+static char *sccsid = "@(#)1kfix.c 4.1 (Berkeley) 10/15/80";
#include <stdio.h>
#include <a.out.h>
#include <sys/param.h>
switch (x.a_magic) {
- case 0407:
- case 0410:
+ case OMAGIC:
+ case NMAGIC:
if ((round(x.a_text,NBPG) & CLOFSET) == 0) {
fprintf(stderr, "%s: wins as is\n", argv[0]);
goto skip;
}
break;
- case 0413:
+ case ZMAGIC:
lseek(io, NBPG, 0);
break;
y = x;
switch (x.a_magic) {
- case 0413: {
+ case ZMAGIC: {
int i;
for (i = 0; i < 512; i++)
if (tp[i] != 0)
}
break;
- case 0407:
- case 0410:
+ case OMAGIC:
+ case NMAGIC:
y.a_text = round(x.a_text, NBPG) - NBPG;
y.a_data += NBPG;
if (y.a_text == 0) {
}
y.a_trsize = y.a_drsize = 0;
write(io, (char *)&y, sizeof y);
- if (x.a_magic == 0413)
+ if (x.a_magic == ZMAGIC)
lseek(io, BSIZE, 0);
write(io, tp, x.a_text);
- if (x.a_magic != 0413)
+ if (x.a_magic != ZMAGIC)
write(io, zeroes, round(x.a_text, NBPG) - x.a_text);
write(io, dp, x.a_data);
write(io, sp, x.a_syms);