summaryrefslogtreecommitdiff
path: root/lib/libform
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libform')
-rw-r--r--lib/libform/fld_opts.c7
-rw-r--r--lib/libform/frm_opts.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/libform/fld_opts.c b/lib/libform/fld_opts.c
index c96e85f05b7..0217bc0309b 100644
--- a/lib/libform/fld_opts.c
+++ b/lib/libform/fld_opts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fld_opts.c,v 1.2 1998/07/24 02:36:49 millert Exp $ */
+/* $OpenBSD: fld_opts.c,v 1.3 1999/02/24 06:30:53 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -33,7 +33,7 @@
****************************************************************************/
#include "form.priv.h"
-MODULE_ID("$From: fld_opts.c,v 1.2 1998/02/11 12:13:44 tom Exp $")
+MODULE_ID("$From: fld_opts.c,v 1.4 1999/02/18 16:12:30 juergen Exp $")
/*----------------------------------------------------------------------------
Field-Options manipulation routines
@@ -54,6 +54,7 @@ MODULE_ID("$From: fld_opts.c,v 1.2 1998/02/11 12:13:44 tom Exp $")
int set_field_opts(FIELD * field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
+ opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
res = _nc_Synchronize_Options( Normalize_Field(field), opts );
RETURN(res);
@@ -88,6 +89,7 @@ int field_opts_on(FIELD * field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
+ opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
{
Normalize_Field( field );
@@ -112,6 +114,7 @@ int field_opts_off(FIELD * field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
+ opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
{
Normalize_Field( field );
diff --git a/lib/libform/frm_opts.c b/lib/libform/frm_opts.c
index 08bcc14e5db..81ce81b2bb3 100644
--- a/lib/libform/frm_opts.c
+++ b/lib/libform/frm_opts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frm_opts.c,v 1.4 1998/07/24 02:37:32 millert Exp $ */
+/* $OpenBSD: frm_opts.c,v 1.5 1999/02/24 06:30:53 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$From: frm_opts.c,v 1.4 1998/02/11 12:13:43 tom Exp $")
+MODULE_ID("$From: frm_opts.c,v 1.6 1999/02/18 16:12:36 juergen Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -48,6 +48,7 @@ MODULE_ID("$From: frm_opts.c,v 1.4 1998/02/11 12:13:43 tom Exp $")
+--------------------------------------------------------------------------*/
int set_form_opts(FORM * form, Form_Options opts)
{
+ opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
RETURN(E_BAD_ARGUMENT);
else
@@ -82,6 +83,7 @@ Form_Options form_opts(const FORM * form)
+--------------------------------------------------------------------------*/
int form_opts_on(FORM * form, Form_Options opts)
{
+ opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
RETURN(E_BAD_ARGUMENT);
else
@@ -103,6 +105,7 @@ int form_opts_on(FORM * form, Form_Options opts)
+--------------------------------------------------------------------------*/
int form_opts_off(FORM * form, Form_Options opts)
{
+ opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
RETURN(E_BAD_ARGUMENT);
else