X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_stat.c;h=9bbe76e0b169eb69bd3a5c109c012ab01c7117ee;hp=98144bf2f1c48376c9f94dea09b715e1a1e23064;hb=5e1e572b71ae31a6071daa24e2460a68a6f1003c;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/form/fld_stat.c b/form/fld_stat.c index 98144bf2..9bbe76e0 100644 --- a/form/fld_stat.c +++ b/form/fld_stat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 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 * @@ -27,12 +27,12 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_stat.c,v 1.6 1999/05/16 17:19:48 juergen Exp $") +MODULE_ID("$Id: fld_stat.c,v 1.14 2012/06/10 00:13:09 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -43,16 +43,19 @@ MODULE_ID("$Id: fld_stat.c,v 1.6 1999/05/16 17:19:48 juergen Exp $") | | Return Values : E_OK - success +--------------------------------------------------------------------------*/ -int set_field_status(FIELD * field, bool status) +NCURSES_EXPORT(int) +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; + SetStatus(field, _CHANGED); else - field->status &= ~_CHANGED; + ClrStatus(field, _CHANGED); - return(E_OK); + RETURN(E_OK); } /*--------------------------------------------------------------------------- @@ -65,9 +68,12 @@ int set_field_status(FIELD * field, bool status) | Return Values : TRUE - buffer has been changed | FALSE - buffer has not been changed +--------------------------------------------------------------------------*/ -bool field_status(const FIELD * field) +NCURSES_EXPORT(bool) +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 */