This is build_o.c in view mode; [Download] [Up]
#include <stdio.h>
main(argc, argv)
int argc;
char **argv;
{
FILE *datafile, *ofile;
int i, c;
if (argc != 3) {
fprintf(stderr, "Arg count.\n");
exit(1);
}
datafile = fopen(argv[1], "r");
ofile = fopen(argv[2], "a");
i = 0;
for (;;) {
c = getc(datafile);
if (feof(datafile))
break;
putc(c, ofile);
i++;
}
fwrite((char *)(&i), 4, 1, ofile);
fclose(datafile);
fclose(ofile);
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.