Main Page | Files | Data Structures | Functions | Global Variables |

gpiv-utils.h File Reference

miscellaneous utilities More...

Go to the source code of this file.

Defines

#define GPIV_FAIL_INT   -914

Functions

void gpiv_scan_parameter (const gchar *PAR_KEY, const gchar *parfile, void *pstruct, gboolean verbose)
gchar * gpiv_scan_resourcefiles (const gchar *PAR_KEY, void *pstruct, gint verbose)
gchar * gpiv_add_datetime_to_comment (gchar *comment)
gchar * gpiv_sort_3 (const unsigned long n, gfloat arr[], gfloat arr_2[], gfloat arr_3[])
long gpiv_lmax (long a, long b)
long gpiv_lmin (long a, long b)
gint gpiv_max (gint a, gint b)
gint gpiv_min (gint a, gint b)
void gpiv_warning (gchar *message,...)
void gpiv_error (gchar *message,...)
gboolean gpiv_fscan_iph_nl (FILE *fp_h, const gchar *MOD_KEY, const gchar *PAR_KEY, const gboolean use_mod_key, gchar *line, const gchar *par_name, gint *parameter, const gboolean verbose, FILE *fp)
gboolean gpiv_scan_iph (const gchar *MOD_KEY, const gchar *PAR_KEY, const gboolean use_mod_key, const gchar *line, const gchar *par_name, gint *parameter, const gboolean verbose, FILE *fp)
gboolean gpiv_scan_cph (const gchar *MOD_KEY, const gchar *PAR_KEY, const gboolean use_mod_key, const gchar *line, const gchar *par_name, gchar *parameter, const gboolean verbose, FILE *fp)
gboolean gpiv_scan_fph (const gchar *MOD_KEY, const gchar *PAR_KEY, const gboolean use_mod_key, const gchar *line, const gchar *par_name, gfloat *parameter, const gboolean verbose, FILE *fp)
gboolean gpiv_scan_sph (const gchar *MOD_KEY, const gchar *PAR_KEY, const gboolean use_mod_key, const gchar *line, const gchar *par_name, gchar *parameter, const gboolean verbose, FILE *fp)


Detailed Description

miscellaneous utilities

SOURCES: lib/utils.c

LAST MODIFICATION DATE:

Id

Definition in file gpiv-utils.h.


Define Documentation

#define GPIV_FAIL_INT   -914

Definition at line 54 of file gpiv-utils.h.


Function Documentation

gchar* gpiv_add_datetime_to_comment ( gchar *  comment  ) 

Adds date and timesatmp to the comment for ASCII-formatted data

Parameters:
[in] comment character string
Returns:
comment including date and time on success or NULL on failure

void gpiv_error ( gchar *  message,
  ... 
)

Prints error handling with variable argumanent list to stdout and exits program

Parameters:
[in] message warning message
Returns:
void

gboolean gpiv_fscan_iph_nl ( FILE *  fp_h,
const gchar *  MOD_KEY,
const gchar *  PAR_KEY,
const gboolean  use_mod_key,
gchar *  line,
const gchar *  par_name,
gint *  parameter,
const gboolean  verbose,
FILE *  fp 
)

Scans line string on **integer** parameter key and value or image header value (without program key). The value to be read is on the next line (_nl) of the key.

Parameters:
[in] fp_h file pointer of header to read the data from
[in] MOD_KEY Module key as part of parameter key
[in] PAR_KEY parameter key
[in] use_mod_key flag to use program key
[in] line line to be scanned
[in] par_name parameter name which is scanned in line
[out] parameter parameter value to be returned
[in] verbose flag to print prarameter to stdout
[in] fp file pointer to print parameter to
Returns:
flag representing parameter__set. Set to TRUE if parameter has been read, else FALSE

long gpiv_lmax ( long  a,
long  b 
)

Calculates maximum of longs a and b

Parameters:
[in] a first variable to be tested
[in] b second variable to be tested
Returns:
result of maximum

long gpiv_lmin ( long  a,
long  b 
)

Calculates minimum of longs a and b

Parameters:
[in] a first variable to be tested
[in] b second variable to be tested
Returns:
result of minimum

gint gpiv_max ( gint  a,
gint  b 
)

Calculates maximum of integers a and b

Parameters:
[in] a first variable to be tested
[in] b second variable to be tested
Returns:
result of maximum

gint gpiv_min ( gint  a,
gint  b 
)

Calculates minimum of integers a and b

Parameters:
[in] a first variable to be tested
[in] b second variable to be tested
Returns:
result of minimum

