mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-08 15:29:41 +00:00
asoft_compact: clean up whitespace, fix compiler warning
This commit is contained in:
parent
2305c15ee4
commit
002948dae0
|
@ -184,7 +184,7 @@ int main(int argc, char **argv) {
|
|||
int i;
|
||||
FILE *fff;
|
||||
|
||||
int offset,link_offset,line_offset;
|
||||
int offset,link_offset;
|
||||
|
||||
if (argc<2) {
|
||||
fprintf(stderr,"Usage: %s FILENAME -1 -2 -3 -4\n",argv[0]);
|
||||
|
@ -197,7 +197,6 @@ int main(int argc, char **argv) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
/* read size, first two bytes */
|
||||
size1=fgetc(fff);
|
||||
size2=fgetc(fff);
|
||||
|
@ -228,7 +227,6 @@ int main(int argc, char **argv) {
|
|||
ch1=fgetc(fff);
|
||||
after_read:
|
||||
if (ch1==0) break;
|
||||
|
||||
/* if > 0x80 it's a token */
|
||||
if (ch1>=0x80) {
|
||||
color_green();
|
||||
|
@ -236,8 +234,6 @@ after_read:
|
|||
color_normal();
|
||||
last_token=ch1&0x7f;
|
||||
}
|
||||
|
||||
|
||||
/* otherwise it is an ascii char */
|
||||
else {
|
||||
if (ch1<0x20) {
|
||||
|
@ -259,7 +255,6 @@ after_read:
|
|||
line_no*=10;
|
||||
line_no+=(ch1-'0');
|
||||
}
|
||||
|
||||
color_yellow();
|
||||
fprintf(stderr,"%d",line_no);
|
||||
color_normal();
|
||||
|
@ -267,11 +262,8 @@ after_read:
|
|||
goto after_read;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fputc(ch1,stderr);
|
||||
}
|
||||
|
||||
}
|
||||
fprintf(stderr,"\n");
|
||||
}
|
||||
|
@ -293,7 +285,6 @@ after_read:
|
|||
size1=fgetc(fff);
|
||||
size2=fgetc(fff);
|
||||
|
||||
|
||||
while(!feof(fff)) {
|
||||
|
||||
link_offset=offset;
|
||||
|
@ -309,10 +300,9 @@ after_read:
|
|||
if (link==0) break;
|
||||
offset+=2;
|
||||
|
||||
|
||||
/* line number is little endian 16-bit value */
|
||||
|
||||
line_offset=offset;
|
||||
// line_offset=offset;
|
||||
|
||||
line1=fgetc(fff);
|
||||
line2=fgetc(fff);
|
||||
|
@ -333,7 +323,6 @@ after_read2:
|
|||
|
||||
/* if > 0x80 it's a token */
|
||||
if (ch1>=0x80) {
|
||||
|
||||
token=ch1&0x7f;
|
||||
|
||||
if (token==TOKEN_LET) {
|
||||
|
@ -341,7 +330,6 @@ after_read2:
|
|||
}
|
||||
else if ((token==TOKEN_GOTO) && (last_token==TOKEN_THEN)) {
|
||||
/* Skip superfluous GOTO if THEN GOTO */
|
||||
|
||||
}
|
||||
else {
|
||||
output[offset]=ch1;
|
||||
|
@ -349,8 +337,6 @@ after_read2:
|
|||
}
|
||||
last_token=token;
|
||||
}
|
||||
|
||||
|
||||
/* otherwise it is an ascii char */
|
||||
else {
|
||||
|
||||
|
@ -367,14 +353,12 @@ after_read2:
|
|||
line_no*=10;
|
||||
line_no+=(ch1-'0');
|
||||
}
|
||||
|
||||
print_int(line_no,&offset);
|
||||
|
||||
goto after_read2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
output[offset]=ch1;
|
||||
offset++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user