]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/frm_opts.c
ncurses 5.3
[ncurses.git] / form / frm_opts.c
index f534d4d5d78da7aaeac2c4ad7084021a343a9468..22ca3a1e1176090a5831081d687bb276c68f3f42 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1998,2000 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  ****************************************************************************/
 
 /****************************************************************************
  ****************************************************************************/
 
 /****************************************************************************
- *   Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1995,1997        *
+ *   Author:  Juergen Pfeifer, 1995,1997                                    *
+ *   Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en             *
  ****************************************************************************/
 
 #include "form.priv.h"
 
  ****************************************************************************/
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: frm_opts.c,v 1.4 1998/02/11 12:13:43 tom Exp $")
+MODULE_ID("$Id: frm_opts.c,v 1.10 2002/07/06 15:33:27 juergen Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
@@ -44,8 +45,10 @@ MODULE_ID("$Id: frm_opts.c,v 1.4 1998/02/11 12:13:43 tom Exp $")
 |   Return Values :  E_OK              - success
 |                    E_BAD_ARGUMENT    - invalid options
 +--------------------------------------------------------------------------*/
 |   Return Values :  E_OK              - success
 |                    E_BAD_ARGUMENT    - invalid options
 +--------------------------------------------------------------------------*/
-int set_form_opts(FORM * form, Form_Options  opts)
+NCURSES_EXPORT(int)
+set_form_opts (FORM * form, Form_Options  opts)
 {
 {
+  opts &= ALL_FORM_OPTS;
   if (opts & ~ALL_FORM_OPTS)
     RETURN(E_BAD_ARGUMENT);
   else
   if (opts & ~ALL_FORM_OPTS)
     RETURN(E_BAD_ARGUMENT);
   else
@@ -63,7 +66,8 @@ int set_form_opts(FORM * form, Form_Options  opts)
 |
 |   Return Values :  The option flags.
 +--------------------------------------------------------------------------*/
 |
 |   Return Values :  The option flags.
 +--------------------------------------------------------------------------*/
-Form_Options form_opts(const FORM * form)
+NCURSES_EXPORT(Form_Options)
+form_opts (const FORM * form)
 {
   return (Normalize_Form(form)->opts & ALL_FORM_OPTS);
 }
 {
   return (Normalize_Form(form)->opts & ALL_FORM_OPTS);
 }
@@ -78,8 +82,10 @@ Form_Options form_opts(const FORM * form)
 |   Return Values :  E_OK            - success 
 |                    E_BAD_ARGUMENT  - invalid options
 +--------------------------------------------------------------------------*/
 |   Return Values :  E_OK            - success 
 |                    E_BAD_ARGUMENT  - invalid options
 +--------------------------------------------------------------------------*/
-int form_opts_on(FORM * form, Form_Options opts)
+NCURSES_EXPORT(int)
+form_opts_on (FORM * form, Form_Options opts)
 {
 {
+  opts &= ALL_FORM_OPTS;
   if (opts & ~ALL_FORM_OPTS)
     RETURN(E_BAD_ARGUMENT);
   else
   if (opts & ~ALL_FORM_OPTS)
     RETURN(E_BAD_ARGUMENT);
   else
@@ -99,8 +105,10 @@ int form_opts_on(FORM * form, Form_Options opts)
 |   Return Values :  E_OK            - success 
 |                    E_BAD_ARGUMENT  - invalid options
 +--------------------------------------------------------------------------*/
 |   Return Values :  E_OK            - success 
 |                    E_BAD_ARGUMENT  - invalid options
 +--------------------------------------------------------------------------*/
-int form_opts_off(FORM * form, Form_Options opts)
+NCURSES_EXPORT(int)
+form_opts_off (FORM * form, Form_Options opts)
 {
 {
+  opts &= ALL_FORM_OPTS;
   if (opts & ~ALL_FORM_OPTS)
     RETURN(E_BAD_ARGUMENT);
   else
   if (opts & ~ALL_FORM_OPTS)
     RETURN(E_BAD_ARGUMENT);
   else