- add lineno field to NODE
- move inotype() prototype into mtree.h from extern.h
This commit is contained in:
parent
1ae193710b
commit
68a03bad5d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.15 2001/10/22 07:07:46 lukem Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.16 2001/10/25 03:00:14 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -42,7 +42,6 @@ int compare(const char *, NODE *, FTSENT *);
|
|||
int crc(int, u_int32_t *, u_int32_t *);
|
||||
void cwalk(void);
|
||||
void dump_nodes(const char *, NODE *);
|
||||
const char *inotype(u_int);
|
||||
int matchtags(NODE *);
|
||||
void mtree_err(const char *, ...)
|
||||
__attribute__((__format__(__printf__, 1, 2)));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mtree.h,v 1.16 2001/10/22 07:07:46 lukem Exp $ */
|
||||
/* $NetBSD: mtree.h,v 1.17 2001/10/25 03:00:14 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -59,6 +59,7 @@ typedef struct _node {
|
|||
nlink_t st_nlink; /* link count */
|
||||
char *md5sum; /* md5 checksum */
|
||||
char *tags; /* tags, comma delimited */
|
||||
size_t lineno; /* line # entry came from */
|
||||
|
||||
#define F_CKSUM 0x00000001 /* check sum */
|
||||
#define F_DONE 0x00000002 /* directory done */
|
||||
|
@ -101,8 +102,13 @@ typedef struct {
|
|||
} slist_t;
|
||||
|
||||
|
||||
NODE *spec(FILE *);
|
||||
u_int nodetoino(u_int);
|
||||
/*
|
||||
* prototypes for functions published to other programs which want to use
|
||||
* the specfile parser but don't want to pull in all of "extern.h"
|
||||
*/
|
||||
const char *inotype(u_int);
|
||||
u_int nodetoino(u_int);
|
||||
NODE *spec(FILE *);
|
||||
|
||||
|
||||
#define RP(p) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: spec.c,v 1.34 2001/10/22 07:07:46 lukem Exp $ */
|
||||
/* $NetBSD: spec.c,v 1.35 2001/10/25 03:00:14 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -74,7 +74,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: spec.c,v 1.34 2001/10/22 07:07:46 lukem Exp $");
|
||||
__RCSID("$NetBSD: spec.c,v 1.35 2001/10/25 03:00:14 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -206,6 +206,7 @@ noparent: mtree_err("no parent node");
|
|||
if ((centry = calloc(1, sizeof(NODE) + strlen(p))) == NULL)
|
||||
mtree_err("%s", strerror(errno));
|
||||
*centry = ginfo;
|
||||
centry->lineno = lineno;
|
||||
strcpy(centry->name, p);
|
||||
#define MAGIC "?*["
|
||||
if (strpbrk(p, MAGIC))
|
||||
|
|
Loading…
Reference in New Issue