|
|
1.1 ! root 1: #define MAINLINE ! 2: #include "parms.h" ! 3: #include "structs.h" ! 4: ! 5: #ifdef RCSIDENT ! 6: static char rcsid[] = "$Header: nfload.c,v 1.7 85/01/18 15:41:19 notes Rel $"; ! 7: #endif RCSIDENT ! 8: ! 9: /* ! 10: * quick hack at loading a notesfile. ! 11: * ! 12: * The ASCII format comes down stdin. ! 13: */ ! 14: ! 15: main (argc, argv) ! 16: int argc; ! 17: char **argv; ! 18: { ! 19: int i; ! 20: int start; ! 21: char *basedir; ! 22: ! 23: if (argc < 2) ! 24: { ! 25: printf ("Usage: %s [-Ddirectory] notesfile \n", argv[0]); ! 26: exit (1); ! 27: } ! 28: ! 29: startup (argc, argv); ! 30: ! 31: start = 1; ! 32: basedir = Mstdir; ! 33: ! 34: if (!strncmp (argv[start], "-D", 2)) /* specified dir */ ! 35: { ! 36: basedir = &argv[start][2]; ! 37: start++; ! 38: } ! 39: ! 40: i = loadnf (basedir, argv[start], stdin); /* load it */ ! 41: printf ("loadnf returns %d\n", i); ! 42: exit (GOOD); ! 43: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.