masakih

KanColleGraphicDivider

  • R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

swfから画像を抽出するコマンドラインアプリケーション


コミットメタ情報

リビジョンa04bd0a8edd7e0edbd02a1449afb243c655f872b (tree)
日時2018-05-23 22:43:24
作者masakih <masakih@user...>
コミッターmasakih

ログメッセージ

s オプションを追加

s, silent 一切のメッセージを出力しない

変更サマリ

差分

--- a/KanColleGraphicDivider/main.m
+++ b/KanColleGraphicDivider/main.m
@@ -26,17 +26,25 @@ static void usage(int exitVal, FILE *fp) {
2626 fprintf(fp, "Usage: %s [OPTIONS] input-swf-file\n", toolName);
2727
2828 fprintf(fp, "\n");
29+
2930 fprintf(fp, " -c charactorIDs, --charactorid=charactorIDs\n");
30- fprintf(fp, "\tcomma separated target image charactor ids. ex) 17,19 \n");
31+ fprintf(fp, "\tComma separated target image charactor ids. ex) 17,19 \n");
3132 fprintf(fp, "\textract all images if not set.\n");
33+
3234 fprintf(fp, " -o output-directory, --output=output-directory\n");
33- fprintf(fp, "\textracted images output to output-directory.\n");
35+ fprintf(fp, "\tExtracted images output to output-directory.\n");
36+
3437 fprintf(fp, " -v, --version\n");
35- fprintf(fp, "\toutput version information and exit.\n");
38+ fprintf(fp, "\tOutput version information and exit.\n");
39+
3640 fprintf(fp, " -f, --force\n");
37- fprintf(fp, "\tif set, force orver write outputfile.\n");
41+ fprintf(fp, "\tIf set, force orver write outputfile.\n");
42+
43+ fprintf(fp, " -s, --silent\n");
44+ fprintf(fp, "\tSilent mode.\n");
45+
3846 fprintf(fp, " -h, --help\n");
39- fprintf(fp, "\tdisplay this help and text.\n");
47+ fprintf(fp, "\tDisplay this help and text.\n");
4048
4149 exit(exitVal);
4250 }
@@ -60,11 +68,12 @@ int main(int argc, char * const *argv) {
6068
6169 toolName = toolNameStr(argv[0]);
6270
63-#define SHORTOPTS "fho:vc:"
71+#define SHORTOPTS "fsho:vc:"
6472 static struct option longopts[] = {
6573 {"output", required_argument, NULL, 'o'},
6674 {"charactorid", required_argument, NULL, 'c'},
6775 {"force", no_argument, NULL, 'f'},
76+ {"silent", no_argument, NULL, 's'},
6877 {"version", no_argument, NULL, 'v'},
6978 {"help", no_argument, NULL, 'h'},
7079 {NULL, 0, NULL, 0}
@@ -82,6 +91,10 @@ int main(int argc, char * const *argv) {
8291 case 'f':
8392 forceOverwrite = YES;
8493 break;
94+ case 's':
95+ fclose(stdout);
96+ fclose(stderr);
97+ break;
8598 case 'h':
8699 usage(EXIT_SUCCESS, stdout);
87100 break;