Mercurial > hg > dmlib
comparison tools/ppl.c @ 860:daebbf28953d
The argument handling API in dmargs* was synced with th-libs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 22 Nov 2014 18:50:07 +0200 |
parents | eba3b87f3f84 |
children | 985225a93aeb |
comparison
equal
deleted
inserted
replaced
859:55a3d6db20ac | 860:daebbf28953d |
---|---|
52 optStartOrder = 0; | 52 optStartOrder = 0; |
53 BOOL optUsePlayTime = FALSE; | 53 BOOL optUsePlayTime = FALSE; |
54 size_t optPlayTime; | 54 size_t optPlayTime; |
55 | 55 |
56 | 56 |
57 DMOptArg optList[] = | 57 static const DMOptArg optList[] = |
58 { | 58 { |
59 { 0, '?', "help", "Show this help", OPT_NONE }, | 59 { 0, '?', "help", "Show this help", OPT_NONE }, |
60 { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, | 60 { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, |
61 { 2, 0, "fs", "Fullscreen", OPT_NONE }, | 61 { 2, 0, "fs", "Fullscreen", OPT_NONE }, |
62 { 3, 'w', "window", "Initial window size/resolution -w 640x480", OPT_ARGREQ }, | 62 { 3, 'w', "window", "Initial window size/resolution -w 640x480", OPT_ARGREQ }, |
76 | 76 |
77 | 77 |
78 void argShowHelp() | 78 void argShowHelp() |
79 { | 79 { |
80 dmPrintBanner(stdout, dmProgName, "[options] <module>"); | 80 dmPrintBanner(stdout, dmProgName, "[options] <module>"); |
81 dmArgsPrintHelp(stdout, optList, optListN); | 81 dmArgsPrintHelp(stdout, optList, optListN, 0); |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 BOOL argHandleOpt(const int optN, char *optArg, char *currArg) | 85 BOOL argHandleOpt(const int optN, char *optArg, char *currArg) |
86 { | 86 { |
569 | 569 |
570 dmInitProg("CBP", "Cyrbe Basci Player", "0.1", NULL, NULL); | 570 dmInitProg("CBP", "Cyrbe Basci Player", "0.1", NULL, NULL); |
571 | 571 |
572 // Parse arguments | 572 // Parse arguments |
573 if (!dmArgsProcess(argc, argv, optList, optListN, | 573 if (!dmArgsProcess(argc, argv, optList, optListN, |
574 argHandleOpt, argHandleFile, TRUE)) | 574 argHandleOpt, argHandleFile, OPTH_BAILOUT)) |
575 exit(1); | 575 exit(1); |
576 | 576 |
577 // Open the files | 577 // Open the files |
578 if (optFilename == NULL) | 578 if (optFilename == NULL) |
579 { | 579 { |