raynstard #7617(2008/09/10 08:46 GMT) [ diff ] Rating0/0=0.00
sh版作っていて-oオプションのチェックが抜けていたことに気づくorz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
--- doukaku205.c 2008-09-10 22:23:39.953125000 +0900 +++ doukaku205.c.new 2008-09-10 22:43:58.656250000 +0900 @@ -61,6 +61,14 @@ info.argv0 = argv[0]; info.argv = &argv[optind]; info.num = argc - optind; + + /* 必須チェック */ + if( info.output != true ) + { + printf("必須オプションがたりない\n"); + printf("書式:cmdopt -o [-q] [-d{0|1|2}] 文字列 [文字列 ...]\n"); + return 1; + } if( info.num < 1 ) { printf("文字列がない\n");
Rating0/0=0.00-0+
[ reply ]
raynstard
#7617()
[
diff
]
Rating0/0=0.00
Rating0/0=0.00-0+