inv1.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
/*
* Copyright (c) 1983, 1984 1985, 1986, 1987, 1988, Sun Microsystems, Inc.
* All Rights Reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <locale.h>
#include <assert.h>
char *argv[];
{
/* Make inverted file indexes. Reads a stream from mkey which
* gives record pointer items and keys. Generates set of files
* a. NHASH pointers to file b.
* b. lists of record numbers.
* c. record pointer items.
*
* these files are named xxx.ia, xxx.ib, xxx.ic;
* where xxx is taken from arg1.
* If the files exist they are updated.
*/
int nhash = 256;
int appflg = 1;
int i,j,k;
long keys;
int iflong =0;
char *sortdir;
#if !defined(TEXT_DOMAIN)
#define TEXT_DOMAIN "SYS_TEST"
#endif
(void) textdomain(TEXT_DOMAIN);
{
{
case 'h': /* size of hash table */
break;
case 'n': /* new, don't append */
appflg=0;
break;
case 'a': /* append to old file */
appflg=1;
break;
case 'v': /* verbose output */
chatty=1;
break;
case 'd': /* keep keys on file .id for check on searching */
keepkey=1;
break;
case 'p': /* pipe into sort (saves space, costs time)*/
pipein = 1;
break;
case 'i': /* input is on file, not stdin */
close(0);
argc--;
argv++;
break;
}
argc--;
argv++;
}
if (pipein)
{
}
else /* use tmp file */
{
}
fb = 0;
if (appflg )
{
{
}
else
appflg=0;
}
if (keepkey)
if (pipein)
{
}
else
{
}
if (appflg)
{
}
# ifndef D1
# endif
if (appflg)
{
}
if (chatty)
exit(0);
/* NOTREACHED */
}