[sword-svn] r3170 - in branches/sword-1-7-x: . utilities/diatheke
greg.hellings at crosswire.org
greg.hellings at crosswire.org
Wed Apr 16 21:14:38 MST 2014
Author: greg.hellings
Date: 2014-04-16 21:14:38 -0700 (Wed, 16 Apr 2014)
New Revision: 3170
Modified:
branches/sword-1-7-x/
branches/sword-1-7-x/utilities/diatheke/diatheke.cpp
Log:
Merging r3110 - More generous help options in diatheke
Property changes on: branches/sword-1-7-x
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108
+ /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108,3110
Modified: branches/sword-1-7-x/utilities/diatheke/diatheke.cpp
===================================================================
--- branches/sword-1-7-x/utilities/diatheke/diatheke.cpp 2014-04-17 04:13:34 UTC (rev 3169)
+++ branches/sword-1-7-x/utilities/diatheke/diatheke.cpp 2014-04-17 04:14:38 UTC (rev 3170)
@@ -71,6 +71,8 @@
fprintf (stderr, " diatheke -b KJV -o fmnx -k Jn 3:16\n");
fprintf (stderr, " diatheke -b WHNU -t Latin -o mn -k Mt 24\n");
fprintf (stderr, " diatheke -b KJV -s phrase -r Mt -k love\n");
+
+ exit(EXIT_FAILURE);
}
int main(int argc, char **argv)
@@ -245,8 +247,11 @@
if (i < argc) {
SWBuf key = argv[i];
i++;
- for (; i < argc; i++)
+ for (; i < argc; i++) {
+ if (!::stricmp("-h", argv[i]) || !::stricmp("--help", argv[i]))
+ printsyntax();
key = key + " " + argv[i];
+ }
ref = new char[key.length() + 1];
strcpy (ref, key.c_str());
if (strlen(ref))
@@ -269,6 +274,11 @@
}
}
*/
+ else {
+ // unexpected argument, so print the syntax
+ // -h, --help, /?, etc. will trigger this
+ printsyntax();
+ }
}
More information about the sword-cvs
mailing list