Commit Graph

  • a40d599cd7 Fix extraneous comma in error message ISSOtm 2019-11-04 01:20:23 +01:00
  • babf36e96e Don't forget to initialize additional banks when using an overlay ISSOtm 2019-11-04 01:16:08 +01:00
  • d6a43f6a53 Fix RGBGFX man page - Add color curve option to synopsis - Fix ordering of -d'd description ISSOtm 2019-11-03 21:21:35 +01:00
  • ff8e38fcc6 Merge pull request #441 from ISSOtm/linker_error_stack Eldred Habert 2019-11-03 16:41:09 +01:00
  • 192f2de704 Merge pull request #440 from ISSOtm/nested_brackets Eldred Habert 2019-11-03 16:40:34 +01:00
  • c568b3a976 Merge pull request #439 from ISSOtm/tests_locale Eldred Habert 2019-11-03 16:30:38 +01:00
  • 9c818ef3e1 Merge pull request #438 from ISSOtm/sub_doc_fix Eldred Habert 2019-11-03 16:18:09 +01:00
  • 5aea30f40d Merge pull request #434 from ISSOtm/rgblink_rewrite Eldred Habert 2019-11-03 16:15:37 +01:00
  • 09c9395ff8 Fix NULL deref when fetching an unknown symbol in RPN expressions was being overwritten with the result, so was meaningless. Using a temporary instead is better. ISSOtm 2019-10-13 15:17:34 +02:00
  • 81047afb4b Rework "overflow" error message ISSOtm 2019-10-13 11:50:51 +02:00
  • f1441cc962 Make linker script error messages more descriptive Provide file names when appropriate, print memory locations in hex ISSOtm 2019-10-12 22:16:30 +02:00
  • 50804d661a Fix linkerscript not updating section categorization ISSOtm 2019-10-11 19:03:03 +02:00
  • 9b895e8a0a Fix bank-fixed sections going in any bank ISSOtm 2019-10-11 19:02:01 +02:00
  • 4600f70fef Fix address-fixed sections potentially incorrectly assigned This happened if all space before their fixed location was taken ISSOtm 2019-10-11 19:00:57 +02:00
  • 9e33cc998f Implement INCLUDE keyword in linker scripts ISSOtm 2019-10-11 18:54:25 +02:00
  • 5496c2e76f Make linkerscript errors report file names ISSOtm 2019-10-11 09:21:14 +02:00
  • bf75971a3a Only open files when necessary ISSOtm 2019-10-11 09:04:50 +02:00
  • 8a59994c0d Fix false positives in readstr Reading the byte EOF & 0xFF would cause an incorrect termination ISSOtm 2019-10-11 01:00:13 +02:00
  • f2e1b7d868 Add EOF checking in string reading Fixes rednex/#422 ISSOtm 2019-10-09 15:05:54 +02:00
  • 8c91b31ae6 Fix typo that led to segfault ISSOtm 2019-10-02 14:22:27 +02:00
  • 302b210470 Fix error in object file documentation ISSOtm 2019-10-02 13:55:32 +02:00
  • 5bd0076233 Write some doc comments ISSOtm 2019-10-02 13:55:19 +02:00
  • 0e24adcafd Rewrite RGBLINK entirely The goal was to improve readability, but along the way a few things were gained. - Sorted sym and map files - Infrastructure for supporting multiple .o versions - Valgrind-proof, as far as my testing goes anyways - Improved verbosity messages - Added error checking - Performance improvements, see end of commit message ISSOtm 2019-09-19 14:27:37 +02:00
  • 696feae32e Have RGBDS' err and warn output an error message The stdlib functions specify the difference between err and errx is that the former prints a message obtained with strerror. However, RGBDS' implementation breaks that contract, and warn's puts the added semicolon in the wrong place. ISSOtm 2019-09-12 22:08:04 +02:00
  • 323738e7b8 Increase version number to 0.3.9 v0.3.9 ISSOtm 2019-11-01 17:38:43 +01:00
  • a1d132cd35 Regenerate wwwman ISSOtm 2019-11-01 17:35:46 +01:00
  • f7c2665e14 Fix errors in make develop ISSOtm 2019-10-30 13:34:21 +01:00
  • ae0b95ec6d Make linker output error stacks instead of their top level ISSOtm 2019-10-11 17:12:18 +02:00
  • cdd8200936 Add test for nested brackets ISSOtm 2019-10-10 15:00:59 +02:00
  • 694075e840 Allow nested bracketed symbols Fixes #320 ISSOtm 2019-10-10 14:58:17 +02:00
  • d76f994318 Run tests under a specific locale Fixes #427 ISSOtm 2019-10-10 13:23:36 +02:00
  • 11b7052f94 Fix flag documentation for sub, sbc and cp ISSOtm 2019-10-10 01:01:21 +02:00
  • e93d65d736 Merge pull request #425 from ISSOtm/eexpansion_error Eldred Habert 2019-10-03 10:20:49 +02:00
  • 0f4d543aeb Have make clean delete all .o files in source directory This will work better if files are rearranged in the future. This appears to be POSIX-compliant, so why wasn't it used earlier? ISSOtm 2019-09-25 03:17:36 +02:00
  • dab5f59ed9 Fix location of all relevant SECTIONs in tests If section placement is changed such that those are no longer guaranteed to be placed at zero, tests would break when they shouldn't. ISSOtm 2019-09-23 01:28:48 +02:00
  • 22a6a82642 Merge pull request #419 from dbrotz/fix-blackslash-tab-at-eof Eldred Habert 2019-09-23 00:05:21 +02:00
  • 7b592eff8a Merge pull request #420 from dbrotz/disallow-null-char Eldred Habert 2019-09-22 02:43:06 +02:00
  • 4be81d9ffd Merge pull request #416 from ISSOtm/makefile Eldred Habert 2019-09-22 01:55:51 +02:00
  • 55fbecee49 Add info about string expansions in error reports This is especially useful when an EQUS expands to another one, to help track them. This is done separately from the file stack as the EQUS stack is separate (which is itself because EQUS are managed *way* differently). ISSOtm 2019-09-12 09:57:01 +02:00
  • f36a3d5b2a Fix macro and rept buffer overflows Macro and rept buffers were not always being terminated with newlines and/or were vulnerable to the final newline being escaped, allowing buffer overflows to occur. Now, they are terminated with newlines using the same mechanism as the file buffer. dbrotz 2019-09-10 03:03:04 -07:00
  • c5e8e4ff83 Reject input that contains null characters Null characters in the middle of strings interact badly with the RGBDS codebase, which assumes null-terminated strings. There is no reason to support null characters in input source code, so the simplest way to deal with null characters is to reject them early. dbrotz 2019-09-09 17:27:56 -07:00
  • ccc666c1e4 Merge pull request #417 from ISSOtm/zero_sections Eldred Habert 2019-09-09 23:32:30 +02:00
  • 89eda89838 Handle tabs after backslash at end of file Commit 6fbb25c added support for tabs between a \ and the newline it escapes, but yy_create_buffer() was not updated to handle tabs. dbrotz 2019-09-09 12:25:26 -07:00
  • 17b9838c8f Merge pull request #418 from dbrotz/fix-symbol-macro-arg-0 Eldred Habert 2019-09-09 19:37:44 +02:00
  • 889dd83798 Print useful error message when '\0' is used in a symbol name AppendMacroArg() was passing 0 to sym_FindMacroArg(), which caused an assertion failure. Now, AppendMacroArg() prints an error message instead. dbrotz 2019-09-09 09:46:18 -07:00
  • 38a372f25f Allow 0-byte SECTIONs to be fixed anywhere They do not take any room, so they can only be used to define symbols at a given location. I ran into trouble with such a SECTION failing to be placed where specified, which doesn't make sense. This way, it also makes sense to have such a SECTION in the middle of another one, but that should be fine, since there's no actual overlap. ISSOtm 2019-09-08 23:59:15 +02:00
  • 1288737c0d Clean up suffix rules Generate .c files from .l files instead of directly a .o Improve yacc and lex header generation dependency ISSOtm 2019-09-07 12:19:04 +00:00
  • 5902306271 Have make clean delete all generated .o files Especially important if the file structure changes, to avoid leaving stale object files in non-fresh repos. ISSOtm 2019-09-07 12:14:56 +00:00
  • 2fe4521a96 Remove locallex.o reference The file was deleted in 8e88659, finish eliminating it ISSOtm 2019-09-07 12:09:08 +00:00
  • 74673436a1 Separate LDFLAGS from CFLAGS ISSOtm 2019-09-07 12:06:46 +00:00
  • 481748c279 Make CI output Makefile commands This is good for debugging Makefiles on systems I don't have (eg. macOS) End users will not be affected by this, and CI provides a persistent log so clobbering isn't much of an issue. ISSOtm 2019-09-07 11:56:52 +00:00
  • 2e6f5ac679 Fix unary NOT being broken nVal wasn't being set, this made the operator a no-op on constant expressions ISSOtm 2019-09-08 21:42:17 +02:00
  • 7a45fc68d9 Fix incorrect evaluation of && and || f29d768 forgot to switch these two expr->nVal to src1->nVal This won't break anything, since this wasn't published yet. I checked, and didn't see any other missed changes. ISSOtm 2019-09-08 21:12:31 +02:00
  • 9faa5c7a9e Update docs on char escapes in macro args Fixes #415 ISSOtm 2019-09-05 15:40:54 +02:00
  • 6fbb25c0da Clean up lexer.c Remove some hardcoded character values Allow tabs to be used for line continuations ISSOtm 2019-09-05 15:22:24 +02:00
  • 65fc42cce5 Remove -Wchkp from develop target This option has been removed in GCC 9, and according to GCC 8.2's man page, only has an implementation on Intel MRX anyways. ISSOtm 2019-09-05 05:56:11 +02:00
  • 736b7727b6 Merge pull request #400 from NieDzejkob/out.pipe-substitute Eldred Habert 2019-09-04 18:43:00 +02:00
  • fa920f8449 Remove the no-longer-needed .out.pipe files Jakub Kądziołka 2019-08-29 20:24:07 +02:00
  • 01aa56606f test/asm: special-case include-recursion Jakub Kądziołka 2019-09-03 22:54:22 +02:00
  • bddd5bc678 test/asm: Generate .out.pipe files on the fly Jakub Kądziołka 2019-08-29 20:23:50 +02:00
  • f6b7e39ce7 Merge pull request #405 from ISSOtm/output_errors Eldred Habert 2019-09-03 10:05:19 +02:00
  • 1363dd8f34 Add url link to releases page to readme (#413) clach04 2019-09-02 16:51:38 -07:00
  • 8214f0c09d Merge pull request #412 from clach04/patch-1 Eldred Habert 2019-09-03 00:50:43 +02:00
  • ff7c46f5a6 Readme windows install instructions, alternative install location clach04 2019-09-02 10:19:22 -07:00
  • b44f5825a5 Make RGBDS behave identically whether writing a .o Some errors are only tripped in out_WriteObject, which was basically a stub when -o wasn't specified. Now, instead, errors are checked in a separate function before out_WriteFile ISSOtm 2019-08-30 22:06:41 +02:00
  • 631910bd67 Merge pull request #395 from ISSOtm/better_error_stack Eldred Habert 2019-09-02 14:33:06 +02:00
  • 37089ef940 Improve error stack The old error stack was fairly obtuse and hard to use for debugging. This improves it notably by ensuring all line numbers are relative to the file, and not, say, the macro definition. This is a breaking change if you were parsing the old stack, but the change should be painless, and the new stack only brings more info. The syntax is unchanged for files, macros see their name prefixed with the file they're defined in and a pair of colors, REPT blocks simply append a '::REPT~n' to the context they're in, where 'n' is the number of iterations the REPT has done. This is especially helpful in macro-heavy code such as rgbds-structs. ISSOtm 2019-08-29 17:03:50 +02:00
  • 4ef27a0d23 Merge pull request #411 from ISSOtm/recursion_limit Eldred Habert 2019-09-02 02:21:16 +02:00
  • 476ccc9f6b Fix undefined behavior in yyunputstr Refer to comment at lexer.c:100 for more info ISSOtm 2019-09-02 02:09:59 +02:00
  • 89dc14fcaf Merge pull request #408 from ISSOtm/plumbing Eldred Habert 2019-09-01 22:16:27 +02:00
  • 1ca2f12d24 Update README.rst clach04 2019-09-01 09:51:47 -07:00
  • 20b2f5ee2f Fix incorrect line numbers with some IF blocks If a line ended with a string's closing quote, or a newline escape, then skipping over that line via IF/ELIF/ELSE would fail to count that line, offsetting the rest of the file. I have no idea why but for some reason 9829be1 changed *specifically* if_skip_to_else to have incorrect behavior on string endings. The incorrect behavior on newline escapes seems to have been here since the beginning. Also added a test to check for both of those behaviors in both functions. ISSOtm 2019-09-01 03:42:50 +02:00
  • 3cc67c48cf Add recursion limit info to man and help ISSOtm 2019-08-31 17:34:54 +02:00
  • f9a04696f2 Add recursion overflow tests ISSOtm 2019-08-31 17:22:43 +02:00
  • e0e8170fe6 Add recursion limit for string expansions Unlike macros, REPTs and INCLUDEs, this recursion depth is independent. This is intentional, because string expansions work very differently. ISSOtm 2019-08-31 15:36:58 +02:00
  • 9b40663d54 Merge pull request #409 from rednex/dd-head Eldred Habert 2019-08-31 12:59:18 +02:00
  • a517f900e4 Use POSIX-compatible dd(1) instead of head -c. Anthony J. Bentley 2019-08-30 23:11:28 -06:00
  • 350f40300c Merge pull request #403 from dbrotz/multiple-charmaps Eldred Habert 2019-08-31 04:44:58 +02:00
  • d3db5f0d76 Add pushc and popc directives dbrotz 2019-08-30 19:36:23 -07:00
  • 7e3af4b3cd Make testing external projects use local RGBDS Currently, the installed version is used instead, which isn't consistent with the tests, which use the local version. ISSOtm 2019-08-31 04:17:08 +02:00
  • dfb3072381 Fix memory leaks with macro args REPT blocks nested in macros (and possibly other cases) leaked memory on every call. Unlike most other memory leaks, which would be freed at the end of program execution if they were done properly, those piled up the more compilation went on. I believe memory usage could have started being fairly high on large projects following the "one master file INCLUDEs all the rest" so this may have actually been worth it. ISSOtm 2019-08-31 03:52:42 +02:00
  • 02191135a0 Fix possible unterminated string sym_SetMacroArgID used a sprintf that could write no \0. In practice this was benign because %u cannot print 256 chars, but better future-proof this. ISSOtm 2019-08-31 03:00:26 +02:00
  • dc2c97fe0c Comment and improve ParseSymbol and AppendMacroArg ISSOtm 2019-08-30 20:47:04 +02:00
  • 6068b565f5 Add recursion limit for INCLUDE and macros (And REPT.) Not exactly a *recursion* limit, more like a *stack depth* limit, but calling it "recursion" conveys its purpose better. The default of 64 is super overkill: even in a a project with what I believe to be above-average levels of nesting, the level only peaked at 6. Keeping in mind the purpose of this is to catch infinite recursion, which is still caught quickly (in usual cases, anyways), this default seems sensible. And it passes tests. What more do you need? ISSOtm 2019-08-30 04:42:56 +02:00
  • a21cef7190 Say which macro argument caused an error when one does ISSOtm 2019-08-30 20:57:11 +02:00
  • 461ef6cea5 Don't complain about initializing statics This error is specific to the way the Linux kernel handles statics. It does not apply to userspace programs. dbrotz 2019-08-29 22:48:16 -07:00
  • e05199ca1e Add support for multiple charmaps This adds two new directives: newcharmap and setcharmap. newcharmap creates a new charmap and switches to it. setcharmap switches to an existing charmap. dbrotz 2019-08-29 21:54:06 -07:00
  • 12d82eb768 Remove extra entry in error stack on macro not defined (#394) Eldred Habert 2019-08-30 02:14:21 +02:00
  • 05becf3f4b Merge pull request #381 from NieDzejkob/rgbgfx-curve Eldred Habert 2019-08-29 22:19:36 +02:00
  • 3cc7981c82 Merge pull request #402 from dbrotz/fix-386 Eldred Habert 2019-08-29 22:06:10 +02:00
  • 8f287eeef9 Fix nested if statements that don't have following whitespace When trying to skip over nested if statements, if there was no whitespace after an "if", then that "if" would not be recognized. That's a problem since "if(" and "if{" are also valid ways to start an if statement. This change will make it so that they are recognized correctly. dbrotz 2019-08-29 12:37:59 -07:00
  • ce05cb5683 Merge pull request #401 from dbrotz/line-cont-test Eldred Habert 2019-08-29 21:23:00 +02:00
  • 17945a7377 Get rid of error in line continuation test The purpose of the test is to ensure that rgbasm doesn't segfault in this case. The "Macro '@' not defined" error is unnecessary. dbrotz 2019-08-29 11:49:17 -07:00
  • 3a1b47129e Merge pull request #397 from NieDzejkob/test-local-without-parent Eldred Habert 2019-08-29 20:24:36 +02:00
  • 6ffa751090 Merge pull request #390 from ISSOtm/print_types Eldred Habert 2019-08-29 20:12:32 +02:00
  • c3641321d7 Merge pull request #399 from ISSOtm/allow_dots Eldred Habert 2019-08-29 20:09:32 +02:00
  • 446173f0cb Merge pull request #387 from ISSOtm/set_doesnt_override_equ Eldred Habert 2019-08-29 20:08:08 +02:00
  • e27f381842 Merge pull request #361 from ISSOtm/better_section_overflow Eldred Habert 2019-08-29 20:04:48 +02:00
  • a3ee76dddd Allow periods to continue macro args c75a953 broke my (previously-working) project that defined, via macros, 'sizeof_.player'. A test was added to confirm that those are indeed accepted outside of macros. ISSOtm 2019-08-29 19:27:03 +02:00
  • 995265c549 Improve testing bracketed symbols Also test EQU and _RS constants, as well as that EQUS errors out, and that labels don't work. ISSOtm 2019-08-29 19:16:28 +02:00