From d5092859ca11dc13b1c44e5f7e3870fbefc828e8 Mon Sep 17 00:00:00 2001 From: Keith Muller Date: Sun, 17 Jan 1993 05:32:42 -0800 Subject: [PATCH] the list of command line files not selected was not being printed. SCCS-vsn: bin/pax/ftree.c 1.2 --- usr/src/bin/pax/ftree.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/usr/src/bin/pax/ftree.c b/usr/src/bin/pax/ftree.c index 4fbc70283e..4d0aa8197a 100644 --- a/usr/src/bin/pax/ftree.c +++ b/usr/src/bin/pax/ftree.c @@ -10,7 +10,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)ftree.c 1.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)ftree.c 1.2 (Berkeley) %G%"; #endif /* not lint */ #include @@ -49,7 +49,6 @@ static FTREE *fthead = NULL; /* head of linked list of file args */ static FTREE *fttail = NULL; /* tail of linked list of file args */ static FTREE *ftcur = NULL; /* current file arg being processed */ static FTSENT *ftent = NULL; /* current file tree entry */ -static int refcnt = 1; /* ref count for stdin supplied arg */ static int ftree_skip; /* when set skip to next file arg */ static int ftree_arg __P((void)); @@ -187,10 +186,8 @@ ftree_sel(arcn) * the trees are read from stdin. stdin processing uses a global * reference count for the last path input. */ - if (ftcur != NULL) + if (ftcur != NULL) ftcur->refcnt = 1; - else - refcnt = 1; /* * if -n we are done with this arg, force a skip to the next arg when @@ -280,11 +277,8 @@ ftree_arg() if (fthead == NULL) { /* * the user didn't supply any args, get the file trees - * to process from stdin; if the refenece count is 0 - * complain that the last stdin read file tree did not - * supply any selected members + * to process from stdin; */ - refcnt = 0; if (fgets(farray[0], PAXPATHLEN+1, stdin) == NULL) return(-1); if ((pt = strchr(farray[0], '\n')) != NULL) @@ -292,15 +286,11 @@ ftree_arg() } else { /* * the user supplied the file args as arguements to pax - * store the current reference count (unless we have not - * processed any files yet). */ - if (ftcur != NULL) { - ftcur->refcnt = refcnt; - if ((ftcur = ftcur->fow) == NULL) - return(-1); - } else + if (ftcur == NULL) ftcur = fthead; + else if ((ftcur != NULL)&&((ftcur=ftcur->fow) == NULL)) + return(-1); farray[0] = ftcur->fname; } -- 2.20.1