Mercurial > hg > Members > kono > os9 > sbc09
diff a09.c @ 46:ec9f494497e1
vdisk fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 20 Jul 2018 11:48:19 +0900 |
parents | b8fa36c04ff7 |
children | 51b437557f42 |
line wrap: on
line diff
--- a/a09.c Thu Jul 19 16:21:47 2018 +0900 +++ b/a09.c Fri Jul 20 11:48:19 2018 +0900 @@ -71,25 +71,6 @@ struct longer *next; } *lglist = 0; -void makelonger(int gl) { - for(struct longer *p=lglist;p;p=p->next) { - if (p->gline==gl) { // already fixed - p->change = 1; - return; - } - } - struct longer *p = (struct longer *)calloc(sizeof(struct longer *),1); - p->gline=gl; - p->next = lglist; - lglist = p; -} - -int longer() { - for(struct longer *p=lglist;p;p=p->next) { - if (p->change == 0) return 1; - } - return 0; -} struct oprecord{char * name; unsigned char cat; @@ -351,6 +332,26 @@ label or constant, this is important when generating relocatable object code. */ +void makelonger(int gl) { + if (pass==1) return; + for(struct longer *p=lglist;p;p=p->next) { + if (p->gline==gl) { // already fixed + p->change = 1; + return; + } + } + struct longer *p = (struct longer *)calloc(sizeof(struct longer *),1); + p->gline=gl; + p->next = lglist; + lglist = p; +} + +int longer() { + for(struct longer *p=lglist;p;p=p->next) { + if (p->change == 0) return 1; + } + return 0; +} void generate() { generating = 1;