summaryrefslogtreecommitdiff
path: root/bin/pax/ftree.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2016-08-26 04:17:49 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2016-08-26 04:17:49 +0000
commit52b3d255a353f7645d594c89a879431eafc0ba46 (patch)
tree51364dc14a4c828056cc26df078ead922e51fabe /bin/pax/ftree.c
parente7ec2792742df574bf22aadff5b1832d14a77c49 (diff)
ftree.h is only used by ftree.c; merge it into the .c file
<sys/time.h> is unnecessary; sort #includes
Diffstat (limited to 'bin/pax/ftree.c')
-rw-r--r--bin/pax/ftree.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/bin/pax/ftree.c b/bin/pax/ftree.c
index 6290b57df5c..e45d4d43038 100644
--- a/bin/pax/ftree.c
+++ b/bin/pax/ftree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftree.c,v 1.39 2016/06/03 23:22:20 tedu Exp $ */
+/* $OpenBSD: ftree.c,v 1.40 2016/08/26 04:17:48 guenther Exp $ */
/* $NetBSD: ftree.c,v 1.4 1995/03/21 09:07:21 cgd Exp $ */
/*-
@@ -35,19 +35,31 @@
*/
#include <sys/types.h>
-#include <sys/time.h>
#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
#include <errno.h>
-#include <stdlib.h>
#include <fts.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
#include "pax.h"
-#include "ftree.h"
#include "extern.h"
/*
+ * Data structure used to store the file args to be handed to fts().
+ * It keeps track of which args generated a "selected" member.
+ */
+typedef struct ftree {
+ char *fname; /* file tree name */
+ int refcnt; /* has tree had a selected file? */
+ int newercnt; /* skipped due to -u/-D */
+ int chflg; /* change directory flag */
+ struct ftree *fow; /* pointer to next entry on list */
+} FTREE;
+
+
+/*
* routines to interface with the fts library function.
*
* file args supplied to pax are stored on a single linked list (of type FTREE)