X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fshell%2Fucw-logoutput.c;h=61e9f32084335663550c6aedbe49154139542fba;hb=f1155256f7a168f5e2c0097cb4e7197b79c4f041;hp=93afcd32870009989ffac3d1097f288ab091d879;hpb=78a39d6019e14a576bd58a26f0c161980ae51daf;p=libucw.git diff --git a/ucw/shell/ucw-logoutput.c b/ucw/shell/ucw-logoutput.c index 93afcd32..61e9f320 100644 --- a/ucw/shell/ucw-logoutput.c +++ b/ucw/shell/ucw-logoutput.c @@ -26,13 +26,13 @@ #include #include -static uns max_line = 1024; +static uint max_line = 1024; static int launch_finish_messages = 1; static int nonzero_status_message = 1; static struct cf_section cfsec_logoutput = { CF_ITEMS { - CF_UNS("LineMax", &max_line), + CF_UINT("LineMax", &max_line), CF_END } }; @@ -43,7 +43,7 @@ struct fds { cnode node; int pipe[2]; int fdnum; - uns level; + uint level; int long_continue; struct main_rec_io rio; }; @@ -66,7 +66,7 @@ do_msg (struct fds *fd, char *l_msg, int long_continue) fd->long_continue = long_continue; } -static uns +static uint handle_read(struct main_rec_io *r) { char buf[max_line + 5]; @@ -82,7 +82,7 @@ handle_read(struct main_rec_io *r) } *eol = 0; byte *b = r->read_rec_start; - while ((uns)(eol - b) > max_line) { + while ((uint)(eol - b) > max_line) { char cc = b[max_line]; b[max_line]=0; do_msg(r->data, b, 1); @@ -282,7 +282,7 @@ main(int argc, char **argv) parseerror = 1; if (parseerror) die("Bad argument `%s' to -l, expects number:letter.", optarg); - uns level = 0; + uint level = 0; while (level < L_MAX && LS_LEVEL_LETTER(level) != c[0]) level++; if (level >= L_MAX) @@ -316,7 +316,8 @@ opt_done: } } if (help) { - write(2, usage, sizeof(usage)); + if (write(2, usage, sizeof(usage)) < 0) { + } return (help == 1) ? 0 : 1; }