]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/demo_forms.c
ncurses 6.0 - patch 20151226
[ncurses.git] / test / demo_forms.c
index b61fceb19a11ee39a959050e5baebb4fcf0f21ee..97125e396e5fc0720069a08117ef9a6075588b32 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_forms.c,v 1.48 2014/07/27 00:26:01 tom Exp $
+ * $Id: demo_forms.c,v 1.50 2014/10/10 00:38:00 tom Exp $
  *
  * Demonstrate a variety of functions from the form library.
  * Thomas Dickey - 2003/4/26
@@ -172,6 +172,7 @@ read_data(const char *filename)
                failed("expected a colon");
            }
        }
+       fclose(fp);
     } else {
        failed(filename);
     }
@@ -398,13 +399,13 @@ show_current_field(WINDOW *win, FORM * form)
        }
 
        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));