diff options
author | eschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2011-11-09 20:40:04 +0000 |
---|---|---|
committer | eschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2011-11-09 20:40:04 +0000 |
commit | b26cfc3988c40dfa104a4aa85662fcd6e8975722 (patch) | |
tree | f27d7f0d398ee4c8a729aa454195704d46ff9814 /src/include | |
parent | ead15be71b6009004b07c9c2013b8c2e066fa02b (diff) |
Make table printing functions publicly accessible
The table data types (util_Table.h) have internal routines that print
the table contents to screen. This can be helpful for debugging. This
patch makes these functions publicly available.
Add a routine Util_TablePrintPretty that converts a table to a nice,
human-readable string.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4769 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/util_Table.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/include/util_Table.h b/src/include/util_Table.h index 45e3cadc..abd83965 100644 --- a/src/include/util_Table.h +++ b/src/include/util_Table.h @@ -14,6 +14,10 @@ @version $Header$ @@*/ +#ifndef _UTIL_TABLE_H_ +#define _UTIL_TABLE_H_ 1 /* define to 1 is Cactus standard */ + /* n.b. usual standard is empty defn! */ + /* * Having this file (a "util_*" low-level file) include a "cctk_*" high-level * file is an ugly hack, but we need the CCTK_{INT,REAL,COMPLEX}_* types @@ -21,10 +25,6 @@ */ #include "cctk_Types.h" -#ifndef _UTIL_TABLE_H_ -#define _UTIL_TABLE_H_ 1 /* define to 1 is Cactus standard */ - /* n.b. usual standard is empty defn! */ - #ifdef __cplusplus extern "C" { @@ -128,6 +128,8 @@ extern "C" #ifdef CCODE +#include <stdio.h> + /* create/destroy */ int Util_TableCreate(int flags); int Util_TableClone(int handle); @@ -509,6 +511,15 @@ int Util_TableItResetToStart(int ihandle); int Util_TableItSetToNull(int ihandle); int Util_TableItSetToKey(int ihandle, const char *key); +/******************************************************************************/ +/***** Table Output API *******************************************************/ +/******************************************************************************/ + +int Util_TablePrintAll(FILE *stream); +int Util_TablePrint(FILE *stream, int handle); +int Util_TablePrintPretty(FILE *stream, int handle); +int Util_TablePrintAllIterators(FILE *stream); + #endif /* CCODE */ /******************************************************************************/ |