]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/frm_driver.c
ncurses 5.7 - patch 20091010
[ncurses.git] / form / frm_driver.c
index 94323ed27788288e74dab5987dc0e40da01c207f..4847149ea34f157a3e1cec4dd268c535b1e21df6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2008,2009 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
 
 #include "form.priv.h"
 
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.91 2009/10/10 16:17:01 tom Exp $")
 
 /*----------------------------------------------------------------------------
   This is the core module of the form library. It contains the majority
 
 /*----------------------------------------------------------------------------
   This is the core module of the form library. It contains the majority
@@ -188,7 +188,7 @@ static int FE_Delete_Previous(FORM *);
 /* Macro to set the attributes for a fields window */
 #define Set_Field_Window_Attributes(field,win) \
 (  wbkgdset((win),(chtype)((field)->pad | (field)->back)), \
 /* Macro to set the attributes for a fields window */
 #define Set_Field_Window_Attributes(field,win) \
 (  wbkgdset((win),(chtype)((field)->pad | (field)->back)), \
-   wattrset((win),(field)->fore) )
+   (void) wattrset((win),(field)->fore) )
 
 /* Logic to decide whether or not a field really appears on the form */
 #define Field_Really_Appears(field)         \
 
 /* Logic to decide whether or not a field really appears on the form */
 #define Field_Really_Appears(field)         \
@@ -1073,9 +1073,13 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag)
   else
     {
       if (field->opts & O_VISIBLE)
   else
     {
       if (field->opts & O_VISIBLE)
-       Set_Field_Window_Attributes(field, win);
+       {
+         Set_Field_Window_Attributes(field, win);
+       }
       else
       else
-       wattrset(win, WINDOW_ATTRS(fwin));
+       {
+         (void)wattrset(win, WINDOW_ATTRS(fwin));
+       }
       werase(win);
     }
 
       werase(win);
     }
 
@@ -4366,6 +4370,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
       delwin(field->working);
       field->working = newpad(field->drows, field->dcols);
     }
       delwin(field->working);
       field->working = newpad(field->drows, field->dcols);
     }
+  len = Buffer_Length(field);
   wclear(field->working);
   mvwaddstr(field->working, 0, 0, value);
 
   wclear(field->working);
   mvwaddstr(field->working, 0, 0, value);
 
@@ -4529,7 +4534,7 @@ _nc_Widen_String(char *source, int *lengthp)
              source[passed + tries] = 0;
              reset_mbytes(state);
              status = trans_mbytes(wch, source + passed, tries, state);
              source[passed + tries] = 0;
              reset_mbytes(state);
              status = trans_mbytes(wch, source + passed, tries, state);
-             source[passed + tries] = save;
+             source[passed + tries] = (char)save;
 
              if (status > 0)
                {
 
              if (status > 0)
                {