diff options
Diffstat (limited to 'pkgtools/pkg_install/files/lib/plist.c')
-rw-r--r-- | pkgtools/pkg_install/files/lib/plist.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/lib/plist.c b/pkgtools/pkg_install/files/lib/plist.c index 63a5aab45a0..2b0bd10683d 100644 --- a/pkgtools/pkg_install/files/lib/plist.c +++ b/pkgtools/pkg_install/files/lib/plist.c @@ -1,4 +1,4 @@ -/* $NetBSD: plist.c,v 1.17.4.9 2008/08/10 22:09:38 joerg Exp $ */ +/* $NetBSD: plist.c,v 1.17.4.10 2008/08/11 15:58:15 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -11,7 +11,7 @@ #if 0 static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp"; #else -__RCSID("$NetBSD: plist.c,v 1.17.4.9 2008/08/10 22:09:38 joerg Exp $"); +__RCSID("$NetBSD: plist.c,v 1.17.4.10 2008/08/11 15:58:15 joerg Exp $"); #endif #endif @@ -353,7 +353,7 @@ parse_plist(package_t *pkg, const char *buf) * Read a packing list from a file */ void -read_plist(package_t *pkg, FILE * fp) +append_plist(package_t *pkg, FILE * fp) { char pline[MaxPathSize]; char *cp; @@ -361,9 +361,6 @@ read_plist(package_t *pkg, FILE * fp) int len; int free_cp; - pkg->head = NULL; - pkg->tail = NULL; - while (fgets(pline, MaxPathSize, fp) != (char *) NULL) { for (len = strlen(pline); len && isspace((unsigned char) pline[len - 1]);) { @@ -392,6 +389,15 @@ read_plist(package_t *pkg, FILE * fp) } } +void +read_plist(package_t *pkg, FILE * fp) +{ + pkg->head = NULL; + pkg->tail = NULL; + + append_plist(pkg, fp); +} + /* * Write a packing list to a file, converting commands to ASCII equivs */ |