=================================================================== RCS file: /cvs/mandoc/Attic/apropos_db.c,v retrieving revision 1.30 retrieving revision 1.32.2.1 diff -u -p -r1.30 -r1.32.2.1 --- mandoc/Attic/apropos_db.c 2012/03/24 00:31:55 1.30 +++ mandoc/Attic/apropos_db.c 2013/10/02 21:03:26 1.32.2.1 @@ -1,6 +1,6 @@ -/* $Id: apropos_db.c,v 1.30 2012/03/24 00:31:55 kristaps Exp $ */ +/* $Id: apropos_db.c,v 1.32.2.1 2013/10/02 21:03:26 schwarze Exp $ */ /* - * Copyright (c) 2011 Kristaps Dzonsons + * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any @@ -19,6 +19,8 @@ #include "config.h" #endif +#include + #include #include #include @@ -35,6 +37,7 @@ # include # include #else +# include # include #endif @@ -426,6 +429,7 @@ apropos_search(int pathsz, char **paths, const struct */ for (i = 0; i < pathsz; i++) { + assert('/' == paths[i][0]); if (chdir(paths[i])) continue; if (single_search(&tree, opts, expr, terms, mc, i))