version 1.4, 2011/11/13 11:07:10 |
version 1.5, 2011/11/16 13:23:27 |
|
|
apropos(int argc, char *argv[]) |
apropos(int argc, char *argv[]) |
{ |
{ |
int ch; |
int ch; |
|
size_t terms; |
struct opts opts; |
struct opts opts; |
struct expr *e; |
struct expr *e; |
extern int optind; |
extern int optind; |
|
|
if (0 == argc) |
if (0 == argc) |
return(EXIT_SUCCESS); |
return(EXIT_SUCCESS); |
|
|
if (NULL == (e = exprcomp(argc, argv))) { |
if (NULL == (e = exprcomp(argc, argv, &terms))) { |
fprintf(stderr, "Bad expression\n"); |
fprintf(stderr, "Bad expression\n"); |
return(EXIT_FAILURE); |
return(EXIT_FAILURE); |
} |
} |
|
|
* The index database is a recno. |
* The index database is a recno. |
*/ |
*/ |
|
|
apropos_search(&opts, e, NULL, list); |
apropos_search(&opts, e, terms, NULL, list); |
exprfree(e); |
exprfree(e); |
return(EXIT_SUCCESS); |
return(EXIT_SUCCESS); |
} |
} |