X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhlsbr.c;h=68d083539b109c0295d2ff751500e20c846f087b;hb=d3a67123c9d05b6d639adb0e6b4a874807602a6b;hp=18617d31b8679b3409bb5615b0fdd6e8d5c5f312;hpb=1691e80890e5d8ba258c51c214a3e91880e1db2b;p=mmh diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 18617d3..68d0835 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -434,6 +434,7 @@ mhl (int argc, char **argv) SIGNAL (SIGINT, SIG_IGN); SIGNAL2 (SIGQUIT, quitser); } + SIGNAL2 (SIGPIPE, pipeser); m_popen (moreproc); ontty = PITTY; } else { @@ -498,7 +499,7 @@ mhl_format (char *file, int length, int width) static ino_t ino = 0; static time_t mtime = 0; - if (fmthd != NULL) + if (fmthd != NULL) { if (stat (etcpath (file), &st) != NOTOK && mtime == st.st_mtime && dev == st.st_dev @@ -506,6 +507,7 @@ mhl_format (char *file, int length, int width) goto out; else free_queue (&fmthd, &fmttl); + } if ((fp = fopen (etcpath (file), "r")) == NULL) adios (file, "unable to open format file"); @@ -584,7 +586,7 @@ mhl_format (char *file, int length, int width) if (evalvar (c1)) adios (NULL, "format file syntax error: %s", bp); } - if (!c1->c_nfs && global.c_nfs) + if (!c1->c_nfs && global.c_nfs) { if (c1->c_flags & DATEFMT) { if (global.c_flags & DATEFMT) c1->c_nfs = getcpy (global.c_nfs); @@ -594,6 +596,7 @@ mhl_format (char *file, int length, int width) if (global.c_flags & ADDRFMT) c1->c_nfs = getcpy (global.c_nfs); } + } continue; default: @@ -1262,13 +1265,14 @@ putcomp (struct mcomp *c1, struct mcomp *c2, int flag) *cp = toupper (*cp); count = 0; - if (cchdr) + if (cchdr) { if (flag == TWOCOMP) count = (c1->c_cwidth >= 0) ? c1->c_cwidth : strlen (c2->c_name) + 2; else count = (c1->c_cwidth >= 0) ? c1->c_cwidth : strlen (c1->c_text ? c1->c_text : c1->c_name) + 2; + } count += c1->c_offset; if ((cp = oneline (c2->c_text, c1->c_flags))) @@ -1343,7 +1347,7 @@ oneline (char *stuff, long flags) static void putstr (char *string) { - if (!column && lm > 0) + if (!column && lm > 0) { while (lm > 0) if (lm >= 8) { putch ('\t'); @@ -1353,6 +1357,7 @@ putstr (char *string) putch (' '); lm--; } + } lm = 0; while (*string) putch (*string++);