diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-12-27 18:51:25 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-12-27 18:51:25 +0000 |
commit | d8b402becc17ecde4e1ebe75eea8221fd42a162b (patch) | |
tree | b6592c62f2c66ec51eadd067227d58db7ab3f8e3 /apropos.c | |
parent | c5990883f0c591898575364a94056380526ffc11 (diff) | |
download | mandoc-d8b402becc17ecde4e1ebe75eea8221fd42a162b.tar.gz |
Change the mansearch() interface to use the mlinks table in the database
and return a list of names with sections, used by apropos(1) for display.
While here, improve uniformity of the interface by allocating the file
name dynamically, just like the names list and the description.
Diffstat (limited to 'apropos.c')
-rw-r--r-- | apropos.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -96,7 +96,9 @@ main(int argc, char *argv[]) goto usage; for (i = 0; i < sz; i++) { - printf("%s - %s\n", res[i].file, res[i].desc); + printf("%s - %s\n", res[i].names, res[i].desc); + free(res[i].file); + free(res[i].names); free(res[i].desc); } |