[BACK]Return to manpath.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/manpath.c between version 1.2 and 1.3

version 1.2, 2011/12/12 01:59:13 version 1.3, 2011/12/19 02:26:33
Line 16 
Line 16 
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   
 #include <sys/types.h>  #include <sys/param.h>
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <limits.h>  #include <limits.h>
Line 31 
Line 32 
 #define MAN_CONF_KEY    "_whatdb"  #define MAN_CONF_KEY    "_whatdb"
   
 static  void     manpath_add(struct manpaths *, const char *);  static  void     manpath_add(struct manpaths *, const char *);
   static  void     manpath_parseline(struct manpaths *, char *);
   
 void  void
 manpath_parse(struct manpaths *dirs, const char *file,  manpath_parse(struct manpaths *dirs, const char *file,
Line 43 
Line 45 
                 defp = getenv("MANPATH");                  defp = getenv("MANPATH");
   
         if (NULL == defp)          if (NULL == defp)
                 manpath_parseconf(dirs, file);                  manpath_manconf(dirs, file ? file : MAN_CONF_FILE);
         else          else
                 manpath_parseline(dirs, defp);                  manpath_parseline(dirs, defp);
 }  }
Line 51 
Line 53 
 /*  /*
  * Parse a FULL pathname from a colon-separated list of arrays.   * Parse a FULL pathname from a colon-separated list of arrays.
  */   */
 void  static void
 manpath_parseline(struct manpaths *dirs, char *path)  manpath_parseline(struct manpaths *dirs, char *path)
 {  {
         char    *dir;          char    *dir;
Line 86 
Line 88 
                  ((size_t)dirs->sz + 1) * sizeof(char *));                   ((size_t)dirs->sz + 1) * sizeof(char *));
   
         dirs->paths[dirs->sz++] = mandoc_strdup(cp);          dirs->paths[dirs->sz++] = mandoc_strdup(cp);
 }  
   
 void  
 manpath_parseconf(struct manpaths *dirs, const char *file)  
 {  
   
         manpath_manconf(dirs, file ? file : MAN_CONF_FILE);  
 }  }
   
 void  void

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3