Michael Steil
d8d9b7350b
Merge pull request #10 from ksherlock/fix_m_flag
...
fix macro listings (-m w/ -l).
2016-04-13 14:44:21 -07:00
Michael Steil
f319c607d5
Merge pull request #9 from ksherlock/fix_null_operand_eval
...
Better checks for null operands
2016-04-13 14:43:40 -07:00
Michael Steil
c91b6231a6
Merge pull request #8 from ksherlock/master
...
mkstemp fix
2016-04-13 14:43:12 -07:00
Michael Steil
19a063f863
Merge pull request #7 from michaelcmartin/fix-link
...
Fix linking
2016-04-13 14:42:44 -07:00
Kelvin Sherlock
2224fcb803
fix macro listings (-m w/ -l). Slightly broken by varargs update.
2016-02-24 13:34:05 -05:00
Kelvin Sherlock
752bd31a3f
prevent lda @y
or lda @x
(which is accepted by the parser) from crashing.
2016-02-23 21:15:01 -05:00
ksherlock
80c4aec631
mkstemp fix
...
`mkstemp` returns a file descriptor. Trying to `fopen`() that is a bad idea.
2016-02-22 15:45:17 -05:00
Michael Martin
0bd54d0432
Default to cc as a compiler, with options to change if needed
2016-02-08 18:10:23 -08:00
Michael Martin
e0ee18b299
Break out makedepend output to auxiliary file
...
This drastically simplifies the core Makefiles and if makedepend
is installed you can regenerate dependencies as needed with the
command `make depend`.
2016-02-08 18:04:00 -08:00
Michael Steil
4cc8c97be5
Merge pull request #5 from michaelcmartin/ansi-c
...
Ansi C conversion
2016-01-25 07:35:52 -08:00
Michael Martin
d914c8345e
Clean up dead target from merged-Makefile experiment
2016-01-24 18:18:41 -08:00
Michael Martin
d45d1461a2
Streamline Makefiles, resolve issue #4
...
Slinky and Macross need the same y.tab.h. This ensures that, and
it also removes all unused variables and rules and does a
makedepend pass to fill in the dependencies of .c files on .h
files.
2016-01-24 18:11:39 -08:00
Michael Martin
877c4bfacc
Extra headers and casts so it can compile with the -ansi flag
2016-01-24 15:56:45 -08:00
Michael Martin
d2d8ab6bfc
rename swab to avoid conflict with string.h
2016-01-24 00:10:35 -08:00
Michael Martin
c2dff5c4c3
Remove cruft and gcc-5-only flags from Makefiles
2016-01-24 00:04:00 -08:00
Michael Martin
d53658da5e
Extern all the globals, not just the tables
2016-01-24 00:00:20 -08:00
Michael Martin
693c15a2a8
Protoize.
2016-01-23 23:13:44 -08:00
Michael Martin
fa1c08008e
Push everything into headers for Slinky
2016-01-23 22:57:12 -08:00
Michael Martin
cefd64ed6f
Bring Slinky makefile in line with Macross
2016-01-23 22:53:59 -08:00
Michael Martin
4ab0baafe6
Use varargs for errors in Slinky
2016-01-23 22:37:08 -08:00
Michael Martin
4c56782718
Change make cleanup to more conventional make clean
2016-01-23 21:51:21 -08:00
Michael Martin
0b99475ead
Move function declarations out of the .c files and use the generated .h files instead
2016-01-23 21:50:38 -08:00
Michael Martin
a98186c8f5
Full header information extracted from gcc -aux-info
2016-01-23 21:50:38 -08:00
Michael Martin
7e126cbfe6
Create a .gitignore file
2016-01-23 17:47:11 -08:00
Michael Martin
c62c0fba3a
Hide warnings, improve Makefile comments
2016-01-23 17:45:47 -08:00
Michael Martin
77e0ca2578
Remove all warnings that aren't int- or pointer-conversion
2016-01-23 17:24:28 -08:00
Michael Martin
3e49dc61f0
Main should have a return value
2016-01-23 16:01:46 -08:00
Michael Martin
e60db078d2
Use mkstemp instead of mktemp - mktemp is intrinsically unsafe.
2016-01-23 15:56:01 -08:00
Peter De Wachter
29f102cdf1
emitString: comparison between pointer and integer
2016-01-23 21:21:31 +01:00
Peter De Wachter
deb5d06fba
Remove obsolete kludge
2016-01-23 21:21:31 +01:00
Peter De Wachter
e10a35e3e1
Protoize
...
command:
protoize -c '-m32 -DTARGET_CPU=CPU_6502' -g $(ls *.c | grep -v 68)
2016-01-23 21:21:31 +01:00
Peter De Wachter
b9748cbe0e
Use the right member of union arguments so that everything typechecks
2016-01-23 21:21:31 +01:00
Peter De Wachter
773dba638d
XXX missing argument for buildIdentifierList
...
buildIdentifierList takes three arguments. All other call sites use
unknownSymbolTag, do that here as well (just a guess).
2016-01-23 21:21:25 +01:00
Peter De Wachter
9124a65c98
buildMdoStatement: seems to have wrong argument type
2016-01-23 21:21:25 +01:00
Peter De Wachter
606dfd1650
addLabelToStatement: correctly create a dummy statementBodyType
2016-01-23 21:21:25 +01:00
Peter De Wachter
9123e36a38
printExpression: select the right field of the union for CONDITION_CODE_EXPR
...
The other branches are good.
2016-01-23 21:21:25 +01:00
Peter De Wachter
c968f1bed4
evaluateOperand takes only a single argument
2016-01-23 21:21:25 +01:00
Peter De Wachter
086027b1b5
XXX Missing parameter in call to assembleStatementBody
...
assembleStatementBody has five parameters:
assembleStatementBody(kind, body, cumulativeLineNumber, worryAboutIf, ifFixupList)
statementKindType kind;
statementBodyType body;
int cumulativeLineNumber;
bool worryAboutIf;
simpleFixupListType **ifFixupList;
but here it is called with only four. The third parameter is missing.
I randomly inserted a 0.
2016-01-23 21:21:22 +01:00
Peter De Wachter
2306979620
expandExpression takes two arguments
2016-01-23 21:21:22 +01:00
Peter De Wachter
19d7cb724c
Convert macross listing functions to varargs
2016-01-23 21:21:22 +01:00
Peter De Wachter
0e03424ec1
moreLabel is always used with one argument
2016-01-23 21:21:22 +01:00
Peter De Wachter
ad1aa82bcd
Avoid C++ style comments
...
protoize chokes on them
2016-01-23 21:21:18 +01:00
Peter De Wachter
c594490db9
Convert macross error-handling functions to varargs
2016-01-23 17:37:55 +01:00
Peter De Wachter
e8b97b38d7
assembleStatement: fix use-after-free
2016-01-23 16:35:02 +01:00
Peter De Wachter
8e5376efd9
Add missing <string.h> includes
2016-01-23 16:07:37 +01:00
Peter De Wachter
dfaf049859
Include <string.h> instead of <strings.h>
2016-01-23 16:07:37 +01:00
Peter De Wachter
ff868a98cb
Use standard malloc
2016-01-23 16:07:37 +01:00
Peter De Wachter
7fb5312423
Use extern keyword in declarations of arrays with unspecified size
2016-01-23 16:07:37 +01:00
Michael Martin
0c3b134ab9
Update source-to-header dependencies
2016-01-23 04:04:14 -08:00
Michael Martin
6e13fae5a5
Remove circular dependency
2016-01-23 03:51:43 -08:00