URI: 
       Allow simpler stdout -f handling. - st - simple terminal
  HTML git clone https://git.parazyd.org/st
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit a1cd28f8099eac3938461f9e63ff6b74d4d824ef
   DIR parent f2da43a0b66f76532ebef5ed2b2c9135aca771a5
  HTML Author: Christoph Lohmann <20h@r-36.net>
       Date:   Thu,  6 Sep 2012 00:00:50 +0200
       
       Allow simpler stdout -f handling.
       
       Diffstat:
         M st.c                                |      12 +++++++++---
       
       1 file changed, 9 insertions(+), 3 deletions(-)
       ---
   DIR diff --git a/st.c b/st.c
       @@ -801,9 +801,15 @@ ttynew(void) {
                        close(s);
                        cmdfd = m;
                        signal(SIGCHLD, sigchld);
       -                if(opt_io && !(fileio = fopen(opt_io, "w"))) {
       -                        fprintf(stderr, "Error opening %s:%s\n",
       -                                opt_io, strerror(errno));
       +                if(opt_io) {
       +                        if(!strcmp(opt_io, "-")) {
       +                                fileio = stdout;
       +                        } else {
       +                                if(!(fileio = fopen(opt_io, "w"))) {
       +                                        fprintf(stderr, "Error opening %s:%s\n",
       +                                                opt_io, strerror(errno));
       +                                }
       +                        }
                        }
                }
        }