version 1.6, 2001/01/19 04:11:28 |
version 1.7, 2001/11/21 15:26:39 |
|
|
|
|
#ifndef lint |
#ifndef lint |
#if 0 |
#if 0 |
static char sccsid[] = "@(#)head.c 8.2 (Berkeley) 4/20/95"; |
static const char sccsid[] = "@(#)head.c 8.2 (Berkeley) 4/20/95"; |
#else |
#else |
static char rcsid[] = "$OpenBSD$"; |
static const char rcsid[] = "$OpenBSD$"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
|
* accomodate all funny formats. |
* accomodate all funny formats. |
*/ |
*/ |
int |
int |
ishead(linebuf) |
ishead(char *linebuf) |
char linebuf[]; |
|
{ |
{ |
char *cp; |
char *cp; |
struct headline hl; |
struct headline hl; |
|
|
|
|
/*ARGSUSED*/ |
/*ARGSUSED*/ |
void |
void |
fail(linebuf, reason) |
fail(char *linebuf, char *reason) |
char linebuf[], reason[]; |
|
{ |
{ |
|
|
/* |
/* |
|
|
* structure. Actually, it scans. |
* structure. Actually, it scans. |
*/ |
*/ |
void |
void |
parse(line, hl, pbuf) |
parse(char *line, struct headline *hl, char *pbuf) |
char line[], pbuf[]; |
|
struct headline *hl; |
|
{ |
{ |
char *cp, *sp; |
char *cp, *sp; |
char word[LINESIZE]; |
char word[LINESIZE]; |
|
|
* the left string into it. |
* the left string into it. |
*/ |
*/ |
char * |
char * |
copyin(src, space) |
copyin(char *src, char **space) |
char *src; |
|
char **space; |
|
{ |
{ |
char *cp, *top; |
char *cp, *top; |
|
|
|
|
}; |
}; |
|
|
int |
int |
isdate(date) |
isdate(char *date) |
char date[]; |
|
{ |
{ |
int i; |
int i; |
|
|
|
|
* Return 1 if they match, 0 if they don't |
* Return 1 if they match, 0 if they don't |
*/ |
*/ |
int |
int |
cmatch(cp, tp) |
cmatch(char *cp, char *tp) |
char *cp, *tp; |
|
{ |
{ |
|
|
while (*cp && *tp) |
while (*cp && *tp) |
|
|
* or NULL if none follow. |
* or NULL if none follow. |
*/ |
*/ |
char * |
char * |
nextword(wp, wbuf) |
nextword(char *wp, char *wbuf) |
char *wp, *wbuf; |
|
{ |
{ |
int c; |
int c; |
|
|