~mdw
/
sgt
/
halibut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow a hastily selected subset of the output formats to also accept
[sgt/halibut]
/
bk_man.c
diff --git
a/bk_man.c
b/bk_man.c
index
dce77d4
..
bb4e5b5
100644
(file)
--- a/
bk_man.c
+++ b/
bk_man.c
@@
-235,7
+235,10
@@
void man_backend(paragraph *sourceform, keywordlist *keywords,
/*
* Open the output file.
*/
/*
* Open the output file.
*/
- fp = fopen(conf.filename, "w");
+ if (!strcmp(conf.filename, "-"))
+ fp = stdout;
+ else
+ fp = fopen(conf.filename, "w");
if (!fp) {
error(err_cantopenw, conf.filename);
return;
if (!fp) {
error(err_cantopenw, conf.filename);
return;
@@
-425,7
+428,8
@@
void man_backend(paragraph *sourceform, keywordlist *keywords,
/*
* Tidy up.
*/
/*
* Tidy up.
*/
- fclose(fp);
+ if (fp != stdout)
+ fclose(fp);
man_conf_cleanup(conf);
}
man_conf_cleanup(conf);
}