Commit Graph

22 Commits

Author SHA1 Message Date
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