Main Page | Files | Data Structures | Functions | Global Variables |
gpiv-utils.h
Go to the documentation of this file.
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
2 /*
3  libgpiv - library for Particle Image Velocimetry
4 
5  Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Gerber van der Graaf
6 
7  This file is part of libgpiv.
8 
9  Libgpiv is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2, or (at your option)
12  any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software Foundation,
21  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 
24 
25 
26 -------------------------------------------------------------------------------
27 LIBRARY: libgpiv:
28 EXTERNAL FUNCTIONS:
29  gpiv_scan_parameter
30  gpiv_scan_resourcefiles
31  gpiv_add_datetime_to_comment
32  gpiv_sort_3,
33  gpiv_max,
34  gpiv_min,
35  gpiv_warning,
36  gpiv_error,
37  gpiv_fscan_iph_nl
38  gpiv_scan_iph,
39  gpiv_scan_cph,
40  gpiv_scan_sph,
41  --------------------------------------------------------------------------- */
51 #ifndef __LIBGPIV_UTILS_H__
52 #define __LIBGPIV_UTILS_H__
53 
54 #define GPIV_FAIL_INT -914
55 
65 void
66 gpiv_scan_parameter (const gchar *PAR_KEY,
67  const gchar *parfile,
68  void *pstruct,
69  gboolean verbose
70  );
71 
72 
73 
84 gchar *
85 gpiv_scan_resourcefiles (const gchar *PAR_KEY,
86  void *pstruct,
87  gint verbose
88  );
89 
90 
98 gchar *
99 gpiv_add_datetime_to_comment (gchar *comment
100  );
101 
102 
103 
114 gchar *
115 gpiv_sort_3 (const unsigned long n,
116  gfloat arr[],
117  gfloat arr_2[],
118  gfloat arr_3[]
119  );
120 
121 
129 long
130 gpiv_lmax (long a,
131  long b
132  );
133 
134 
135 
143 long
144 gpiv_lmin (long a,
145  long b
146  );
147 
148 
149 
157 gint
158 gpiv_max (gint a,
159  gint b
160  );
161 
162 
163 
171 gint
172 gpiv_min (gint a,
173  gint b
174  );
175 
176 
177 
184 void
185 gpiv_warning (gchar *message, ...
186  );
187 
188 
189 
197 void
198 gpiv_error (gchar *message, ...
199  );
200 
201 
202 
221 gboolean
222 gpiv_fscan_iph_nl (FILE *fp_h,
223  const gchar *MOD_KEY,
224  const gchar *PAR_KEY,
225  const gboolean use_mod_key,
226  gchar *line,
227  const gchar *par_name,
228  gint *parameter,
229  const gboolean verbose,
230  FILE *fp
231  );
232 
249 gboolean
250 gpiv_scan_iph (const gchar *MOD_KEY,
251  const gchar *PAR_KEY,
252  const gboolean use_mod_key,
253  const gchar *line,
254  const gchar *par_name,
255  gint *parameter,
256  const gboolean verbose,
257  FILE *fp
258  );
259 
260 
261 
278 gboolean
279 gpiv_scan_cph (const gchar *MOD_KEY,
280  const gchar *PAR_KEY,
281  const gboolean use_mod_key,
282  const gchar *line,
283  const gchar *par_name,
284  gchar *parameter,
285  const gboolean verbose,
286  FILE *fp
287  );
288 
289 
290 
307 gboolean
308 gpiv_scan_fph (const gchar *MOD_KEY,
309  const gchar *PAR_KEY,
310  const gboolean use_mod_key,
311  const gchar *line,
312  const gchar *par_name,
313  gfloat *parameter,
314  const gboolean verbose,
315  FILE *fp
316  );
317 
318 
319 
336 gboolean
337 gpiv_scan_sph (const gchar *MOD_KEY,
338  const gchar *PAR_KEY,
339  const gboolean use_mod_key,
340  const gchar *line,
341  const gchar *par_name,
342  gchar *parameter,
343  const gboolean verbose,
344  FILE *fp
345  );
346 
347 
348 
349 #endif /* __LIBGPIV_UTILS_H__ */
void gpiv_error(gchar *message,...)
Prints error handling with variable argumanent list to stdout and exits program.
long gpiv_lmin(long a, long b)
Calculates minimum of longs a and b.
long gpiv_lmax(long a, long b)
Calculates maximum of longs a and b.
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)...
gint gpiv_min(gint a, gint b)
Calculates minimum of integers a and b.
gint gpiv_max(gint a, gint b)
Calculates maximum of integers a and b.
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 param...
gchar * gpiv_add_datetime_to_comment(gchar *comment)
Adds date and timesatmp to the comment for ASCII-formatted data.
void gpiv_warning(gchar *message,...)
Prints warning message with variable argumanent list.
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)...
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...
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)...
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...
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)...
void gpiv_scan_parameter(const gchar *PAR_KEY, const gchar *parfile, void *pstruct, gboolean verbose)
Reads parameters from local parameter file PARFILE.

Generated for libgpiv-0.6.1 by doxygen 1.8.13