X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffrm_post.c;h=ab880894d92526a46e5fa4bad921c393a52f5d80;hp=8e29aff5f62a721eb453aab4221d0defed20a2bf;hb=9f479192e3ca3413d235c66bf058f8cc63764898;hpb=c6540b9c89dda1a6a8bd681726831e8924176504 diff --git a/form/frm_post.c b/form/frm_post.c index 8e29aff5..ab880894 100644 --- a/form/frm_post.c +++ b/form/frm_post.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 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,12 +33,12 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_post.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_post.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $") /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int post_form(FORM * form) -| +| | Description : Writes the form into its associated subwindow. | | Return Values : E_OK - success @@ -47,7 +48,7 @@ MODULE_ID("$Id: frm_post.c,v 1.10 2010/01/23 21:14:36 tom Exp $") | E_NO_ROOM - form doesn't fit into subwindow | E_SYSTEM_ERROR - system error +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) +FORM_EXPORT(int) post_form(FORM *form) { WINDOW *formwin; @@ -69,7 +70,7 @@ post_form(FORM *form) if ((form->cols > getmaxx(formwin)) || (form->rows > getmaxy(formwin))) RETURN(E_NO_ROOM); - /* reset form->curpage to an invald value. This forces Set_Form_Page + /* reset form->curpage to an invalid value. This forces Set_Form_Page to do the page initialization which is required by post_form. */ page = form->curpage; @@ -77,7 +78,7 @@ post_form(FORM *form) if ((err = _nc_Set_Form_Page(form, page, form->current)) != E_OK) RETURN(err); - form->status |= _POSTED; + SetStatus(form, _POSTED); Call_Hook(form, forminit); Call_Hook(form, fieldinit); @@ -87,9 +88,9 @@ post_form(FORM *form) } /*--------------------------------------------------------------------------- -| Facility : libnform +| Facility : libnform | Function : int unpost_form(FORM * form) -| +| | Description : Erase form from its associated subwindow. | | Return Values : E_OK - success @@ -97,7 +98,7 @@ post_form(FORM *form) | E_NOT_POSTED - form isn't posted | E_BAD_STATE - called from a hook routine +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) +FORM_EXPORT(int) unpost_form(FORM *form) { T((T_CALLED("unpost_form(%p)"), (void *)form)); @@ -117,7 +118,7 @@ unpost_form(FORM *form) werase(Get_Form_Window(form)); delwin(form->w); form->w = (WINDOW *)0; - form->status &= ~_POSTED; + ClrStatus(form, _POSTED); RETURN(E_OK); }