mkey2.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 <ctype.h>
#define MAXLINE 500
static int eof = 0;
static char *p, key[20];
FILE *f;
char *name;
{
/* read file f & spit out keys & ptrs */
int c;
long grec();
extern int wholefile;
extern char *iglist;
lp=0;
if (wholefile==0)
{
# if D1
# endif
p = key;
}
else
{
p=key;
}
fclose(f);
}
char *ky;
{
int n;
extern int minlen;
if (n<minlen) return (0);
if (n<3)
{
if (trail == '.') return(0);
}
/* Allow years 1000 - 2099 */
return(0);
return(0);
return(1);
}
long
grec (s, f)
char *s;
FILE *f;
{
char tm[200];
int curtype = 0;
extern int wholefile;
extern char *iglist;
if (eof) return(0);
*s = 0;
{
return(len);
{
fseek (f, 0L, 2);
return(ftell(f));
}
}
eof=1;
return(s[0] ? len : 0L);
}
char *
char *ln;
{
register char *p = ln;
while (*p) p++;
p--;
if (*p == '\n') *p=0;
return(ln);
}
{
extern int labels;
extern int wholefile;
{
if (alph++ < 6)
*p++ = c;
}
else
{
*p = 0;
for(p=key; *p; p++)
*p |= 040;
{
if (used==0)
{
if (labels)
{
if (wholefile==0)
else
}
}
else
putchar(' ');
used++;
}
prevc=c;
alph=0;
}
}