version 1.260, 2015/12/15 17:38:45 |
version 1.262, 2016/01/08 02:53:13 |
|
|
/* $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, 2015 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2010-2012, 2014-2016 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 126 main(int argc, char *argv[]) |
|
Line 126 main(int argc, char *argv[]) |
|
size_t isec, i, sz; |
size_t isec, i, sz; |
int prio, best_prio; |
int prio, best_prio; |
char sec; |
char sec; |
enum mandoclevel rctmp; |
|
enum outmode outmode; |
enum outmode outmode; |
int fd; |
int fd; |
int show_usage; |
int show_usage; |
Line 459 main(int argc, char *argv[]) |
|
Line 458 main(int argc, char *argv[]) |
|
} |
} |
|
|
while (argc > 0) { |
while (argc > 0) { |
rctmp = mparse_open(curp.mp, &fd, |
fd = mparse_open(curp.mp, resp != NULL ? resp->file : *argv); |
resp != NULL ? resp->file : *argv); |
|
if (rc < rctmp) |
|
rc = rctmp; |
|
|
|
if (fd != -1) { |
if (fd != -1) { |
if (use_pager) { |
if (use_pager) { |
tag_files = tag_init(); |
tag_files = tag_init(); |
Line 482 main(int argc, char *argv[]) |
|
Line 477 main(int argc, char *argv[]) |
|
|
|
if (argc > 1 && curp.outtype <= OUTT_UTF8) |
if (argc > 1 && curp.outtype <= OUTT_UTF8) |
ascii_sepline(curp.outdata); |
ascii_sepline(curp.outdata); |
} |
} else if (rc < MANDOCLEVEL_ERROR) |
|
rc = MANDOCLEVEL_ERROR; |
|
|
if (MANDOCLEVEL_OK != rc && curp.wstop) |
if (MANDOCLEVEL_OK != rc && curp.wstop) |
break; |
break; |
Line 724 parse(struct curparse *curp, int fd, const char *file) |
|
Line 720 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; |
|
|