ncurses 6.0 - patch 20150808
[ncurses.git] / form / fld_info.c
index c3826abdec3fa95ffb73ab847dec34ec6878a075..13fe8e72a03c34ef564b4e3053ec3b83bf533c13 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2004,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            *
 
 /****************************************************************************
  *   Author:  Juergen Pfeifer, 1995,1997                                    *
- *   Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en             *
  ****************************************************************************/
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: fld_info.c,v 1.6 2002/07/06 15:33:27 juergen Exp $")
+MODULE_ID("$Id: fld_info.c,v 1.11 2010/01/23 21:14:35 tom Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
@@ -48,24 +47,35 @@ MODULE_ID("$Id: fld_info.c,v 1.6 2002/07/06 15:33:27 juergen Exp $")
 |                    E_BAD_ARGUMENT - invalid field pointer
 +--------------------------------------------------------------------------*/
 NCURSES_EXPORT(int)
-field_info 
-    (const FIELD *field,
-     int *rows, int *cols, 
-     int *frow, int *fcol, 
-     int *nrow, int *nbuf)
+field_info(const FIELD *field,
+          int *rows, int *cols,
+          int *frow, int *fcol,
+          int *nrow, int *nbuf)
 {
-  if (!field) 
+  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));
+
+  if (!field)
     RETURN(E_BAD_ARGUMENT);
 
-  if (rows) *rows = field->rows;
-  if (cols) *cols = field->cols;
-  if (frow) *frow = field->frow;
-  if (fcol) *fcol = field->fcol;
-  if (nrow) *nrow = field->nrow;
-  if (nbuf) *nbuf = field->nbuf;
+  if (rows)
+    *rows = field->rows;
+  if (cols)
+    *cols = field->cols;
+  if (frow)
+    *frow = field->frow;
+  if (fcol)
+    *fcol = field->fcol;
+  if (nrow)
+    *nrow = field->nrow;
+  if (nbuf)
+    *nbuf = field->nbuf;
   RETURN(E_OK);
 }
-       
+
 /*---------------------------------------------------------------------------
 |   Facility      :  libnform  
 |   Function      :  int dynamic_field_info(const FIELD *field,
@@ -79,15 +89,23 @@ field_info
 |                    E_BAD_ARGUMENT - invalid argument
 +--------------------------------------------------------------------------*/
 NCURSES_EXPORT(int)
-dynamic_field_info
-(const FIELD *field, int *drows, int *dcols, int *maxgrow)
+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));
+
   if (!field)
     RETURN(E_BAD_ARGUMENT);
 
-  if (drows)   *drows   = field->drows;
-  if (dcols)   *dcols   = field->dcols;
-  if (maxgrow) *maxgrow = field->maxgrow;
+  if (drows)
+    *drows = field->drows;
+  if (dcols)
+    *dcols = field->dcols;
+  if (maxgrow)
+    *maxgrow = field->maxgrow;
 
   RETURN(E_OK);
 }