X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=form%2Ffld_current.c;h=f4b308adcb9b01ddb19847f3c9b08f533da0d4d5;hp=72534a9e36a3196cd02df6d5398a8624f54d8f4e;hb=a8987e73ec254703634802b4f7ee30d3a485524d;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/form/fld_current.c b/form/fld_current.c index 72534a9e..f4b308ad 100644 --- a/form/fld_current.c +++ b/form/fld_current.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,2003 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,11 +27,12 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ + #include "form.priv.h" -MODULE_ID("$Id: fld_current.c,v 1.2 1998/02/11 12:13:44 tom Exp $") +MODULE_ID("$Id: fld_current.c,v 1.7 2003/10/25 15:17:08 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -46,7 +47,8 @@ MODULE_ID("$Id: fld_current.c,v 1.2 1998/02/11 12:13:44 tom Exp $") | E_INVALID_FIELD - current field can't be left | E_SYSTEM_ERROR - system error +--------------------------------------------------------------------------*/ -int set_current_field(FORM * form, FIELD * field) +NCURSES_EXPORT(int) +set_current_field (FORM * form, FIELD * field) { int err = E_OK; @@ -101,7 +103,8 @@ int set_current_field(FORM * form, FIELD * field) | | Return Values : Pointer to the current field. +--------------------------------------------------------------------------*/ -FIELD *current_field(const FORM * form) +NCURSES_EXPORT(FIELD *) +current_field (const FORM * form) { return Normalize_Form(form)->current; } @@ -116,7 +119,8 @@ FIELD *current_field(const FORM * form) | Return Values : >= 0 : field index | -1 : fieldpointer invalid or field not connected +--------------------------------------------------------------------------*/ -int field_index(const FIELD * field) +NCURSES_EXPORT(int) +field_index (const FIELD * field) { return ( (field && field->form) ? field->index : -1 ); }