Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.393 2013/09/07 19:17:48 tom Exp $
+$Id: ncurses.c,v 1.396 2013/11/23 21:43:51 tom Exp $
***************************************************************************/
attr_t old_attr = 0;
short old_pair = 0;
- (void) attr_get(&old_attr, &old_pair, 0);
+ (void) (attr_get) (&old_attr, &old_pair, 0);
(void) attr_set(attr, pair, 0);
addwstr(wide_attr_test_string);
(void) attr_set(old_attr, old_pair, 0);
MvAddStr(SLK_WORK, 0, "Please enter the label value: ");
strcpy(buf, "");
if ((s = slk_label(c - '0')) != 0) {
- strncpy(buf, s, 8);
+ strncpy(buf, s, (size_t) 8);
}
wGetstring(stdscr, buf, 8);
slk_set((c - '0'), buf, fmt);
transient((FRAME *) 0, (char *) 0);
switch (c) {
case CTRL('C'):
- if ((neww = typeCalloc(FRAME, 1)) == 0) {
+ if ((neww = typeCalloc(FRAME, (size_t) 1)) == 0) {
failed("acs_and_scroll");
goto breakout;
}
if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) {
transient(current, "Can't open screen dump file");
} else {
- if ((neww = typeCalloc(FRAME, 1)) != 0) {
+ if ((neww = typeCalloc(FRAME, (size_t) 1)) != 0) {
neww->next = current ? current->next : 0;
neww->last = current;
size_t have = (source ? strlen(source) : 0) + 1;
size_t need = 80 + have;
char *temp = malloc(need);
- long len;
+ size_t len;
if (temp != 0) {
strncpy(temp, source ? source : "", have + 1);
- len = (long) (char *) field_userptr(me);
+ len = (size_t) (char *) field_userptr(me);
if (c <= KEY_MAX) {
- if (isgraph(c) && (len + 1) < (int) sizeof(temp)) {
+ if (isgraph(c) && (len + 1) < sizeof(temp)) {
temp[len++] = (char) c;
temp[len] = 0;
set_field_buffer(me, 1, temp);
command = 0;
for (;;) {
char ch = '\0';
- if (read(fileno(stdin), &ch, 1) <= 0) {
+ if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
if (command == 0)
command = 'q';
break;