]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/fld_stat.c
ncurses 6.2 - patch 20200912
[ncurses.git] / form / fld_stat.c
index b85b4d55f244e08814fe4cd98a7dba43878d8736..43e71b557a6797255062cce41f0d4ecf4e0cafa9 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +33,7 @@
 
 #include "form.priv.h"
 
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $")
+MODULE_ID("$Id: fld_stat.c,v 1.16 2020/05/24 01:40:20 anonymous.maarten Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
@@ -43,17 +44,17 @@ MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $")
 |
 |   Return Values :  E_OK            - success
 +--------------------------------------------------------------------------*/
 |
 |   Return Values :  E_OK            - success
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
+FORM_EXPORT(int)
 set_field_status(FIELD *field, bool status)
 {
 set_field_status(FIELD *field, bool status)
 {
-  T((T_CALLED("set_field_status(%p,%d)"), field, status));
+  T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
 
   Normalize_Field(field);
 
   if (status)
 
   Normalize_Field(field);
 
   if (status)
-    field->status |= _CHANGED;
+    SetStatus(field, _CHANGED);
   else
   else
-    field->status &= ~_CHANGED;
+    ClrStatus(field, _CHANGED);
 
   RETURN(E_OK);
 }
 
   RETURN(E_OK);
 }
@@ -68,10 +69,10 @@ set_field_status(FIELD *field, bool status)
 |   Return Values :  TRUE  - buffer has been changed
 |                    FALSE - buffer has not been changed
 +--------------------------------------------------------------------------*/
 |   Return Values :  TRUE  - buffer has been changed
 |                    FALSE - buffer has not been changed
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(bool)
+FORM_EXPORT(bool)
 field_status(const FIELD *field)
 {
 field_status(const FIELD *field)
 {
-  T((T_CALLED("field_status(%p)"), field));
+  T((T_CALLED("field_status(%p)"), (const void *)field));
 
   returnBool((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE);
 }
 
   returnBool((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE);
 }