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

Diff for /mandoc/main.c between version 1.316 and 1.321

version 1.316, 2019/01/01 08:18:11 version 1.321, 2019/03/04 18:15:06
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010-2012, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>   * Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
Line 21 
Line 21 
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/ioctl.h>  #include <sys/ioctl.h>
 #include <sys/param.h>  /* MACHINE */  #include <sys/param.h>  /* MACHINE */
 #include <sys/termios.h>  
 #include <sys/wait.h>  #include <sys/wait.h>
   
 #include <assert.h>  #include <assert.h>
Line 40 
Line 39 
 #include <stdint.h>  #include <stdint.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <termios.h>
 #include <time.h>  #include <time.h>
 #include <unistd.h>  #include <unistd.h>
   
Line 148  main(int argc, char *argv[])
Line 148  main(int argc, char *argv[])
         setprogname(progname);          setprogname(progname);
 #endif  #endif
   
           mandoc_msg_setoutfile(stderr);
         if (strncmp(progname, "mandocdb", 8) == 0 ||          if (strncmp(progname, "mandocdb", 8) == 0 ||
             strcmp(progname, BINM_MAKEWHATIS) == 0)              strcmp(progname, BINM_MAKEWHATIS) == 0)
                 return mandocdb(argc, argv);                  return mandocdb(argc, argv);
Line 560  main(int argc, char *argv[])
Line 561  main(int argc, char *argv[])
                         }                          }
                 } else                  } else
                         mandoc_msg(MANDOCERR_FILE, 0, 0,                          mandoc_msg(MANDOCERR_FILE, 0, 0,
                             "%s", strerror(errno));                              "%s: %s", thisarg, strerror(errno));
   
                 if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)                  if (curp.wstop && mandoc_msg_getrc() != MANDOCLEVEL_OK)
                         break;                          break;
Line 796  fs_search(const struct mansearch *cfg, const struct ma
Line 797  fs_search(const struct mansearch *cfg, const struct ma
                 }                  }
                 if (res != NULL && *ressz == lastsz &&                  if (res != NULL && *ressz == lastsz &&
                     strchr(*argv, '/') == NULL) {                      strchr(*argv, '/') == NULL) {
                         if (cfg->sec == NULL)                          if (cfg->arch != NULL &&
                               arch_valid(cfg->arch, OSENUM) == 0)
                                   warnx("Unknown architecture \"%s\".",
                                       cfg->arch);
                           else if (cfg->sec == NULL)
                                 warnx("No entry for %s in the manual.",                                  warnx("No entry for %s in the manual.",
                                     *argv);                                      *argv);
                         else                          else
Line 834  parse(struct curparse *curp, int fd, const char *file)
Line 839  parse(struct curparse *curp, int fd, const char *file)
   
         if (curp->outdata == NULL)          if (curp->outdata == NULL)
                 outdata_alloc(curp);                  outdata_alloc(curp);
           else if (curp->outtype == OUTT_HTML)
                   html_reset(curp);
   
         mandoc_xr_reset();          mandoc_xr_reset();
         meta = mparse_result(curp->mp);          meta = mparse_result(curp->mp);

Legend:
Removed from v.1.316  
changed lines
  Added in v.1.321

CVSweb