summaryrefslogtreecommitdiff
path: root/lib/libform/frm_page.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-01-12 23:22:15 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-01-12 23:22:15 +0000
commit6ee254699bf787d78835419be2b3241fb037d444 (patch)
tree07fe67dab517e4990f344fe2c00e65cef4d25b81 /lib/libform/frm_page.c
parent0b62f5dc36fc7203a74cdc812c4234ae188fdfd2 (diff)
Update to ncurses 5.7, with local changes reapplied.
This is around eight years worth of changes (previously we were around ncurses 5.2), too many to list - many bug fixes and also a few new functions. A major bump for libcurses, libpanel, libform and libmenu. ok deraadt
Diffstat (limited to 'lib/libform/frm_page.c')
-rw-r--r--lib/libform/frm_page.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/lib/libform/frm_page.c b/lib/libform/frm_page.c
index fbad21e25cf..5aa3892729b 100644
--- a/lib/libform/frm_page.c
+++ b/lib/libform/frm_page.c
@@ -1,7 +1,5 @@
-/* $OpenBSD: frm_page.c,v 1.4 2001/01/22 18:02:15 millert Exp $ */
-
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2004 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 *
@@ -29,12 +27,12 @@
****************************************************************************/
/****************************************************************************
- * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 *
+ * Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
#include "form.priv.h"
-MODULE_ID("$From: frm_page.c,v 1.6 2000/12/10 02:09:37 tom Exp $")
+MODULE_ID("$Id: frm_page.c,v 1.5 2010/01/12 23:22:07 nicm Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -49,35 +47,37 @@ MODULE_ID("$From: frm_page.c,v 1.6 2000/12/10 02:09:37 tom Exp $")
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
-set_form_page (FORM * form, int page)
+set_form_page(FORM *form, int page)
{
int err = E_OK;
- if ( !form || (page<0) || (page>=form->maxpage) )
+ T((T_CALLED("set_form_page(%p,%d)"), form, page));
+
+ if (!form || (page < 0) || (page >= form->maxpage))
RETURN(E_BAD_ARGUMENT);
if (!(form->status & _POSTED))
{
form->curpage = page;
form->current = _nc_First_Active_Field(form);
- }
+ }
else
{
- if (form->status & _IN_DRIVER)
+ if (form->status & _IN_DRIVER)
err = E_BAD_STATE;
else
{
if (form->curpage != page)
{
- if (!_nc_Internal_Validation(form))
+ if (!_nc_Internal_Validation(form))
err = E_INVALID_FIELD;
else
{
- Call_Hook(form,fieldterm);
- Call_Hook(form,formterm);
- err = _nc_Set_Form_Page(form,page,(FIELD *)0);
- Call_Hook(form,forminit);
- Call_Hook(form,fieldinit);
+ Call_Hook(form, fieldterm);
+ Call_Hook(form, formterm);
+ err = _nc_Set_Form_Page(form, page, (FIELD *)0);
+ Call_Hook(form, forminit);
+ Call_Hook(form, fieldinit);
_nc_Refresh_Current_Field(form);
}
}
@@ -96,9 +96,11 @@ set_form_page (FORM * form, int page)
| -1 : invalid form pointer
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
-form_page (const FORM * form)
+form_page(const FORM *form)
{
- return Normalize_Form(form)->curpage;
+ T((T_CALLED("form_page(%p)"), form));
+
+ returnCode(Normalize_Form(form)->curpage);
}
/* frm_page.c ends here */