X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Ftset.c;fp=progs%2Ftset.c;h=475b3e6391d140d156a93903d21ca74dfc348ee7;hb=87f20fc6e737084b06b6343c8c7206404daec4a2;hp=f01acd72109170b94ed9cfa0210e10cbf56e09e2;hpb=aefc1659d732acf7e62c0c78a443d6d8352a3c6e;p=ncurses.git diff --git a/progs/tset.c b/progs/tset.c index f01acd72..475b3e63 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * + * Copyright (c) 1998-2013,2015 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -119,7 +119,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 1.93 2013/12/15 01:05:56 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.94 2015/03/21 16:34:59 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -745,7 +745,7 @@ get_termcap_entry(char *userarg) #define DISABLED(val) ((int)(val) <= 0) #endif -#define CHK(val, dft) (DISABLED(val) ? dft : val) +#define CHK(val, dft) (unsigned char) (DISABLED(val) ? dft : val) static bool set_tabs(void); @@ -1305,8 +1305,8 @@ main(int argc, char **argv) if (WINSIZE_ROWS(win) == 0 && WINSIZE_COLS(win) == 0 && tlines > 0 && tcolumns > 0) { - WINSIZE_ROWS(win) = tlines; - WINSIZE_COLS(win) = tcolumns; + WINSIZE_ROWS(win) = (unsigned short) tlines; + WINSIZE_COLS(win) = (unsigned short) tcolumns; (void) ioctl(STDERR_FILENO, IOCTL_SET_WINSIZE, &win); } }