Skip to content

Commit

Permalink
Work around a compiler bug in Unix spigot
Browse files Browse the repository at this point in the history
  • Loading branch information
hoglet67 committed Jan 24, 2022
1 parent 2c8d0f0 commit 70bb4f8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/v7/spigot.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ outnl();
print();


program() {

#ifdef LINUX
outc(c)
char c;
{
putchar(c);
}
main() {
short r[N + 1];
#else
program() {
short *r = (short *)0x1FFE;
#endif

Expand All @@ -40,8 +45,9 @@ short *r = (short *)0x1FFE;
printf("%04x %04x\n", 0x0FFE + 2 * x, r[x]);
}
#endif
print(c + d/10000);
i = d/10000 + c;
c = d%10000;
print(i);
}
outnl();
}
Expand Down

0 comments on commit 70bb4f8

Please # to comment.