]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - form/fty_ipv4.c
ncurses 6.2 - patch 20201212
[ncurses.git] / form / fty_ipv4.c
index 5d1a2098ef94b098fa08234d3febd5d0185a1139..d79683de68d3fc27099a2f50f23a5948e95c40e5 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 1998-2006,2009 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            *
@@ -34,7 +35,7 @@
 
 #include "form.priv.h"
 
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fty_ipv4.c,v 1.8 2006/12/02 19:33:02 tom Exp $")
+MODULE_ID("$Id: fty_ipv4.c,v 1.14 2020/12/12 01:15:37 tom Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
@@ -94,12 +95,27 @@ static FIELDTYPE typeIPV4 =
   NULL,
   NULL,
   NULL,
   NULL,
   NULL,
   NULL,
-  Check_IPV4_Field,
-  Check_IPV4_Character,
-  NULL,
+  INIT_FT_FUNC(Check_IPV4_Field),
+  INIT_FT_FUNC(Check_IPV4_Character),
+  INIT_FT_FUNC(NULL),
+  INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
   NULL
   NULL
+#endif
 };
 
 };
 
-NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
+FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4 = &typeIPV4;
+
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+   programming languages with restrictions on interop with C level
+   constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+FORM_EXPORT(FIELDTYPE *)
+_nc_TYPE_IPV4(void)
+{
+  return TYPE_IPV4;
+}
+#endif
 
 /* fty_ipv4.c ends here */
 
 /* fty_ipv4.c ends here */