Rangi
0d379e9016
Assume clz/ctz argument is nonzero in our fallback implementations
2026-07-21 13:56:57 -04:00
Rangi
b5681c0d34
Set binary or text mode on stdout as well as stdin
2026-07-21 13:39:28 -04:00
Rangi
fa49e238a9
Release v1.0.2
2026-07-20 14:08:09 -04:00
Rangi
cb34fe18f7
Use transparent instead of repeating 0x8000
2026-07-14 10:34:27 -04:00
Rangi
9a15b723f2
Format CGB colors in error/verbose messages as "GB:rr,gg,bb"
...
These should be more debuggable than packed "$xxxx" format.
2026-07-14 10:34:27 -04:00
Rangi
7e2a3491a5
Encapsulate fseek+ftell idiom in seekSize
...
This allows a single check for the return value of `seekSize`
to verify all three `fseek`+`ftell`+`fseek` calls.
2026-07-14 01:32:18 -04:00
Rangi
304cbb464f
Factor out verboseDo to encapsulate magenta output color
2026-07-13 18:05:55 -04:00
Rangi
e9fa1e4e94
Avoid closing stdin/stdout/stderr standard streams
2026-07-13 13:02:46 -04:00
Rangi
d94d0bcc2f
Make explicit the assumption that targetFileName is checked before ever calling printDep
2026-07-07 17:02:46 -04:00
Rangi
21682e8814
Consistently handle negative shifted macro args ( #2014 )
...
Negative macro arguments count from the end, i.e. `\<-1>`
is equivalent to `\<_NARG>`, even after `shift`ing them.
Negative arguments cannot be used to access shifted values.
2026-07-07 02:19:37 -04:00
Rangi
6e643406a2
Refactor warning diagnostic code to reduce repeated output logic
2026-07-04 23:02:16 -04:00
Rangi
c55dec254d
Remove unnecessary const_casting methods
2026-07-04 18:45:41 -04:00
Rangi
0996a2f5ed
Encapuslate UTF-8 decoder state in a struct
2026-07-03 19:35:23 -04:00
Rangi
0b91bf654b
Rename BaseV to ValidBaseV
2026-06-09 17:55:38 -04:00
Rangi42
f72a4d53e2
Add -Wlarge-constant to RGBLINK as it is for RGBASM
2026-06-09 16:16:21 -04:00
vulcandth
998f636495
Fix rgbgfx -Z palette overgeneration on merged color sets ( #1912 )
...
- Fix logic for color set comparison (which affects sorting them)
- Prune color sets which are proper subsets of newly-encountered ones
(a comment implied we were already doing this, but we weren't)
- Add more verbose logging to debug this behavior
2026-06-07 09:55:05 -04:00
Rangi
673c62414f
Use std::string_view keys for UpperMap
...
This avoids constructing temporary `std::string` objects on lookup
2026-05-27 22:01:20 -04:00
Rangi
996469ee28
Ensure CRLF line endings are preserved when necessary
...
Some test cases need CRLF line endings checked out even on Unix.
Also some source files had inadvertently contained CR bytes.
2026-05-25 22:00:45 -04:00
Rangi
55db252a8f
Simplify the lexer by removing BufferedContent and inlining ViewedContent ( #1981 )
...
Instead of reading 64 characters at a time into a rolling buffer
as `shiftChar()` is called, we read 8192 characters at a time into
a complete buffer before any `peek()`/`shiftChar()` operations.
2026-05-25 21:05:59 -04:00
Rangi
cfa0adf295
Intern strings used as identifiers (for labels, constants, macros, charmaps, etc) ( #1980 )
2026-05-25 16:22:29 -04:00
Rangi
ed19806434
Don't hard-code std::string as the key type for InsertionOrderedMap
2026-05-25 14:21:18 -04:00
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
dce14fd4b8
Use C++20 concepts to require constraints on template parameters ( #1977 )
2026-05-22 17:54:34 -04:00
Rangi
728bed39d5
Do not support GCC 9 ( #1978 )
...
This will let us use C++20 features that GCC 9's experimental
C++20 support did not yet cover, such as "concepts".
This reverts some commits:
- 6bcd79b997
- d5ce5329ea
- 728d14879b
2026-05-22 16:46:46 -04:00
Rangi
48fcd9a0ca
Use templates to reduce the redundant number-lexing functions ( #1963 )
2026-05-21 23:13:09 +02:00
Rangi
d56dbbb4bf
Refactor section creation errors, and simplify output for single errors ( #1964 )
2026-05-21 13:01:08 -04: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
ISSOtm
d5ce5329ea
Fix compilation with GCC 9
2026-04-26 23:30:59 +02:00
ISSOtm
6bcd79b997
Revert "Derive operator!= from operator== ( #1660 )"
...
This reverts commit 993879a2ed .
2026-04-26 23:30:59 +02:00
ISSOtm
d054f07703
Fix some truncation warnings
...
Amusingly, reported by MSVC only
2026-03-10 01:31:23 -04:00
Rangi
92bfe5d930
Release v1.0.1
2026-01-01 00:43:43 -05:00
Rangi
b0e0dfc56e
Handle a missing -P/--preinclude file the same as an INCLUDE ( #1873 )
2025-12-08 14:39:34 -05:00
Rangi
33475e2c36
Factor out version-printing to usage.cpp ( #1870 )
2025-12-05 23:04:49 -05:00
Rangi
131bb97ebc
Fix some rgblink object file input bugs found via fuzzing with AFL++ ( #1867 )
...
- ID numbers (for fstack nodes, sections, symbols, patches, etc)
might be too large for their associated collection
- Enum values might be invalid
- Bank values might be out of range for their section types
2025-12-04 20:49: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
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
Rangi42
fb9fa6038c
Release version 1.0.0
2025-10-31 20:19:24 -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
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
f065243cd2
Enable RGBGFX's CLI "at-files" for all programs ( #1848 )
2025-10-22 17:05:59 -04:00
Rangi
7462bccb72
Move struct Palette into its own file ( #1850 )
2025-10-20 16:59:24 -04:00
Rangi
2873e0b8c8
Use musttail attribute to guarantee tail recursion ( #1849 )
2025-10-20 15:56:22 -04:00
Rangi
23b9039716
Give clearer names to template parameters
2025-10-08 14:55:43 -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