Commit Graph

14 Commits

Author SHA1 Message Date
Rangi
13e85b5151 Replace all ctype.h functions with locale-independent ones 2025-10-03 12:52:24 -04:00
Rangi
eea277ae9c Add more tests for RGBFIX 2025-09-29 22:43:16 -04:00
Rangi42
d5bb462f25 Separate isLetter into isUpper and isLower 2025-09-24 19:19:50 -04:00
Rangi
634fd853d1 Factor out a single parseNumber utility function (#1839) 2025-09-22 15:15:24 -04:00
Rangi
3d155d5695 Some refactoring and cleanup (#1806)
* Use clang-tidy `misc-include-cleaner` for IWYU `#include` cleanup

* Use `std::optional<size_t>` instead of `ssize_t`

* Rename some functions in linkdefs.hpp

* Fix header order
2025-08-20 16:09:04 -04:00
Rangi42
386fb5f398 Add more character utility functions 2025-08-19 19:17:40 -04:00
Rangi
db6793f444 Don't count single quote ' as garbage (#1801)
Also copy the "blank space" (space or tab) vs "whitespace" (space,
tab, or newline) convention from `<ctype.h>`
2025-08-14 10:10:59 -04:00
Rangi
7b405513d9 Make quote marks consistent in error/warning messages (#1791)
- "Double quotes" for strings (filenames, section names, CLI option arguments, etc)
- 'Single quotes' for characters and CLI option flags
- `Backticks` for keywords and identifiers (symbol names, charmap names, etc)

CLI option flags also have their leading dashes
2025-08-12 15:24:21 -04:00
Rangi
23ce888d65 Use colored/styled text output for diagnostics and usage info (#1775) 2025-08-04 17:02:24 -04:00
Rangi42
8b1a5244f7 Avoid hard-coding a redundant "FATAL:" in RGBFIX 2025-07-27 19:35:08 -04:00
Rangi42
3bc8b1ff7c Handle unknown MBCs, since raw numeric values are accepted 2025-07-26 14:15:05 -04:00
Rangi42
aa46c79db6 Use unordered_map lookups instead of manual switches for MbcType data 2025-07-26 13:30:56 -04:00
Rangi42
ac632d9223 RGBFIX returns 1 if there was a -Werror before processing any files 2025-07-26 12:29:57 -04:00
Rangi
0df5b7b86d Implement warning diagnostic flags for RGBFIX (#1766)
* Implement warning diagnostic flags for RGBFIX

* `-m/--mbc-type help` prints to stdout

* Support `-m list` as well as `-m help`

* Make invalid `rgbfix -l` characters a fatal error, like other invalid CLI arguments

* Refactor fix/main.cpp into multiple files
2025-07-26 12:11:52 -04:00