X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhl.c;h=c78619ee6ca8615d058c87677dc5283e1d12a289;hb=d5b5e6e4813b7fd77dc1664df4304537f3002cf3;hp=c1c53551fde34066d054386907254f152cb4f977;hpb=1577ee015a08dd21f0f57f8a8f9a9396c31e884d;p=mmh diff --git a/uip/mhl.c b/uip/mhl.c index c1c5355..c78619e 100644 --- a/uip/mhl.c +++ b/uip/mhl.c @@ -105,11 +105,11 @@ static struct mcomp *fmthd = NULL; static struct mcomp *fmttl = NULL; static struct mcomp global = { - NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 0, 0 + NULL, NULL, NULL, NULL, NULL, 0, -1, 80, -1, 0, NULL }; static struct mcomp holder = { - NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NOCOMPONENT, 0 + NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NOCOMPONENT, NULL }; struct pair { @@ -178,12 +178,12 @@ static int mhldebug = 0; #define NOTTY 0 static int ontty = NOTTY; -static int column; +static unsigned int column; static int lm; static int ovoff; static int term; -static int wid; +static unsigned int wid; static char *ovtxt; @@ -231,9 +231,9 @@ static void putcomp(struct mcomp *, struct mcomp *, int); static char *oneline(char *, long); static void putstr(char *); static void putch(char); -static RETSIGTYPE intrser(int); -static RETSIGTYPE pipeser(int); -static RETSIGTYPE quitser(int); +static void intrser(int); +static void pipeser(int); +static void quitser(int); static void mhladios(char *, char *, ...); static void mhldone(int); static void m_popen(char *); @@ -1082,11 +1082,11 @@ putcomp(struct mcomp *c1, struct mcomp *c2, int flag) count = 0; if (cchdr) { if (flag == TWOCOMP) - count = (c1->c_cwidth >= 0) ? - c1->c_cwidth : strlen(c2->c_name) + 2; + count = (c1->c_cwidth >= 0) ? c1->c_cwidth : + (int)strlen(c2->c_name) + 2; else - count = (c1->c_cwidth >= 0) ? - c1->c_cwidth : strlen(c1->c_text ? + count = (c1->c_cwidth >= 0) ? (size_t)c1->c_cwidth : + strlen(c1->c_text ? c1->c_text : c1->c_name) + 2; } count += c1->c_offset; @@ -1223,37 +1223,25 @@ putch(char ch) } -static RETSIGTYPE +static void intrser(int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL(SIGINT, intrser); -#endif - discard(stdout); putchar('\n'); longjmp(env, DONE); } -static RETSIGTYPE +static void pipeser(int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL(SIGPIPE, pipeser); -#endif - done(NOTOK); } -static RETSIGTYPE +static void quitser(int i) { -#ifndef RELIABLE_SIGNALS - SIGNAL(SIGQUIT, quitser); -#endif - putchar('\n'); fflush(stdout); done(NOTOK);