summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorsenator <senator>2008-03-18 14:02:27 +0000
committersenator <senator>2008-03-18 14:02:27 +0000
commitd658d56eb7c00def8bbb8605c6259016979a47ba (patch)
tree006807fd97e87d331dd5221b37711f5bc7899207 /client
parentecd2386b857c629c03e6a82610ba0801639a4da1 (diff)
changed command line -? to /?
Diffstat (limited to 'client')
-rw-r--r--client/main.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/client/main.cc b/client/main.cc
index fbedfc2..0bd94d7 100644
--- a/client/main.cc
+++ b/client/main.cc
@@ -40,17 +40,11 @@ int main(int argc, char *argv[])
char macro[100] = "example";
char cpr[11] = "0000000000";
char user[20] = "testuser";
+ char config[30] = "pracro.ini";
int a;
for(a=1; a < argc; a++) {
- /*
- if(argv[a][0] != '-') {
- strcpy(cprfile, argv[a]);
- continue;
- }
- */
- if(strcmp(argv[a], "-h") == 0 || strcmp(argv[a], "--help") == 0 ||
- strcmp(argv[a], "-?") == 0) {
+ if(strcmp(argv[a], "-h") == 0 || strcmp(argv[a], "--help") == 0) {
printf("Usage: pracro -m MACRO -c CPR -U USER\n");
printf("Executes the requested Pracro MACRO using supplied CPR "
"and USER.\n");
@@ -92,12 +86,16 @@ int main(int argc, char *argv[])
a++;
continue;
}
+ if(strcmp(argv[a], "-C") == 0 || strcmp(argv[a], "--config") == 0) {
+ if(a+1 == argc || argv[a+1][0] == '-') {
+ printf("Missing argument for config, exiting...\n");
+ exit(1);
+ }
+ strcpy(config, argv[a+1]);
+ a++;
+ continue;
+ }
}
-
-
-
-
-
new_macro(macro, cpr, user);