1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
const char *options[]={
"--help",
"-script",
"-encoding",
"-music-format",
"-music-directory",
"-transparency-method-layer",
"-transparency-method-anim",
"-image-cache-size",
"-debug",
"-redirect",
"--version",
"-implementation",
"-no-console",
"-dump-text",
"-f",
"-r",
"-verbosity",
"-sdebug",
"-s",
0
};
long option=-1;
for (long a=0;options[a] && option<0;a++)
if (!strcmp(argv[argument],options[a]))
option=a;
switch (option){
case 0:
//...
case 1:
//...
//...
};
|