summaryrefslogtreecommitdiffstats
path: root/usr.bin/cpio/cpio.h
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-06-21 02:20:20 +0000
committerkientzle <kientzle@FreeBSD.org>2008-06-21 02:20:20 +0000
commit9254f3ae51d2393c6c949dd0df66da7390fb9b0e (patch)
tree2261941fea24abe81097c5b38c9d9c251c575253 /usr.bin/cpio/cpio.h
parent93b5d5e1a904f166be427a7592aaf206581b09a9 (diff)
downloadFreeBSD-src-9254f3ae51d2393c6c949dd0df66da7390fb9b0e.zip
FreeBSD-src-9254f3ae51d2393c6c949dd0df66da7390fb9b0e.tar.gz
Rework line-processing framework to add support for --null and
to eliminate a callback.
Diffstat (limited to 'usr.bin/cpio/cpio.h')
-rw-r--r--usr.bin/cpio/cpio.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/cpio/cpio.h b/usr.bin/cpio/cpio.h
index ecec2ee..7808633 100644
--- a/usr.bin/cpio/cpio.h
+++ b/usr.bin/cpio/cpio.h
@@ -53,12 +53,12 @@ struct cpio {
int extract_flags; /* Flags for extract operation */
char symlink_mode; /* H or L, per BSD conventions */
const char *compress_program;
+ char line_separator; /* --null ? '\0' : '\n' */
int option_append; /* -A, only relevant for -o */
int option_atime_restore; /* -a */
int option_follow_links; /* -L */
int option_link; /* -l */
int option_list; /* -t */
- int option_null; /* -0 --null */
int option_rename; /* -r */
char *destdir;
size_t pass_destpath_alloc;
@@ -98,9 +98,13 @@ enum {
OPTION_VERSION
};
+struct line_reader;
+
+struct line_reader *process_lines_init(const char *, char separator);
+const char *process_lines_next(struct line_reader *);
+void process_lines_free(struct line_reader *);
+
int cpio_getopt(struct cpio *cpio);
-int process_lines(struct cpio *cpio, const char *pathname,
- int (*process)(struct cpio *, const char *));
int include_from_file(struct cpio *, const char *);
#endif
OpenPOWER on IntegriCloud