X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_stat.c;h=7b504bf449fee3c8ab192696d5bea83c589cac85;hp=b85b4d55f244e08814fe4cd98a7dba43878d8736;hb=b724cdc89cf31757ab43262ecefe5242b0edc450;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/form/fld_stat.c b/form/fld_stat.c index b85b4d55..7b504bf4 100644 --- a/form/fld_stat.c +++ b/form/fld_stat.c @@ -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 * @@ -32,28 +33,28 @@ #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.17 2020/12/11 22:05:24 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform | Function : int set_field_status(FIELD *field, bool status) | | Description : Set or clear the 'changed' indication flag for that -| fields primary buffer. +| field's primary buffer. | | Return Values : E_OK - success +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) +FORM_EXPORT(int) 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) - field->status |= _CHANGED; + SetStatus(field, _CHANGED); else - field->status &= ~_CHANGED; + ClrStatus(field, _CHANGED); RETURN(E_OK); } @@ -63,15 +64,15 @@ set_field_status(FIELD *field, bool status) | Function : bool field_status(const FIELD *field) | | Description : Retrieve the value of the 'changed' indication flag -| for that fields primary buffer. +| for that field's primary buffer. | | Return Values : TRUE - buffer has been changed | FALSE - buffer has not been changed +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(bool) +FORM_EXPORT(bool) 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); }