summaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-09-06 00:00:50 +0200
committerChristoph Lohmann <20h@r-36.net>2012-09-06 00:00:50 +0200
commita1cd28f8099eac3938461f9e63ff6b74d4d824ef (patch)
tree005debb669f3bbc5a6c259cc4ac0d94c123cd153 /st.c
parentAdding instantenous debug output and fixing italic with a reset. (diff)
downloadst-a1cd28f8099eac3938461f9e63ff6b74d4d824ef.tar.gz
st-a1cd28f8099eac3938461f9e63ff6b74d4d824ef.zip
Allow simpler stdout -f handling.
Diffstat (limited to '')
-rw-r--r--st.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/st.c b/st.c
index fd5e0fd..7852de0 100644
--- a/st.c
+++ b/st.c
@@ -801,9 +801,15 @@ ttynew(void) {
801 close(s); 801 close(s);
802 cmdfd = m; 802 cmdfd = m;
803 signal(SIGCHLD, sigchld); 803 signal(SIGCHLD, sigchld);
804 if(opt_io && !(fileio = fopen(opt_io, "w"))) { 804 if(opt_io) {
805 fprintf(stderr, "Error opening %s:%s\n", 805 if(!strcmp(opt_io, "-")) {
806 opt_io, strerror(errno)); 806 fileio = stdout;
807 } else {
808 if(!(fileio = fopen(opt_io, "w"))) {
809 fprintf(stderr, "Error opening %s:%s\n",
810 opt_io, strerror(errno));
811 }
812 }
807 } 813 }
808 } 814 }
809} 815}