X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_arg.c;h=b92484877df192eb577dbeb8388adcc748b19328;hp=a07bdb195900a94239e4de6dfe4311f382929b0a;hb=e5d1530ca229aef94a3c84ad33f8ae89f35c4045;hpb=c6540b9c89dda1a6a8bd681726831e8924176504 diff --git a/form/fld_arg.c b/form/fld_arg.c index a07bdb19..b9248487 100644 --- a/form/fld_arg.c +++ b/form/fld_arg.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. * + * Copyright 2018,2020 Thomas E. Dickey * + * Copyright 1998-2012,2016 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 +33,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.17 2020/05/24 01:40:20 anonymous.maarten Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -60,18 +61,23 @@ MODULE_ID("$Id: fld_arg.c,v 1.12 2010/01/23 21:14:35 tom Exp $") | Return Values : E_OK - success | E_BAD_ARGUMENT - invalid argument +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(int) +FORM_EXPORT(int) set_fieldtype_arg(FIELDTYPE *typ, void *(*const make_arg)(va_list *), void *(*const copy_arg)(const void *), void (*const free_arg) (void *)) { - T((T_CALLED("set_fieldtype_arg(%p,%p,%p,%p)"), - (void *)typ, make_arg, copy_arg, free_arg)); + TR_FUNC_BFR(3); + + T((T_CALLED("set_fieldtype_arg(%p,%s,%s,%s)"), + (void *)typ, + TR_FUNC_ARG(0, make_arg), + TR_FUNC_ARG(1, copy_arg), + TR_FUNC_ARG(2, free_arg))); if (typ != 0 && make_arg != (void *)0) { - typ->status |= _HAS_ARGS; + SetStatus(typ, _HAS_ARGS); typ->makearg = make_arg; typ->copyarg = copy_arg; typ->freearg = free_arg; @@ -88,7 +94,7 @@ set_fieldtype_arg(FIELDTYPE *typ, | | Return Values : Pointer to structure or NULL if none is defined. +--------------------------------------------------------------------------*/ -NCURSES_EXPORT(void *) +FORM_EXPORT(void *) field_arg(const FIELD *field) { T((T_CALLED("field_arg(%p)"), (const void *)field));