150276Speter/**************************************************************************** 2166124Srafan * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. * 350276Speter * * 450276Speter * Permission is hereby granted, free of charge, to any person obtaining a * 550276Speter * copy of this software and associated documentation files (the * 650276Speter * "Software"), to deal in the Software without restriction, including * 750276Speter * without limitation the rights to use, copy, modify, merge, publish, * 850276Speter * distribute, distribute with modifications, sublicense, and/or sell * 950276Speter * copies of the Software, and to permit persons to whom the Software is * 1050276Speter * furnished to do so, subject to the following conditions: * 1150276Speter * * 1250276Speter * The above copyright notice and this permission notice shall be included * 1350276Speter * in all copies or substantial portions of the Software. * 1450276Speter * * 1550276Speter * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 1650276Speter * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 1750276Speter * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 1850276Speter * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 1950276Speter * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 2050276Speter * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 2150276Speter * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 2250276Speter * * 2350276Speter * Except as contained in this notice, the name(s) of the above copyright * 2450276Speter * holders shall not be used in advertising or otherwise to promote the * 2550276Speter * sale, use or other dealings in this Software without prior written * 2650276Speter * authorization. * 2750276Speter ****************************************************************************/ 2850276Speter 2950276Speter/**************************************************************************** 30166124Srafan * Author: Juergen Pfeifer, 1995,1997 * 3150276Speter ****************************************************************************/ 3250276Speter 3350276Speter#include "form.priv.h" 3450276Speter 35166124SrafanMODULE_ID("$Id: fld_info.c,v 1.10 2004/12/11 22:24:57 tom Exp $") 3650276Speter 3750276Speter/*--------------------------------------------------------------------------- 3850276Speter| Facility : libnform 3950276Speter| Function : int field_info(const FIELD *field, 4050276Speter| int *rows, int *cols, 4150276Speter| int *frow, int *fcol, 4250276Speter| int *nrow, int *nbuf) 4350276Speter| 4450276Speter| Description : Retrieve infos about the fields creation parameters. 4550276Speter| 4650276Speter| Return Values : E_OK - success 4750276Speter| E_BAD_ARGUMENT - invalid field pointer 4850276Speter+--------------------------------------------------------------------------*/ 4976726SpeterNCURSES_EXPORT(int) 50166124Srafanfield_info(const FIELD *field, 51166124Srafan int *rows, int *cols, 52166124Srafan int *frow, int *fcol, 53166124Srafan int *nrow, int *nbuf) 5450276Speter{ 55166124Srafan T((T_CALLED("field_info(%p,%p,%p,%p,%p,%p,%p)"), 56166124Srafan field, 57166124Srafan rows, cols, 58166124Srafan frow, fcol, 59166124Srafan nrow, nbuf)); 60166124Srafan 61166124Srafan if (!field) 6250276Speter RETURN(E_BAD_ARGUMENT); 6350276Speter 64166124Srafan if (rows) 65166124Srafan *rows = field->rows; 66166124Srafan if (cols) 67166124Srafan *cols = field->cols; 68166124Srafan if (frow) 69166124Srafan *frow = field->frow; 70166124Srafan if (fcol) 71166124Srafan *fcol = field->fcol; 72166124Srafan if (nrow) 73166124Srafan *nrow = field->nrow; 74166124Srafan if (nbuf) 75166124Srafan *nbuf = field->nbuf; 7650276Speter RETURN(E_OK); 7750276Speter} 78166124Srafan 7950276Speter/*--------------------------------------------------------------------------- 8050276Speter| Facility : libnform 8150276Speter| Function : int dynamic_field_info(const FIELD *field, 8250276Speter| int *drows, int *dcols, 8350276Speter| int *maxgrow) 8450276Speter| 8550276Speter| Description : Retrieve informations about a dynamic fields current 8650276Speter| dynamic parameters. 8750276Speter| 8850276Speter| Return Values : E_OK - success 8950276Speter| E_BAD_ARGUMENT - invalid argument 9050276Speter+--------------------------------------------------------------------------*/ 9176726SpeterNCURSES_EXPORT(int) 92166124Srafandynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow) 9350276Speter{ 94166124Srafan T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), field, drows, dcols, maxgrow)); 95166124Srafan 9650276Speter if (!field) 9750276Speter RETURN(E_BAD_ARGUMENT); 9850276Speter 99166124Srafan if (drows) 100166124Srafan *drows = field->drows; 101166124Srafan if (dcols) 102166124Srafan *dcols = field->dcols; 103166124Srafan if (maxgrow) 104166124Srafan *maxgrow = field->maxgrow; 10550276Speter 10650276Speter RETURN(E_OK); 10750276Speter} 10850276Speter 10950276Speter/* fld_info.c ends here */ 110