Rangi
43ffc89bb4
Correct comment SIZE_MAX to UINT16_MAX
2026-05-25 13:55:12 -04:00
Rangi
72a410c007
Encapsulate charmap_Init, like sym_Init
2026-05-25 13:54:26 -04:00
Rangi
090768e2c9
Some Expansion references can be const
2026-05-23 13:06:09 -04:00
Rangi42
5f2ee530b8
Pass -Wno-unused-but-set-variable by default, not just in make develop
...
The Bison-generated parser skeleton otherwise triggers this warning
with Apple clang++ for `yynerrs_`.
2026-05-23 01:40:13 -04:00
Rangi
ef2f021892
Simplify sectError handling, without the need for an empty-string sentinel
...
The `errorNoTrace` case for the empty-string sentinel was unreachable,
so we can just have a `fatalNoTrace` error right away.
2026-05-22 18:17:25 -04:00
Rangi
728d14879b
Consistently use -std=c++2a, not -std=c++20
...
Commit 63a911e657 switched
to `-std=c++20` since at the time we required GCC 10 or higher.
Commit d5ce5329ea partially reverted
to `-std=c++2a` since we once again support GCC 9, which did not
yet handle `std=c++20`.
2026-05-20 17:09:23 -04:00
Rangi
42e3da837c
Comment the commands to use for profiling and code coverage
2026-05-09 20:52:45 -04:00
Rangi42
f0161b41c8
Update readHexNumber for consistency with other routines
2026-04-29 12:31:00 +02:00
Rangi42
ca23210f18
Refactor and rename some numeric literal lexing for asm and linkerscript consistency
2026-04-29 12:15:14 +02:00
Rangi42
85e044f5be
Use std::move when relevant in Token constructor
2026-04-28 13:32:45 +02:00
Rangi42
60e76b2da4
Avoid UB if new OOMs by removing std:nothrow
2026-04-28 13:28:32 +02:00
Rangi42
3c7488c131
Some refactoring, renaming, and debug assertions for clarity and safety
...
- Add more `assume()` checks in the lexer
- Replace double negative "`disable* = false`" with "`enable* = true`"
- Naming convention of "`std::deque<> *Stack`" when relying on
`.push_front()` and `.pop_back()`
2026-04-27 18:47:06 +02:00
Rangi42
9fd0c0297f
Fix invalid character in bracketed macro argument
...
The invalid character should not be consumed by `shiftChar()`.
2026-04-27 17:11:20 +02:00
Rangi42
c1c7e64249
Add two assume calls to verify lexer arguments
2026-04-27 15:35:10 +02:00
Rangi42
a18b2f1049
Consistently lex local labels after keywords, even when skipping/capturing
2026-04-27 15:28:30 +02:00
Rangi42
3f144b7713
Add test case for local labels after block-ending keywords
2026-04-27 15:04:12 +02:00
Rangi42
eeb3a73210
Small optimization to skipToLeadingKeyword
2026-04-27 14:26:47 +02:00
Rangi42
0553491107
Replace a FIXME comment with an explanation of why we can't/won't "fix" it
2026-04-20 14:51:38 +02:00
Rangi42
12186fdccc
Keep more non-declaration initialization within the for loop clause
2026-04-19 22:01:56 +02:00
Rangi
71dfab3365
Use charmapEntry to simplify charmap_HasChar
2026-04-17 15:39:30 -04:00
Rangi
20b11039c9
Keep trie edges sorted for O(log N) lookup
2026-04-17 15:39:30 -04:00
Rangi
eb9e9c0f33
Replace charmaps' fixed-size 256-value array with a vector of pairs
...
This should save memory at the cost of O(n) instead of O(1) access,
which should be okay because the `next` vector is generally small.
2026-04-17 15:39:30 -04:00
Rangi
ac2a022124
Set the Cygwin shell once as a default for its job
2026-04-15 23:54:12 -04:00
Rangi
1249c4ef58
Revert "Set up Cygwin before cloning our repo"
...
This reverts commit aeedfb35a6 .
2026-04-15 21:53:29 -04:00
Rangi
b3c3981a90
Use a separate CI step to install clang-format before running it
...
Also use short `-Yqu` flags like our other invocations
2026-04-15 20:12:48 -04:00
Rangi
73941c3249
Add .git-blame-ignore-revs as a blame.ignoreRevsFile
2026-04-13 13:26:29 -04:00
Rangi42
7596ae67b5
Fix internal link to docs/CONTRIBUTING.md
2026-04-13 02:34:46 -04:00
Rangi
fc08ab6aee
Print a GitHub Actions error annotation if install_deps.sh fails
...
See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-an-error-message
2026-04-13 02:04:56 -04:00
Rangi
c7663423d6
Update our Dockerfile to base on Debian 13 slim
2026-04-12 22:36:41 -04:00
Rangi
1ff73cd5e0
Revert "Stop trying to explicitly install pkg-config in CI ( #1940 )"
...
This reverts commit bc3572ec37 .
Turns out that our Dockerfile *does* need to install `pkg-config`
on the `debian:12-slim` image.
2026-04-12 22:33:25 -04:00
Rangi
49a4da2235
Revert "Generate Bison output in CMake build tree"
...
This reverts commit 4577ff16bc .
2026-04-10 17:18:40 -04:00
Rangi
2cfb2b2533
Remove the claim that only exported symbols appear in sym and map files
...
Fixes #1916
This claim was true in v0.4.2, but intentionally changed in v0.5.0.
rgblink(1) already explains that "all visible labels and exported numeric constants"
will appear, which is a more appropriate location than rgbasm(5).
2026-04-09 21:28:07 -04:00
Rangi
187e1a55b8
Add examples for using character literals instead of strings as numbers
...
Fixes #1890
2026-04-08 21:42:10 -04:00
Rangi
6e13779b8b
Use C++-sryle static_cast, not C-style explicit cast
...
`uint32_t(param)` is actually functional notation of explicit casting,
not a direct constructor call. `uint32_t{param}` would be uniform
initialization syntax for a constructor call, but would not allow
narrowing from `uint64_t`. See issue #1904 for discussion.
2026-04-08 20:05:36 -04:00
Rangi
25bf0e9e2c
SOURCE_DATE_EPOCH must be in base 10
2026-03-30 21:31:37 -04:00
Rangi
4ce4162da4
A little .yml cleanup
2026-03-30 20:29:06 -04:00
Rangi
18b074711e
Fix rgbasm -s not overriding a previous -s
2026-03-30 20:18:19 -04:00
Rangi
efd4373a56
Check for a SDAS "Def" or "Ref" line before reading a subsequent integer
...
Without checking `token[0]` through `token[2], `readInt` starting at
`&token[3]` could go out of bounds on a badly-formed SDAS .rel object file
2026-03-30 19:45:44 -04:00
Rangi
92a31ff7df
Correct list numbering
2026-03-30 19:23:42 -04:00
Rangi42
919a5dba89
Correct CONTRIBUTING.md to accurately describe test/fetch-test-deps.sh
2026-03-23 11:13:23 -04:00
Rangi
65b0b49720
Update zlib to 1.3.2
...
Note that the DLL name created by CMake with `BUILD_SHARED_LIBS`
has changed from `zlib1.dll` to `z.dll`. This was caused by the
"Continued rewrite of CMake build [Vollstrecker]" from its
changelog <https://zlib.net/ChangeLog.txt >, and has been reported
in <https://github.com/madler/zlib/issues/1181 >.
The MinGW package `libz-mingw-w64-dev` still calls it `libz1.dll`.
2026-03-06 22:28:09 -05:00
Rangi
48d58ba095
Pass -Wdangling-alias to Bison 3.5 or newer
...
`bison -Wall` enables all diagnostics except `-Wcounterexamples`
(added in 3.7; we already pass it), `-Wyacc` (which we do not need),
and `-Wdangling-alias` (added in 3.5).
2026-03-06 22:28:09 -05:00
Rangi
af0505b4cd
Explicitly clarify that SECTION(@) returns the name of the current section
2026-02-06 19:37:49 -05:00
Rangi
d053025070
Avoid writing "XXX" since it's a conventional "TODO/FIXME" comment
2026-01-22 13:01:10 -05:00
Rangi
ade898d815
List -B in rgbgfx options
2026-01-13 09:46:33 -05:00
Rangi
e738b90c69
Refactor to combine similar functions into one
2026-01-07 16:36:04 -05:00
Rangi
a91d26192d
Fix SECTION UNION alignment depending on piece order
2026-01-07 16:36:04 -05:00
Rangi
92bfe5d930
Release v1.0.1
2026-01-01 00:43:43 -05:00
Rangi
9b22ff3491
Fix link in man page
2025-12-12 18:25:47 -05:00
Rangi
a4af81f250
Fix two "Using a macro as first argument cancels effect of .Li" man page warnings
...
These were observed in https://udd.debian.org/lintian/?packages=rgbds
and can be reproduced by running:
for f in man/*; do
echo $f
LC_ALL=C.UTF-8 MANROFFSEQ='' MANWIDTH=120 \
man --warnings -E UTF-8 -l -Tutf8 -Z "$f" >/dev/null
done
2025-12-12 12:31:03 -05:00
Rangi
d4e0ca5f90
Update libpng to 1.6.53
2025-12-11 11:48:18 -05:00
Rangi42
27dca5680c
Fix formatting typo in man/rgbasm-old.5
2025-12-09 10:33:24 -05:00
Rangi
c8161be23a
Add missing SPDX-License-Identifier: MIT comments
2025-12-05 22:41:12 -05:00
Rangi
2c5c453ab8
Refactor FileStackNode::printBacktrace from recursive to iterative
...
This avoids a potential stack overflow for very long backtraces,
or for corrupt object files with cyclic backtraces
2025-12-05 22:41:12 -05:00
Rangi
c3e245c13e
Correct typo in rgbds(5)
2025-12-05 22:39:30 -05:00
Rangi
1c00123b33
Add missing return 0; to rgblink main()
2025-12-04 21:06:46 -05:00
Rangi
8d6c617875
Use 4 spaces per tab in LCOV coverage report
2025-12-04 17:56:16 -05:00
Rangi42
752e2b3620
Symbol names with more than two '.'s could be defined as constants
...
Dot-only names could also trip an assertion in `make develop`
when used as labels
2025-12-04 15:15:41 -05:00
Rangi42
ad3188f038
Fix garbage characters at EOF causing an infinite loop
2025-12-04 15:15:41 -05:00
Rangi
1eb4eb3339
Reuse the usage.name for printing version info
2025-11-18 22:32:45 -05:00
Rangi
a3d3e1525a
Fix RGBLINK object type detection
2025-11-18 22:01:43 -05:00
Rangi
3553c9c4da
Fix RGBLINK evaluation of undefined RPN symbols
...
This was the only RPN case to not assign a deliberate value
in all possible branches.
Fixes #1858
2025-11-18 16:40:24 -05:00
Rangi
5c2c893ced
Refactor getSectionDescription in src/link/assign.cpp
2025-11-16 17:37:01 -05:00
Rangi
04e3a904c2
Avoid calling style_Set/Reset before strerror(errno),
...
since they may call `isatty` which can change `errno`
Fixes #1857
2025-11-08 12:06:16 -05:00
Rangi
395b03e88e
Disallow SECTION UNION for ROM sections
...
Fixes #1855
2025-11-07 11:38:06 -05:00
Rangi42
fb9fa6038c
Release version 1.0.0
2025-10-31 20:19:24 -04:00
Rangi42
558d3ca0fc
Disallow labels before ENDC
2025-10-31 18:21:59 -04:00
Rangi42
df5162edca
Use loops instead of tail calls and musttail
...
gcc 15.2.1 20250813 complains "address of automatic variable can
escape to `musttail` call" from `-Wmaybe-musttail-local-addr`,
and guaranteeing tail-call optimization cross-platform is more
trouble than it's worth.
2025-10-27 12:05:27 -04:00
Rangi42
2519d1e698
Mention REDEF and FOR regarding EQUS expansion
...
Fixes #1851
2025-10-27 10:54:16 -04:00
Rangi42
ca383c91ca
Revert "More accurate 8-bit <=> 5-bit RGB color conversion ( #1827 )"
...
This reverts commit 223b3d1921 .
2025-10-24 13:32:59 -04:00
Rangi
8bedd710d7
Simplify musl's getopt, including removing optind, optopt, opterr, idx, and longonly
2025-10-23 13:39:28 -04:00
Rangi
efb5a88edb
Show conventional colored "error:"/"FATAL:" for CLI option errors
2025-10-23 12:40:29 -04:00
Rangi
a0bb830679
More consistent man page descriptions for CLI options
2025-10-22 14:48:24 -04:00
Rangi
7654c6e27a
More consistent man page descriptions for warning diagnostics
2025-10-22 14:03:34 -04:00
Rangi
400375b2e5
Share some handling between two tests of rgbasm -M -
2025-10-20 20:57:48 -04:00
Rangi
1badba03d8
Clean up some #define callables
...
These are used where anonymous functions would not be sufficient
2025-10-13 13:14:49 -04:00
Rangi42
64bcef99bd
Lower default -Wtrunction= level to 1
2025-10-13 11:48:33 -04:00
Rangi42
aa672bbec9
Rephrase PURGE documentation and raise the default level to 2
...
Fixes #1847
2025-10-13 11:43:29 -04:00
Rangi42
651877e094
Avoid reusing a static local variable (too fragile)
2025-10-08 21:19:23 -04:00
Rangi
26c48cc409
Add RGBGFX test for libpng warning with invalid bKGD chunk
2025-10-08 15:44:15 -04:00
Rangi
23b9039716
Give clearer names to template parameters
2025-10-08 14:55:43 -04:00
Rangi
711fba5e35
Add more tests for things that only the external tests had covered
2025-10-08 13:32:48 -04:00
Rangi
089fc11e31
A local label starting with a keyword (e.g. jr.local) is an error
2025-10-08 12:23:08 -04:00
Rangi42
837f552987
Fix bank increment never happening due to unsigned overflow
2025-10-07 16:20:24 -04:00
Rangi
cb8c973453
Add test for undefined __SCOPE__
2025-10-06 17:51:21 -04:00
Rangi
cca3794dd0
Mention libpng in its internal warning and error messages
2025-10-06 17:03:51 -04:00
Rangi
02c2408f58
Implement reversed template for reversing for-each loops
2025-10-06 16:50:47 -04:00
Rangi
fba0562650
Fix repeated REPT nodes in backtraces
2025-10-06 16:36:55 -04:00
Rangi
0c9920d4a6
Use C++ iterator for fragment/union "pieces" of RGBLINK sections
2025-10-05 15:07:25 -04:00
Rangi
13e85b5151
Replace all ctype.h functions with locale-independent ones
2025-10-03 12:52:24 -04:00
Rangi
268b586c9d
Release v1.0.0-rc2
2025-09-30 18:56:00 -04:00
Rangi
85d3b5df58
Add more RGBFIX tests
2025-09-30 18:20:53 -04:00
Rangi
eea277ae9c
Add more tests for RGBFIX
2025-09-29 22:43:16 -04:00
Rangi
538395b92c
Prevent simple syntax highlighters from breaking on /* in a string
2025-09-29 11:11:40 -04:00
Rangi
3108fb5297
Rename gbz80.7 "CPU opcode reference" to "Game Boy CPU instruction reference"
2025-09-28 16:43:36 -04:00
Rangi42
f99591bf6f
Link FORCE_COLOR and NO_COLOR
2025-09-25 14:06:44 -04:00
Rangi42
0297da4d4c
Add more tests for RGBASM coverage
2025-09-25 13:30:30 -04:00
Rangi42
96b953fe51
Add a test case for overlapping IF/ENDC and REPT/ENDR
...
This trips an asserton in the Rust rewrite because of its different
conditional stack design
2025-09-25 11:57:56 -04:00
Rangi42
0670c03bc2
Add CLI tests for RGBASM
2025-09-25 11:57:56 -04:00
Rangi42
09ef5b7e06
Refactor error fix suggestions in fstk_RunMacro
2025-09-24 19:35:41 -04:00