=================================================================== RCS file: /cvs/mandoc/Attic/apropos.c,v retrieving revision 1.20 retrieving revision 1.23 diff -u -p -r1.20 -r1.23 --- mandoc/Attic/apropos.c 2011/11/27 18:54:01 1.20 +++ mandoc/Attic/apropos.c 2011/12/07 16:08:55 1.23 @@ -1,4 +1,4 @@ -/* $Id: apropos.c,v 1.20 2011/11/27 18:54:01 kristaps Exp $ */ +/* $Id: apropos.c,v 1.23 2011/12/07 16:08:55 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -53,7 +53,7 @@ main(int argc, char *argv[]) else ++progname; - whatis = 0 == strcmp(progname, "whatis"); + whatis = 0 == strncmp(progname, "whatis", 6); memset(&paths, 0, sizeof(struct manpaths)); memset(&opts, 0, sizeof(struct opts)); @@ -133,7 +133,7 @@ static int 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)); } @@ -142,8 +142,8 @@ usage(void) { fprintf(stderr, "usage: %s " - "[-M path] " - "[-m path] " + "[-M manpath] " + "[-m manpath] " "[-S arch] " "[-s section] " "expression...\n",