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

Diff for /mandoc/main.c between version 1.3 and 1.4

version 1.3, 2009/03/19 16:40:49 version 1.4, 2009/03/19 18:30:26
Line 165  main(int argc, char *argv[])
Line 165  main(int argc, char *argv[])
   
         mdoc = mdoc_alloc(&wflags, fflags, &cb);          mdoc = mdoc_alloc(&wflags, fflags, &cb);
   
         while (*argv) {          /*
                 if ( ! file(&line, &linesz, &buf, &bufsz, *argv, mdoc))           * Loop around available files.
                         break;           */
                 if (outrun && ! (*outrun)(outdata, mdoc))  
                         break;  
   
                 /* Reset the parser for another file. */          if (NULL == *argv) {
                 mdoc_reset(mdoc);                  c = fdesc(&line, &linesz, &buf, &bufsz,
                 argv++;                                  "stdin", STDIN_FILENO, mdoc);
                   rc = 0;
                   if (c && NULL == outrun)
                           rc = 1;
                   else if (c && outrun && (*outrun)(outdata, mdoc))
                           rc = 1;
           } else {
                   while (*argv) {
                           c = file(&line, &linesz, &buf,
                                           &bufsz, *argv, mdoc);
                           if ( ! c)
                                   break;
                           if (outrun && ! (*outrun)(outdata, mdoc))
                                   break;
                           /* Reset the parser for another file. */
                           mdoc_reset(mdoc);
                           argv++;
                   }
                   rc = NULL == *argv;
         }          }
   
         rc = NULL == *argv;  
   
         if (buf)          if (buf)
                 free(buf);                  free(buf);

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

CVSweb