diff options
author | Tim Kientzle <kientzle@gmail.com> | 2008-05-28 18:17:53 -0400 |
---|---|---|
committer | Tim Kientzle <kientzle@gmail.com> | 2008-05-28 18:17:53 -0400 |
commit | 55cd13edec5f2a9b2a07c452d5d21c1209cc113d (patch) | |
tree | e26175c3739084745342ded25d85d64707b3ebbe /cpio/cpio.h | |
parent | e5cc9b33aabceff79b0b96a7fbe343d4df0491ed (diff) | |
download | libarchive-55cd13edec5f2a9b2a07c452d5d21c1209cc113d.tar.gz |
Callbacks are annoying. Change the callback-driven line processor
into a separate line reader that returns a line each time it's
called.
SVN-Revision: 101
Diffstat (limited to 'cpio/cpio.h')
-rw-r--r-- | cpio/cpio.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpio/cpio.h b/cpio/cpio.h index ecec2eee..78086331 100644 --- a/cpio/cpio.h +++ b/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 |