X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_page.c;h=9029768ce2ba4f65d4131db5dd685b845beabe0f;hp=be9b915af7a93aaad6f54ac340ea92aeddb2177b;hb=9028a6e05bf66890591f074dd510a43c10f4e984;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/form/fld_page.c b/form/fld_page.c index be9b915a..9029768c 100644 --- a/form/fld_page.c +++ b/form/fld_page.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998 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 * @@ -27,12 +28,12 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: fld_page.c,v 1.2 1998/02/11 12:13:44 tom Exp $") +MODULE_ID("$Id: fld_page.c,v 1.15 2020/12/11 23:15:26 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -44,16 +45,19 @@ MODULE_ID("$Id: fld_page.c,v 1.2 1998/02/11 12:13:44 tom Exp $") | Return Values : E_OK - success | E_CONNECTED - field is connected +--------------------------------------------------------------------------*/ -int set_new_page(FIELD * field, bool new_page_flag) +FORM_EXPORT(int) +set_new_page(FIELD *field, bool new_page_flag) { + T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag)); + Normalize_Field(field); - if (field->form) + if (field->form) RETURN(E_CONNECTED); - if (new_page_flag) - field->status |= _NEWPAGE; + if (new_page_flag) + SetStatus(field, _NEWPAGE); else - field->status &= ~_NEWPAGE; + ClrStatus(field, _NEWPAGE); RETURN(E_OK); } @@ -62,15 +66,18 @@ int set_new_page(FIELD * field, bool new_page_flag) | Facility : libnform | Function : bool new_page(const FIELD *field) | -| Description : Retrieve the info whether or not the field starts a -| new page on the form. +| Description : Retrieve the information whether or not the field starts +| a new page on the form. | | Return Values : TRUE - field starts a new page | FALSE - field doesn't start a new page +--------------------------------------------------------------------------*/ -bool new_page(const FIELD * field) +FORM_EXPORT(bool) +new_page(const FIELD *field) { - return (Normalize_Field(field)->status & _NEWPAGE) ? TRUE : FALSE; + T((T_CALLED("new_page(%p)"), (const void *)field)); + + returnBool((Normalize_Field(field)->status & _NEWPAGE) ? TRUE : FALSE); } /* fld_page.c ends here */