[BACK]Return to manpath.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/manpath.c between version 1.14 and 1.17

version 1.14, 2014/04/20 16:46:05 version 1.17, 2014/08/16 19:00:01
Line 15 
Line 15 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
 #ifdef HAVE_CONFIG_H  
 #include "config.h"  #include "config.h"
 #endif  
   
   #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <limits.h>  #include <limits.h>
Line 39  void
Line 39  void
 manpath_parse(struct manpaths *dirs, const char *file,  manpath_parse(struct manpaths *dirs, const char *file,
                 char *defp, char *auxp)                  char *defp, char *auxp)
 {  {
 #ifdef  USE_MANPATH  #if HAVE_MANPATH
         char             cmd[(PATH_MAX * 3) + 20];          char             cmd[(PATH_MAX * 3) + 20];
         FILE            *stream;          FILE            *stream;
         char            *buf;          char            *buf;
Line 169  manpath_add(struct manpaths *dirs, const char *dir)
Line 169  manpath_add(struct manpaths *dirs, const char *dir)
                 if (0 == strcmp(dirs->paths[i], dir))                  if (0 == strcmp(dirs->paths[i], dir))
                         return;                          return;
   
         dirs->paths = mandoc_realloc(dirs->paths,          dirs->paths = mandoc_reallocarray(dirs->paths,
             (dirs->sz + 1) * sizeof(char *));              dirs->sz + 1, sizeof(char *));
   
         dirs->paths[dirs->sz++] = mandoc_strdup(cp);          dirs->paths[dirs->sz++] = mandoc_strdup(cp);
 }  }

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.17

CVSweb