Rename countvars
This commit is contained in:
parent
4adaf2d4d9
commit
733c8fa285
|
@ -0,0 +1 @@
|
||||||
|
assembler
|
|
@ -183,7 +183,7 @@ void populatevars(struct symbol** vars, int* varscount) {
|
||||||
*varscount = firstamnt+ramvamnt+2;
|
*varscount = firstamnt+ramvamnt+2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void countvars(FILE* input, int* lnscount, int* labelscount) {
|
void countstuff(FILE* input, int* lnscount, int* labelscount) {
|
||||||
char c;
|
char c;
|
||||||
while(c = fgetc(input), c != -1) {
|
while(c = fgetc(input), c != -1) {
|
||||||
if(c == '\n') {
|
if(c == '\n') {
|
||||||
|
@ -472,7 +472,7 @@ int main(int argc, char* argv[]) {
|
||||||
// line chopping
|
// line chopping
|
||||||
int lnscount = 0;
|
int lnscount = 0;
|
||||||
int labelscount = 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 line* lns[lnscount]; // some lines will be empty/comments/labels, so this array is bigger than needed
|
||||||
|
|
||||||
struct symbol* labels[labelscount];
|
struct symbol* labels[labelscount];
|
||||||
|
|
Loading…
Reference in New Issue