version 1.20, 2011/11/27 18:54:01 |
version 1.23, 2011/12/07 16:08:55 |
Line 53 main(int argc, char *argv[]) |
|
Line 53 main(int argc, char *argv[]) |
|
else |
else |
++progname; |
++progname; |
|
|
whatis = 0 == strcmp(progname, "whatis"); |
whatis = 0 == strncmp(progname, "whatis", 6); |
|
|
memset(&paths, 0, sizeof(struct manpaths)); |
memset(&paths, 0, sizeof(struct manpaths)); |
memset(&opts, 0, sizeof(struct opts)); |
memset(&opts, 0, sizeof(struct opts)); |
|
|
cmp(const void *p1, const void *p2) |
cmp(const void *p1, const void *p2) |
{ |
{ |
|
|
return(strcmp(((const struct res *)p1)->title, |
return(strcasecmp(((const struct res *)p1)->title, |
((const struct res *)p2)->title)); |
((const struct res *)p2)->title)); |
} |
} |
|
|
|
|
{ |
{ |
|
|
fprintf(stderr, "usage: %s " |
fprintf(stderr, "usage: %s " |
"[-M path] " |
"[-M manpath] " |
"[-m path] " |
"[-m manpath] " |
"[-S arch] " |
"[-S arch] " |
"[-s section] " |
"[-s section] " |
"expression...\n", |
"expression...\n", |