Rangi
3feb75f84f
Implement new string functions ( #1655 )
...
`STRFIND`, `STRRFIND`, `STRCHAR`, `STRSLICE`, `CHARCMP`, `CHARSIZE`, and `REVCHAR`
2025-02-14 23:09:45 +01:00
Rangi42
48412e9c56
Some miscellaneous refactoring and copy-editing
2025-02-10 16:51:51 +01:00
Rangi
44caffe04a
Fix CHARLEN and CHARSUB on invalid UTF-8 ( #1630 )
2025-01-28 02:01:18 -05:00
Rangi42
e49291b7cf
Refactor readUTF8Char into charmap_ConvertNext
2025-01-28 00:07:08 -05:00
Rangi42
cae31005f8
Always use braces with InsertBraces: true in .clang-format
2025-01-27 20:12:12 -05:00
Rangi42
b8b60207f5
Use // line comments not /* block comments
2025-01-27 20:12:12 -05:00
Rangi42
a354af3d08
Reformat source files with clang-format 19.1.7
2025-01-27 20:12:12 -05:00
Rangi42
fac5e35d24
Prefer empty braces to semicolons for empty loop bodies
2025-01-17 00:20:33 -05:00
Sylvie
b877c81c32
Use C++-style casts ( #1576 )
2024-12-09 21:56:54 -05:00
Rangi42
a27f704c25
Implement -Wunmatched-directive
2024-11-28 20:30:38 +01:00
Sylvie
2fb76ce584
Traverse the charmap trie to reconstruct mappings instead of saving them ( #1487 )
2024-09-01 15:22:56 +02:00
Rangi42
26fcff831d
Run clang-format
2024-08-27 01:49:05 -04:00
Sylvie
44332ff4be
Charmaps cannot map an empty string ( #1486 )
2024-08-22 13:21:16 -04:00
Rangi42
c42e856efb
Fix charmap state output for inherited characters
2024-08-09 22:13:43 -04:00
Sylvie
f304e1dd7f
Implement state file output for RGBASM ( #1435 )
2024-08-05 12:41:40 -04:00
Sylvie
9a5b3f0902
Implement multi-value charmaps ( #1429 )
2024-08-04 23:32:08 +02:00
Rangi42
4e0f794c23
More refactoring and renaming
2024-07-26 20:12:51 -04:00
Sylvie
623c3f662c
Allow NUL characters in strings ( #1405 )
2024-06-18 14:26:18 -04:00
ISSOtm
e5078aba3b
Clean up #includes
...
Remove unused headers, and avoid relying on transitive inclusions
`include-what-you-use` has been very useful for this!
2024-03-28 01:25:38 +01:00
Rangi42
91164ac1b0
Pass std::string references to charmap functions
2024-03-18 14:42:05 -04:00
Rangi42
a14de10e28
Use std::unordered_map for charmaps
2024-03-16 11:13:14 -04:00
Sylvie
17444e825a
Reduce the header declarations ( #1342 )
...
- Since we have style rules to include foo.hpp at the top of its
corresponding foo.cpp, this takes any headers included by foo.hpp
as being also guaranteed for foo.cpp.
- Use C-style <foo.h> instead of <cfoo>, since the latter only
guarantees putting symbols in the `std` namespace, which we are
not using for C functions (e.g. `printf` not `std::printf`).
- Remove now-unused `__PRETTY_FUNCTION__` reporting
2024-03-09 14:55:39 -05:00
Rangi42
e5b7e65e91
Use std::nothrow from <new> with every new allocation
2024-03-07 09:56:15 -05:00
Rangi42
053aa80951
Improve some const correctness in RGBASM
2024-03-06 13:53:03 -05:00
Sylvie
e74073e480
Run clang-format on everything ( #1332 )
2024-03-04 14:22:49 -05:00
Rangi42
277ea9be28
Replace RGBASM non-null pointers with references
2024-03-03 00:57:03 -05:00
Rangi42
dbcb82799e
Use std::vector for capture buffer
2024-03-02 06:46:11 -05:00
Rangi42
e14ba664ea
Remove redundant (void) parameter declarations
2024-03-01 10:41:47 -05:00
Sylvie
043db49676
Replace NULL with nullptr ( #1321 )
2024-02-29 15:06:33 -05:00
Sylvie
eff8c324c8
Remove now-unnecessary struct keyword ( #1320 )
...
C++ acts like structs are `typedef`ed by default
We do have to keep `struct stat`, since there's ambiguity
with the function also called `stat`.
2024-02-29 14:41:58 -05:00
Rangi42
a24df27cd8
Use std::vector for charmap output
2024-02-29 13:44:08 -05:00
Rangi42
a4ed7e1d18
Use automatic allocation for charmaps
2024-02-29 13:44:08 -05:00
Rangi42
95e7dac9a6
Use std::map for rgbasm charmaps
2024-02-29 13:44:08 -05:00
Rangi42
52c80c2740
Use std::stack for charmaps
2024-02-29 13:44:08 -05:00
Sylvie
595c066c2a
Remove #include <stdbool.h> ( #1317 )
2024-02-24 10:51:46 -05:00
Sylvie
c0d534f5ad
No more flexible array members (not standard C++) ( #1307 )
...
* Replace FAMs with `std::vector`s (or one `std::string`) in four `struct`s
* Anonymous types declared in an anonymous union are also non-standard
Only Clang complains about this (-Wnested-anon-types)
2024-02-22 16:22:37 -05:00
Rangi42
ee59f17ea1
Free all the charmaps after parsing
2024-02-19 09:00:15 -05:00
Sylvie
a02687a83e
Fix behavior of non-ASCII bytes with INCHARMAP ( #1308 )
2024-02-19 08:09:55 +01:00
Rangi42
3860ab11c7
Reformat some deeply-indented lines
2024-02-18 18:14:13 -05:00
Eldred Habert
fd78a9ae83
Port linkerscript parser to Bison ( #1266 )
...
Notable side effects:
* Use the standard-conformant MSVC preproc
* Add test for linker script INCLUDE
* Improve wording of placement conflict errors
* Fix errors from not newline-terminated files
* Teach checkdiff about the linker script doc
* Call linker script "commands" "directives" instead
---------
Co-authored-by: Rangi42 <remy.oukaour+rangi42@gmail.com >
2023-12-11 02:29:37 +01:00
Rangi
cee3d1c859
Add more test coverage for RGBASM ( #1256 )
...
This also fixes two bugs: `-1 >>> 32` was -1 not 0, and `macro_FreeArgs` should have been called but wasn't.
2023-11-29 15:16:05 -05:00
Rangi
1e70e703a7
Build everything as C++ ( #1176 )
2023-11-07 21:45:56 +01:00