From 084d7341e201b5153031223070580cfac88a038a Mon Sep 17 00:00:00 2001 From: delphij Date: Fri, 28 Feb 2014 19:12:44 +0000 Subject: Undo two previous imports which was never done in preparation of doing a new import. --- form/Makefile.in | 19 +- form/f_trace.c | 12 +- form/fld_arg.c | 8 +- form/fld_attr.c | 6 +- form/fld_current.c | 10 +- form/fld_def.c | 10 +- form/fld_dup.c | 8 +- form/fld_ftchoice.c | 11 +- form/fld_ftlink.c | 8 +- form/fld_info.c | 18 +- form/fld_just.c | 8 +- form/fld_link.c | 8 +- form/fld_max.c | 6 +- form/fld_move.c | 6 +- form/fld_newftyp.c | 28 +- form/fld_opts.c | 12 +- form/fld_pad.c | 8 +- form/fld_page.c | 8 +- form/fld_stat.c | 8 +- form/fld_type.c | 8 +- form/fld_user.c | 8 +- form/form.h | 81 +++--- form/form.priv.h | 61 +--- form/frm_cursor.c | 6 +- form/frm_data.c | 8 +- form/frm_def.c | 67 ++--- form/frm_driver.c | 350 ++++++++++------------- form/frm_hook.c | 6 +- form/frm_opts.c | 12 +- form/frm_page.c | 8 +- form/frm_post.c | 8 +- form/frm_req_name.c | 8 +- form/frm_scale.c | 9 +- form/frm_sub.c | 23 +- form/frm_user.c | 8 +- form/frm_win.c | 29 +- form/fty_alnum.c | 63 +---- form/fty_alpha.c | 63 +---- form/fty_enum.c | 160 ++--------- form/fty_generic.c | 297 -------------------- form/fty_int.c | 77 +----- form/fty_ipv4.c | 25 +- form/fty_num.c | 83 ++---- form/fty_regex.c | 172 +++++------- form/llib-lform | 51 +--- form/llib-lformt | 777 --------------------------------------------------- form/llib-lformtw | 783 ---------------------------------------------------- form/llib-lformw | 51 +--- form/modules | 86 +++--- 49 files changed, 550 insertions(+), 3040 deletions(-) delete mode 100644 form/fty_generic.c delete mode 100644 form/llib-lformt delete mode 100644 form/llib-lformtw (limited to 'form') diff --git a/form/Makefile.in b/form/Makefile.in index 1a07e14..2bf31e1 100644 --- a/form/Makefile.in +++ b/form/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.53 2010/11/27 21:45:27 tom Exp $ +# $Id: Makefile.in,v 1.47 2007/04/28 14:56:11 tom Exp $ ############################################################################## -# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. # +# Copyright (c) 1998-2006,2007 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 "Software"), # @@ -43,7 +43,6 @@ .SUFFIXES: SHELL = /bin/sh -VPATH = @srcdir@ THIS = Makefile x = @EXEEXT@ @@ -64,7 +63,6 @@ LIBTOOL_COMPILE = @LIB_COMPILE@ LIBTOOL_LINK = @LIB_LINK@ LIBTOOL_INSTALL = @LIB_INSTALL@ LIBTOOL_UNINSTALL = @LIB_UNINSTALL@ -LT_UNDEF = @LT_UNDEF@ INSTALL = @INSTALL@ INSTALL_LIB = @INSTALL@ @INSTALL_LIB@ @@ -72,14 +70,11 @@ INSTALL_PROG = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ AR = @AR@ -ARFLAGS = @ARFLAGS@ +AR_OPTS = @AR_OPTS@ AWK = @AWK@ LD = @LD@ LN_S = @LN_S@ -CTAGS = @CTAGS@ -ETAGS = @ETAGS@ - CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ @@ -129,7 +124,7 @@ sources : $(AUTO_SRC) $(DESTDIR)$(bindir) \ $(DESTDIR)$(libdir) : - mkdir -p $@ + sh $(srcdir)/../mkdirs.sh $@ # make copies to simplify include-paths while still keeping form's include # file in this directory. @@ -137,7 +132,7 @@ $(DESTDIR)$(libdir) : -rm -f $@ cp $(srcdir)/form.h $@ -HEADER_DEPS = \ +FORM_PRIV_H = \ $(srcdir)/form.priv.h \ $(srcdir)/form.h \ ../include/mf_common.h \ @@ -145,10 +140,10 @@ HEADER_DEPS = \ ../include/eti.h tags: - $(CTAGS) *.[ch] + ctags *.[ch] @MAKE_UPPER_TAGS@TAGS: -@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] +@MAKE_UPPER_TAGS@ etags *.[ch] mostlyclean :: -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace diff --git a/form/f_trace.c b/form/f_trace.c index 6044e03..3bb4ccd 100644 --- a/form/f_trace.c +++ b/form/f_trace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 2004 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 * @@ -32,33 +32,33 @@ #include "form.priv.h" -MODULE_ID("$Id: f_trace.c,v 1.2 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: f_trace.c,v 1.1 2004/12/25 23:28:49 tom Exp $") NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr(FIELD **code) { - T((T_RETURN("%p"), (void *)code)); + T((T_RETURN("%p"), code)); return code; } NCURSES_EXPORT(FIELD *) _nc_retrace_field(FIELD *code) { - T((T_RETURN("%p"), (void *)code)); + T((T_RETURN("%p"), code)); return code; } NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type(FIELDTYPE *code) { - T((T_RETURN("%p"), (void *)code)); + T((T_RETURN("%p"), code)); return code; } NCURSES_EXPORT(FORM *) _nc_retrace_form(FORM *code) { - T((T_RETURN("%p"), (void *)code)); + T((T_RETURN("%p"), code)); return code; } diff --git a/form/fld_arg.c b/form/fld_arg.c index a07bdb1..f79a157 100644 --- a/form/fld_arg.c +++ b/form/fld_arg.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_arg.c,v 1.12 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_arg.c,v 1.11 2004/12/25 22:20:18 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -67,7 +67,7 @@ set_fieldtype_arg(FIELDTYPE *typ, void (*const free_arg) (void *)) { T((T_CALLED("set_fieldtype_arg(%p,%p,%p,%p)"), - (void *)typ, make_arg, copy_arg, free_arg)); + typ, make_arg, copy_arg, free_arg)); if (typ != 0 && make_arg != (void *)0) { @@ -91,7 +91,7 @@ set_fieldtype_arg(FIELDTYPE *typ, NCURSES_EXPORT(void *) field_arg(const FIELD *field) { - T((T_CALLED("field_arg(%p)"), (const void *)field)); + T((T_CALLED("field_arg(%p)"), field)); returnVoidPtr(Normalize_Field(field)->arg); } diff --git a/form/fld_attr.c b/form/fld_attr.c index 0112f00..c9c0838 100644 --- a/form/fld_attr.c +++ b/form/fld_attr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_attr.c,v 1.11 2010/01/23 21:12:08 tom Exp $") +MODULE_ID("$Id: fld_attr.c,v 1.10 2004/12/11 21:33:15 tom Exp $") /*---------------------------------------------------------------------------- Field-Attribute manipulation routines @@ -66,7 +66,7 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\ #define GEN_FIELD_ATTR_GET_FCT( name ) \ NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\ {\ - T((T_CALLED("field_" #name "(%p)"), (const void *) field));\ + T((T_CALLED("field_" #name "(%p)"), field));\ returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\ } diff --git a/form/fld_current.c b/form/fld_current.c index ef9ec00..7c3a90a 100644 --- a/form/fld_current.c +++ b/form/fld_current.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_current.c,v 1.12 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_current.c,v 1.11 2004/12/25 22:40:13 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -52,7 +52,7 @@ set_current_field(FORM *form, FIELD *field) { int err = E_OK; - T((T_CALLED("set_current_field(%p,%p)"), (void *)form, (void *)field)); + T((T_CALLED("set_current_field(%p,%p)"), form, field)); if (form == 0 || field == 0) { RETURN(E_BAD_ARGUMENT); @@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field) NCURSES_EXPORT(FIELD *) current_field(const FORM *form) { - T((T_CALLED("current_field(%p)"), (const void *)form)); + T((T_CALLED("current_field(%p)"), form)); returnField(Normalize_Form(form)->current); } @@ -130,7 +130,7 @@ current_field(const FORM *form) NCURSES_EXPORT(int) field_index(const FIELD *field) { - T((T_CALLED("field_index(%p)"), (const void *)field)); + T((T_CALLED("field_index(%p)"), field)); returnCode((field != 0 && field->form != 0) ? (int)field->index : -1); } diff --git a/form/fld_def.c b/form/fld_def.c index 6d7bd34..3559ba6 100644 --- a/form/fld_def.c +++ b/form/fld_def.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_def.c,v 1.38 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_def.c,v 1.36 2007/10/13 19:29:58 tom Exp $") /* this can't be readonly */ static FIELD default_field = @@ -252,8 +252,8 @@ _nc_Free_Type(FIELD *field) if (field->type != 0) { field->type->ref--; - _nc_Free_Argument(field->type, (TypeArgument *)(field->arg)); } + _nc_Free_Argument(field->type, (TypeArgument *)(field->arg)); } /*--------------------------------------------------------------------------- @@ -291,7 +291,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) ((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */ (New_Field = typeMalloc(FIELD, 1)) != 0) { - T((T_CREATE("field %p"), (void *)New_Field)); + T((T_CREATE("field %p"), New_Field)); *New_Field = default_field; New_Field->rows = rows; New_Field->cols = cols; @@ -355,7 +355,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) NCURSES_EXPORT(int) free_field(FIELD *field) { - T((T_CALLED("free_field(%p)"), (void *)field)); + T((T_CALLED("free_field(%p)"), field)); if (!field) { RETURN(E_BAD_ARGUMENT); diff --git a/form/fld_dup.c b/form/fld_dup.c index b8e501b..bbc38a3 100644 --- a/form/fld_dup.c +++ b/form/fld_dup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2007 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_dup.c,v 1.13 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_dup.c,v 1.12 2007/10/13 19:30:21 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -53,12 +53,12 @@ dup_field(FIELD *field, int frow, int fcol) FIELD *New_Field = (FIELD *)0; int err = E_BAD_ARGUMENT; - T((T_CALLED("dup_field(%p,%d,%d)"), (void *)field, frow, fcol)); + T((T_CALLED("dup_field(%p,%d,%d)"), field, frow, fcol)); if (field && (frow >= 0) && (fcol >= 0) && ((err = E_SYSTEM_ERROR) != 0) && /* trick : this resets the default error */ (New_Field = typeMalloc(FIELD, 1))) { - T((T_CREATE("field %p"), (void *)New_Field)); + T((T_CREATE("field %p"), New_Field)); *New_Field = *_nc_Default_Field; New_Field->frow = frow; New_Field->fcol = fcol; diff --git a/form/fld_ftchoice.c b/form/fld_ftchoice.c index 3aac5be..9237f96 100644 --- a/form/fld_ftchoice.c +++ b/form/fld_ftchoice.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_ftchoice.c,v 1.12 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_ftchoice.c,v 1.9 2004/12/11 21:44:57 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -51,19 +51,14 @@ set_fieldtype_choice(FIELDTYPE *typ, bool (*const next_choice) (FIELD *, const void *), bool (*const prev_choice) (FIELD *, const void *)) { - T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), (void *)typ, next_choice, prev_choice)); + T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), typ, next_choice, prev_choice)); if (!typ || !next_choice || !prev_choice) RETURN(E_BAD_ARGUMENT); typ->status |= _HAS_CHOICE; -#if NCURSES_INTEROP_FUNCS - typ->enum_next.onext = next_choice; - typ->enum_prev.oprev = prev_choice; -#else typ->next = next_choice; typ->prev = prev_choice; -#endif RETURN(E_OK); } diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c index c2cd251..4ed2219 100644 --- a/form/fld_ftlink.c +++ b/form/fld_ftlink.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2007 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_ftlink.c,v 1.14 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_ftlink.c,v 1.13 2007/10/13 19:30:35 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -53,14 +53,14 @@ link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2) { FIELDTYPE *nftyp = (FIELDTYPE *)0; - T((T_CALLED("link_fieldtype(%p,%p)"), (void *)type1, (void *)type2)); + T((T_CALLED("link_fieldtype(%p,%p)"), type1, type2)); if (type1 && type2) { nftyp = typeMalloc(FIELDTYPE, 1); if (nftyp) { - T((T_CREATE("fieldtype %p"), (void *)nftyp)); + T((T_CREATE("fieldtype %p"), nftyp)); *nftyp = *_nc_Default_FieldType; nftyp->status |= _LINKED_TYPE; if ((type1->status & _HAS_ARGS) || (type2->status & _HAS_ARGS)) diff --git a/form/fld_info.c b/form/fld_info.c index 13fe8e7..324198c 100644 --- a/form/fld_info.c +++ b/form/fld_info.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_info.c,v 1.11 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_info.c,v 1.10 2004/12/11 22:24:57 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -53,10 +53,10 @@ field_info(const FIELD *field, int *nrow, int *nbuf) { T((T_CALLED("field_info(%p,%p,%p,%p,%p,%p,%p)"), - (const void *)field, - (void *)rows, (void *)cols, - (void *)frow, (void *)fcol, - (void *)nrow, (void *)nbuf)); + field, + rows, cols, + frow, fcol, + nrow, nbuf)); if (!field) RETURN(E_BAD_ARGUMENT); @@ -91,11 +91,7 @@ field_info(const FIELD *field, NCURSES_EXPORT(int) dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow) { - T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), - (const void *)field, - (void *)drows, - (void *)dcols, - (void *)maxgrow)); + T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), field, drows, dcols, maxgrow)); if (!field) RETURN(E_BAD_ARGUMENT); diff --git a/form/fld_just.c b/form/fld_just.c index 58a1750..e021fb1 100644 --- a/form/fld_just.c +++ b/form/fld_just.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_just.c,v 1.12 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_just.c,v 1.11 2004/12/11 22:55:48 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -49,7 +49,7 @@ set_field_just(FIELD *field, int just) { int res = E_BAD_ARGUMENT; - T((T_CALLED("set_field_just(%p,%d)"), (void *)field, just)); + T((T_CALLED("set_field_just(%p,%d)"), field, just)); if ((just == NO_JUSTIFICATION) || (just == JUSTIFY_LEFT) || @@ -79,7 +79,7 @@ set_field_just(FIELD *field, int just) NCURSES_EXPORT(int) field_just(const FIELD *field) { - T((T_CALLED("field_just(%p)"), (const void *)field)); + T((T_CALLED("field_just(%p)"), field)); returnCode(Normalize_Field(field)->just); } diff --git a/form/fld_link.c b/form/fld_link.c index 18103be..0aac7db 100644 --- a/form/fld_link.c +++ b/form/fld_link.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2007 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_link.c,v 1.12 2010/01/23 21:14:35 tom Exp $") +MODULE_ID("$Id: fld_link.c,v 1.11 2007/10/13 19:30:43 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -54,12 +54,12 @@ link_field(FIELD *field, int frow, int fcol) FIELD *New_Field = (FIELD *)0; int err = E_BAD_ARGUMENT; - T((T_CALLED("link_field(%p,%d,%d)"), (void *)field, frow, fcol)); + T((T_CALLED("link_field(%p,%d,%d)"), field, frow, fcol)); if (field && (frow >= 0) && (fcol >= 0) && ((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */ (New_Field = typeMalloc(FIELD, 1))) { - T((T_CREATE("field %p"), (void *)New_Field)); + T((T_CREATE("field %p"), New_Field)); *New_Field = *_nc_Default_Field; New_Field->frow = frow; New_Field->fcol = fcol; diff --git a/form/fld_max.c b/form/fld_max.c index 5ce918e..7f5352e 100644 --- a/form/fld_max.c +++ b/form/fld_max.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_max.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_max.c,v 1.9 2004/12/11 21:51:54 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_max.c,v 1.10 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_max_field(FIELD *field, int maxgrow) { - T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow)); + T((T_CALLED("set_max_field(%p,%d)"), field, maxgrow)); if (!field || (maxgrow < 0)) RETURN(E_BAD_ARGUMENT); diff --git a/form/fld_move.c b/form/fld_move.c index dfba22d..d9ceaae 100644 --- a/form/fld_move.c +++ b/form/fld_move.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_move.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_move.c,v 1.9 2004/12/11 21:52:44 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_move.c,v 1.10 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) move_field(FIELD *field, int frow, int fcol) { - T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol)); + T((T_CALLED("move_field(%p,%d,%d)"), field, frow, fcol)); if (!field || (frow < 0) || (fcol < 0)) RETURN(E_BAD_ARGUMENT); diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c index 4351aed..c2984b1 100644 --- a/form/fld_newftyp.c +++ b/form/fld_newftyp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2007 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 * @@ -32,9 +32,9 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_newftyp.c,v 1.19 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_newftyp.c,v 1.15 2007/10/13 19:30:55 tom Exp $") -static FIELDTYPE default_fieldtype = +static FIELDTYPE const default_fieldtype = { 0, /* status */ 0L, /* reference count */ @@ -43,16 +43,13 @@ static FIELDTYPE default_fieldtype = NULL, /* makearg function */ NULL, /* copyarg function */ NULL, /* freearg function */ - INIT_FT_FUNC(NULL), /* field validation function */ - INIT_FT_FUNC(NULL), /* Character check function */ - INIT_FT_FUNC(NULL), /* enumerate next function */ - INIT_FT_FUNC(NULL), /* enumerate previous function */ -#if NCURSES_INTEROP_FUNCS - NULL /* generic callback alternative to makearg */ -#endif + NULL, /* field validation function */ + NULL, /* Character check function */ + NULL, /* enumerate next function */ + NULL /* enumerate previous function */ }; -NCURSES_EXPORT_VAR(FIELDTYPE *) +NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType = &default_fieldtype; /*--------------------------------------------------------------------------- @@ -83,15 +80,10 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *), if (nftyp) { - T((T_CREATE("fieldtype %p"), (void *)nftyp)); + T((T_CREATE("fieldtype %p"), nftyp)); *nftyp = default_fieldtype; -#if NCURSES_INTEROP_FUNCS - nftyp->fieldcheck.ofcheck = field_check; - nftyp->charcheck.occheck = char_check; -#else nftyp->fcheck = field_check; nftyp->ccheck = char_check; -#endif } else { @@ -118,7 +110,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *), NCURSES_EXPORT(int) free_fieldtype(FIELDTYPE *typ) { - T((T_CALLED("free_fieldtype(%p)"), (void *)typ)); + T((T_CALLED("free_fieldtype(%p)"), typ)); if (!typ) RETURN(E_BAD_ARGUMENT); diff --git a/form/fld_opts.c b/form/fld_opts.c index a52f1e2..3c881ac 100644 --- a/form/fld_opts.c +++ b/form/fld_opts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_opts.c,v 1.12 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_opts.c,v 1.11 2004/12/11 21:55:46 tom Exp $") /*---------------------------------------------------------------------------- Field-Options manipulation routines @@ -55,7 +55,7 @@ set_field_opts(FIELD *field, Field_Options opts) { int res = E_BAD_ARGUMENT; - T((T_CALLED("set_field_opts(%p,%d)"), (void *)field, opts)); + T((T_CALLED("set_field_opts(%p,%d)"), field, opts)); opts &= ALL_FIELD_OPTS; if (!(opts & ~ALL_FIELD_OPTS)) @@ -74,7 +74,7 @@ set_field_opts(FIELD *field, Field_Options opts) NCURSES_EXPORT(Field_Options) field_opts(const FIELD *field) { - T((T_CALLED("field_opts(%p)"), (const void *)field)); + T((T_CALLED("field_opts(%p)"), field)); returnCode(ALL_FIELD_OPTS & Normalize_Field(field)->opts); } @@ -96,7 +96,7 @@ field_opts_on(FIELD *field, Field_Options opts) { int res = E_BAD_ARGUMENT; - T((T_CALLED("field_opts_on(%p,%d)"), (void *)field, opts)); + T((T_CALLED("field_opts_on(%p,%d)"), field, opts)); opts &= ALL_FIELD_OPTS; if (!(opts & ~ALL_FIELD_OPTS)) @@ -124,7 +124,7 @@ field_opts_off(FIELD *field, Field_Options opts) { int res = E_BAD_ARGUMENT; - T((T_CALLED("field_opts_off(%p,%d)"), (void *)field, opts)); + T((T_CALLED("field_opts_off(%p,%d)"), field, opts)); opts &= ALL_FIELD_OPTS; if (!(opts & ~ALL_FIELD_OPTS)) diff --git a/form/fld_pad.c b/form/fld_pad.c index 4f8ff1f..63d8ad1 100644 --- a/form/fld_pad.c +++ b/form/fld_pad.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_pad.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_pad.c,v 1.9 2004/12/11 21:56:49 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -50,7 +50,7 @@ set_field_pad(FIELD *field, int ch) { int res = E_BAD_ARGUMENT; - T((T_CALLED("set_field_pad(%p,%d)"), (void *)field, ch)); + T((T_CALLED("set_field_pad(%p,%d)"), field, ch)); Normalize_Field(field); if (isprint(UChar(ch))) @@ -77,7 +77,7 @@ set_field_pad(FIELD *field, int ch) NCURSES_EXPORT(int) field_pad(const FIELD *field) { - T((T_CALLED("field_pad(%p)"), (const void *)field)); + T((T_CALLED("field_pad(%p)"), field)); returnCode(Normalize_Field(field)->pad); } diff --git a/form/fld_page.c b/form/fld_page.c index e4d18c5..e1af496 100644 --- a/form/fld_page.c +++ b/form/fld_page.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_page.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_page.c,v 1.9 2004/12/11 21:58:19 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_page.c,v 1.10 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_new_page(FIELD *field, bool new_page_flag) { - T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag)); + T((T_CALLED("set_new_page(%p,%d)"), field, new_page_flag)); Normalize_Field(field); if (field->form) @@ -74,7 +74,7 @@ set_new_page(FIELD *field, bool new_page_flag) NCURSES_EXPORT(bool) new_page(const FIELD *field) { - T((T_CALLED("new_page(%p)"), (const void *)field)); + T((T_CALLED("new_page(%p)"), field)); returnBool((Normalize_Field(field)->status & _NEWPAGE) ? TRUE : FALSE); } diff --git a/form/fld_stat.c b/form/fld_stat.c index 46f89e6..b85b4d5 100644 --- a/form/fld_stat.c +++ b/form/fld_stat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_stat.c,v 1.12 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_stat.c,v 1.12 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_field_status(FIELD *field, bool status) { - T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status)); + T((T_CALLED("set_field_status(%p,%d)"), field, status)); Normalize_Field(field); @@ -71,7 +71,7 @@ set_field_status(FIELD *field, bool status) NCURSES_EXPORT(bool) field_status(const FIELD *field) { - T((T_CALLED("field_status(%p)"), (const void *)field)); + T((T_CALLED("field_status(%p)"), field)); returnBool((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE); } diff --git a/form/fld_type.c b/form/fld_type.c index 0b35b7e..c9a3fbe 100644 --- a/form/fld_type.c +++ b/form/fld_type.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_type.c,v 1.16 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_type.c,v 1.15 2004/12/25 22:24:10 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -52,7 +52,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...) int res = E_SYSTEM_ERROR; int err = 0; - T((T_CALLED("set_field_type(%p,%p)"), (void *)field, (void *)type)); + T((T_CALLED("set_field_type(%p,%p)"), field, type)); va_start(ap, type); @@ -90,7 +90,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...) NCURSES_EXPORT(FIELDTYPE *) field_type(const FIELD *field) { - T((T_CALLED("field_type(%p)"), (const void *)field)); + T((T_CALLED("field_type(%p)"), field)); returnFieldType(Normalize_Field(field)->type); } diff --git a/form/fld_user.c b/form/fld_user.c index 30bcf7a4..323622c 100644 --- a/form/fld_user.c +++ b/form/fld_user.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_user.c,v 1.16 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fld_user.c,v 1.15 2004/12/25 22:24:50 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_user.c,v 1.16 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_field_userptr(FIELD *field, void *usrptr) { - T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr)); + T((T_CALLED("set_field_userptr(%p,%p)"), field, usrptr)); Normalize_Field(field)->usrptr = usrptr; RETURN(E_OK); @@ -65,7 +65,7 @@ set_field_userptr(FIELD *field, void *usrptr) NCURSES_EXPORT(void *) field_userptr(const FIELD *field) { - T((T_CALLED("field_userptr(%p)"), (const void *)field)); + T((T_CALLED("field_userptr(%p)"), field)); returnVoidPtr(Normalize_Field(field)->usrptr); } diff --git a/form/form.h b/form/form.h index f52893b..a4691a8 100644 --- a/form/form.h +++ b/form/form.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -30,7 +30,7 @@ * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ -/* $Id: form.h,v 0.21 2009/11/07 19:31:11 tom Exp $ */ +/* $Id: form.h,v 0.20 2004/12/04 22:22:10 tom Exp $ */ #ifndef FORM_H #define FORM_H @@ -105,13 +105,34 @@ typedef struct fieldnode { NCURSES_FIELD_INTERNALS } FIELD; + /************** + * FIELDTYPE * + **************/ + +typedef struct typenode { + unsigned short status; /* flags */ + long ref; /* reference count */ + struct typenode * left; /* ptr to operand for | */ + struct typenode * right; /* ptr to operand for | */ + + void* (*makearg)(va_list *); /* make fieldtype arg */ + void* (*copyarg)(const void *); /* copy fieldtype arg */ + void (*freearg)(void *); /* free fieldtype arg */ + + bool (*fcheck)(FIELD *,const void *); /* field validation */ + bool (*ccheck)(int,const void *); /* character validation */ + + bool (*next)(FIELD *,const void *); /* enumerate next value */ + bool (*prev)(FIELD *,const void *); /* enumerate prev value */ + +} FIELDTYPE; /********* * FORM * *********/ typedef struct formnode { - unsigned short status; /* flags */ + unsigned short status; /* flags */ short rows; /* size in rows */ short cols; /* size in cols */ int currow; /* current row in field window */ @@ -137,49 +158,6 @@ typedef struct formnode { } FORM; - - /************** - * FIELDTYPE * - **************/ - -typedef struct typenode { - unsigned short status; /* flags */ - long ref; /* reference count */ - struct typenode * left; /* ptr to operand for | */ - struct typenode * right; /* ptr to operand for | */ - - void* (*makearg)(va_list *); /* make fieldtype arg */ - void* (*copyarg)(const void *); /* copy fieldtype arg */ - void (*freearg)(void *); /* free fieldtype arg */ - -#if NCURSES_INTEROP_FUNCS - union { - bool (*ofcheck)(FIELD *,const void *); /* field validation */ - bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */ - } fieldcheck; - union { - bool (*occheck)(int,const void *); /* character validation */ - bool (*gccheck)(int,FORM*, - FIELD*,const void*); /* generic char validation */ - } charcheck; - union { - bool (*onext)(FIELD *,const void *); /* enumerate next value */ - bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */ - } enum_next; - union { - bool (*oprev)(FIELD *,const void *); /* enumerate prev value */ - bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */ - } enum_prev; - void* (*genericarg)(void*); /* Alternate Arg method */ -#else - bool (*fcheck)(FIELD *,const void *); /* field validation */ - bool (*ccheck)(int,const void *); /* character validation */ - - bool (*next)(FIELD *,const void *); /* enumerate next value */ - bool (*prev)(FIELD *,const void *); /* enumerate prev value */ -#endif -} FIELDTYPE; - typedef void (*Form_Hook)(FORM *); /*************************** @@ -301,6 +279,13 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP; extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */ /*********************** + * Default objects * + ***********************/ +extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form; +extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field; + + + /*********************** * FIELDTYPE routines * ***********************/ extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype ( @@ -411,10 +396,6 @@ extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *); extern NCURSES_EXPORT(bool) data_ahead (const FORM *); extern NCURSES_EXPORT(bool) data_behind (const FORM *); -#if NCURSES_SP_FUNCS -extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **); -#endif - #ifdef __cplusplus } #endif diff --git a/form/form.priv.h b/form/form.priv.h index 49250b4..fea627d 100644 --- a/form/form.priv.h +++ b/form/form.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2008 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 * @@ -30,7 +30,7 @@ * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ -/* $Id: form.priv.h,v 0.32 2009/11/07 21:26:43 tom Exp $ */ +/* $Id: form.priv.h,v 0.27 2008/09/08 20:29:05 tom Exp $ */ #ifndef FORM_PRIV_H #define FORM_PRIV_H 1 @@ -62,13 +62,6 @@ #include "form.h" - /*********************** - * Default objects * - ***********************/ -extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form; -extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field; -extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; - /* form status values */ #define _OVLMODE (0x04U) /* Form is in overlay mode */ #define _WINDOW_MODIFIED (0x10U) /* Current field window has been modified */ @@ -85,7 +78,6 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; #define _HAS_ARGS (0x02U) /* Type has arguments */ #define _HAS_CHOICE (0x04U) /* Type has choice methods */ #define _RESIDENT (0x08U) /* Type is built-in */ -#define _GENERIC (0x10U) /* A generic field type */ /* This are the field options required to be a selectable field in field navigation requests */ @@ -99,20 +91,9 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType; #define Normalize_Field(field) \ ((field) = (field != 0) ? (field) : _nc_Default_Field) -#if NCURSES_SP_FUNCS -#define Get_Form_Screen(form) \ - ((form)->win ? _nc_screen_of((form->win)):CURRENT_SCREEN) -#else -#define Get_Form_Screen(form) CURRENT_SCREEN -#endif - /* Retrieve forms window */ #define Get_Form_Window(form) \ - ((form)->sub \ - ? (form)->sub \ - : ((form)->win \ - ? (form)->win \ - : StdScreen(Get_Form_Screen(form)))) + ((form)->sub?(form)->sub:((form)->win?(form)->win:stdscr)) /* Calculate the size for a single buffer for this field */ #define Buffer_Length(field) ((field)->drows * (field)->dcols) @@ -163,6 +144,8 @@ TypeArgument; #define C_ZEROS '\0' +extern NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType; + extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*); extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*); extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*); @@ -178,36 +161,6 @@ extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*); extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*); extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*); -#if NCURSES_INTEROP_FUNCS -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void); -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void); -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void); -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void); -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void); -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void); -extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void); - -extern NCURSES_EXPORT(FIELDTYPE *) -_nc_generic_fieldtype(bool (*const field_check) (FORM*, - FIELD *, - const void *), - bool (*const char_check) (int, - FORM*, - FIELD*, - const void *), - bool (*const next)(FORM*,FIELD*,const void*), - bool (*const prev)(FORM*,FIELD*,const void*), - void (*freecallback)(void*)); -extern NCURSES_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**)); -extern NCURSES_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* ); - -#define INIT_FT_FUNC(func) {func} -#else -#define INIT_FT_FUNC(func) func -#endif - -extern NCURSES_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*); - #if USE_WIDEC_SUPPORT extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); #endif @@ -223,8 +176,8 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *); extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **); extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *); extern NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *); -extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *); -extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook); +extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *); +extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook); #else /* !TRACE */ diff --git a/form/frm_cursor.c b/form/frm_cursor.c index 7a4cd16..18dabab 100644 --- a/form/frm_cursor.c +++ b/form/frm_cursor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_cursor.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_cursor.c,v 1.9 2004/12/11 22:01:03 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -53,7 +53,7 @@ pos_form_cursor(FORM *form) { int res; - T((T_CALLED("pos_form_cursor(%p)"), (void *)form)); + T((T_CALLED("pos_form_cursor(%p)"), form)); if (!form) res = E_BAD_ARGUMENT; diff --git a/form/frm_data.c b/form/frm_data.c index 93917d5..787a179 100644 --- a/form/frm_data.c +++ b/form/frm_data.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2010 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_data.c,v 1.15 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_data.c,v 1.14 2005/11/26 15:34:01 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -49,7 +49,7 @@ data_behind(const FORM *form) { bool result = FALSE; - T((T_CALLED("data_behind(%p)"), (const void *)form)); + T((T_CALLED("data_behind(%p)"), form)); if (form && (form->status & _POSTED) && form->current) { @@ -136,7 +136,7 @@ data_ahead(const FORM *form) { bool result = FALSE; - T((T_CALLED("data_ahead(%p)"), (const void *)form)); + T((T_CALLED("data_ahead(%p)"), form)); if (form && (form->status & _POSTED) && form->current) { diff --git a/form/frm_def.c b/form/frm_def.c index 86500f2..e689751 100644 --- a/form/frm_def.c +++ b/form/frm_def.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_def.c,v 1.25 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_def.c,v 1.23 2008/08/04 00:07:55 tom Exp $") /* this can't be readonly */ static FORM default_form = @@ -160,7 +160,7 @@ Connect_Fields(FORM *form, FIELD **fields) int maximum_row_in_field, maximum_col_in_field; _PAGE *pg; - T((T_CALLED("Connect_Fields(%p,%p)"), (void *)form, (void *)fields)); + T((T_CALLED("Connect_Fields(%p,%p)"), form, fields)); assert(form); @@ -188,7 +188,7 @@ Connect_Fields(FORM *form, FIELD **fields) /* allocate page structures */ if ((pg = typeMalloc(_PAGE, page_nr)) != (_PAGE *) 0) { - T((T_CREATE("_PAGE %p"), (void *)pg)); + T((T_CREATE("_PAGE %p"), pg)); form->page = pg; } else @@ -283,7 +283,7 @@ Associate_Fields(FORM *form, FIELD **fields) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : FORM *new_form_sp(SCREEN* sp, FIELD** fields ) +| Function : FORM *new_form( FIELD **fields ) | | Description : Create new form with given array of fields. | @@ -295,31 +295,21 @@ Associate_Fields(FORM *form, FIELD **fields) | E_SYSTEM_ERROR - not enough memory +--------------------------------------------------------------------------*/ NCURSES_EXPORT(FORM *) -NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields) +new_form(FIELD **fields) { int err = E_SYSTEM_ERROR; - FORM *form = (FORM *)0; - T((T_CALLED("new_form(%p,%p)"), (void *)SP_PARM, (void *)fields)); + FORM *form = typeMalloc(FORM, 1); - if (IsValidScreen(SP_PARM)) + T((T_CALLED("new_form(%p)"), fields)); + if (form) { - form = typeMalloc(FORM, 1); - - if (form) + T((T_CREATE("form %p"), form)); + *form = *_nc_Default_Form; + if ((err = Associate_Fields(form, fields)) != E_OK) { - T((T_CREATE("form %p"), (void *)form)); - *form = *_nc_Default_Form; - /* This ensures win and sub are always non-null, - so we can derive always the SCREEN that this form is - running on. */ - form->win = StdScreen(SP_PARM); - form->sub = StdScreen(SP_PARM); - if ((err = Associate_Fields(form, fields)) != E_OK) - { - free_form(form); - form = (FORM *)0; - } + free_form(form); + form = (FORM *)0; } } @@ -331,27 +321,6 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : FORM* new_form(FIELD** fields ) -| -| Description : Create new form with given array of fields. -| -| Return Values : Pointer to form. NULL if error occurred. -! Set errno: -| E_OK - success -| E_BAD_ARGUMENT - Invalid form pointer or field array -| E_CONNECTED - a field is already connected -| E_SYSTEM_ERROR - not enough memory -+--------------------------------------------------------------------------*/ -#if NCURSES_SP_FUNCS -NCURSES_EXPORT(FORM *) -new_form(FIELD **fields) -{ - return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields); -} -#endif - -/*--------------------------------------------------------------------------- -| Facility : libnform | Function : int free_form( FORM *form ) | | Description : Release internal memory associated with form. @@ -363,7 +332,7 @@ new_form(FIELD **fields) NCURSES_EXPORT(int) free_form(FORM *form) { - T((T_CALLED("free_form(%p)"), (void *)form)); + T((T_CALLED("free_form(%p)"), form)); if (!form) RETURN(E_BAD_ARGUMENT); @@ -397,7 +366,7 @@ set_form_fields(FORM *form, FIELD **fields) FIELD **old; int res; - T((T_CALLED("set_form_fields(%p,%p)"), (void *)form, (void *)fields)); + T((T_CALLED("set_form_fields(%p,%p)"), form, fields)); if (!form) RETURN(E_BAD_ARGUMENT); @@ -425,7 +394,7 @@ set_form_fields(FORM *form, FIELD **fields) NCURSES_EXPORT(FIELD **) form_fields(const FORM *form) { - T((T_CALLED("form_field(%p)"), (const void *)form)); + T((T_CALLED("form_field(%p)"), form)); returnFieldPtr(Normalize_Form(form)->field); } @@ -440,7 +409,7 @@ form_fields(const FORM *form) NCURSES_EXPORT(int) field_count(const FORM *form) { - T((T_CALLED("field_count(%p)"), (const void *)form)); + T((T_CALLED("field_count(%p)"), form)); returnCode(Normalize_Form(form)->maxfield); } diff --git a/form/frm_driver.c b/form/frm_driver.c index e0892bf..94323ed 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.98 2010/05/01 21:11:43 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -188,7 +188,7 @@ static int FE_Delete_Previous(FORM *); /* Macro to set the attributes for a fields window */ #define Set_Field_Window_Attributes(field,win) \ ( wbkgdset((win),(chtype)((field)->pad | (field)->back)), \ - (void) wattrset((win),(field)->fore) ) + wattrset((win),(field)->fore) ) /* Logic to decide whether or not a field really appears on the form */ #define Field_Really_Appears(field) \ @@ -512,10 +512,9 @@ Buffer_To_Window(const FIELD *field, WINDOW *win) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : void _nc_get_fieldbuffer( +| Function : static void Window_To_Buffer( | WINDOW * win, -| FIELD * field, -| FIELD_CELL * buf) +| FIELD * field) | | Description : Copy the content of the window into the buffer. | The multiple lines of a window are simply @@ -524,22 +523,18 @@ Buffer_To_Window(const FIELD *field, WINDOW *win) | | Return Values : - +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(void) -_nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf) +static void +Window_To_Buffer(WINDOW *win, FIELD *field) { int pad; int len = 0; FIELD_CELL *p; int row, height; - WINDOW *win; - assert(form && field && buf); - - win = form->w; - assert(win); + assert(win && field && field->buf); pad = field->pad; - p = buf; + p = field->buf; height = getmaxy(win); for (row = 0; (row < height) && (row < field->drows); row++) @@ -568,25 +563,6 @@ _nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void Window_To_Buffer( -| FORM * form, -| FIELD * field) -| -| Description : Copy the content of the window into the buffer. -| The multiple lines of a window are simply -| concatenated into the buffer. Pad characters in -| the window will be replaced by blanks in the buffer. -| -| Return Values : - -+--------------------------------------------------------------------------*/ -static void -Window_To_Buffer(FORM *form, FIELD *field) -{ - _nc_get_fieldbuffer(form, field, field->buf); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform | Function : static void Synchronize_Buffer(FORM * form) | | Description : If there was a change, copy the content of the @@ -603,7 +579,7 @@ Synchronize_Buffer(FORM *form) { form->status &= ~_WINDOW_MODIFIED; form->status |= _FCHECK_REQUIRED; - Window_To_Buffer(form, form->current); + Window_To_Buffer(form->w, form->current); wmove(form->w, form->currow, form->curcol); } } @@ -687,7 +663,7 @@ Field_Grown(FIELD *field, int amount) result = TRUE; /* allow sharing of recovery on failure */ - T((T_CREATE("fieldcell %p"), (void *)newbuf)); + T((T_CREATE("fieldcell %p"), newbuf)); field->buf = newbuf; for (i = 0; i <= field->nbuf; i++) { @@ -776,7 +752,7 @@ Field_Grown(FIELD *field, int amount) static int Field_encloses(FIELD *field, int ry, int rx) { - T((T_CALLED("Field_encloses(%p)"), (void *)field)); + T((T_CALLED("Field_encloses(%p)"), field)); if (field != 0 && field->frow <= ry && (field->frow + field->rows) > ry @@ -849,7 +825,7 @@ _nc_Refresh_Current_Field(FORM *form) WINDOW *formwin; FIELD *field; - T((T_CALLED("_nc_Refresh_Current_Field(%p)"), (void *)form)); + T((T_CALLED("_nc_Refresh_Current_Field(%p)"), form)); if (!form) RETURN(E_BAD_ARGUMENT); @@ -1034,8 +1010,7 @@ Undo_Justification(FIELD *field, WINDOW *win) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static bool Check_Char(FORM *form, -| FIELD *field, +| Function : static bool Check_Char( | FIELDTYPE * typ, | int ch, | TypeArgument *argp) @@ -1047,11 +1022,7 @@ Undo_Justification(FIELD *field, WINDOW *win) | FALSE - Character is invalid +--------------------------------------------------------------------------*/ static bool -Check_Char(FORM *form, - FIELD *field, - FIELDTYPE *typ, - int ch, - TypeArgument *argp) +Check_Char(FIELDTYPE *typ, int ch, TypeArgument *argp) { if (typ) { @@ -1059,23 +1030,13 @@ Check_Char(FORM *form, { assert(argp); return ( - Check_Char(form, field, typ->left, ch, argp->left) || - Check_Char(form, field, typ->right, ch, argp->right)); + Check_Char(typ->left, ch, argp->left) || + Check_Char(typ->right, ch, argp->right)); } else { -#if NCURSES_INTEROP_FUNCS - if (typ->charcheck.occheck) - { - if (typ->status & _GENERIC) - return typ->charcheck.gccheck(ch, form, field, (void *)argp); - else - return typ->charcheck.occheck(ch, (void *)argp); - } -#else if (typ->ccheck) return typ->ccheck(ch, (void *)argp); -#endif } } return (!iscntrl(UChar(ch)) ? TRUE : FALSE); @@ -1112,13 +1073,9 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag) else { if (field->opts & O_VISIBLE) - { - Set_Field_Window_Attributes(field, win); - } + Set_Field_Window_Attributes(field, win); else - { - (void)wattrset(win, WINDOW_ATTRS(fwin)); - } + wattrset(win, WINDOW_ATTRS(fwin)); werase(win); } @@ -1240,7 +1197,7 @@ _nc_Synchronize_Attributes(FIELD *field) int res = E_OK; WINDOW *formwin; - T((T_CALLED("_nc_Synchronize_Attributes(%p)"), (void *)field)); + T((T_CALLED("_nc_Synchronize_Attributes(%p)"), field)); if (!field) returnCode(E_BAD_ARGUMENT); @@ -1307,7 +1264,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts) FORM *form; int res = E_OK; - T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), (void *)field, newopts)); + T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), field, newopts)); if (!field) returnCode(E_BAD_ARGUMENT); @@ -1319,13 +1276,14 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts) if (form) { + if (form->current == field) + { + field->opts = oldopts; + returnCode(E_CURRENT); + } + if (form->status & _POSTED) { - if (form->current == field) - { - field->opts = oldopts; - returnCode(E_CURRENT); - } if ((form->curpage == field->page)) { if (changed_opts & O_VISIBLE) @@ -1407,7 +1365,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield) FIELD *field; WINDOW *new_window; - T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), (void *)form, (void *)newfield)); + T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), form, newfield)); if (!form || !newfield || !form->current || (newfield->form != form)) returnCode(E_BAD_ARGUMENT); @@ -1441,7 +1399,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield) { if (Justification_Allowed(field)) { - Window_To_Buffer(form, field); + Window_To_Buffer(form->w, field); werase(form->w); Perform_Justification(field, form->w); wsyncup(form->w); @@ -1514,7 +1472,7 @@ IFN_Next_Character(FORM *form) FIELD *field = form->current; int step = myWCWIDTH(form->w, form->currow, form->curcol); - T((T_CALLED("IFN_Next_Character(%p)"), (void *)form)); + T((T_CALLED("IFN_Next_Character(%p)"), form)); if ((form->curcol += step) == field->dcols) { if ((++(form->currow)) == field->drows) @@ -1556,7 +1514,7 @@ IFN_Previous_Character(FORM *form) int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1); int oldcol = form->curcol; - T((T_CALLED("IFN_Previous_Character(%p)"), (void *)form)); + T((T_CALLED("IFN_Previous_Character(%p)"), form)); if ((form->curcol -= amount) < 0) { if ((--(form->currow)) < 0) @@ -1584,7 +1542,7 @@ IFN_Next_Line(FORM *form) { FIELD *field = form->current; - T((T_CALLED("IFN_Next_Line(%p)"), (void *)form)); + T((T_CALLED("IFN_Next_Line(%p)"), form)); if ((++(form->currow)) == field->drows) { #if GROW_IF_NAVIGATE @@ -1610,7 +1568,7 @@ IFN_Next_Line(FORM *form) static int IFN_Previous_Line(FORM *form) { - T((T_CALLED("IFN_Previous_Line(%p)"), (void *)form)); + T((T_CALLED("IFN_Previous_Line(%p)"), form)); if ((--(form->currow)) < 0) { form->currow++; @@ -1637,7 +1595,7 @@ IFN_Next_Word(FORM *form) FIELD_CELL *s; FIELD_CELL *t; - T((T_CALLED("IFN_Next_Word(%p)"), (void *)form)); + T((T_CALLED("IFN_Next_Word(%p)"), form)); /* We really need access to the data, so we have to synchronize */ Synchronize_Buffer(form); @@ -1680,7 +1638,7 @@ IFN_Previous_Word(FORM *form) FIELD_CELL *t; bool again = FALSE; - T((T_CALLED("IFN_Previous_Word(%p)"), (void *)form)); + T((T_CALLED("IFN_Previous_Word(%p)"), form)); /* We really need access to the data, so we have to synchronize */ Synchronize_Buffer(form); @@ -1730,7 +1688,7 @@ IFN_Beginning_Of_Field(FORM *form) { FIELD *field = form->current; - T((T_CALLED("IFN_Beginning_Of_Field(%p)"), (void *)form)); + T((T_CALLED("IFN_Beginning_Of_Field(%p)"), form)); Synchronize_Buffer(form); Adjust_Cursor_Position(form, Get_Start_Of_Data(field->buf, Buffer_Length(field))); @@ -1754,7 +1712,7 @@ IFN_End_Of_Field(FORM *form) FIELD *field = form->current; FIELD_CELL *pos; - T((T_CALLED("IFN_End_Of_Field(%p)"), (void *)form)); + T((T_CALLED("IFN_End_Of_Field(%p)"), form)); Synchronize_Buffer(form); pos = After_End_Of_Data(field->buf, Buffer_Length(field)); if (pos == (field->buf + Buffer_Length(field))) @@ -1777,7 +1735,7 @@ IFN_Beginning_Of_Line(FORM *form) { FIELD *field = form->current; - T((T_CALLED("IFN_Beginning_Of_Line(%p)"), (void *)form)); + T((T_CALLED("IFN_Beginning_Of_Line(%p)"), form)); Synchronize_Buffer(form); Adjust_Cursor_Position(form, Get_Start_Of_Data(Address_Of_Current_Row_In_Buffer(form), @@ -1803,7 +1761,7 @@ IFN_End_Of_Line(FORM *form) FIELD_CELL *pos; FIELD_CELL *bp; - T((T_CALLED("IFN_End_Of_Line(%p)"), (void *)form)); + T((T_CALLED("IFN_End_Of_Line(%p)"), form)); Synchronize_Buffer(form); bp = Address_Of_Current_Row_In_Buffer(form); pos = After_End_Of_Data(bp, field->dcols); @@ -1829,7 +1787,7 @@ IFN_Left_Character(FORM *form) int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1); int oldcol = form->curcol; - T((T_CALLED("IFN_Left_Character(%p)"), (void *)form)); + T((T_CALLED("IFN_Left_Character(%p)"), form)); if ((form->curcol -= amount) < 0) { form->curcol = oldcol; @@ -1854,7 +1812,7 @@ IFN_Right_Character(FORM *form) int amount = myWCWIDTH(form->w, form->currow, form->curcol); int oldcol = form->curcol; - T((T_CALLED("IFN_Right_Character(%p)"), (void *)form)); + T((T_CALLED("IFN_Right_Character(%p)"), form)); if ((form->curcol += amount) >= form->current->dcols) { #if GROW_IF_NAVIGATE @@ -1882,7 +1840,7 @@ IFN_Right_Character(FORM *form) static int IFN_Up_Character(FORM *form) { - T((T_CALLED("IFN_Up_Character(%p)"), (void *)form)); + T((T_CALLED("IFN_Up_Character(%p)"), form)); if ((--(form->currow)) < 0) { form->currow++; @@ -1906,7 +1864,7 @@ IFN_Down_Character(FORM *form) { FIELD *field = form->current; - T((T_CALLED("IFN_Down_Character(%p)"), (void *)form)); + T((T_CALLED("IFN_Down_Character(%p)"), form)); if ((++(form->currow)) == field->drows) { #if GROW_IF_NAVIGATE @@ -2015,7 +1973,7 @@ Vertical_Scrolling(int (*const fct) (FORM *), FORM *form) static int VSC_Scroll_Line_Forward(FORM *form) { - T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), (void *)form)); + T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), form)); returnCode(VSC_Generic(form, 1)); } @@ -2031,7 +1989,7 @@ VSC_Scroll_Line_Forward(FORM *form) static int VSC_Scroll_Line_Backward(FORM *form) { - T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), (void *)form)); + T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), form)); returnCode(VSC_Generic(form, -1)); } @@ -2047,7 +2005,7 @@ VSC_Scroll_Line_Backward(FORM *form) static int VSC_Scroll_Page_Forward(FORM *form) { - T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), (void *)form)); + T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), form)); returnCode(VSC_Generic(form, form->current->rows)); } @@ -2063,7 +2021,7 @@ VSC_Scroll_Page_Forward(FORM *form) static int VSC_Scroll_Half_Page_Forward(FORM *form) { - T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), (void *)form)); + T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), form)); returnCode(VSC_Generic(form, (form->current->rows + 1) / 2)); } @@ -2079,7 +2037,7 @@ VSC_Scroll_Half_Page_Forward(FORM *form) static int VSC_Scroll_Page_Backward(FORM *form) { - T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), (void *)form)); + T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), form)); returnCode(VSC_Generic(form, -(form->current->rows))); } @@ -2095,7 +2053,7 @@ VSC_Scroll_Page_Backward(FORM *form) static int VSC_Scroll_Half_Page_Backward(FORM *form) { - T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), (void *)form)); + T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), form)); returnCode(VSC_Generic(form, -((form->current->rows + 1) / 2))); } /*---------------------------------------------------------------------------- @@ -2189,7 +2147,7 @@ Horizontal_Scrolling(int (*const fct) (FORM *), FORM *form) static int HSC_Scroll_Char_Forward(FORM *form) { - T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), (void *)form)); + T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), form)); returnCode(HSC_Generic(form, 1)); } @@ -2205,7 +2163,7 @@ HSC_Scroll_Char_Forward(FORM *form) static int HSC_Scroll_Char_Backward(FORM *form) { - T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), (void *)form)); + T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), form)); returnCode(HSC_Generic(form, -1)); } @@ -2221,7 +2179,7 @@ HSC_Scroll_Char_Backward(FORM *form) static int HSC_Horizontal_Line_Forward(FORM *form) { - T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), (void *)form)); + T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), form)); returnCode(HSC_Generic(form, form->current->cols)); } @@ -2237,7 +2195,7 @@ HSC_Horizontal_Line_Forward(FORM *form) static int HSC_Horizontal_Half_Line_Forward(FORM *form) { - T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), (void *)form)); + T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), form)); returnCode(HSC_Generic(form, (form->current->cols + 1) / 2)); } @@ -2253,7 +2211,7 @@ HSC_Horizontal_Half_Line_Forward(FORM *form) static int HSC_Horizontal_Line_Backward(FORM *form) { - T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), (void *)form)); + T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), form)); returnCode(HSC_Generic(form, -(form->current->cols))); } @@ -2269,7 +2227,7 @@ HSC_Horizontal_Line_Backward(FORM *form) static int HSC_Horizontal_Half_Line_Backward(FORM *form) { - T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), (void *)form)); + T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), form)); returnCode(HSC_Generic(form, -((form->current->cols + 1) / 2))); } @@ -2448,7 +2406,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form) return E_SYSTEM_ERROR; } bp = Address_Of_Current_Row_In_Buffer(form); - Window_To_Buffer(form, field); + Window_To_Buffer(form->w, field); split = After_Last_Whitespace_Character(bp, field->dcols); /* split points to the first character of the sequence to be brought on the next line */ @@ -2474,7 +2432,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form) if (result != E_OK) { DeleteChar(form); - Window_To_Buffer(form, field); + Window_To_Buffer(form->w, field); result = E_REQUEST_DENIED; } } @@ -2565,7 +2523,7 @@ FE_New_Line(FORM *form) FIELD_CELL *bp, *t; bool Last_Row = ((field->drows - 1) == form->currow); - T((T_CALLED("FE_New_Line(%p)"), (void *)form)); + T((T_CALLED("FE_New_Line(%p)"), form)); if (form->status & _OVLMODE) { if (Last_Row && @@ -2648,9 +2606,8 @@ FE_Insert_Character(FORM *form) FIELD *field = form->current; int result = E_REQUEST_DENIED; - T((T_CALLED("FE_Insert_Character(%p)"), (void *)form)); - if (Check_Char(form, field, field->type, (int)C_BLANK, - (TypeArgument *)(field->arg))) + T((T_CALLED("FE_Insert_Character(%p)"), form)); + if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg))) { bool There_Is_Room = Is_There_Room_For_A_Char_In_Line(form); @@ -2684,9 +2641,8 @@ FE_Insert_Line(FORM *form) FIELD *field = form->current; int result = E_REQUEST_DENIED; - T((T_CALLED("FE_Insert_Line(%p)"), (void *)form)); - if (Check_Char(form, field, - field->type, (int)C_BLANK, (TypeArgument *)(field->arg))) + T((T_CALLED("FE_Insert_Line(%p)"), form)); + if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg))) { bool Maybe_Done = (form->currow != (field->drows - 1)) && Is_There_Room_For_A_Line(form); @@ -2718,7 +2674,7 @@ FE_Insert_Line(FORM *form) static int FE_Delete_Character(FORM *form) { - T((T_CALLED("FE_Delete_Character(%p)"), (void *)form)); + T((T_CALLED("FE_Delete_Character(%p)"), form)); DeleteChar(form); returnCode(E_OK); } @@ -2741,7 +2697,7 @@ FE_Delete_Previous(FORM *form) { FIELD *field = form->current; - T((T_CALLED("FE_Delete_Previous(%p)"), (void *)form)); + T((T_CALLED("FE_Delete_Previous(%p)"), form)); if (First_Position_In_Current_Field(form)) returnCode(E_REQUEST_DENIED); @@ -2809,7 +2765,7 @@ FE_Delete_Previous(FORM *form) static int FE_Delete_Line(FORM *form) { - T((T_CALLED("FE_Delete_Line(%p)"), (void *)form)); + T((T_CALLED("FE_Delete_Line(%p)"), form)); form->curcol = 0; wdeleteln(form->w); returnCode(E_OK); @@ -2833,7 +2789,7 @@ FE_Delete_Word(FORM *form) FIELD_CELL *cp = bp + form->curcol; FIELD_CELL *s; - T((T_CALLED("FE_Delete_Word(%p)"), (void *)form)); + T((T_CALLED("FE_Delete_Word(%p)"), form)); Synchronize_Buffer(form); if (ISBLANK(*cp)) returnCode(E_REQUEST_DENIED); /* not in word */ @@ -2867,7 +2823,7 @@ FE_Delete_Word(FORM *form) static int FE_Clear_To_End_Of_Line(FORM *form) { - T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), (void *)form)); + T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), form)); wmove(form->w, form->currow, form->curcol); wclrtoeol(form->w); returnCode(E_OK); @@ -2884,7 +2840,7 @@ FE_Clear_To_End_Of_Line(FORM *form) static int FE_Clear_To_End_Of_Field(FORM *form) { - T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), (void *)form)); + T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), form)); wmove(form->w, form->currow, form->curcol); wclrtobot(form->w); returnCode(E_OK); @@ -2901,7 +2857,7 @@ FE_Clear_To_End_Of_Field(FORM *form) static int FE_Clear_Field(FORM *form) { - T((T_CALLED("FE_Clear_Field(%p)"), (void *)form)); + T((T_CALLED("FE_Clear_Field(%p)"), form)); form->currow = form->curcol = 0; werase(form->w); returnCode(E_OK); @@ -2925,7 +2881,7 @@ FE_Clear_Field(FORM *form) static int EM_Overlay_Mode(FORM *form) { - T((T_CALLED("EM_Overlay_Mode(%p)"), (void *)form)); + T((T_CALLED("EM_Overlay_Mode(%p)"), form)); form->status |= _OVLMODE; returnCode(E_OK); } @@ -2941,7 +2897,7 @@ EM_Overlay_Mode(FORM *form) static int EM_Insert_Mode(FORM *form) { - T((T_CALLED("EM_Insert_Mode(%p)"), (void *)form)); + T((T_CALLED("EM_Insert_Mode(%p)"), form)); form->status &= ~_OVLMODE; returnCode(E_OK); } @@ -2956,7 +2912,7 @@ EM_Insert_Mode(FORM *form) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static bool Next_Choice(FORM * form, +| Function : static bool Next_Choice( | FIELDTYPE * typ, | FIELD * field, | TypeArgument *argp) @@ -2968,7 +2924,7 @@ EM_Insert_Mode(FORM *form) | FALSE - couldn't retrieve next choice +--------------------------------------------------------------------------*/ static bool -Next_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) +Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) { if (!typ || !(typ->status & _HAS_CHOICE)) return FALSE; @@ -2977,27 +2933,19 @@ Next_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) { assert(argp); return ( - Next_Choice(form, typ->left, field, argp->left) || - Next_Choice(form, typ->right, field, argp->right)); + Next_Choice(typ->left, field, argp->left) || + Next_Choice(typ->right, field, argp->right)); } else { -#if NCURSES_INTEROP_FUNCS - assert(typ->enum_next.onext); - if (typ->status & _GENERIC) - return typ->enum_next.gnext(form, field, (void *)argp); - else - return typ->enum_next.onext(field, (void *)argp); -#else assert(typ->next); return typ->next(field, (void *)argp); -#endif } } /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static bool Previous_Choice(FORM * form, +| Function : static bool Previous_Choice( | FIELDTYPE * typ, | FIELD * field, | TypeArgument *argp) @@ -3009,7 +2957,7 @@ Next_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) | FALSE - couldn't retrieve previous choice +--------------------------------------------------------------------------*/ static bool -Previous_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) +Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) { if (!typ || !(typ->status & _HAS_CHOICE)) return FALSE; @@ -3018,21 +2966,13 @@ Previous_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) { assert(argp); return ( - Previous_Choice(form, typ->left, field, argp->left) || - Previous_Choice(form, typ->right, field, argp->right)); + Previous_Choice(typ->left, field, argp->left) || + Previous_Choice(typ->right, field, argp->right)); } else { -#if NCURSES_INTEROP_FUNCS - assert(typ->enum_prev.oprev); - if (typ->status & _GENERIC) - return typ->enum_prev.gprev(form, field, (void *)argp); - else - return typ->enum_prev.oprev(field, (void *)argp); -#else assert(typ->prev); return typ->prev(field, (void *)argp); -#endif } } /*---------------------------------------------------------------------------- @@ -3057,9 +2997,9 @@ CR_Next_Choice(FORM *form) { FIELD *field = form->current; - T((T_CALLED("CR_Next_Choice(%p)"), (void *)form)); + T((T_CALLED("CR_Next_Choice(%p)"), form)); Synchronize_Buffer(form); - returnCode((Next_Choice(form, field->type, field, (TypeArgument *)(field->arg))) + returnCode((Next_Choice(field->type, field, (TypeArgument *)(field->arg))) ? E_OK : E_REQUEST_DENIED); } @@ -3078,9 +3018,9 @@ CR_Previous_Choice(FORM *form) { FIELD *field = form->current; - T((T_CALLED("CR_Previous_Choice(%p)"), (void *)form)); + T((T_CALLED("CR_Previous_Choice(%p)"), form)); Synchronize_Buffer(form); - returnCode((Previous_Choice(form, field->type, field, (TypeArgument *)(field->arg))) + returnCode((Previous_Choice(field->type, field, (TypeArgument *)(field->arg))) ? E_OK : E_REQUEST_DENIED); } @@ -3094,7 +3034,7 @@ CR_Previous_Choice(FORM *form) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static bool Check_Field(FORM* form, +| Function : static bool Check_Field( | FIELDTYPE * typ, | FIELD * field, | TypeArgument * argp) @@ -3107,7 +3047,7 @@ CR_Previous_Choice(FORM *form) | FALSE - field is invalid. +--------------------------------------------------------------------------*/ static bool -Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) +Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) { if (typ) { @@ -3128,23 +3068,13 @@ Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp) { assert(argp); return ( - Check_Field(form, typ->left, field, argp->left) || - Check_Field(form, typ->right, field, argp->right)); + Check_Field(typ->left, field, argp->left) || + Check_Field(typ->right, field, argp->right)); } else { -#if NCURSES_INTEROP_FUNCS - if (typ->fieldcheck.ofcheck) - { - if (typ->status & _GENERIC) - return typ->fieldcheck.gfcheck(form, field, (void *)argp); - else - return typ->fieldcheck.ofcheck(field, (void *)argp); - } -#else if (typ->fcheck) return typ->fcheck(field, (void *)argp); -#endif } } return TRUE; @@ -3170,7 +3100,7 @@ _nc_Internal_Validation(FORM *form) if ((form->status & _FCHECK_REQUIRED) || (!(field->opts & O_PASSOK))) { - if (!Check_Field(form, field->type, field, (TypeArgument *)(field->arg))) + if (!Check_Field(field->type, field, (TypeArgument *)(field->arg))) return FALSE; form->status &= ~_FCHECK_REQUIRED; field->status |= _CHANGED; @@ -3198,7 +3128,7 @@ _nc_Internal_Validation(FORM *form) static int FV_Validation(FORM *form) { - T((T_CALLED("FV_Validation(%p)"), (void *)form)); + T((T_CALLED("FV_Validation(%p)"), form)); if (_nc_Internal_Validation(form)) returnCode(E_OK); else @@ -3576,7 +3506,7 @@ Inter_Field_Navigation(int (*const fct) (FORM *), FORM *form) static int FN_Next_Field(FORM *form) { - T((T_CALLED("FN_Next_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Next_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Next_Field_On_Page(form->current))); } @@ -3594,7 +3524,7 @@ FN_Next_Field(FORM *form) static int FN_Previous_Field(FORM *form) { - T((T_CALLED("FN_Previous_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Previous_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Previous_Field_On_Page(form->current))); } @@ -3611,7 +3541,7 @@ FN_Previous_Field(FORM *form) static int FN_First_Field(FORM *form) { - T((T_CALLED("FN_First_Field(%p)"), (void *)form)); + T((T_CALLED("FN_First_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Next_Field_On_Page(form->field[form->page[form->curpage].pmax]))); } @@ -3628,7 +3558,7 @@ FN_First_Field(FORM *form) static int FN_Last_Field(FORM *form) { - T((T_CALLED("FN_Last_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Last_Field(%p)"), form)); returnCode( _nc_Set_Current_Field(form, Previous_Field_On_Page(form->field[form->page[form->curpage].pmin]))); @@ -3647,7 +3577,7 @@ FN_Last_Field(FORM *form) static int FN_Sorted_Next_Field(FORM *form) { - T((T_CALLED("FN_Sorted_Next_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Sorted_Next_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Sorted_Next_Field(form->current))); } @@ -3665,7 +3595,7 @@ FN_Sorted_Next_Field(FORM *form) static int FN_Sorted_Previous_Field(FORM *form) { - T((T_CALLED("FN_Sorted_Previous_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Sorted_Previous_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Sorted_Previous_Field(form->current))); } @@ -3683,7 +3613,7 @@ FN_Sorted_Previous_Field(FORM *form) static int FN_Sorted_First_Field(FORM *form) { - T((T_CALLED("FN_Sorted_First_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Sorted_First_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Sorted_Next_Field(form->field[form->page[form->curpage].smax]))); } @@ -3701,7 +3631,7 @@ FN_Sorted_First_Field(FORM *form) static int FN_Sorted_Last_Field(FORM *form) { - T((T_CALLED("FN_Sorted_Last_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Sorted_Last_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Sorted_Previous_Field(form->field[form->page[form->curpage].smin]))); } @@ -3719,7 +3649,7 @@ FN_Sorted_Last_Field(FORM *form) static int FN_Left_Field(FORM *form) { - T((T_CALLED("FN_Left_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Left_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Left_Neighbor_Field(form->current))); } @@ -3737,7 +3667,7 @@ FN_Left_Field(FORM *form) static int FN_Right_Field(FORM *form) { - T((T_CALLED("FN_Right_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Right_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Right_Neighbor_Field(form->current))); } @@ -3757,7 +3687,7 @@ FN_Right_Field(FORM *form) static int FN_Up_Field(FORM *form) { - T((T_CALLED("FN_Up_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Up_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Upper_Neighbor_Field(form->current))); } @@ -3777,7 +3707,7 @@ FN_Up_Field(FORM *form) static int FN_Down_Field(FORM *form) { - T((T_CALLED("FN_Down_Field(%p)"), (void *)form)); + T((T_CALLED("FN_Down_Field(%p)"), form)); returnCode(_nc_Set_Current_Field(form, Down_Neighbor_Field(form->current))); } @@ -3921,7 +3851,7 @@ Page_Navigation(int (*const fct) (FORM *), FORM *form) static int PN_Next_Page(FORM *form) { - T((T_CALLED("PN_Next_Page(%p)"), (void *)form)); + T((T_CALLED("PN_Next_Page(%p)"), form)); returnCode(_nc_Set_Form_Page(form, Next_Page_Number(form), (FIELD *)0)); } @@ -3937,7 +3867,7 @@ PN_Next_Page(FORM *form) static int PN_Previous_Page(FORM *form) { - T((T_CALLED("PN_Previous_Page(%p)"), (void *)form)); + T((T_CALLED("PN_Previous_Page(%p)"), form)); returnCode(_nc_Set_Form_Page(form, Previous_Page_Number(form), (FIELD *)0)); } @@ -3953,7 +3883,7 @@ PN_Previous_Page(FORM *form) static int PN_First_Page(FORM *form) { - T((T_CALLED("PN_First_Page(%p)"), (void *)form)); + T((T_CALLED("PN_First_Page(%p)"), form)); returnCode(_nc_Set_Form_Page(form, 0, (FIELD *)0)); } @@ -3969,7 +3899,7 @@ PN_First_Page(FORM *form) static int PN_Last_Page(FORM *form) { - T((T_CALLED("PN_Last_Page(%p)"), (void *)form)); + T((T_CALLED("PN_Last_Page(%p)"), form)); returnCode(_nc_Set_Form_Page(form, form->maxpage - 1, (FIELD *)0)); } @@ -3998,7 +3928,7 @@ Data_Entry(FORM *form, int c) FIELD *field = form->current; int result = E_REQUEST_DENIED; - T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c))); + T((T_CALLED("Data_Entry(%p,%s)"), form, _tracechtype((chtype)c))); if ((field->opts & O_EDIT) #if FIX_FORM_INACTIVE_BUG && (field->opts & O_ACTIVE) @@ -4199,7 +4129,7 @@ form_driver(FORM *form, int c) const Binding_Info *BI = (Binding_Info *) 0; int res = E_UNKNOWN_COMMAND; - T((T_CALLED("form_driver(%p,%d)"), (void *)form, c)); + T((T_CALLED("form_driver(%p,%d)"), form, c)); if (!form) RETURN(E_BAD_ARGUMENT); @@ -4264,7 +4194,7 @@ form_driver(FORM *form, int c) else if (KEY_MOUSE == c) { MEVENT event; - WINDOW *win = form->win ? form->win : StdScreen(Get_Form_Screen(form)); + WINDOW *win = form->win ? form->win : stdscr; WINDOW *sub = form->sub ? form->sub : win; getmouse(&event); @@ -4351,7 +4281,7 @@ form_driver(FORM *form, int c) if (!iscntrl(UChar(c))) #else if (isprint(UChar(c)) && - Check_Char(form, form->current, form->current->type, c, + Check_Char(form->current->type, c, (TypeArgument *)(form->current->arg))) #endif res = Data_Entry(form, c); @@ -4396,7 +4326,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) FIELD_CELL *widevalue = 0; #endif - T((T_CALLED("set_field_buffer(%p,%d,%s)"), (void *)field, buffer, _nc_visbuf(value))); + T((T_CALLED("set_field_buffer(%p,%d,%s)"), field, buffer, _nc_visbuf(value))); if (!field || !value || ((buffer < 0) || (buffer > field->nbuf))) RETURN(E_BAD_ARGUMENT); @@ -4417,9 +4347,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) * field->cols)))) RETURN(E_SYSTEM_ERROR); -#if !USE_WIDEC_SUPPORT len = vlen; -#endif } } @@ -4432,15 +4360,14 @@ set_field_buffer(FIELD *field, int buffer, const char *value) * and other special cases that we really do not want to handle here. */ #if NCURSES_EXT_FUNCS - if (wresize(field->working, 1, Buffer_Length(field) + 1) == ERR) + if (wresize(field->working, field->drows, field->dcols) == ERR) #endif { delwin(field->working); - field->working = newpad(1, Buffer_Length(field) + 1); + field->working = newpad(field->drows, field->dcols); } - len = Buffer_Length(field); wclear(field->working); - (void)mvwaddstr(field->working, 0, 0, value); + mvwaddstr(field->working, 0, 0, value); if ((widevalue = typeCalloc(FIELD_CELL, len + 1)) == 0) { @@ -4450,9 +4377,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value) { for (i = 0; i < (unsigned)field->drows; ++i) { - (void)mvwin_wchnstr(field->working, 0, i * field->dcols, - widevalue + (i * field->dcols), - field->dcols); + mvwin_wchnstr(field->working, i, 0, + widevalue + (i * field->dcols), + field->dcols); } for (i = 0; i < len; ++i) { @@ -4506,7 +4433,7 @@ field_buffer(const FIELD *field, int buffer) { char *result = 0; - T((T_CALLED("field_buffer(%p,%d)"), (const void *)field, buffer)); + T((T_CALLED("field_buffer(%p,%d)"), field, buffer)); if (field && (buffer >= 0) && (buffer <= field->nbuf)) { @@ -4519,7 +4446,7 @@ field_buffer(const FIELD *field, int buffer) /* determine the number of bytes needed to store the expanded string */ for (n = 0; n < size; ++n) { - if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0') + if (!isWidecExt(data[n])) { mbstate_t state; size_t next; @@ -4536,25 +4463,12 @@ field_buffer(const FIELD *field, int buffer) free(field->expanded[buffer]); field->expanded[buffer] = typeMalloc(char, need + 1); - /* - * Expand the multibyte data. - * - * It may also be multi-column data. In that case, the data for a row - * may be null-padded to align to the dcols/drows layout (or it may - * contain embedded wide-character extensions). Change the null-padding - * to blanks as needed. - */ + /* expand the multibyte data */ if ((result = field->expanded[buffer]) != 0) { wclear(field->working); - wmove(field->working, 0, 0); - for (n = 0; n < size; ++n) - { - if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0') - wadd_wch(field->working, &data[n]); - } - wmove(field->working, 0, 0); - winnstr(field->working, result, (int)need); + mvwadd_wchnstr(field->working, 0, 0, data, size); + mvwinnstr(field->working, 0, 0, result, (int)need); } #else result = Address_Of_Nth_Buffer(field, buffer); @@ -4565,6 +4479,22 @@ field_buffer(const FIELD *field, int buffer) #if USE_WIDEC_SUPPORT +/* FIXME: see lib_get_wch.c */ +#if HAVE_MBTOWC && HAVE_MBLEN +#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0) +#define count_mbytes(buffer,length,state) mblen(buffer,length) +#define trans_mbytes(wch,buffer,length,state) \ + (int) mbtowc(&wch, buffer, length) +#elif HAVE_MBRTOWC && HAVE_MBRLEN +#define NEED_STATE +#define reset_mbytes(state) init_mb(state) +#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state) +#define trans_mbytes(wch,buffer,length,state) \ + (int) mbrtowc(&wch, buffer, length, &state) +#else +make an error +#endif + /*--------------------------------------------------------------------------- | Convert a multibyte string to a wide-character string. The result must be | freed by the caller. @@ -4579,7 +4509,7 @@ _nc_Widen_String(char *source, int *lengthp) int pass; int status; -#ifndef state_unused +#ifdef NEED_STATE mbstate_t state; #endif @@ -4598,8 +4528,8 @@ _nc_Widen_String(char *source, int *lengthp) source[passed + tries] = 0; reset_mbytes(state); - status = check_mbytes(wch, source + passed, tries, state); - source[passed + tries] = (char)save; + status = trans_mbytes(wch, source + passed, tries, state); + source[passed + tries] = save; if (status > 0) { diff --git a/form/frm_hook.c b/form/frm_hook.c index 7daa396..18e6d71 100644 --- a/form/frm_hook.c +++ b/form/frm_hook.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_hook.c,v 1.15 2010/01/23 21:12:08 tom Exp $") +MODULE_ID("$Id: frm_hook.c,v 1.14 2004/12/25 22:37:27 tom Exp $") /* "Template" macro to generate function to set application specific hook */ #define GEN_HOOK_SET_FUNCTION( typ, name ) \ @@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f #define GEN_HOOK_GET_FUNCTION( typ, name ) \ NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\ {\ - T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\ + T((T_CALLED(#typ "_" #name "(%p)"), form));\ returnFormHook( Normalize_Form( form ) -> typ ## name );\ } diff --git a/form/frm_opts.c b/form/frm_opts.c index 3557fcd..d36d618 100644 --- a/form/frm_opts.c +++ b/form/frm_opts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2010 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_opts.c,v 1.15 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_opts.c,v 1.14 2005/04/16 16:59:18 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_opts.c,v 1.15 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_form_opts(FORM *form, Form_Options opts) { - T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts)); + T((T_CALLED("set_form_opts(%p,%d)"), form, opts)); opts &= ALL_FORM_OPTS; if (opts & ~ALL_FORM_OPTS) @@ -70,7 +70,7 @@ set_form_opts(FORM *form, Form_Options opts) NCURSES_EXPORT(Form_Options) form_opts(const FORM *form) { - T((T_CALLED("form_opts(%p)"), (const void *)form)); + T((T_CALLED("form_opts(%p)"), form)); returnCode((int)(Normalize_Form(form)->opts & ALL_FORM_OPTS)); } @@ -87,7 +87,7 @@ form_opts(const FORM *form) NCURSES_EXPORT(int) form_opts_on(FORM *form, Form_Options opts) { - T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts)); + T((T_CALLED("form_opts_on(%p,%d)"), form, opts)); opts &= ALL_FORM_OPTS; if (opts & ~ALL_FORM_OPTS) @@ -112,7 +112,7 @@ form_opts_on(FORM *form, Form_Options opts) NCURSES_EXPORT(int) form_opts_off(FORM *form, Form_Options opts) { - T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts)); + T((T_CALLED("form_opts_off(%p,%d)"), form, opts)); opts &= ALL_FORM_OPTS; if (opts & ~ALL_FORM_OPTS) diff --git a/form/frm_page.c b/form/frm_page.c index 5a76ca9..a371838 100644 --- a/form/frm_page.c +++ b/form/frm_page.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_page.c,v 1.11 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_page.c,v 1.10 2004/12/11 22:08:21 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -51,7 +51,7 @@ set_form_page(FORM *form, int page) { int err = E_OK; - T((T_CALLED("set_form_page(%p,%d)"), (void *)form, page)); + T((T_CALLED("set_form_page(%p,%d)"), form, page)); if (!form || (page < 0) || (page >= form->maxpage)) RETURN(E_BAD_ARGUMENT); @@ -98,7 +98,7 @@ set_form_page(FORM *form, int page) NCURSES_EXPORT(int) form_page(const FORM *form) { - T((T_CALLED("form_page(%p)"), (const void *)form)); + T((T_CALLED("form_page(%p)"), form)); returnCode(Normalize_Form(form)->curpage); } diff --git a/form/frm_post.c b/form/frm_post.c index 8e29aff..28937e9 100644 --- a/form/frm_post.c +++ b/form/frm_post.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_post.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_post.c,v 1.9 2004/12/11 22:19:06 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -54,7 +54,7 @@ post_form(FORM *form) int err; int page; - T((T_CALLED("post_form(%p)"), (void *)form)); + T((T_CALLED("post_form(%p)"), form)); if (!form) RETURN(E_BAD_ARGUMENT); @@ -100,7 +100,7 @@ post_form(FORM *form) NCURSES_EXPORT(int) unpost_form(FORM *form) { - T((T_CALLED("unpost_form(%p)"), (void *)form)); + T((T_CALLED("unpost_form(%p)"), form)); if (!form) RETURN(E_BAD_ARGUMENT); diff --git a/form/frm_req_name.c b/form/frm_req_name.c index 99abd7e..7ac9abe 100644 --- a/form/frm_req_name.c +++ b/form/frm_req_name.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2008 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 * @@ -37,7 +37,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_req_name.c,v 1.17 2009/10/10 16:17:01 tom Exp $") +MODULE_ID("$Id: frm_req_name.c,v 1.16 2008/07/05 23:22:08 tom Exp $") static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] = { @@ -154,14 +154,14 @@ form_request_by_name(const char *str) strncpy(buf, str, sizeof(buf)); while ((i < sizeof(buf)) && (buf[i] != '\0')) { - buf[i] = (char)toupper(UChar(buf[i])); + buf[i] = toupper(UChar(buf[i])); i++; } for (i = 0; i < A_SIZE; i++) { if (strncmp(request_names[i], buf, sizeof(buf)) == 0) - returnCode(MIN_FORM_COMMAND + (int)i); + returnCode(MIN_FORM_COMMAND + (int) i); } } RETURN(E_NO_MATCH); diff --git a/form/frm_scale.c b/form/frm_scale.c index 27e154e..2ebf72d 100644 --- a/form/frm_scale.c +++ b/form/frm_scale.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_scale.c,v 1.10 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_scale.c,v 1.9 2004/12/11 22:12:34 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -47,10 +47,7 @@ MODULE_ID("$Id: frm_scale.c,v 1.10 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) scale_form(const FORM *form, int *rows, int *cols) { - T((T_CALLED("scale_form(%p,%p,%p)"), - (const void *)form, - (void *)rows, - (void *)cols)); + T((T_CALLED("scale_form(%p,%p,%p)"), form, rows, cols)); if (!form) RETURN(E_BAD_ARGUMENT); diff --git a/form/frm_sub.c b/form/frm_sub.c index 1ab131a..6db0023 100644 --- a/form/frm_sub.c +++ b/form/frm_sub.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -27,12 +27,12 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer, 1995-1997,2009 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ #include "form.priv.h" -MODULE_ID("$Id: frm_sub.c,v 1.12 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,22 +46,13 @@ MODULE_ID("$Id: frm_sub.c,v 1.12 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_form_sub(FORM *form, WINDOW *win) { - T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win)); + T((T_CALLED("set_form_sub(%p,%p)"), form, win)); if (form && (form->status & _POSTED)) RETURN(E_POSTED); - else - { -#if NCURSES_SP_FUNCS - FORM *f = Normalize_Form(form); - f->sub = win ? win : StdScreen(Get_Form_Screen(f)); - RETURN(E_OK); -#else - Normalize_Form(form)->sub = win; - RETURN(E_OK); -#endif - } + Normalize_Form(form)->sub = win; + RETURN(E_OK); } /*--------------------------------------------------------------------------- @@ -77,7 +68,7 @@ form_sub(const FORM *form) { const FORM *f; - T((T_CALLED("form_sub(%p)"), (const void *)form)); + T((T_CALLED("form_sub(%p)"), form)); f = Normalize_Form(form); returnWin(Get_Form_Window(f)); diff --git a/form/frm_user.c b/form/frm_user.c index 1375b5e..4d5e0e46 100644 --- a/form/frm_user.c +++ b/form/frm_user.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_user.c,v 1.15 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_user.c,v 1.14 2004/12/25 22:37:56 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,7 +46,7 @@ MODULE_ID("$Id: frm_user.c,v 1.15 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_form_userptr(FORM *form, void *usrptr) { - T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr)); + T((T_CALLED("set_form_userptr(%p,%p)"), form, usrptr)); Normalize_Form(form)->usrptr = usrptr; RETURN(E_OK); @@ -65,7 +65,7 @@ set_form_userptr(FORM *form, void *usrptr) NCURSES_EXPORT(void *) form_userptr(const FORM *form) { - T((T_CALLED("form_userptr(%p)"), (const void *)form)); + T((T_CALLED("form_userptr(%p)"), form)); returnVoidPtr(Normalize_Form(form)->usrptr); } diff --git a/form/frm_win.c b/form/frm_win.c index a65cc59..2258f0a 100644 --- a/form/frm_win.c +++ b/form/frm_win.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_win.c,v 1.16 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,22 +46,13 @@ MODULE_ID("$Id: frm_win.c,v 1.16 2010/01/23 21:14:36 tom Exp $") NCURSES_EXPORT(int) set_form_win(FORM *form, WINDOW *win) { - T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win)); + T((T_CALLED("set_form_win(%p,%p)"), form, win)); if (form && (form->status & _POSTED)) RETURN(E_POSTED); - else - { -#if NCURSES_SP_FUNCS - FORM *f = Normalize_Form(form); - f->win = win ? win : StdScreen(Get_Form_Screen(f)); - RETURN(E_OK); -#else - Normalize_Form(form)->win = win; - RETURN(E_OK); -#endif - } + Normalize_Form(form)->win = win; + RETURN(E_OK); } /*--------------------------------------------------------------------------- @@ -75,18 +66,12 @@ set_form_win(FORM *form, WINDOW *win) NCURSES_EXPORT(WINDOW *) form_win(const FORM *form) { - WINDOW *result; const FORM *f; - T((T_CALLED("form_win(%p)"), (const void *)form)); + T((T_CALLED("form_win(%p)"), form)); f = Normalize_Form(form); -#if NCURSES_SP_FUNCS - result = (f->win ? f->win : StdScreen(Get_Form_Screen(f))); -#else - result = (f->win ? f->win : stdscr); -#endif - returnWin(result); + returnWin(f->win ? f->win : stdscr); } /* frm_win.c ends here */ diff --git a/form/fty_alnum.c b/form/fty_alnum.c index cda23dc..59dd273 100644 --- a/form/fty_alnum.c +++ b/form/fty_alnum.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_alnum.c,v 1.24 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fty_alnum.c,v 1.21 2007/10/13 19:31:52 tom Exp $") #define thisARG alnumARG @@ -46,44 +46,24 @@ thisARG; /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Generic_This_Type(void *arg) +| Function : static void *Make_This_Type(va_list *ap) | | Description : Allocate structure for alphanumeric type argument. | | Return Values : Pointer to argument structure or NULL on error +--------------------------------------------------------------------------*/ static void * -Generic_This_Type(void *arg) +Make_This_Type(va_list *ap) { - thisARG *argp = (thisARG *) 0; + thisARG *argp = typeMalloc(thisARG, 1); - if (arg) + if (argp) { - argp = typeMalloc(thisARG, 1); - - if (argp) - { - T((T_CREATE("thisARG %p"), (void *)argp)); - argp->width = *((int *)arg); - } + T((T_CREATE("thisARG %p"), argp)); + argp->width = va_arg(*ap, int); } - return ((void *)argp); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : static void *Make_This_Type(va_list *ap) -| -| Description : Allocate structure for alphanumeric type argument. -| -| Return Values : Pointer to argument structure or NULL on error -+--------------------------------------------------------------------------*/ -static void * -Make_This_Type(va_list *ap) -{ - int w = va_arg(*ap, int); - return Generic_This_Type((void *)&w); + return ((void *)argp); } /*--------------------------------------------------------------------------- @@ -102,7 +82,7 @@ Copy_This_Type(const void *argp) if (result) { - T((T_CREATE("thisARG %p"), (void *)result)); + T((T_CREATE("thisARG %p"), result)); *result = *ap; } @@ -176,27 +156,12 @@ static FIELDTYPE typeTHIS = Make_This_Type, Copy_This_Type, Free_This_Type, - INIT_FT_FUNC(Check_This_Field), - INIT_FT_FUNC(Check_This_Character), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(NULL), -#if NCURSES_INTEROP_FUNCS - Generic_This_Type -#endif + Check_This_Field, + Check_This_Character, + NULL, + NULL }; NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_ALNUM(void) -{ - return TYPE_ALNUM; -} -#endif - /* fty_alnum.c ends here */ diff --git a/form/fty_alpha.c b/form/fty_alpha.c index 917a9e0..bd49544 100644 --- a/form/fty_alpha.c +++ b/form/fty_alpha.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_alpha.c,v 1.26 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fty_alpha.c,v 1.23 2007/10/13 19:32:09 tom Exp $") #define thisARG alphaARG @@ -46,44 +46,24 @@ thisARG; /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Generic_This_Type(va_list *ap) +| Function : static void *Make_This_Type(va_list *ap) | | Description : Allocate structure for alpha type argument. | | Return Values : Pointer to argument structure or NULL on error +--------------------------------------------------------------------------*/ static void * -Generic_This_Type(void *arg) +Make_This_Type(va_list *ap) { - thisARG *argp = (thisARG *) 0; + thisARG *argp = typeMalloc(thisARG, 1); - if (arg) + if (argp) { - argp = typeMalloc(thisARG, 1); - - if (argp) - { - T((T_CREATE("thisARG %p"), (void *)argp)); - argp->width = *((int *)arg); - } + T((T_CREATE("thisARG %p"), argp)); + argp->width = va_arg(*ap, int); } - return ((void *)argp); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : static void *Make_This_Type(va_list *ap) -| -| Description : Allocate structure for alpha type argument. -| -| Return Values : Pointer to argument structure or NULL on error -+--------------------------------------------------------------------------*/ -static void * -Make_This_Type(va_list *ap) -{ - int w = va_arg(*ap, int); - return Generic_This_Type((void *)&w); + return ((void *)argp); } /*--------------------------------------------------------------------------- @@ -102,7 +82,7 @@ Copy_This_Type(const void *argp) if (result) { - T((T_CREATE("thisARG %p"), (void *)result)); + T((T_CREATE("thisARG %p"), result)); *result = *ap; } @@ -176,27 +156,12 @@ static FIELDTYPE typeTHIS = Make_This_Type, Copy_This_Type, Free_This_Type, - INIT_FT_FUNC(Check_This_Field), - INIT_FT_FUNC(Check_This_Character), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(NULL), -#if NCURSES_INTEROP_FUNCS - Generic_This_Type -#endif + Check_This_Field, + Check_This_Character, + NULL, + NULL }; NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_ALPHA(void) -{ - return TYPE_ALPHA; -} -#endif - /* fty_alpha.c ends here */ diff --git a/form/fty_enum.c b/form/fty_enum.c index d335164..c96a080 100644 --- a/form/fty_enum.c +++ b/form/fty_enum.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.26 2010/05/01 21:11:07 tom Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.22 2007/10/13 19:32:26 tom Exp $") typedef struct { @@ -45,99 +45,43 @@ typedef struct } enumARG; -typedef struct - { - char **kwds; - int ccase; - int cunique; - } -enumParams; - /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Generic_Enum_Type(void * arg) +| Function : static void *Make_Enum_Type( va_list * ap ) | | Description : Allocate structure for enumeration type argument. | | Return Values : Pointer to argument structure or NULL on error +--------------------------------------------------------------------------*/ static void * -Generic_Enum_Type(void *arg) +Make_Enum_Type(va_list *ap) { - enumARG *argp = (enumARG *)0; - enumParams *params = (enumParams *) arg; + enumARG *argp = typeMalloc(enumARG, 1); - if (params) + if (argp) { - argp = typeMalloc(enumARG, 1); - - if (argp) - { - int cnt = 0; - char **kp = (char **)0; - char **kwds = (char **)0; - char **kptarget; - int ccase, cunique; - - T((T_CREATE("enumARG %p"), (void *)argp)); - kwds = params->kwds; - ccase = params->ccase; - cunique = params->cunique; - - argp->checkcase = ccase ? TRUE : FALSE; - argp->checkunique = cunique ? TRUE : FALSE; - argp->kwds = (char **)0; - - kp = kwds; - while (kp && (*kp++)) - cnt++; - argp->count = cnt; - - if (cnt > 0) - { - /* We copy the keywords, because we can't rely on the fact - that the caller doesn't relocate or free the memory used - for the keywords (maybe he has GC) - */ - argp->kwds = typeMalloc(char *, cnt + 1); - - kp = kwds; - if ((kptarget = argp->kwds) != 0) - { - while (kp && (*kp)) - { - (*kptarget++) = strdup(*kp++); - } - *kptarget = (char *)0; - } - } - } + int cnt = 0; + char **kp = (char **)0; + int ccase, cunique; + + T((T_CREATE("enumARG %p"), argp)); + argp->kwds = va_arg(*ap, char **); + ccase = va_arg(*ap, int); + cunique = va_arg(*ap, int); + + argp->checkcase = ccase ? TRUE : FALSE; + argp->checkunique = cunique ? TRUE : FALSE; + + kp = argp->kwds; + while (kp && (*kp++)) + cnt++; + argp->count = cnt; } return (void *)argp; } /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Make_Enum_Type( va_list * ap ) -| -| Description : Allocate structure for enumeration type argument. -| -| Return Values : Pointer to argument structure or NULL on error -+--------------------------------------------------------------------------*/ -static void * -Make_Enum_Type(va_list *ap) -{ - enumParams params; - - params.kwds = va_arg(*ap, char **); - params.ccase = va_arg(*ap, int); - params.cunique = va_arg(*ap, int); - - return Generic_Enum_Type((void *)¶ms); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform | Function : static void *Copy_Enum_Type( const void * argp ) | | Description : Copy structure for enumeration type argument. @@ -157,24 +101,8 @@ Copy_Enum_Type(const void *argp) if (result) { - T((T_CREATE("enumARG %p"), (void *)result)); + T((T_CREATE("enumARG %p"), result)); *result = *ap; - - if (ap->count > 0) - { - char **kptarget; - char **kp = ap->kwds; - result->kwds = typeMalloc(char *, 1 + ap->count); - - if ((kptarget = result->kwds) != 0) - { - while (kp && (*kp)) - { - (*kptarget++) = strdup(*kp++); - } - *kptarget = (char *)0; - } - } } } return (void *)result; @@ -192,24 +120,7 @@ static void Free_Enum_Type(void *argp) { if (argp) - { - const enumARG *ap = (const enumARG *)argp; - - if (ap->kwds && ap->count > 0) - { - char **kp = ap->kwds; - int cnt = 0; - - while (kp && (*kp)) - { - free(*kp++); - cnt++; - } - assert(cnt == ap->count); - free(ap->kwds); - } - free(argp); - } + free(argp); } #define SKIP_SPACE(x) while(((*(x))!='\0') && (is_blank(*(x)))) (x)++ @@ -415,28 +326,13 @@ static FIELDTYPE typeENUM = Make_Enum_Type, Copy_Enum_Type, Free_Enum_Type, - INIT_FT_FUNC(Check_Enum_Field), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(Next_Enum), - INIT_FT_FUNC(Previous_Enum), -#if NCURSES_INTEROP_FUNCS - Generic_Enum_Type -#endif + Check_Enum_Field, + NULL, + Next_Enum, + Previous_Enum }; NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM = &typeENUM; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_ENUM(void) -{ - return TYPE_ENUM; -} -#endif - /* fty_enum.c ends here */ diff --git a/form/fty_generic.c b/form/fty_generic.c deleted file mode 100644 index 3e7a575..0000000 --- a/form/fty_generic.c +++ /dev/null @@ -1,297 +0,0 @@ -/**************************************************************************** - * Copyright (c) 2008-2009,2010 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 * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/*************************************************************************** -* * -* Author : Juergen Pfeifer * -* * -***************************************************************************/ - -#include "form.priv.h" - -MODULE_ID("$Id: fty_generic.c,v 1.5 2010/01/23 21:14:36 tom Exp $") - -/* - * This is not a full implementation of a field type, but adds some - * support for higher level languages with some restrictions to interop - * with C language. Especially the collection of arguments for the - * various fieldtypes is not based on the vararg C mechanism, but on a - * iterator based callback mechanism that allowes the high level language - * to provide the arguments as a structure. Most languages have mechanisms - * to layout structures so that they can be passed to C. - * The languages can register a new generic fieldtype dynamically and store - * a handle (key) to the calling object as an argument. Together with that - * it can register a freearg callback, so that the high level language - * remains in control of the memory management of the arguments they pass. - * The design idea is, that the high-level language - typically a OO - * language like C# or Java, uses it's own dispatching mechanisms - * (polymorphism) to call the proper check routines responsible for the - * argument type. So these language implement typically only one generic - * fieldtype they register with the forms library using this call. - * - * For that purpose we have extended the fieldtype struc by a new element - * that gets the arguments from a single struct passed by the caller. - * - */ -#if NCURSES_INTEROP_FUNCS - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : static void *Generic_This_Type( void * arg ) -| -| Description : We interpret the passed arg just as a handle the -| calling language uses to keep track of its allocated -| argument structures. We can simply copy it back. -| -| Return Values : Pointer to argument structure -+--------------------------------------------------------------------------*/ -static void * -Generic_This_Type(void *arg) -{ - return (arg); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : FIELDTYPE *_nc_generic_fieldtype( -| bool (* const field_check)(FIELD *,const void *), -| bool (* const char_check) (int, const void *), -| bool (*const next)(FORM*,FIELD*,const void*), -| bool (*const prev)(FORM*,FIELD*,const void*), -| void (*freecallback)(void*)) -| -| Description : Create a new fieldtype. The application programmer must -| write a field_check and a char_check function and give -| them as input to this call. A callback to allow the -| release of the allocated memory must also be provided. -| For generic field types, we provide some more -| information about the field as parameters. -| -| If an error occurs, errno is set to -| E_BAD_ARGUMENT - invalid arguments -| E_SYSTEM_ERROR - system error (no memory) -| -| Return Values : Fieldtype pointer or NULL if error occurred -+--------------------------------------------------------------------------*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *), - bool (*const char_check) (int, FORM *, FIELD *, const - void *), - bool (*const next) (FORM *, FIELD *, const void *), - bool (*const prev) (FORM *, FIELD *, const void *), - void (*freecallback) (void *)) -{ - int code = E_SYSTEM_ERROR; - FIELDTYPE *res = (FIELDTYPE *)0; - - T((T_CALLED("_nc_generic_fieldtype(%p,%p,%p,%p,%p)"), - field_check, char_check, next, prev, freecallback)); - - if (field_check || char_check) - { - res = typeMalloc(FIELDTYPE, 1); - - if (res) - { - *res = *_nc_Default_FieldType; - res->status |= (_HAS_ARGS | _GENERIC); - res->fieldcheck.gfcheck = field_check; - res->charcheck.gccheck = char_check; - res->genericarg = Generic_This_Type; - res->freearg = freecallback; - res->enum_next.gnext = next; - res->enum_prev.gprev = prev; - code = E_OK; - } - } - else - code = E_BAD_ARGUMENT; - - if (E_OK != code) - SET_ERROR(code); - - returnFieldType(res); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : static TypeArgument *GenericArgument( -| const FIELDTYPE* typ, -| int (*argiterator)(void**), -| int* err) -| -| Description : The iterator callback must browse through all fieldtype -| parameters that have an argument associated with the -| type. The iterator returns 1 if the operation to get -| the next element was successfull, 0 otherwise. If the -| iterator could move to the next argument, it fills -| the void* pointer representing the argument into the -| location provided as argument to the iterator. -| The err reference is used to keep track of errors. -| -| Return Values : Pointer to argument structure -+--------------------------------------------------------------------------*/ -static TypeArgument * -GenericArgument(const FIELDTYPE *typ, - int (*argiterator) (void **), int *err) -{ - TypeArgument *res = (TypeArgument *)0; - - if (typ != 0 && (typ->status & _HAS_ARGS) != 0 && err != 0 && argiterator != 0) - { - if (typ->status & _LINKED_TYPE) - { - /* Composite fieldtypes keep track internally of their own memory */ - TypeArgument *p = typeMalloc(TypeArgument, 1); - - if (p) - { - p->left = GenericArgument(typ->left, argiterator, err); - p->right = GenericArgument(typ->right, argiterator, err); - return p; - } - else - *err += 1; - } - else - { - assert(typ->genericarg != (void *)0); - if (typ->genericarg == 0) - *err += 1; - else - { - void *argp; - int valid = argiterator(&argp); - - if (valid == 0 || argp == 0 || - !(res = (TypeArgument *)typ->genericarg(argp))) - { - *err += 1; - } - } - } - } - return res; -} - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : int _nc_set_generic_fieldtype( -| FIELD* field, -| FIELDTYPE* ftyp, -| int (*argiterator)(void**)) -| -| Description : Assign the fieldtype to the field and use the iterator -| mechanism to get the arguments when a check is -| performed. -| -| Return Values : E_OK if all went well -| E_SYSTEM_ERROR if an error occurred -+--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) -_nc_set_generic_fieldtype(FIELD *field, - FIELDTYPE *ftyp, - int (*argiterator) (void **)) -{ - int code = E_SYSTEM_ERROR; - int err = 0; - - if (field) - { - if (field && field->type) - _nc_Free_Type(field); - - field->type = ftyp; - if (ftyp) - { - if (argiterator) - { - /* The precondition is that the iterator is reset */ - field->arg = (void *)GenericArgument(field->type, argiterator, &err); - - if (err) - { - _nc_Free_Argument(field->type, (TypeArgument *)(field->arg)); - field->type = (FIELDTYPE *)0; - field->arg = (void *)0; - } - else - { - code = E_OK; - if (field->type) - field->type->ref++; - } - } - } - else - { - field->arg = (void *)0; - code = E_OK; - } - } - return code; -} - -/*--------------------------------------------------------------------------- -| Facility : libnform -| Function : WINDOW* _nc_form_cursor( -| FORM* form, -| int *pRow, int *pCol) -| -| Description : Get the current position of the form cursor position -| We also return the field window -| -| Return Values : The fields Window or NULL on error -+--------------------------------------------------------------------------*/ -NCURSES_EXPORT(WINDOW *) -_nc_form_cursor(const FORM *form, int *pRow, int *pCol) -{ - int code = E_SYSTEM_ERROR; - WINDOW *res = (WINDOW *)0; - - if (!(form == 0 || pRow == 0 || pCol == 0)) - { - *pRow = form->currow; - *pCol = form->curcol; - res = form->w; - code = E_OK; - } - if (code != E_OK) - SET_ERROR(code); - return res; -} - -#else -extern void _nc_fty_generic(void); -void -_nc_fty_generic(void) -{ -} -#endif - -/* fty_generic.c ends here */ diff --git a/form/fty_int.c b/form/fty_int.c index e643ad9..8a5367f 100644 --- a/form/fty_int.c +++ b/form/fty_int.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_int.c,v 1.25 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fty_int.c,v 1.22 2007/10/13 19:32:40 tom Exp $") #if USE_WIDEC_SUPPORT #define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c))) @@ -52,63 +52,31 @@ typedef struct } thisARG; -typedef struct - { - int precision; - long low; - long high; - } -integerPARM; - /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Generic_This_Type( void * arg ) +| Function : static void *Make_This_Type( va_list * ap ) | | Description : Allocate structure for integer type argument. | | Return Values : Pointer to argument structure or NULL on error +--------------------------------------------------------------------------*/ static void * -Generic_This_Type(void *arg) +Make_This_Type(va_list *ap) { - thisARG *argp = (thisARG *) 0; - thisARG *param = (thisARG *) arg; + thisARG *argp = typeMalloc(thisARG, 1); - if (param) + if (argp) { - argp = typeMalloc(thisARG, 1); - - if (argp) - { - T((T_CREATE("thisARG %p"), (void *)argp)); - *argp = *param; - } + T((T_CREATE("thisARG %p"), argp)); + argp->precision = va_arg(*ap, int); + argp->low = va_arg(*ap, long); + argp->high = va_arg(*ap, long); } return (void *)argp; } /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Make_This_Type( va_list * ap ) -| -| Description : Allocate structure for integer type argument. -| -| Return Values : Pointer to argument structure or NULL on error -+--------------------------------------------------------------------------*/ -static void * -Make_This_Type(va_list *ap) -{ - thisARG arg; - - arg.precision = va_arg(*ap, int); - arg.low = va_arg(*ap, long); - arg.high = va_arg(*ap, long); - - return Generic_This_Type((void *)&arg); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform | Function : static void *Copy_This_Type(const void * argp) | | Description : Copy structure for integer type argument. @@ -126,7 +94,7 @@ Copy_This_Type(const void *argp) result = typeMalloc(thisARG, 1); if (result) { - T((T_CREATE("thisARG %p"), (void *)result)); + T((T_CREATE("thisARG %p"), result)); *result = *ap; } } @@ -267,27 +235,12 @@ static FIELDTYPE typeTHIS = Make_This_Type, Copy_This_Type, Free_This_Type, - INIT_FT_FUNC(Check_This_Field), - INIT_FT_FUNC(Check_This_Character), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(NULL), -#if NCURSES_INTEROP_FUNCS - Generic_This_Type -#endif + Check_This_Field, + Check_This_Character, + NULL, + NULL }; NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_INTEGER(void) -{ - return TYPE_INTEGER; -} -#endif - /* fty_int.c ends here */ diff --git a/form/fty_ipv4.c b/form/fty_ipv4.c index 8dc04f8..5d1a209 100644 --- a/form/fty_ipv4.c +++ b/form/fty_ipv4.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,2006 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_ipv4.c,v 1.10 2009/11/07 20:17:58 tom Exp $") +MODULE_ID("$Id: fty_ipv4.c,v 1.8 2006/12/02 19:33:02 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -94,27 +94,12 @@ static FIELDTYPE typeIPV4 = NULL, NULL, 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 + Check_IPV4_Field, + Check_IPV4_Character, + NULL, NULL -#endif }; NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_IPV4(void) -{ - return TYPE_IPV4; -} -#endif - /* fty_ipv4.c ends here */ diff --git a/form/fty_num.c b/form/fty_num.c index 4bd7132..e74e8e3 100644 --- a/form/fty_num.c +++ b/form/fty_num.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_num.c,v 1.28 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fty_num.c,v 1.25 2007/10/13 19:32:54 tom Exp $") #if HAVE_LOCALE_H #include @@ -63,71 +63,37 @@ typedef struct } thisARG; -typedef struct - { - int precision; - double low; - double high; - } -thisPARM; - /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Generic_This_Type(void * arg) +| Function : static void *Make_This_Type(va_list * ap) | | Description : Allocate structure for numeric type argument. | | Return Values : Pointer to argument structure or NULL on error +--------------------------------------------------------------------------*/ static void * -Generic_This_Type(void *arg) +Make_This_Type(va_list *ap) { - thisARG *argn = (thisARG *) 0; - thisPARM *args = (thisPARM *) arg; + thisARG *argn = typeMalloc(thisARG, 1); - if (args) + if (argn) { - argn = typeMalloc(thisARG, 1); - - if (argn) - { - T((T_CREATE("thisARG %p"), (void *)argn)); - argn->precision = args->precision; - argn->low = args->low; - argn->high = args->high; + T((T_CREATE("thisARG %p"), argn)); + argn->precision = va_arg(*ap, int); + argn->low = va_arg(*ap, double); + argn->high = va_arg(*ap, double); #if HAVE_LOCALE_H - argn->L = localeconv(); + argn->L = localeconv(); #else - argn->L = NULL; + argn->L = NULL; #endif - } } return (void *)argn; } /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Make_This_Type(va_list * ap) -| -| Description : Allocate structure for numeric type argument. -| -| Return Values : Pointer to argument structure or NULL on error -+--------------------------------------------------------------------------*/ -static void * -Make_This_Type(va_list *ap) -{ - thisPARM arg; - - arg.precision = va_arg(*ap, int); - arg.low = va_arg(*ap, double); - arg.high = va_arg(*ap, double); - - return Generic_This_Type((void *)&arg); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform | Function : static void *Copy_This_Type(const void * argp) | | Description : Copy structure for numeric type argument. @@ -145,7 +111,7 @@ Copy_This_Type(const void *argp) result = typeMalloc(thisARG, 1); if (result) { - T((T_CREATE("thisARG %p"), (void *)result)); + T((T_CREATE("thisARG %p"), result)); *result = *ap; } } @@ -313,27 +279,12 @@ static FIELDTYPE typeTHIS = Make_This_Type, Copy_This_Type, Free_This_Type, - INIT_FT_FUNC(Check_This_Field), - INIT_FT_FUNC(Check_This_Character), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(NULL), -#if NCURSES_INTEROP_FUNCS - Generic_This_Type -#endif + Check_This_Field, + Check_This_Character, + NULL, + NULL }; NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_NUMERIC(void) -{ - return TYPE_NUMERIC; -} -#endif - /* fty_num.c ends here */ diff --git a/form/fty_regex.c b/form/fty_regex.c index 2c0a4ca..247779f 100644 --- a/form/fty_regex.c +++ b/form/fty_regex.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 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 * @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_regex.c,v 1.24 2010/01/23 21:14:37 tom Exp $") +MODULE_ID("$Id: fty_regex.c,v 1.21 2007/10/13 19:33:50 tom Exp $") #if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */ #include @@ -90,109 +90,97 @@ RegExp_Arg; #endif -#if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS -# define MAYBE_UNUSED -#else -# define MAYBE_UNUSED GCC_UNUSED -#endif - /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Generic_RegularExpression_Type(void * arg) +| Function : static void *Make_RegularExpression_Type(va_list * ap) | | Description : Allocate structure for regex type argument. | | Return Values : Pointer to argument structure or NULL on error +--------------------------------------------------------------------------*/ static void * -Generic_RegularExpression_Type(void *arg MAYBE_UNUSED) +Make_RegularExpression_Type(va_list *ap) { #if HAVE_REGEX_H_FUNCS - char *rx = (char *)arg; - RegExp_Arg *preg = (RegExp_Arg *)0; + char *rx = va_arg(*ap, char *); + RegExp_Arg *preg; - if (rx) - { - preg = typeMalloc(RegExp_Arg, 1); + preg = typeMalloc(RegExp_Arg, 1); - if (preg) + if (preg) + { + T((T_CREATE("RegExp_Arg %p"), preg)); + if (((preg->pRegExp = typeMalloc(regex_t, 1)) != 0) + && !regcomp(preg->pRegExp, rx, + (REG_EXTENDED | REG_NOSUB | REG_NEWLINE))) { - T((T_CREATE("RegExp_Arg %p"), (void *)preg)); - if (((preg->pRegExp = typeMalloc(regex_t, 1)) != 0) - && !regcomp(preg->pRegExp, rx, - (REG_EXTENDED | REG_NOSUB | REG_NEWLINE))) - { - T((T_CREATE("regex_t %p"), (void *)preg->pRegExp)); - preg->refCount = typeMalloc(unsigned long, 1); + T((T_CREATE("regex_t %p"), preg->pRegExp)); + preg->refCount = typeMalloc(unsigned long, 1); - *(preg->refCount) = 1; - } - else - { - if (preg->pRegExp) - free(preg->pRegExp); - free(preg); - preg = (RegExp_Arg *)0; - } + *(preg->refCount) = 1; + } + else + { + if (preg->pRegExp) + free(preg->pRegExp); + free(preg); + preg = (RegExp_Arg *)0; } } return ((void *)preg); #elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS - char *rx = (char *)arg; - RegExp_Arg *pArg = (RegExp_Arg *)0; + char *rx = va_arg(*ap, char *); + RegExp_Arg *pArg; - if (rx) + pArg = typeMalloc(RegExp_Arg, 1); + + if (pArg) { - pArg = typeMalloc(RegExp_Arg, 1); + int blen = RX_INCREMENT; - if (pArg) - { - int blen = RX_INCREMENT; + T((T_CREATE("RegExp_Arg %p"), pArg)); + pArg->compiled_expression = NULL; + pArg->refCount = typeMalloc(unsigned long, 1); - T((T_CREATE("RegExp_Arg %p"), pArg)); - pArg->compiled_expression = NULL; - pArg->refCount = typeMalloc(unsigned long, 1); + *(pArg->refCount) = 1; - *(pArg->refCount) = 1; + do + { + char *buf = typeMalloc(char, blen); - do + if (buf) { - char *buf = typeMalloc(char, blen); - - if (buf) - { #if HAVE_REGEXP_H_FUNCS - char *last_pos = compile(rx, buf, &buf[blen], '\0'); + char *last_pos = compile(rx, buf, &buf[blen], '\0'); #else /* HAVE_REGEXPR_H_FUNCS */ - char *last_pos = compile(rx, buf, &buf[blen]); + char *last_pos = compile(rx, buf, &buf[blen]); #endif - if (reg_errno) - { - free(buf); - if (reg_errno == 50) - blen += RX_INCREMENT; - else - { - free(pArg); - pArg = NULL; - break; - } - } + if (reg_errno) + { + free(buf); + if (reg_errno == 50) + blen += RX_INCREMENT; else { - pArg->compiled_expression = buf; + free(pArg); + pArg = NULL; break; } } + else + { + pArg->compiled_expression = buf; + break; + } } - while (blen <= MAX_RX_LEN); - } - if (pArg && !pArg->compiled_expression) - { - free(pArg); - pArg = NULL; } + while (blen <= MAX_RX_LEN); + } + if (pArg && !pArg->compiled_expression) + { + free(pArg); + pArg = NULL; } return (void *)pArg; #else @@ -202,22 +190,6 @@ Generic_RegularExpression_Type(void *arg MAYBE_UNUSED) /*--------------------------------------------------------------------------- | Facility : libnform -| Function : static void *Make_RegularExpression_Type(va_list * ap) -| -| Description : Allocate structure for regex type argument. -| -| Return Values : Pointer to argument structure or NULL on error -+--------------------------------------------------------------------------*/ -static void * -Make_RegularExpression_Type(va_list *ap) -{ - char *rx = va_arg(*ap, char *); - - return Generic_RegularExpression_Type((void *)rx); -} - -/*--------------------------------------------------------------------------- -| Facility : libnform | Function : static void *Copy_RegularExpression_Type( | const void * argp) | @@ -226,7 +198,7 @@ Make_RegularExpression_Type(va_list *ap) | Return Values : Pointer to argument structure or NULL on error. +--------------------------------------------------------------------------*/ static void * -Copy_RegularExpression_Type(const void *argp MAYBE_UNUSED) +Copy_RegularExpression_Type(const void *argp) { #if (HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS) const RegExp_Arg *ap = (const RegExp_Arg *)argp; @@ -252,7 +224,7 @@ Copy_RegularExpression_Type(const void *argp MAYBE_UNUSED) | Return Values : - +--------------------------------------------------------------------------*/ static void -Free_RegularExpression_Type(void *argp MAYBE_UNUSED) +Free_RegularExpression_Type(void *argp) { #if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS RegExp_Arg *ap = (RegExp_Arg *)argp; @@ -292,8 +264,7 @@ Free_RegularExpression_Type(void *argp MAYBE_UNUSED) | FALSE - field is invalid +--------------------------------------------------------------------------*/ static bool -Check_RegularExpression_Field(FIELD *field MAYBE_UNUSED, - const void *argp MAYBE_UNUSED) +Check_RegularExpression_Field(FIELD *field, const void *argp) { bool match = FALSE; @@ -324,27 +295,12 @@ static FIELDTYPE typeREGEXP = Make_RegularExpression_Type, Copy_RegularExpression_Type, Free_RegularExpression_Type, - INIT_FT_FUNC(Check_RegularExpression_Field), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(NULL), - INIT_FT_FUNC(NULL), -#if NCURSES_INTEROP_FUNCS - Generic_RegularExpression_Type -#endif + Check_RegularExpression_Field, + NULL, + NULL, + NULL }; NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP; -#if NCURSES_INTEROP_FUNCS -/* The next routines are to simplify the use of ncurses from - programming languages with restictions on interop with C level - constructs (e.g. variable access or va_list + ellipsis constructs) -*/ -NCURSES_EXPORT(FIELDTYPE *) -_nc_TYPE_REGEXP(void) -{ - return TYPE_REGEXP; -} -#endif - /* fty_regex.c ends here */ diff --git a/form/llib-lform b/form/llib-lform index 2b6abdc..bd7c3a4 100644 --- a/form/llib-lform +++ b/form/llib-lform @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,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 * @@ -27,13 +27,13 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1996-2005,2010 * + * Author: Thomas E. Dickey 1996,1997,2002,2005 * ****************************************************************************/ /* LINTLIBRARY */ /* ./f_trace.c */ -#include +#include "form.priv.h" #undef _nc_retrace_field_ptr FIELD **_nc_retrace_field_ptr( @@ -264,7 +264,7 @@ int move_field( /* ./fld_newftyp.c */ #undef _nc_Default_FieldType -FIELDTYPE *_nc_Default_FieldType; +const FIELDTYPE *_nc_Default_FieldType = {0}; #undef new_fieldtype FIELDTYPE *new_fieldtype( @@ -396,12 +396,6 @@ NCURSES_BOOL data_ahead( #undef _nc_Default_Form FORM *_nc_Default_Form; -#undef new_form_sp -FORM *new_form_sp( - SCREEN *sp, - FIELD **fields) - { return(*(FORM **)0); } - #undef new_form FORM *new_form( FIELD **fields) @@ -430,13 +424,6 @@ int field_count( /* ./frm_driver.c */ -#undef _nc_get_fieldbuffer -void _nc_get_fieldbuffer( - FORM *form, - FIELD *field, - char *buf) - { /* void */ } - #undef _nc_Position_Form_Cursor int _nc_Position_Form_Cursor( FORM *form) @@ -696,23 +683,9 @@ typedef struct } enumARG; -typedef struct - { - char **kwds; - int ccase; - int cunique; - } -enumParams; - #undef TYPE_ENUM FIELDTYPE *TYPE_ENUM; -/* ./fty_generic.c */ - -#undef _nc_fty_generic -void _nc_fty_generic(void) - { /* void */ } - /* ./fty_int.c */ typedef struct @@ -723,14 +696,6 @@ typedef struct } integerARG; -typedef struct - { - int precision; - long low; - long high; - } -integerPARM; - #undef TYPE_INTEGER FIELDTYPE *TYPE_INTEGER; @@ -751,14 +716,6 @@ typedef struct } numericARG; -typedef struct - { - int precision; - double low; - double high; - } -thisPARM; - #undef TYPE_NUMERIC FIELDTYPE *TYPE_NUMERIC; diff --git a/form/llib-lformt b/form/llib-lformt deleted file mode 100644 index 33de63c..0000000 --- a/form/llib-lformt +++ /dev/null @@ -1,777 +0,0 @@ -/**************************************************************************** - * Copyright (c) 2010 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 * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Thomas E. Dickey 2010 * - ****************************************************************************/ -/* LINTLIBRARY */ - -/* ./f_trace.c */ - -#include - -#undef _nc_retrace_field_ptr -FIELD **_nc_retrace_field_ptr( - FIELD **code) - { return(*(FIELD ***)0); } - -#undef _nc_retrace_field -FIELD *_nc_retrace_field( - FIELD *code) - { return(*(FIELD **)0); } - -#undef _nc_retrace_field_type -FIELDTYPE *_nc_retrace_field_type( - FIELDTYPE *code) - { return(*(FIELDTYPE **)0); } - -#undef _nc_retrace_form -FORM *_nc_retrace_form( - FORM *code) - { return(*(FORM **)0); } - -#undef _nc_retrace_form_hook -Form_Hook _nc_retrace_form_hook( - Form_Hook code) - { return(*(Form_Hook *)0); } - -/* ./fld_arg.c */ - -#undef set_fieldtype_arg -int set_fieldtype_arg( - FIELDTYPE *typ, - void *(*const make_arg)( - va_list *p1), - void *(*const copy_arg)( - const void *p1), - void (*const free_arg)( - void *p1)) - { return(*(int *)0); } - -#undef field_arg -void *field_arg( - const FIELD *field) - { return(*(void **)0); } - -/* ./fld_attr.c */ - -#undef set_field_fore -int set_field_fore( - FIELD *field, - chtype attr) - { return(*(int *)0); } - -#undef field_fore -chtype field_fore( - const FIELD *field) - { return(*(chtype *)0); } - -#undef set_field_back -int set_field_back( - FIELD *field, - chtype attr) - { return(*(int *)0); } - -#undef field_back -chtype field_back( - const FIELD *field) - { return(*(chtype *)0); } - -/* ./fld_current.c */ - -#undef set_current_field -int set_current_field( - FORM *form, - FIELD *field) - { return(*(int *)0); } - -#undef current_field -FIELD *current_field( - const FORM *form) - { return(*(FIELD **)0); } - -#undef field_index -int field_index( - const FIELD *field) - { return(*(int *)0); } - -/* ./fld_def.c */ - -#undef _nc_Default_Field -FIELD *_nc_Default_Field; - -#undef _nc_Make_Argument -TypeArgument *_nc_Make_Argument( - const FIELDTYPE *typ, - va_list *ap, - int *err) - { return(*(TypeArgument **)0); } - -#undef _nc_Copy_Argument -TypeArgument *_nc_Copy_Argument( - const FIELDTYPE *typ, - const TypeArgument *argp, - int *err) - { return(*(TypeArgument **)0); } - -#undef _nc_Free_Argument -void _nc_Free_Argument( - const FIELDTYPE *typ, - TypeArgument *argp) - { /* void */ } - -#undef _nc_Copy_Type -NCURSES_BOOL _nc_Copy_Type( - FIELD *dst, - FIELD const *src) - { return(*(NCURSES_BOOL *)0); } - -#undef _nc_Free_Type -void _nc_Free_Type( - FIELD *field) - { /* void */ } - -#undef new_field -FIELD *new_field( - int rows, - int cols, - int frow, - int fcol, - int nrow, - int nbuf) - { return(*(FIELD **)0); } - -#undef free_field -int free_field( - FIELD *field) - { return(*(int *)0); } - -/* ./fld_dup.c */ - -#undef dup_field -FIELD *dup_field( - FIELD *field, - int frow, - int fcol) - { return(*(FIELD **)0); } - -/* ./fld_ftchoice.c */ - -#undef set_fieldtype_choice -int set_fieldtype_choice( - FIELDTYPE *typ, - NCURSES_BOOL (*const next_choice)( - FIELD *p1, - const void *p2), - NCURSES_BOOL (*const prev_choice)( - FIELD *p1, - const void *p2)) - { return(*(int *)0); } - -/* ./fld_ftlink.c */ - -#undef link_fieldtype -FIELDTYPE *link_fieldtype( - FIELDTYPE *type1, - FIELDTYPE *type2) - { return(*(FIELDTYPE **)0); } - -/* ./fld_info.c */ - -#undef field_info -int field_info( - const FIELD *field, - int *rows, - int *cols, - int *frow, - int *fcol, - int *nrow, - int *nbuf) - { return(*(int *)0); } - -#undef dynamic_field_info -int dynamic_field_info( - const FIELD *field, - int *drows, - int *dcols, - int *maxgrow) - { return(*(int *)0); } - -/* ./fld_just.c */ - -#undef set_field_just -int set_field_just( - FIELD *field, - int just) - { return(*(int *)0); } - -#undef field_just -int field_just( - const FIELD *field) - { return(*(int *)0); } - -/* ./fld_link.c */ - -#undef link_field -FIELD *link_field( - FIELD *field, - int frow, - int fcol) - { return(*(FIELD **)0); } - -/* ./fld_max.c */ - -#undef set_max_field -int set_max_field( - FIELD *field, - int maxgrow) - { return(*(int *)0); } - -/* ./fld_move.c */ - -#undef move_field -int move_field( - FIELD *field, - int frow, - int fcol) - { return(*(int *)0); } - -/* ./fld_newftyp.c */ - -#undef _nc_Default_FieldType -FIELDTYPE *_nc_Default_FieldType; - -#undef new_fieldtype -FIELDTYPE *new_fieldtype( - NCURSES_BOOL (*const field_check)( - FIELD *p1, - const void *p2), - NCURSES_BOOL (*const char_check)( - int p1, - const void *p2)) - { return(*(FIELDTYPE **)0); } - -#undef free_fieldtype -int free_fieldtype( - FIELDTYPE *typ) - { return(*(int *)0); } - -/* ./fld_opts.c */ - -#undef set_field_opts -int set_field_opts( - FIELD *field, - Field_Options opts) - { return(*(int *)0); } - -#undef field_opts -Field_Options field_opts( - const FIELD *field) - { return(*(Field_Options *)0); } - -#undef field_opts_on -int field_opts_on( - FIELD *field, - Field_Options opts) - { return(*(int *)0); } - -#undef field_opts_off -int field_opts_off( - FIELD *field, - Field_Options opts) - { return(*(int *)0); } - -/* ./fld_pad.c */ - -#undef set_field_pad -int set_field_pad( - FIELD *field, - int ch) - { return(*(int *)0); } - -#undef field_pad -int field_pad( - const FIELD *field) - { return(*(int *)0); } - -/* ./fld_page.c */ - -#undef set_new_page -int set_new_page( - FIELD *field, - NCURSES_BOOL new_page_flag) - { return(*(int *)0); } - -#undef new_page -NCURSES_BOOL new_page( - const FIELD *field) - { return(*(NCURSES_BOOL *)0); } - -/* ./fld_stat.c */ - -#undef set_field_status -int set_field_status( - FIELD *field, - NCURSES_BOOL status) - { return(*(int *)0); } - -#undef field_status -NCURSES_BOOL field_status( - const FIELD *field) - { return(*(NCURSES_BOOL *)0); } - -/* ./fld_type.c */ - -#undef set_field_type -int set_field_type( - FIELD *field, - FIELDTYPE *type, - ...) - { return(*(int *)0); } - -#undef field_type -FIELDTYPE *field_type( - const FIELD *field) - { return(*(FIELDTYPE **)0); } - -/* ./fld_user.c */ - -#undef set_field_userptr -int set_field_userptr( - FIELD *field, - void *usrptr) - { return(*(int *)0); } - -#undef field_userptr -void *field_userptr( - const FIELD *field) - { return(*(void **)0); } - -/* ./frm_cursor.c */ - -#undef pos_form_cursor -int pos_form_cursor( - FORM *form) - { return(*(int *)0); } - -/* ./frm_data.c */ - -#undef data_behind -NCURSES_BOOL data_behind( - const FORM *form) - { return(*(NCURSES_BOOL *)0); } - -#undef data_ahead -NCURSES_BOOL data_ahead( - const FORM *form) - { return(*(NCURSES_BOOL *)0); } - -/* ./frm_def.c */ - -#undef _nc_Default_Form -FORM *_nc_Default_Form; - -#undef new_form_sp -FORM *new_form_sp( - SCREEN *sp, - FIELD **fields) - { return(*(FORM **)0); } - -#undef new_form -FORM *new_form( - FIELD **fields) - { return(*(FORM **)0); } - -#undef free_form -int free_form( - FORM *form) - { return(*(int *)0); } - -#undef set_form_fields -int set_form_fields( - FORM *form, - FIELD **fields) - { return(*(int *)0); } - -#undef form_fields -FIELD **form_fields( - const FORM *form) - { return(*(FIELD ***)0); } - -#undef field_count -int field_count( - const FORM *form) - { return(*(int *)0); } - -/* ./frm_driver.c */ - -#undef _nc_get_fieldbuffer -void _nc_get_fieldbuffer( - FORM *form, - FIELD *field, - char *buf) - { /* void */ } - -#undef _nc_Position_Form_Cursor -int _nc_Position_Form_Cursor( - FORM *form) - { return(*(int *)0); } - -#undef _nc_Refresh_Current_Field -int _nc_Refresh_Current_Field( - FORM *form) - { return(*(int *)0); } - -#undef _nc_Synchronize_Attributes -int _nc_Synchronize_Attributes( - FIELD *field) - { return(*(int *)0); } - -#undef _nc_Synchronize_Options -int _nc_Synchronize_Options( - FIELD *field, - Field_Options newopts) - { return(*(int *)0); } - -#undef _nc_Set_Current_Field -int _nc_Set_Current_Field( - FORM *form, - FIELD *newfield) - { return(*(int *)0); } - -#undef _nc_Internal_Validation -NCURSES_BOOL _nc_Internal_Validation( - FORM *form) - { return(*(NCURSES_BOOL *)0); } - -#undef _nc_First_Active_Field -FIELD *_nc_First_Active_Field( - FORM *form) - { return(*(FIELD **)0); } - -#undef _nc_Set_Form_Page -int _nc_Set_Form_Page( - FORM *form, - int page, - FIELD *field) - { return(*(int *)0); } - -typedef struct -{ - int keycode; - int (*cmd) (FORM *); -} -Binding_Info; - -#undef form_driver -int form_driver( - FORM *form, - int c) - { return(*(int *)0); } - -#undef set_field_buffer -int set_field_buffer( - FIELD *field, - int buffer, - const char *value) - { return(*(int *)0); } - -#undef field_buffer -char *field_buffer( - const FIELD *field, - int buffer) - { return(*(char **)0); } - -/* ./frm_hook.c */ - -#undef set_field_init -int set_field_init( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef field_init -Form_Hook field_init( - const FORM *form) - { return(*(Form_Hook *)0); } - -#undef set_field_term -int set_field_term( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef field_term -Form_Hook field_term( - const FORM *form) - { return(*(Form_Hook *)0); } - -#undef set_form_init -int set_form_init( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef form_init -Form_Hook form_init( - const FORM *form) - { return(*(Form_Hook *)0); } - -#undef set_form_term -int set_form_term( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef form_term -Form_Hook form_term( - const FORM *form) - { return(*(Form_Hook *)0); } - -/* ./frm_opts.c */ - -#undef set_form_opts -int set_form_opts( - FORM *form, - Form_Options opts) - { return(*(int *)0); } - -#undef form_opts -Form_Options form_opts( - const FORM *form) - { return(*(Form_Options *)0); } - -#undef form_opts_on -int form_opts_on( - FORM *form, - Form_Options opts) - { return(*(int *)0); } - -#undef form_opts_off -int form_opts_off( - FORM *form, - Form_Options opts) - { return(*(int *)0); } - -/* ./frm_page.c */ - -#undef set_form_page -int set_form_page( - FORM *form, - int page) - { return(*(int *)0); } - -#undef form_page -int form_page( - const FORM *form) - { return(*(int *)0); } - -/* ./frm_post.c */ - -#undef post_form -int post_form( - FORM *form) - { return(*(int *)0); } - -#undef unpost_form -int unpost_form( - FORM *form) - { return(*(int *)0); } - -/* ./frm_req_name.c */ - -#undef form_request_name -const char *form_request_name( - int request) - { return(*(const char **)0); } - -#undef form_request_by_name -int form_request_by_name( - const char *str) - { return(*(int *)0); } - -/* ./frm_scale.c */ - -#undef scale_form -int scale_form( - const FORM *form, - int *rows, - int *cols) - { return(*(int *)0); } - -/* ./frm_sub.c */ - -#undef set_form_sub -int set_form_sub( - FORM *form, - WINDOW *win) - { return(*(int *)0); } - -#undef form_sub -WINDOW *form_sub( - const FORM *form) - { return(*(WINDOW **)0); } - -/* ./frm_user.c */ - -#undef set_form_userptr -int set_form_userptr( - FORM *form, - void *usrptr) - { return(*(int *)0); } - -#undef form_userptr -void *form_userptr( - const FORM *form) - { return(*(void **)0); } - -/* ./frm_win.c */ - -#undef set_form_win -int set_form_win( - FORM *form, - WINDOW *win) - { return(*(int *)0); } - -#undef form_win -WINDOW *form_win( - const FORM *form) - { return(*(WINDOW **)0); } - -/* ./fty_alnum.c */ - -typedef struct - { - int width; - } -alnumARG; - -#undef TYPE_ALNUM -FIELDTYPE *TYPE_ALNUM; - -/* ./fty_alpha.c */ - -typedef struct - { - int width; - } -alphaARG; - -#undef TYPE_ALPHA -FIELDTYPE *TYPE_ALPHA; - -/* ./fty_enum.c */ - -typedef struct - { - char **kwds; - int count; - NCURSES_BOOL checkcase; - NCURSES_BOOL checkunique; - } -enumARG; - -typedef struct - { - char **kwds; - int ccase; - int cunique; - } -enumParams; - -#undef TYPE_ENUM -FIELDTYPE *TYPE_ENUM; - -/* ./fty_generic.c */ - -#undef _nc_fty_generic -void _nc_fty_generic(void) - { /* void */ } - -/* ./fty_int.c */ - -typedef struct - { - int precision; - long low; - long high; - } -integerARG; - -typedef struct - { - int precision; - long low; - long high; - } -integerPARM; - -#undef TYPE_INTEGER -FIELDTYPE *TYPE_INTEGER; - -/* ./fty_ipv4.c */ -#undef TYPE_IPV4 -FIELDTYPE *TYPE_IPV4; - -/* ./fty_num.c */ - -#include - -typedef struct - { - int precision; - double low; - double high; - struct lconv *L; - } -numericARG; - -typedef struct - { - int precision; - double low; - double high; - } -thisPARM; - -#undef TYPE_NUMERIC -FIELDTYPE *TYPE_NUMERIC; - -/* ./fty_regex.c */ - -#include - -typedef struct - { - regex_t *pRegExp; - unsigned long *refCount; - } -RegExp_Arg; - -#undef TYPE_REGEXP -FIELDTYPE *TYPE_REGEXP; diff --git a/form/llib-lformtw b/form/llib-lformtw deleted file mode 100644 index 1063949..0000000 --- a/form/llib-lformtw +++ /dev/null @@ -1,783 +0,0 @@ -/**************************************************************************** - * Copyright (c) 2010 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 * - * "Software"), to deal in the Software without restriction, including * - * without limitation the rights to use, copy, modify, merge, publish, * - * distribute, distribute with modifications, sublicense, and/or sell * - * copies of the Software, and to permit persons to whom the Software is * - * furnished to do so, subject to the following conditions: * - * * - * The above copyright notice and this permission notice shall be included * - * in all copies or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * * - * Except as contained in this notice, the name(s) of the above copyright * - * holders shall not be used in advertising or otherwise to promote the * - * sale, use or other dealings in this Software without prior written * - * authorization. * - ****************************************************************************/ - -/**************************************************************************** - * Author: Thomas E. Dickey 2010 * - ****************************************************************************/ -/* LINTLIBRARY */ - -/* ./f_trace.c */ - -#include - -#undef _nc_retrace_field_ptr -FIELD **_nc_retrace_field_ptr( - FIELD **code) - { return(*(FIELD ***)0); } - -#undef _nc_retrace_field -FIELD *_nc_retrace_field( - FIELD *code) - { return(*(FIELD **)0); } - -#undef _nc_retrace_field_type -FIELDTYPE *_nc_retrace_field_type( - FIELDTYPE *code) - { return(*(FIELDTYPE **)0); } - -#undef _nc_retrace_form -FORM *_nc_retrace_form( - FORM *code) - { return(*(FORM **)0); } - -#undef _nc_retrace_form_hook -Form_Hook _nc_retrace_form_hook( - Form_Hook code) - { return(*(Form_Hook *)0); } - -/* ./fld_arg.c */ - -#undef set_fieldtype_arg -int set_fieldtype_arg( - FIELDTYPE *typ, - void *(*const make_arg)( - va_list *p1), - void *(*const copy_arg)( - const void *p1), - void (*const free_arg)( - void *p1)) - { return(*(int *)0); } - -#undef field_arg -void *field_arg( - const FIELD *field) - { return(*(void **)0); } - -/* ./fld_attr.c */ - -#undef set_field_fore -int set_field_fore( - FIELD *field, - chtype attr) - { return(*(int *)0); } - -#undef field_fore -chtype field_fore( - const FIELD *field) - { return(*(chtype *)0); } - -#undef set_field_back -int set_field_back( - FIELD *field, - chtype attr) - { return(*(int *)0); } - -#undef field_back -chtype field_back( - const FIELD *field) - { return(*(chtype *)0); } - -/* ./fld_current.c */ - -#undef set_current_field -int set_current_field( - FORM *form, - FIELD *field) - { return(*(int *)0); } - -#undef current_field -FIELD *current_field( - const FORM *form) - { return(*(FIELD **)0); } - -#undef field_index -int field_index( - const FIELD *field) - { return(*(int *)0); } - -/* ./fld_def.c */ - -#undef _nc_Default_Field -FIELD *_nc_Default_Field; - -#undef _nc_Make_Argument -TypeArgument *_nc_Make_Argument( - const FIELDTYPE *typ, - va_list *ap, - int *err) - { return(*(TypeArgument **)0); } - -#undef _nc_Copy_Argument -TypeArgument *_nc_Copy_Argument( - const FIELDTYPE *typ, - const TypeArgument *argp, - int *err) - { return(*(TypeArgument **)0); } - -#undef _nc_Free_Argument -void _nc_Free_Argument( - const FIELDTYPE *typ, - TypeArgument *argp) - { /* void */ } - -#undef _nc_Copy_Type -NCURSES_BOOL _nc_Copy_Type( - FIELD *dst, - FIELD const *src) - { return(*(NCURSES_BOOL *)0); } - -#undef _nc_Free_Type -void _nc_Free_Type( - FIELD *field) - { /* void */ } - -#undef new_field -FIELD *new_field( - int rows, - int cols, - int frow, - int fcol, - int nrow, - int nbuf) - { return(*(FIELD **)0); } - -#undef free_field -int free_field( - FIELD *field) - { return(*(int *)0); } - -/* ./fld_dup.c */ - -#undef dup_field -FIELD *dup_field( - FIELD *field, - int frow, - int fcol) - { return(*(FIELD **)0); } - -/* ./fld_ftchoice.c */ - -#undef set_fieldtype_choice -int set_fieldtype_choice( - FIELDTYPE *typ, - NCURSES_BOOL (*const next_choice)( - FIELD *p1, - const void *p2), - NCURSES_BOOL (*const prev_choice)( - FIELD *p1, - const void *p2)) - { return(*(int *)0); } - -/* ./fld_ftlink.c */ - -#undef link_fieldtype -FIELDTYPE *link_fieldtype( - FIELDTYPE *type1, - FIELDTYPE *type2) - { return(*(FIELDTYPE **)0); } - -/* ./fld_info.c */ - -#undef field_info -int field_info( - const FIELD *field, - int *rows, - int *cols, - int *frow, - int *fcol, - int *nrow, - int *nbuf) - { return(*(int *)0); } - -#undef dynamic_field_info -int dynamic_field_info( - const FIELD *field, - int *drows, - int *dcols, - int *maxgrow) - { return(*(int *)0); } - -/* ./fld_just.c */ - -#undef set_field_just -int set_field_just( - FIELD *field, - int just) - { return(*(int *)0); } - -#undef field_just -int field_just( - const FIELD *field) - { return(*(int *)0); } - -/* ./fld_link.c */ - -#undef link_field -FIELD *link_field( - FIELD *field, - int frow, - int fcol) - { return(*(FIELD **)0); } - -/* ./fld_max.c */ - -#undef set_max_field -int set_max_field( - FIELD *field, - int maxgrow) - { return(*(int *)0); } - -/* ./fld_move.c */ - -#undef move_field -int move_field( - FIELD *field, - int frow, - int fcol) - { return(*(int *)0); } - -/* ./fld_newftyp.c */ - -#undef _nc_Default_FieldType -FIELDTYPE *_nc_Default_FieldType; - -#undef new_fieldtype -FIELDTYPE *new_fieldtype( - NCURSES_BOOL (*const field_check)( - FIELD *p1, - const void *p2), - NCURSES_BOOL (*const char_check)( - int p1, - const void *p2)) - { return(*(FIELDTYPE **)0); } - -#undef free_fieldtype -int free_fieldtype( - FIELDTYPE *typ) - { return(*(int *)0); } - -/* ./fld_opts.c */ - -#undef set_field_opts -int set_field_opts( - FIELD *field, - Field_Options opts) - { return(*(int *)0); } - -#undef field_opts -Field_Options field_opts( - const FIELD *field) - { return(*(Field_Options *)0); } - -#undef field_opts_on -int field_opts_on( - FIELD *field, - Field_Options opts) - { return(*(int *)0); } - -#undef field_opts_off -int field_opts_off( - FIELD *field, - Field_Options opts) - { return(*(int *)0); } - -/* ./fld_pad.c */ - -#undef set_field_pad -int set_field_pad( - FIELD *field, - int ch) - { return(*(int *)0); } - -#undef field_pad -int field_pad( - const FIELD *field) - { return(*(int *)0); } - -/* ./fld_page.c */ - -#undef set_new_page -int set_new_page( - FIELD *field, - NCURSES_BOOL new_page_flag) - { return(*(int *)0); } - -#undef new_page -NCURSES_BOOL new_page( - const FIELD *field) - { return(*(NCURSES_BOOL *)0); } - -/* ./fld_stat.c */ - -#undef set_field_status -int set_field_status( - FIELD *field, - NCURSES_BOOL status) - { return(*(int *)0); } - -#undef field_status -NCURSES_BOOL field_status( - const FIELD *field) - { return(*(NCURSES_BOOL *)0); } - -/* ./fld_type.c */ - -#undef set_field_type -int set_field_type( - FIELD *field, - FIELDTYPE *type, - ...) - { return(*(int *)0); } - -#undef field_type -FIELDTYPE *field_type( - const FIELD *field) - { return(*(FIELDTYPE **)0); } - -/* ./fld_user.c */ - -#undef set_field_userptr -int set_field_userptr( - FIELD *field, - void *usrptr) - { return(*(int *)0); } - -#undef field_userptr -void *field_userptr( - const FIELD *field) - { return(*(void **)0); } - -/* ./frm_cursor.c */ - -#undef pos_form_cursor -int pos_form_cursor( - FORM *form) - { return(*(int *)0); } - -/* ./frm_data.c */ - -#undef data_behind -NCURSES_BOOL data_behind( - const FORM *form) - { return(*(NCURSES_BOOL *)0); } - -#undef data_ahead -NCURSES_BOOL data_ahead( - const FORM *form) - { return(*(NCURSES_BOOL *)0); } - -/* ./frm_def.c */ - -#undef _nc_Default_Form -FORM *_nc_Default_Form; - -#undef new_form_sp -FORM *new_form_sp( - SCREEN *sp, - FIELD **fields) - { return(*(FORM **)0); } - -#undef new_form -FORM *new_form( - FIELD **fields) - { return(*(FORM **)0); } - -#undef free_form -int free_form( - FORM *form) - { return(*(int *)0); } - -#undef set_form_fields -int set_form_fields( - FORM *form, - FIELD **fields) - { return(*(int *)0); } - -#undef form_fields -FIELD **form_fields( - const FORM *form) - { return(*(FIELD ***)0); } - -#undef field_count -int field_count( - const FORM *form) - { return(*(int *)0); } - -/* ./frm_driver.c */ - -#undef _nc_get_fieldbuffer -void _nc_get_fieldbuffer( - FORM *form, - FIELD *field, - cchar_t *buf) - { /* void */ } - -#undef _nc_Position_Form_Cursor -int _nc_Position_Form_Cursor( - FORM *form) - { return(*(int *)0); } - -#undef _nc_Refresh_Current_Field -int _nc_Refresh_Current_Field( - FORM *form) - { return(*(int *)0); } - -#undef _nc_Synchronize_Attributes -int _nc_Synchronize_Attributes( - FIELD *field) - { return(*(int *)0); } - -#undef _nc_Synchronize_Options -int _nc_Synchronize_Options( - FIELD *field, - Field_Options newopts) - { return(*(int *)0); } - -#undef _nc_Set_Current_Field -int _nc_Set_Current_Field( - FORM *form, - FIELD *newfield) - { return(*(int *)0); } - -#undef _nc_Internal_Validation -NCURSES_BOOL _nc_Internal_Validation( - FORM *form) - { return(*(NCURSES_BOOL *)0); } - -#undef _nc_First_Active_Field -FIELD *_nc_First_Active_Field( - FORM *form) - { return(*(FIELD **)0); } - -#undef _nc_Set_Form_Page -int _nc_Set_Form_Page( - FORM *form, - int page, - FIELD *field) - { return(*(int *)0); } - -typedef struct -{ - int keycode; - int (*cmd) (FORM *); -} -Binding_Info; - -#undef form_driver -int form_driver( - FORM *form, - int c) - { return(*(int *)0); } - -#undef set_field_buffer -int set_field_buffer( - FIELD *field, - int buffer, - const char *value) - { return(*(int *)0); } - -#undef field_buffer -char *field_buffer( - const FIELD *field, - int buffer) - { return(*(char **)0); } - -#undef _nc_Widen_String -wchar_t *_nc_Widen_String( - char *source, - int *lengthp) - { return(*(wchar_t **)0); } - -/* ./frm_hook.c */ - -#undef set_field_init -int set_field_init( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef field_init -Form_Hook field_init( - const FORM *form) - { return(*(Form_Hook *)0); } - -#undef set_field_term -int set_field_term( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef field_term -Form_Hook field_term( - const FORM *form) - { return(*(Form_Hook *)0); } - -#undef set_form_init -int set_form_init( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef form_init -Form_Hook form_init( - const FORM *form) - { return(*(Form_Hook *)0); } - -#undef set_form_term -int set_form_term( - FORM *form, - Form_Hook func) - { return(*(int *)0); } - -#undef form_term -Form_Hook form_term( - const FORM *form) - { return(*(Form_Hook *)0); } - -/* ./frm_opts.c */ - -#undef set_form_opts -int set_form_opts( - FORM *form, - Form_Options opts) - { return(*(int *)0); } - -#undef form_opts -Form_Options form_opts( - const FORM *form) - { return(*(Form_Options *)0); } - -#undef form_opts_on -int form_opts_on( - FORM *form, - Form_Options opts) - { return(*(int *)0); } - -#undef form_opts_off -int form_opts_off( - FORM *form, - Form_Options opts) - { return(*(int *)0); } - -/* ./frm_page.c */ - -#undef set_form_page -int set_form_page( - FORM *form, - int page) - { return(*(int *)0); } - -#undef form_page -int form_page( - const FORM *form) - { return(*(int *)0); } - -/* ./frm_post.c */ - -#undef post_form -int post_form( - FORM *form) - { return(*(int *)0); } - -#undef unpost_form -int unpost_form( - FORM *form) - { return(*(int *)0); } - -/* ./frm_req_name.c */ - -#undef form_request_name -const char *form_request_name( - int request) - { return(*(const char **)0); } - -#undef form_request_by_name -int form_request_by_name( - const char *str) - { return(*(int *)0); } - -/* ./frm_scale.c */ - -#undef scale_form -int scale_form( - const FORM *form, - int *rows, - int *cols) - { return(*(int *)0); } - -/* ./frm_sub.c */ - -#undef set_form_sub -int set_form_sub( - FORM *form, - WINDOW *win) - { return(*(int *)0); } - -#undef form_sub -WINDOW *form_sub( - const FORM *form) - { return(*(WINDOW **)0); } - -/* ./frm_user.c */ - -#undef set_form_userptr -int set_form_userptr( - FORM *form, - void *usrptr) - { return(*(int *)0); } - -#undef form_userptr -void *form_userptr( - const FORM *form) - { return(*(void **)0); } - -/* ./frm_win.c */ - -#undef set_form_win -int set_form_win( - FORM *form, - WINDOW *win) - { return(*(int *)0); } - -#undef form_win -WINDOW *form_win( - const FORM *form) - { return(*(WINDOW **)0); } - -/* ./fty_alnum.c */ - -typedef struct - { - int width; - } -alnumARG; - -#undef TYPE_ALNUM -FIELDTYPE *TYPE_ALNUM; - -/* ./fty_alpha.c */ - -typedef struct - { - int width; - } -alphaARG; - -#undef TYPE_ALPHA -FIELDTYPE *TYPE_ALPHA; - -/* ./fty_enum.c */ - -typedef struct - { - char **kwds; - int count; - NCURSES_BOOL checkcase; - NCURSES_BOOL checkunique; - } -enumARG; - -typedef struct - { - char **kwds; - int ccase; - int cunique; - } -enumParams; - -#undef TYPE_ENUM -FIELDTYPE *TYPE_ENUM; - -/* ./fty_generic.c */ - -#undef _nc_fty_generic -void _nc_fty_generic(void) - { /* void */ } - -/* ./fty_int.c */ - -typedef struct - { - int precision; - long low; - long high; - } -integerARG; - -typedef struct - { - int precision; - long low; - long high; - } -integerPARM; - -#undef TYPE_INTEGER -FIELDTYPE *TYPE_INTEGER; - -/* ./fty_ipv4.c */ -#undef TYPE_IPV4 -FIELDTYPE *TYPE_IPV4; - -/* ./fty_num.c */ - -#include - -typedef struct - { - int precision; - double low; - double high; - struct lconv *L; - } -numericARG; - -typedef struct - { - int precision; - double low; - double high; - } -thisPARM; - -#undef TYPE_NUMERIC -FIELDTYPE *TYPE_NUMERIC; - -/* ./fty_regex.c */ - -#include - -typedef struct - { - regex_t *pRegExp; - unsigned long *refCount; - } -RegExp_Arg; - -#undef TYPE_REGEXP -FIELDTYPE *TYPE_REGEXP; diff --git a/form/llib-lformw b/form/llib-lformw index 30c24b5..7690c5b 100644 --- a/form/llib-lformw +++ b/form/llib-lformw @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. * + * Copyright (c) 2002,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 * @@ -27,13 +27,13 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 2002-2005,2010 * + * Author: Thomas E. Dickey 2002,2005 * ****************************************************************************/ /* LINTLIBRARY */ /* ./f_trace.c */ -#include +#include "form.priv.h" #undef _nc_retrace_field_ptr FIELD **_nc_retrace_field_ptr( @@ -264,7 +264,7 @@ int move_field( /* ./fld_newftyp.c */ #undef _nc_Default_FieldType -FIELDTYPE *_nc_Default_FieldType; +const FIELDTYPE *_nc_Default_FieldType = {0}; #undef new_fieldtype FIELDTYPE *new_fieldtype( @@ -396,12 +396,6 @@ NCURSES_BOOL data_ahead( #undef _nc_Default_Form FORM *_nc_Default_Form; -#undef new_form_sp -FORM *new_form_sp( - SCREEN *sp, - FIELD **fields) - { return(*(FORM **)0); } - #undef new_form FORM *new_form( FIELD **fields) @@ -430,13 +424,6 @@ int field_count( /* ./frm_driver.c */ -#undef _nc_get_fieldbuffer -void _nc_get_fieldbuffer( - FORM *form, - FIELD *field, - cchar_t *buf) - { /* void */ } - #undef _nc_Position_Form_Cursor int _nc_Position_Form_Cursor( FORM *form) @@ -702,23 +689,9 @@ typedef struct } enumARG; -typedef struct - { - char **kwds; - int ccase; - int cunique; - } -enumParams; - #undef TYPE_ENUM FIELDTYPE *TYPE_ENUM; -/* ./fty_generic.c */ - -#undef _nc_fty_generic -void _nc_fty_generic(void) - { /* void */ } - /* ./fty_int.c */ typedef struct @@ -729,14 +702,6 @@ typedef struct } integerARG; -typedef struct - { - int precision; - long low; - long high; - } -integerPARM; - #undef TYPE_INTEGER FIELDTYPE *TYPE_INTEGER; @@ -757,14 +722,6 @@ typedef struct } numericARG; -typedef struct - { - int precision; - double low; - double high; - } -thisPARM; - #undef TYPE_NUMERIC FIELDTYPE *TYPE_NUMERIC; diff --git a/form/modules b/form/modules index 205356b..89f9f9f 100644 --- a/form/modules +++ b/form/modules @@ -1,6 +1,6 @@ -# $Id: modules,v 1.17 2010/01/23 16:26:37 tom Exp $ +# $Id: modules,v 1.15 2006/12/24 00:52:58 tom Exp $ ############################################################################## -# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. # +# Copyright (c) 1998-2004,2006 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 "Software"), # @@ -28,51 +28,49 @@ ############################################################################## # # Author: Thomas E. Dickey 1995-on -# and: Juergen Pfeifer 2008 # @ base # Library objects -f_trace lib $(srcdir) $(HEADER_DEPS) -fld_arg lib $(srcdir) $(HEADER_DEPS) -fld_attr lib $(srcdir) $(HEADER_DEPS) -fld_current lib $(srcdir) $(HEADER_DEPS) -fld_def lib $(srcdir) $(HEADER_DEPS) -fld_dup lib $(srcdir) $(HEADER_DEPS) -fld_ftchoice lib $(srcdir) $(HEADER_DEPS) -fld_ftlink lib $(srcdir) $(HEADER_DEPS) -fld_info lib $(srcdir) $(HEADER_DEPS) -fld_just lib $(srcdir) $(HEADER_DEPS) -fld_link lib $(srcdir) $(HEADER_DEPS) -fld_max lib $(srcdir) $(HEADER_DEPS) -fld_move lib $(srcdir) $(HEADER_DEPS) -fld_newftyp lib $(srcdir) $(HEADER_DEPS) -fld_opts lib $(srcdir) $(HEADER_DEPS) -fld_pad lib $(srcdir) $(HEADER_DEPS) -fld_page lib $(srcdir) $(HEADER_DEPS) -fld_stat lib $(srcdir) $(HEADER_DEPS) -fld_type lib $(srcdir) $(HEADER_DEPS) -fld_user lib $(srcdir) $(HEADER_DEPS) -frm_cursor lib $(srcdir) $(HEADER_DEPS) -frm_data lib $(srcdir) $(HEADER_DEPS) -frm_def lib $(srcdir) $(HEADER_DEPS) -frm_driver lib $(srcdir) $(HEADER_DEPS) -frm_hook lib $(srcdir) $(HEADER_DEPS) -frm_opts lib $(srcdir) $(HEADER_DEPS) -frm_page lib $(srcdir) $(HEADER_DEPS) -frm_post lib $(srcdir) $(HEADER_DEPS) -frm_req_name lib $(srcdir) $(HEADER_DEPS) -frm_scale lib $(srcdir) $(HEADER_DEPS) -frm_sub lib $(srcdir) $(HEADER_DEPS) -frm_user lib $(srcdir) $(HEADER_DEPS) -frm_win lib $(srcdir) $(HEADER_DEPS) -fty_alnum lib $(srcdir) $(HEADER_DEPS) -fty_alpha lib $(srcdir) $(HEADER_DEPS) -fty_enum lib $(srcdir) $(HEADER_DEPS) -fty_generic lib $(srcdir) $(HEADER_DEPS) -fty_int lib $(srcdir) $(HEADER_DEPS) -fty_ipv4 lib $(srcdir) $(HEADER_DEPS) -fty_num lib $(srcdir) $(HEADER_DEPS) -fty_regex lib $(srcdir) $(HEADER_DEPS) +f_trace lib $(srcdir) $(FORM_PRIV_H) +fld_arg lib $(srcdir) $(FORM_PRIV_H) +fld_attr lib $(srcdir) $(FORM_PRIV_H) +fld_current lib $(srcdir) $(FORM_PRIV_H) +fld_def lib $(srcdir) $(FORM_PRIV_H) +fld_dup lib $(srcdir) $(FORM_PRIV_H) +fld_ftchoice lib $(srcdir) $(FORM_PRIV_H) +fld_ftlink lib $(srcdir) $(FORM_PRIV_H) +fld_info lib $(srcdir) $(FORM_PRIV_H) +fld_just lib $(srcdir) $(FORM_PRIV_H) +fld_link lib $(srcdir) $(FORM_PRIV_H) +fld_max lib $(srcdir) $(FORM_PRIV_H) +fld_move lib $(srcdir) $(FORM_PRIV_H) +fld_newftyp lib $(srcdir) $(FORM_PRIV_H) +fld_opts lib $(srcdir) $(FORM_PRIV_H) +fld_pad lib $(srcdir) $(FORM_PRIV_H) +fld_page lib $(srcdir) $(FORM_PRIV_H) +fld_stat lib $(srcdir) $(FORM_PRIV_H) +fld_type lib $(srcdir) $(FORM_PRIV_H) +fld_user lib $(srcdir) $(FORM_PRIV_H) +frm_cursor lib $(srcdir) $(FORM_PRIV_H) +frm_data lib $(srcdir) $(FORM_PRIV_H) +frm_def lib $(srcdir) $(FORM_PRIV_H) +frm_driver lib $(srcdir) $(FORM_PRIV_H) +frm_hook lib $(srcdir) $(FORM_PRIV_H) +frm_opts lib $(srcdir) $(FORM_PRIV_H) +frm_page lib $(srcdir) $(FORM_PRIV_H) +frm_post lib $(srcdir) $(FORM_PRIV_H) +frm_req_name lib $(srcdir) $(FORM_PRIV_H) +frm_scale lib $(srcdir) $(FORM_PRIV_H) +frm_sub lib $(srcdir) $(FORM_PRIV_H) +frm_user lib $(srcdir) $(FORM_PRIV_H) +frm_win lib $(srcdir) $(FORM_PRIV_H) +fty_alnum lib $(srcdir) $(FORM_PRIV_H) +fty_alpha lib $(srcdir) $(FORM_PRIV_H) +fty_enum lib $(srcdir) $(FORM_PRIV_H) +fty_int lib $(srcdir) $(FORM_PRIV_H) +fty_ipv4 lib $(srcdir) $(FORM_PRIV_H) +fty_num lib $(srcdir) $(FORM_PRIV_H) +fty_regex lib $(srcdir) $(FORM_PRIV_H) # vile:makemode -- cgit v1.1