From 6272094bc7265262cbca8363b425531ad0170caa Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Tue, 17 Feb 2026 17:18:46 +0100 Subject: Release v0.7.0 (#84) --- CHANGELOG.md | 4 +- LICENSE.md | 2 +- docs/classes/bitflags.html | 2 +- docs/examples/compat.lua.html | 2 +- docs/examples/flag_debugging.lua.html | 2 +- docs/examples/password_input.lua.html | 2 +- docs/examples/read.lua.html | 2 +- docs/examples/readline.lua.html | 2 +- docs/examples/spinner.lua.html | 2 +- docs/examples/spiral_snake.lua.html | 2 +- docs/examples/terminalsize.lua.html | 2 +- docs/index.html | 2 +- docs/modules/system.html | 20 ++++++--- docs/topics/01-introduction.md.html | 2 +- docs/topics/02-development.md.html | 2 +- docs/topics/03-terminal.md.html | 2 +- docs/topics/CHANGELOG.md.html | 20 ++++++++- docs/topics/LICENSE.md.html | 4 +- rockspecs/luasystem-0.7.0-1.rockspec | 85 +++++++++++++++++++++++++++++++++++ src/core.c | 2 +- 20 files changed, 138 insertions(+), 25 deletions(-) create mode 100644 rockspecs/luasystem-0.7.0-1.rockspec diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e83db8..75ab9f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,13 +27,13 @@ The scope of what is covered by the version number excludes: ## Version history -### version x.x.x, unreleased +### version 0.7.0, released 17-Feb-2026 - Fix: remove two unused-variable warnings. See [#78](https://github.com/lunarmodules/luasystem/pull/78). - Fix: duplicate symbol when linking with luajit on windows See [#81](https://github.com/lunarmodules/luasystem/pull/81). -- Fix: fix the display-width functions that occasionally reported a bad width. The source code now +- Feat: fix the display-width functions that occasionally reported a bad width. The source code now includes a code-generator that parses the official Unicode files to create static ranges in the source code. Beyond that the ambiguous width can now be specified by the user, as a second parameter to `utf8cwidth` and `utf8swidth`. diff --git a/LICENSE.md b/LICENSE.md index 4eba941..226cabe 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ # MIT License ### Copyright (c) 2016-2024, Oscar Lim -### Copyright (c) 2024-2025, the luasystem project authors. +### Copyright (c) 2024-2026, the luasystem project authors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/docs/classes/bitflags.html b/docs/classes/bitflags.html index 7637aeb..c03f11f 100644 --- a/docs/classes/bitflags.html +++ b/docs/classes/bitflags.html @@ -298,7 +298,7 @@ return false if the flags are checked.
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/compat.lua.html b/docs/examples/compat.lua.html index ca4e489..f6c7e1e 100644 --- a/docs/examples/compat.lua.html +++ b/docs/examples/compat.lua.html @@ -112,7 +112,7 @@
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/flag_debugging.lua.html b/docs/examples/flag_debugging.lua.html index dba4471..402ee51 100644 --- a/docs/examples/flag_debugging.lua.html +++ b/docs/examples/flag_debugging.lua.html @@ -80,7 +80,7 @@
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/password_input.lua.html b/docs/examples/password_input.lua.html index 342b066..8095acd 100644 --- a/docs/examples/password_input.lua.html +++ b/docs/examples/password_input.lua.html @@ -132,7 +132,7 @@ useful for reading secrets from the user.
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/read.lua.html b/docs/examples/read.lua.html index 4995bda..f5d8fb5 100644 --- a/docs/examples/read.lua.html +++ b/docs/examples/read.lua.html @@ -143,7 +143,7 @@ sys.setnonblock(io
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/readline.lua.html b/docs/examples/readline.lua.html index 493de2c..ff06b99 100644 --- a/docs/examples/readline.lua.html +++ b/docs/examples/readline.lua.html @@ -549,7 +549,7 @@ sys.setconsoleflags(io
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/spinner.lua.html b/docs/examples/spinner.lua.html index 6e2d63a..b9c0856 100644 --- a/docs/examples/spinner.lua.html +++ b/docs/examples/spinner.lua.html @@ -137,7 +137,7 @@ sys.setnonblock(io
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/spiral_snake.lua.html b/docs/examples/spiral_snake.lua.html index 97d5f77..38404c1 100644 --- a/docs/examples/spiral_snake.lua.html +++ b/docs/examples/spiral_snake.lua.html @@ -145,7 +145,7 @@ codes for moving the cursor around.
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/examples/terminalsize.lua.html b/docs/examples/terminalsize.lua.html index d3486bb..4da228a 100644 --- a/docs/examples/terminalsize.lua.html +++ b/docs/examples/terminalsize.lua.html @@ -110,7 +110,7 @@ sys.tcsetattr(io.
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/index.html b/docs/index.html index e901d08..da33fcb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -142,7 +142,7 @@
generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
diff --git a/docs/modules/system.html b/docs/modules/system.html index 0a2447e..2e3ddc0 100644 --- a/docs/modules/system.html +++ b/docs/modules/system.html @@ -206,11 +206,11 @@ Sets the current console output code page (Windows). - utf8cwidth (utf8_char) + utf8cwidth (utf8_char[, ambiguous_width=1]) Get the width of a utf8 character for terminal display. - utf8swidth (utf8_string) + utf8swidth (utf8_string[, ambiguous_width=1]) Get the width of a utf8 string for terminal display. @@ -1248,7 +1248,7 @@ sequences will be buffered internally and returned one byte at a time.
- utf8cwidth (utf8_char) + utf8cwidth (utf8_char[, ambiguous_width=1])
Get the width of a utf8 character for terminal display. @@ -1260,6 +1260,11 @@ sequences will be buffered internally and returned one byte at a time. string or int the utf8 character, or unicode codepoint, to check, only the width of the first character will be returned +
  • ambiguous_width + int + the width to return for ambiguous width characters (usually 1 or 2) + (default 1) +
  • Returns:

    @@ -1286,7 +1291,7 @@ sequences will be buffered internally and returned one byte at a time.
    - utf8swidth (utf8_string) + utf8swidth (utf8_string[, ambiguous_width=1])
    Get the width of a utf8 string for terminal display. @@ -1298,6 +1303,11 @@ sequences will be buffered internally and returned one byte at a time. string the utf8 string to check +
  • ambiguous_width + int + the width to return for ambiguous width characters (1 or 2) + (default 1) +
  • Returns:

    @@ -1518,7 +1528,7 @@ This function will sleep, without doing a busy-loop and wasting CPU cycles.
    generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
    diff --git a/docs/topics/01-introduction.md.html b/docs/topics/01-introduction.md.html index 264aa71..0723af1 100644 --- a/docs/topics/01-introduction.md.html +++ b/docs/topics/01-introduction.md.html @@ -84,7 +84,7 @@ independence.

    generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
    diff --git a/docs/topics/02-development.md.html b/docs/topics/02-development.md.html index 15efe55..b2a9833 100644 --- a/docs/topics/02-development.md.html +++ b/docs/topics/02-development.md.html @@ -84,7 +84,7 @@ pass locally, and do not rely on CI only.

    generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
    diff --git a/docs/topics/03-terminal.md.html b/docs/topics/03-terminal.md.html index 27772ac..272d124 100644 --- a/docs/topics/03-terminal.md.html +++ b/docs/topics/03-terminal.md.html @@ -220,7 +220,7 @@ For an example see examples/
    generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
    diff --git a/docs/topics/CHANGELOG.md.html b/docs/topics/CHANGELOG.md.html index 9603abd..318c020 100644 --- a/docs/topics/CHANGELOG.md.html +++ b/docs/topics/CHANGELOG.md.html @@ -106,6 +106,24 @@

    Version history

    +

    version 0.7.0, released 17-Feb-2026

    + +
      +
    • Fix: remove two unused-variable warnings. + See #78.
    • +
    • Fix: duplicate symbol when linking with luajit on windows + See #81.
    • +
    • Feat: fix the display-width functions that occasionally reported a bad width. The source code now + includes a code-generator that parses the official Unicode files to create static ranges in the + source code. Beyond that the ambiguous width can now be specified by the user, as a second parameter + to utf8cwidth and utf8swidth. + See #82.
    • +
    • Chore: added Lua 5.5 to CI matrix. + See #79.
    • +
    • Chore: relax test assertion wrt time. + See #80.
    • +
    +

    version 0.6.3, released 11-Jul-2025

      @@ -234,7 +252,7 @@
      generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
      diff --git a/docs/topics/LICENSE.md.html b/docs/topics/LICENSE.md.html index c0b9b93..c417973 100644 --- a/docs/topics/LICENSE.md.html +++ b/docs/topics/LICENSE.md.html @@ -69,7 +69,7 @@

      MIT License

      Copyright (c) 2016-2024, Oscar Lim

      -

      Copyright (c) 2024-2025, the luasystem project authors.

      +

      Copyright (c) 2024-2026, the luasystem project authors.

      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -94,7 +94,7 @@ SOFTWARE.

      generated by LDoc 1.5.0 -Last updated 2025-07-11 22:55:05 +Last updated 2026-02-17 17:18:04
      diff --git a/rockspecs/luasystem-0.7.0-1.rockspec b/rockspecs/luasystem-0.7.0-1.rockspec new file mode 100644 index 0000000..0c39c16 --- /dev/null +++ b/rockspecs/luasystem-0.7.0-1.rockspec @@ -0,0 +1,85 @@ +local package_name = "luasystem" +local package_version = "0.7.0" +local rockspec_revision = "1" +local github_account_name = "lunarmodules" +local github_repo_name = "luasystem" + + +package = package_name +version = package_version.."-"..rockspec_revision + +source = { + url = "git+https://github.com/"..github_account_name.."/"..github_repo_name..".git", + branch = (package_version == "scm") and "master" or nil, + tag = (package_version ~= "scm") and "v"..package_version or nil, +} + +description = { + summary = 'Platform independent system calls for Lua.', + detailed = [[ + Adds a Lua API for making platform independent system calls. + ]], + license = 'MIT ', + homepage = "https://github.com/"..github_account_name.."/"..github_repo_name, +} + +dependencies = { + 'lua >= 5.1', +} + +local function make_platform(plat) + local defines = { + linux = { }, + unix = { }, + macosx = { }, + win32 = { "WINVER=0x0600", "_WIN32_WINNT=0x0600" }, + mingw32 = { "WINVER=0x0600", "_WIN32_WINNT=0x0600" }, + } + local libraries = { + linux = { "rt" }, + unix = { }, + macosx = { }, + win32 = { "advapi32", "winmm", "bcrypt" }, + mingw32 = { }, + } + local libdirs = { + linux = nil, + unix = nil, + macosx = nil, + win32 = nil, + mingw32 = { }, + } + return { + modules = { + ['system.core'] = { + sources = { + 'src/core.c', + 'src/compat.c', + 'src/time.c', + 'src/environment.c', + 'src/random.c', + 'src/term.c', + 'src/bitflags.c', + 'src/wcwidth.c', + }, + defines = defines[plat], + libraries = libraries[plat], + libdirs = libdirs[plat], + }, + }, + } +end + +build = { + type = 'builtin', + platforms = { + linux = make_platform('linux'), + unix = make_platform('unix'), + macosx = make_platform('macosx'), + win32 = make_platform('win32'), + mingw32 = make_platform('mingw32'), + }, + modules = { + ['system.init'] = 'system/init.lua', + }, +} diff --git a/src/core.c b/src/core.c index 34e19d8..3fdca45 100644 --- a/src/core.c +++ b/src/core.c @@ -4,7 +4,7 @@ #include #include -#define LUASYSTEM_VERSION "LuaSystem 0.6.3" +#define LUASYSTEM_VERSION "LuaSystem 0.7.0" #ifdef _WIN32 #define LUAEXPORT __declspec(dllexport) -- cgit v1.2.3-55-g6feb