dj(1): prefix getopt optstring with :
This commit is contained in:
parent
6548a448c7
commit
3897f44cf8
2
src/dj.c
2
src/dj.c
|
@ -279,7 +279,7 @@ int main(int argc, char *argv[]){
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
program_name = argv[0];
|
program_name = argv[0];
|
||||||
while((c = getopt(argc, argv, "a:b:B:c:i:hHns:S:o:")) != -1)
|
while((c = getopt(argc, argv, ":a:b:B:c:i:hHns:S:o:")) != -1)
|
||||||
switch(c){
|
switch(c){
|
||||||
case 'i': case 'o': i = (c == 'o');
|
case 'i': case 'o': i = (c == 'o');
|
||||||
if(optarg[0] == '-' && optarg[1] == '\0'){ /* optarg == "-" */
|
if(optarg[0] == '-' && optarg[1] == '\0'){ /* optarg == "-" */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user