]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/fld_def.c
ncurses 6.2 - patch 20210605
[ncurses.git] / form / fld_def.c
index e529b3c0c1aea670d1689f2bd7ac8934d490ccfa..51bdc648580043f01a1c4da5b1fd06714642b519 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2012,2014 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -33,7 +33,7 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fld_def.c,v 1.42 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: fld_def.c,v 1.44 2021/03/27 23:49:53 tom Exp $")
 
 /* this can't be readonly */
 static FIELD default_field =
@@ -66,7 +66,7 @@ static FIELD default_field =
   NCURSES_FIELD_EXTENSION
 };
 
-NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
+FORM_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform
@@ -82,18 +82,17 @@ NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
 |   Return Values :  Pointer to argument structure. Maybe NULL.
 |                    In case of an error in *err an error counter is increased.
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(TypeArgument *)
+FORM_EXPORT(TypeArgument *)
 _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
 {
   TypeArgument *res = (TypeArgument *)0;
-  TypeArgument *p;
 
   if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
     {
       assert(err != 0 && ap != (va_list *)0);
       if ((typ->status & _LINKED_TYPE) != 0)
        {
-         p = typeMalloc(TypeArgument, 1);
+         TypeArgument *p = typeMalloc(TypeArgument, 1);
 
          if (p != 0)
            {
@@ -130,18 +129,17 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
 |   Return Values :  Pointer to argument structure. Maybe NULL.
 |                    In case of an error in *err an error counter is increased.
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(TypeArgument *)
+FORM_EXPORT(TypeArgument *)
 _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
 {
   TypeArgument *res = (TypeArgument *)0;
-  TypeArgument *p;
 
   if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
     {
       assert(err != 0 && argp != 0);
       if ((typ->status & _LINKED_TYPE) != 0)
        {
-         p = typeMalloc(TypeArgument, 1);
+         TypeArgument *p = typeMalloc(TypeArgument, 1);
 
          if (p != 0)
            {
@@ -179,7 +177,7 @@ _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
 |
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(void)
+FORM_EXPORT(void)
 _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp)
 {
   if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
@@ -212,7 +210,7 @@ _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp)
 |   Return Values :  TRUE       - copy worked
 |                    FALSE      - error occurred
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(bool)
+FORM_EXPORT(bool)
 _nc_Copy_Type(FIELD *dst, FIELD const *src)
 {
   int err = 0;
@@ -247,7 +245,7 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src)
 |
 |   Return Values :  -
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(void)
+FORM_EXPORT(void)
 _nc_Free_Type(FIELD *field)
 {
   assert(field != 0);
@@ -274,7 +272,7 @@ _nc_Free_Type(FIELD *field)
 |
 |   Return Values :  Pointer to the new field or NULL if failure.
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(FIELD *)
+FORM_EXPORT(FIELD *)
 new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
 {
   static const FIELD_CELL blank = BLANK;
@@ -354,7 +352,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
 |                    E_BAD_ARGUMENT - invalid field pointer
 |                    E_CONNECTED    - field is connected
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(int)
+FORM_EXPORT(int)
 free_field(FIELD *field)
 {
   T((T_CALLED("free_field(%p)"), (void *)field));