gboolean gpiv_scan_cph ( const gchar *  MOD_KEY,
const gchar *  PAR_KEY,
const gboolean  use_mod_key,
const gchar *  line,
const gchar *  par_name,
gchar *  parameter,
const gboolean  verbose,
FILE *  fp 
)

Scans line string on **char** parameter key and value or image header value (without program key). Prints result to file.

Parameters:
[in] MOD_KEY module key as part of parameter key
[in] PAR_KEY parameter key
[in] use_mod_key flag to use module key
[in] line line to be scanned
[in] par_name parameter name which is scanned in line
[out] parameter parameter value to be returned
[in] verbose flag to print prarameter to stdout
[in] fp file pointer to print parameter to
Returns:
flag representing parameter__set. Set to TRUE if parameter has been read, else FALSE

gboolean gpiv_scan_fph ( const gchar *  MOD_KEY,
const gchar *  PAR_KEY,
const gboolean  use_mod_key,
const gchar *  line,
const gchar *  par_name,
gfloat *  parameter,
const gboolean  verbose,
FILE *  fp 
)

Scans line string on **gfloat** parameter/header key and value or image header value (without program key). Prints result to file.

Parameters:
[in] MOD_KEY module key as part of parameter key
[in] PAR_KEY parameter key
[in] use_mod_key flag to use module key
[in] line line to be scanned
[in] par_name parameter name which is scanned in line
[out] parameter parameter value to be returned
[in] verbose flag to print prarameter to stdout
[in] fp file pointer to print parameter to
Returns:
flag representing parameter__set. Set to TRUE if parameter has been read, else FALSE

gboolean gpiv_scan_iph ( const gchar *  MOD_KEY,
const gchar *  PAR_KEY,
const gboolean  use_mod_key,
const gchar *  line,
const gchar *  par_name,
gint *  parameter,
const gboolean  verbose,
FILE *  fp 
)

Scans line string on **int** parameter key and value or image header value (without program key). Prints result to file.

Parameters:
[in] MOD_KEY module key as part of parameter key
[in] PAR_KEY parameter key
[in] use_mod_key flag to use module key
[in] line line to be scanned
[in] par_name parameter name which is scanned in line
[out] parameter parameter value to be returned
[in] verbose flag to print prarameter to stdout
[in] fp file pointer to print parameter to
Returns:
flag representing parameter__set. Set to TRUE if parameter has been read, else FALSE

void gpiv_scan_parameter ( const gchar *  PAR_KEY,
const gchar *  parfile,
void *  pstruct,
gboolean  verbose 
)

Reads parameters from local parameter file PARFILE

Parameters:
[in] PAR_KEY Parameter key, specific for each process
[in] parfile Parameter file, specific for each process
[in] verbose flag for printing parameters
[out] pstruct pointer to parameter structure
Returns:
void

gchar* gpiv_scan_resourcefiles ( const gchar *  PAR_KEY,
void *  pstruct,
gint  verbose 
)

Opens resource files GPIV_HOME_RSC_FILE (hidden) and SYSTEM_RSC_DIR, GPIV_SYSTEM_RSC_FILE Reads parameters from it

Parameters:
[in] PAR_KEY Parameter key, specific for each process
[in] verbose parameter to print to stdout
[out] pstruct pointer to parameter structure
Returns:
NULL on success or error message on failure

gboolean gpiv_scan_sph ( const gchar *  MOD_KEY,
const gchar *  PAR_KEY,
const gboolean  use_mod_key,
const gchar *  line,
const gchar *  par_name,
gchar *  parameter,
const gboolean  verbose,
FILE *  fp 
)

Scans line string on **string** parameter key and value or image header value (without program key). Prints result to file.

Parameters:
[in] MOD_KEY module key as part of parameter key
[in] PAR_KEY parameter key
[in] use_mod_key flag to use module key
[in] line line to be scanned
[in] par_name parameter name which is scanned in line
[out] parameter parameter value to be returned
[in] verbose flag to print prarameter to stdout
[in] fp file pointer to print parameter to
Returns:
flag representing parameter__set. Set to TRUE if parameter has been read, else FALSE

gchar* gpiv_sort_3 ( const unsigned long  n,
gfloat  arr[],
gfloat  arr_2[],
gfloat  arr_3[] 
)

Orders array arr AND its belonging arrays arr_2 and arr_3 Also swaps accompanying arrays

Parameters:
[in] n length of array
[in] arr array to be sorted
[in] arr_2 second belonging array to arr
[in] arr_3 third belonging array to arr
Returns:
NULL on success or error message on failure

void gpiv_warning ( gchar *  message,
  ... 
)

Prints warning message with variable argumanent list

Parameters:
[in] message warning message
Returns:
void


Generated on Tue Nov 20 19:46:20 2007 for Libgpiv by doxygen 1.5.1