]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/fld_stat.c
ncurses 5.9 - patch 20120310
[ncurses.git] / form / fld_stat.c
index 0cd255a7b687d4fef02338a5f1066291304502c9..3e6f1921677d8b4ae204699e6673e79cdbf5ceee 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2010,2012 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            *
 
 /****************************************************************************
  *   Author:  Juergen Pfeifer, 1995,1997                                    *
- *   Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en             *
  ****************************************************************************/
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fld_stat.c,v 1.8 2002/07/06 15:33:27 juergen Exp $")
+MODULE_ID("$Id: fld_stat.c,v 1.13 2012/03/11 00:37:16 tom Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
@@ -45,16 +44,18 @@ MODULE_ID("$Id: fld_stat.c,v 1.8 2002/07/06 15:33:27 juergen Exp $")
 |   Return Values :  E_OK            - success
 +--------------------------------------------------------------------------*/
 NCURSES_EXPORT(int)
-set_field_status (FIELD * field, bool status)
+set_field_status(FIELD *field, bool status)
 {
-  Normalize_Field( field );
+  T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
+
+  Normalize_Field(field);
 
   if (status)
     field->status |= _CHANGED;
   else
-    field->status &= ~_CHANGED;
+    field->status &= (unsigned short)(~_CHANGED);
 
-  return(E_OK);
+  RETURN(E_OK);
 }
 
 /*---------------------------------------------------------------------------
@@ -68,9 +69,11 @@ set_field_status (FIELD * field, bool status)
 |                    FALSE - buffer has not been changed
 +--------------------------------------------------------------------------*/
 NCURSES_EXPORT(bool)
-field_status (const FIELD * field)
+field_status(const FIELD *field)
 {
-  return ((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE);
+  T((T_CALLED("field_status(%p)"), (const void *)field));
+
+  returnBool((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE);
 }
 
 /* fld_stat.c ends here */