pinosaur
/
smdp.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved file handling to mdp.c completely
[smdp.git]
/
mdp.c
diff --git
a/mdp.c
b/mdp.c
index
9a71cd0
..
4e37879
100644
(file)
--- a/
mdp.c
+++ b/
mdp.c
@@
-104,6
+104,10
@@
int main(int argc, char *argv[]) {
// close file
fclose(input);
// close file
fclose(input);
+ // replace stdin with current tty if input was a pipe
+ if(input == stdin)
+ freopen("/dev/tty", "rw", stdin);
+
if(debug > 0) {
markdown_debug(deck, debug);
}
if(debug > 0) {
markdown_debug(deck, debug);
}