From eba8de3007e8bc3187a70d19cedb77fdda47aa68 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sun, 2 Oct 2011 22:37:51 +0000 Subject: [PATCH] kextract (without further filenames) lists all files in the GRP. git-svn-id: https://svn.eduke32.com/eduke32@2065 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/util/kextract.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/util/kextract.c b/polymer/eduke32/build/src/util/kextract.c index af45e82ad..5ba56e0ec 100644 --- a/polymer/eduke32/build/src/util/kextract.c +++ b/polymer/eduke32/build/src/util/kextract.c @@ -37,13 +37,17 @@ int main(int argc, char **argv) { int i, j, k, l, fil, fil2; - if (argc < 3) + int onlylist = (argc==2); + + if (argc < 2) { - printf("KEXTRACT [grouped file][@file or filespec...] by Kenneth Silverman\n"); + printf("KEXTRACT [@file or filespec...] by Kenneth Silverman\n"); printf(" This program extracts files from a previously grouped group file.\n"); printf(" You can extract files using the ? and * wildcards.\n"); printf(" Ex: kextract stuff.dat tiles000.art nukeland.map palette.dat\n"); - printf(" (stuff.dat is the group file, the rest are the files to extract)\n"); + printf(" (stuff.dat is the group file, the rest are the files to extract)\n"); + printf(" kextract stuff.grp\n"); + printf(" (simply lists the contents of stuff.grp)\n"); return(0); } @@ -77,6 +81,14 @@ int main(int argc, char **argv) } fileoffs[numfiles] = j; + if (onlylist) + { + for (i=0; i