File:  [CSRG BSD Unix] / 43BSD / contrib / notes / src / nfload.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

#define	MAINLINE
#include "parms.h"
#include "structs.h"

#ifdef	RCSIDENT
static char rcsid[] = "$Header: /var/lib/cvsd/repos/CSRG/43BSD/contrib/notes/src/nfload.c,v 1.1.1.1 2018/04/24 16:12:54 root Exp $";
#endif	RCSIDENT

/*
 *	quick hack at loading a notesfile.
 *
 *	The ASCII format comes down stdin.
 */

main (argc, argv)
int     argc;
char  **argv;
{
    int     i;
    int     start;
    char   *basedir;

    if (argc < 2)
    {
	printf ("Usage: %s [-Ddirectory] notesfile \n", argv[0]);
	exit (1);
    }

    startup (argc, argv);

    start = 1;
    basedir = Mstdir;

    if (!strncmp (argv[start], "-D", 2))		/* specified dir */
    {
	basedir = &argv[start][2];
	start++;
    }

    i = loadnf (basedir, argv[start], stdin);		/* load it */
    printf ("loadnf returns %d\n", i);
    exit (GOOD);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.