diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af20eaf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +assembler diff --git a/assembler b/assembler deleted file mode 100755 index fe8bb01..0000000 Binary files a/assembler and /dev/null differ diff --git a/assembler.c b/assembler.c index 7e69771..d4ed50b 100644 --- a/assembler.c +++ b/assembler.c @@ -183,7 +183,7 @@ void populatevars(struct symbol** vars, int* varscount) { *varscount = firstamnt+ramvamnt+2; } -void countvars(FILE* input, int* lnscount, int* labelscount) { +void countstuff(FILE* input, int* lnscount, int* labelscount) { char c; while(c = fgetc(input), c != -1) { if(c == '\n') { @@ -472,7 +472,7 @@ int main(int argc, char* argv[]) { // line chopping int lnscount = 0; int labelscount = 0; - countvars(input, &lnscount, &labelscount); + countstuff(input, &lnscount, &labelscount); struct line* lns[lnscount]; // some lines will be empty/comments/labels, so this array is bigger than needed struct symbol* labels[labelscount];