=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/mandoc/main.c 2009/06/18 23:51:12 1.6 --- src/usr.bin/mandoc/main.c 2009/06/21 20:10:31 1.7 *************** *** 1,4 **** ! /* $Id: main.c,v 1.6 2009/06/18 23:51:12 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: main.c,v 1.7 2009/06/21 20:10:31 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 88,95 **** static int manwarn(void *, int, int, const char *); static int mdocwarn(void *, int, int, enum mdoc_warn, const char *); - static int fstdin(struct buf *, struct buf *, - struct curparse *); static int ffile(struct buf *, struct buf *, const char *, struct curparse *); static int fdesc(struct buf *, struct buf *, --- 88,93 ---- *************** *** 151,159 **** rc = 1; ! if (NULL == *argv) ! if ( ! fstdin(&blk, &ln, &curp)) rc = 0; while (rc && *argv) { if ( ! ffile(&blk, &ln, *argv, &curp)) --- 149,160 ---- rc = 1; ! if (NULL == *argv) { ! curp.file = ""; ! curp.fd = STDIN_FILENO; ! if ( ! fdesc(&blk, &ln, &curp)) rc = 0; + } while (rc && *argv) { if ( ! ffile(&blk, &ln, *argv, &curp)) *************** *** 257,272 **** warnx("memory exhausted"); return(mdoc); - } - - - static int - fstdin(struct buf *blk, struct buf *ln, struct curparse *curp) - { - - curp->file = ""; - curp->fd = STDIN_FILENO; - return(fdesc(blk, ln, curp)); } --- 258,263 ----