Commit | Line | Data |
---|---|---|
1 | #include "cll1.h" | |
2 | ||
3 | //try$ make arguments1 | |
4 | //try$ ./arguments1 -x xxx yyyy -c cccc | |
5 | ||
6 | program | |
7 | { | |
8 | char *ptr; | |
9 | ||
10 | arguments | |
11 | { | |
12 | thisargument(ptr); | |
13 | if(*ptr=='-') | |
14 | { | |
15 | printf("Command line switch: -%c ",ptr[1]); | |
16 | nextargument(ptr); | |
17 | printf("followed by: %s\n",ptr); | |
18 | } | |
19 | else | |
20 | printf("Simple argument: %s \n",ptr); | |
21 | } | |
22 | else | |
23 | puts("Bleeeeh, no arguments supplied... :-("); | |
24 | } |