diff --git a/usr.sbin/mtree/extern.h b/usr.sbin/mtree/extern.h index 4d22115b5255..139b3d228f2e 100644 --- a/usr.sbin/mtree/extern.h +++ b/usr.sbin/mtree/extern.h @@ -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))); diff --git a/usr.sbin/mtree/mtree.h b/usr.sbin/mtree/mtree.h index 9da0c77ae971..a6ff031f54a5 100644 --- a/usr.sbin/mtree/mtree.h +++ b/usr.sbin/mtree/mtree.h @@ -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) \ diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c index 632ed92298f0..5068c3795a19 100644 --- a/usr.sbin/mtree/spec.c +++ b/usr.sbin/mtree/spec.c @@ -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))