Not all occurrences have been replaced, in some cases they have been
left as they were before (like in rgbgfx and when they are in the
interface of a C standard library function).
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
Files that weren't found with the absolute path weren't added as
dependencies even if they were found after considering the list of
include directories.
This patch makes rgbasm print the complete path (including the include
directory path) in these cases.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
If they don't have quotes when passed to sym_AddString() they can't be
used at all by the assembler. I suppose nobody actually used them, they
seem to have been broken forever.
Added a comment to the function to say how to use it correctly for
strings.
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
The code that adds an include path to the array of paths doesn't check
the lenght of the path (which can cause overflows because of strcpy).
It doesn't check if the max number of paths has been reached, either.
This patch adds error messages for such cases, giving the user more
information than before and crashing the assembly instead of
continuing and failing when it can't find a file to include.
"t" is a nonportable way of opening files in text mode. Windows
opens files in text mode by default anyway, and in UNIX there is
no text mode. (Passing "t" to fopen is undefined in standard C.)
Merging lai's source with this one is very irritating because
they have different indentation styles. I couldn't find what profile
vegard used for his version, so I used these flags (which should bring
the source close to KNF):
-bap
-br
-ce
-ci4
-cli0
-d0
-di0
-i8
-ip
-l79
-nbc
-ncdb
-ndj
-ei
-nfc1
-nlp
-npcs
-psl
-sc
-sob