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

Diff for /mandoc/main.c between version 1.259 and 1.261

version 1.259, 2015/11/20 21:59:54 version 1.261, 2016/01/08 02:13:39
Line 299  main(int argc, char *argv[])
Line 299  main(int argc, char *argv[])
                 use_pager = 0;                  use_pager = 0;
   
 #if HAVE_PLEDGE  #if HAVE_PLEDGE
         if (!use_pager && pledge("stdio rpath flock", NULL) == -1)          if (!use_pager)
                 err((int)MANDOCLEVEL_SYSERR, "pledge");                  if (pledge("stdio rpath flock", NULL) == -1)
                           err((int)MANDOCLEVEL_SYSERR, "pledge");
 #endif  #endif
   
         /* Parse arguments. */          /* Parse arguments. */
Line 430  main(int argc, char *argv[])
Line 431  main(int argc, char *argv[])
         /* mandoc(1) */          /* mandoc(1) */
   
 #if HAVE_PLEDGE  #if HAVE_PLEDGE
         if (pledge(use_pager ? "stdio rpath tmppath tty proc exec" :          if (use_pager) {
             "stdio rpath", NULL) == -1)                  if (pledge("stdio rpath tmppath tty proc exec", NULL) == -1)
                 err((int)MANDOCLEVEL_SYSERR, "pledge");                          err((int)MANDOCLEVEL_SYSERR, "pledge");
           } else {
                   if (pledge("stdio rpath", NULL) == -1)
                           err((int)MANDOCLEVEL_SYSERR, "pledge");
           }
 #endif  #endif
   
         if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))          if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))
Line 719  parse(struct curparse *curp, int fd, const char *file)
Line 724  parse(struct curparse *curp, int fd, const char *file)
         /* Begin by parsing the file itself. */          /* Begin by parsing the file itself. */
   
         assert(file);          assert(file);
         assert(fd >= -1);          assert(fd > 0);
   
         rctmp = mparse_readfd(curp->mp, fd, file);          rctmp = mparse_readfd(curp->mp, fd, file);
           if (fd != STDIN_FILENO)
                   close(fd);
         if (rc < rctmp)          if (rc < rctmp)
                 rc = rctmp;                  rc = rctmp;
   

Legend:
Removed from v.1.259  
changed lines
  Added in v.1.261

CVSweb