X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/2b84abb596f52ab2068d52108adc96838ad4340a..31cef89cb428866f787983e68246030321893df4:/usr/src/cmd/1kfix.c diff --git a/usr/src/cmd/1kfix.c b/usr/src/cmd/1kfix.c index c70873c95d..64a471ca8b 100644 --- a/usr/src/cmd/1kfix.c +++ b/usr/src/cmd/1kfix.c @@ -1,3 +1,4 @@ +static char *sccsid = "@(#)1kfix.c 4.1 (Berkeley) 10/15/80"; #include #include #include @@ -33,15 +34,15 @@ main(argc, argv) 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; @@ -70,7 +71,7 @@ format: y = x; switch (x.a_magic) { - case 0413: { + case ZMAGIC: { int i; for (i = 0; i < 512; i++) if (tp[i] != 0) @@ -84,8 +85,8 @@ format: } 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) { @@ -95,10 +96,10 @@ format: } 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);