pm

barely a pack manager
git clone git://z3bra.org/pm
Log | Files | Refs | README | LICENSE

commit e85aace532941b00cad1e8e5f1e090afa064cddb
parent 40512c0e9dfffd238b3178ae25f0ea7624137ff3
Author: z3bra <willyatmailoodotorg>
Date:   Tue Dec 22 13:34:51 2015

Change function names and comments

Diffstat:
 pack.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/pack.c b/pack.c @@ -26,7 +26,7 @@ usage(char *name) * output the content of an archive */ int -pack_list(char *filename) +inspect(char *filename) { struct archive *a; struct archive_entry *e; @@ -55,10 +55,10 @@ pack_list(char *filename) } /* - * create an archive out of a file name (or directory + * pack mutliple files into an archive */ int -pack_creat(const char *out, char **filename) +pack(const char *out, char **filename) { struct archive *a; struct archive_entry *e; @@ -104,10 +104,10 @@ pack_creat(const char *out, char **filename) /* - * create the files contained in the archive under the given directory + * extract files into the gien directory */ int -pack_unpack(char *root, const char *in) +unpack(char *root, const char *in) { struct archive *a; struct archive *w; /* write */ @@ -141,7 +141,7 @@ pack_unpack(char *root, const char *in) while (archive_read_next_header(a, &e) != ARCHIVE_EOF) { r = archive_write_header(w, e); - if (r < ARCHIVE_WARN) { + if (r < ARCHIVE_OK) { fprintf(stderr, "%s\n", archive_error_string(w)); return r; } @@ -172,15 +172,15 @@ main (int argc, char **argv) ARGBEGIN{ case 'l': - pack_list(EARGF(usage(argv0))); + inspect(EARGF(usage(argv0))); break; case 'c': fn = EARGF(usage(argv0)); - pack_creat(fn, ++argv); + pack(fn, ++argv); break; case 'e': fn = EARGF(usage(argv0)); - pack_unpack(PACKAGE_ROOT, fn); + unpack(PACKAGE_ROOT, fn); break; default: usage(argv0);