/****************************************************************************
- * Copyright (c) 2003-2012,2013 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2013,2014 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 *
* authorization. *
****************************************************************************/
/*
- * $Id: demo_forms.c,v 1.44 2013/06/08 15:21:26 tom Exp $
+ * $Id: demo_forms.c,v 1.49 2014/08/02 23:11:57 tom Exp $
*
* Demonstrate a variety of functions from the form library.
* Thomas Dickey - 2003/4/26
trimmed(const char *value)
{
int result = (int) strlen(value);
- while (result > 0 && isspace(value[result - 1])) {
+ while (result > 0 && isspace(UChar(value[result - 1]))) {
--result;
}
return result;
int more = 0;
int item = 0;
- my_data = typeCalloc(MY_DATA, 100); /* FIXME */
+ my_data = typeCalloc(MY_DATA, (size_t) 100); /* FIXME */
while (fgets(buffer, sizeof(buffer), fp) != 0) {
chomp(buffer);
if (more) {
if (d_option) {
if (has_colors()) {
set_field_fore(f, (chtype) COLOR_PAIR(2));
- set_field_back(f, A_UNDERLINE | COLOR_PAIR(3));
+ set_field_back(f, (A_UNDERLINE | (chtype) COLOR_PAIR(3)));
} else {
set_field_fore(f, A_BOLD);
}
}
waddch(win, ' ');
- (void) wattrset(win, (int) field_fore(field));
+ (void) wattrset(win, AttrArg(field_fore(field), 0));
waddstr(win, "fore");
wattroff(win, (int) field_fore(field));
waddch(win, '/');
- (void) wattrset(win, (int) field_back(field));
+ (void) wattrset(win, AttrArg(field_back(field), 0));
waddstr(win, "back");
wattroff(win, (int) field_back(field));