diff options
Diffstat (limited to 'lib/libform/frm_opts.c')
-rw-r--r-- | lib/libform/frm_opts.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/lib/libform/frm_opts.c b/lib/libform/frm_opts.c index 300493d518e..0c00cb3c23d 100644 --- a/lib/libform/frm_opts.c +++ b/lib/libform/frm_opts.c @@ -1,7 +1,5 @@ -/* $OpenBSD: frm_opts.c,v 1.7 2001/01/22 18:02:15 millert Exp $ */ - /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2005 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_opts.c,v 1.9 2000/12/10 02:09:37 tom Exp $") +MODULE_ID("$Id: frm_opts.c,v 1.8 2010/01/12 23:22:07 nicm Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -47,14 +45,16 @@ MODULE_ID("$From: frm_opts.c,v 1.9 2000/12/10 02:09:37 tom Exp $") | E_BAD_ARGUMENT - invalid options +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -set_form_opts (FORM * form, Form_Options opts) +set_form_opts(FORM *form, Form_Options opts) { + T((T_CALLED("set_form_opts(%p,%d)"), form, opts)); + opts &= ALL_FORM_OPTS; if (opts & ~ALL_FORM_OPTS) RETURN(E_BAD_ARGUMENT); else { - Normalize_Form( form )->opts = opts; + Normalize_Form(form)->opts = opts; RETURN(E_OK); } } @@ -68,9 +68,10 @@ set_form_opts (FORM * form, Form_Options opts) | Return Values : The option flags. +--------------------------------------------------------------------------*/ NCURSES_EXPORT(Form_Options) -form_opts (const FORM * form) +form_opts(const FORM *form) { - return (Normalize_Form(form)->opts & ALL_FORM_OPTS); + T((T_CALLED("form_opts(%p)"), form)); + returnCode((int)(Normalize_Form(form)->opts & ALL_FORM_OPTS)); } /*--------------------------------------------------------------------------- @@ -84,14 +85,16 @@ form_opts (const FORM * form) | E_BAD_ARGUMENT - invalid options +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -form_opts_on (FORM * form, Form_Options opts) +form_opts_on(FORM *form, Form_Options opts) { + T((T_CALLED("form_opts_on(%p,%d)"), form, opts)); + opts &= ALL_FORM_OPTS; if (opts & ~ALL_FORM_OPTS) RETURN(E_BAD_ARGUMENT); else { - Normalize_Form( form )->opts |= opts; + Normalize_Form(form)->opts |= opts; RETURN(E_OK); } } @@ -107,8 +110,10 @@ form_opts_on (FORM * form, Form_Options opts) | E_BAD_ARGUMENT - invalid options +--------------------------------------------------------------------------*/ NCURSES_EXPORT(int) -form_opts_off (FORM * form, Form_Options opts) +form_opts_off(FORM *form, Form_Options opts) { + T((T_CALLED("form_opts_off(%p,%d)"), form, opts)); + opts &= ALL_FORM_OPTS; if (opts & ~ALL_FORM_OPTS) RETURN(E_BAD_ARGUMENT); |