~ubuntu-branches/ubuntu/vivid/psicode/vivid

« back to all changes in this revision

Viewing changes to src/lib/libipv1/ip_data.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2008-06-07 16:49:57 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080607164957-8pifvb133yjlkagn
Tags: 3.3.0-3
* debian/rules (DEB_MAKE_CHECK_TARGET): Do not abort test suite on
  failures.
* debian/rules (DEB_CONFIGURE_EXTRA_FLAGS): Set ${bindir} to /usr/lib/psi.
* debian/rules (install/psi3): Move psi3 file to /usr/bin.
* debian/patches/07_464867_move_executables.dpatch: New patch, add
  /usr/lib/psi to the $PATH, so that the moved executables are found.
  (closes: #464867)
* debian/patches/00list: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Log: ip_data.c,v $
2
 
/* Revision 1.2.10.2  2005/01/29 17:39:38  evaleev
3
 
/* Replaced some K&R definitions.
4
 
/*
5
 
/* Revision 1.2.10.1  2003/11/23 19:17:39  crawdad
6
 
/* Minor fixes: (1) Corrected dependencies in doc/Make*.in; (2) Elimintated
7
 
/* warnings from gcc -Wall in several libipv1 routines and psi2molden.
8
 
/* -TDC
9
 
/*
10
 
/* Revision 1.2  2002/01/04 18:50:26  evaleev
11
 
/* Added ip_double_array to read in an array of floating point numbers.
12
 
/*
13
 
/* Revision 1.1.1.1  2000/02/04 22:53:26  evaleev
14
 
/* Started PSI 3 repository
15
 
/*
16
 
/* Revision 1.11  1995/11/27 15:32:53  sherrill
17
 
/* Make error handling of ip_int_array completely standardized.
18
 
/*
19
 
 * Revision 1.10  1995/11/09  14:31:08  sherrill
20
 
 * Patch up ip_int_array().
21
 
 *
22
 
 * Revision 1.9  1995/11/09  14:27:24  sherrill
23
 
 * Added routine ip_int_array().
24
 
 *
25
 
 * Revision 1.8  1995/01/16  23:03:49  cljanss
26
 
 * Minor changes so the SGI compiler won't complain.
27
 
 *
28
 
 * Revision 1.7  1994/08/09  22:33:57  crawdad
29
 
 * Added check for AIX before including globals.
30
 
 *
31
 
 * Revision 1.6  1994/08/04  17:33:24  dcrawfrd
32
 
 * Added vars for $(LEX) = lex or flex and $(LEXLIB) = -ll or -fl.  These are
33
 
 * necessary for portability.  This will have to be thoroughly tested for IBM'
34
 
 * AIX.
35
 
 *
36
 
 * Revision 1.5  1994/06/02  02:22:24  seidl
37
 
 * using new tmpl now...change .global to .gbl and .local to .lcl
38
 
 *
39
 
 * Revision 1.1.1.1  1994/05/02  17:05:52  cljanss
40
 
 * The May 1, 1994 version of psi as on the CCQC machines.
41
 
 *
42
 
 * Revision 1.4  1991/09/18  20:49:48  seidl
43
 
 * changes made for DEC
44
 
 *
45
 
 * Revision 1.3  1991/07/30  03:28:45  seidl
46
 
 * add rcs log and id
47
 
 * */
48
 
 
49
1
#include <stdio.h>
50
2
#include <stdlib.h>
51
3
#include <stdarg.h>
79
31
 
80
32
#include "ip_cwk.gbl"
81
33
 
82
 
GLOBAL_VA_FUNCTION int
83
 
ip_count(char* keyword, int* count, int n,...)
 
34
int ip_count(char *keyword, int *count, int n, ...)
84
35
{
85
36
  va_list args;
86
37
  int i;
104
55
    }
105
56
  }
106
57
 
107
 
GLOBAL_FUNCTION int
108
 
ip_count_v(keyword,count,n,v)
109
 
char *keyword;
110
 
int *count;
111
 
int n;
112
 
int *v;
 
58
int ip_count_v(char *keyword, int *count, int n, int *v)
113
59
{
114
60
  ip_value_t *val;
115
61
  int errcod;
122
68
  return IPE_OK;
123
69
  }
124
70
 
125
 
GLOBAL_VA_FUNCTION int
126
 
ip_boolean(char* keyword, int* boolean, int n,...)
 
71
int ip_boolean(char *keyword, int *boolean, int n, ...)
127
72
{
128
73
  va_list args;
129
74
  int i;
147
92
    }
148
93
  }
149
94
 
150
 
GLOBAL_FUNCTION int
151
 
ip_boolean_v(keyword,boolean,n,v)
152
 
char *keyword;
153
 
int *boolean;
154
 
int n;
155
 
int *v;
 
95
int ip_boolean_v(char *keyword, int *boolean, int n, int *v)
156
96
{
157
97
  ip_value_t *val;
158
98
  int errcod;
182
122
  }
183
123
 
184
124
/* n should always be zero in this version of libip. */
185
 
GLOBAL_VA_FUNCTION int
186
 
ip_exist(char* keyword, int n,...)
 
125
int ip_exist(char *keyword, int n, ...)
187
126
{
188
127
  va_list args;
189
128
  int i;
211
150
  }
212
151
 
213
152
/* n should always be zero in this version of libip. */
214
 
GLOBAL_FUNCTION int
215
 
ip_exist_v(keyword,n,v)
216
 
char *keyword;
217
 
int n;
218
 
int *v;
 
153
int ip_exist_v(char *keyword, int n, int *v)
219
154
{
220
155
  if (ip_cwk_descend_tree(keyword)) return 1;
221
156
 
222
157
  return 0;
223
158
  }
224
159
 
225
 
GLOBAL_VA_FUNCTION int
226
 
ip_data(char* keyword, char* conv, void* value, int n,...)
 
160
int ip_data(char *keyword, char *conv, void *value, int n, ...)
227
161
{
228
162
  va_list args;
229
163
  int i;
247
181
    }
248
182
  }
249
183
 
250
 
GLOBAL_FUNCTION int
251
 
ip_data_v(keyword,conv,value,n,v)
252
 
char *keyword;
253
 
char *conv;
254
 
VOID *value;
255
 
int n;
256
 
int *v;
 
184
int ip_data_v(char *keyword, char *conv, void *value, int n, int *v)
257
185
{
258
186
  ip_value_t *val;
259
187
  int errcod;
267
195
  return IPE_OK;
268
196
  }
269
197
 
270
 
GLOBAL_VA_FUNCTION int
271
 
ip_string(char* keyword, char** value, int n,...)
 
198
int ip_string(char *keyword, char **value, int n, ...)
272
199
{
273
200
  va_list args;
274
201
  int i;
292
219
    }
293
220
  }
294
221
 
295
 
GLOBAL_FUNCTION int
296
 
ip_string_v(keyword,value,n,v)
297
 
char *keyword;
298
 
char **value;
299
 
int n;
300
 
int *v;
 
222
int ip_string_v(char *keyword, char **value, int n, int *v)
301
223
{
302
224
  ip_value_t *val;
303
225
  int errcod;
312
234
  return IPE_OK;
313
235
  }
314
236
 
315
 
GLOBAL_VA_FUNCTION int
316
 
ip_value( char* keyword, ip_value_t** value, int n,...)
 
237
int ip_value(char *keyword, ip_value_t **value, int n, ...)
317
238
{
318
239
  va_list args;
319
240
  int i;
337
258
    }
338
259
  }
339
260
 
340
 
GLOBAL_FUNCTION int
341
 
ip_value_v(keyword,value,n,v)
342
 
char *keyword;
343
 
ip_value_t **value;
344
 
int n;
345
 
int *v;
 
261
int ip_value_v(char *keyword, ip_value_t **value, int n, int *v)
346
262
{
347
263
  int i;
348
264
  ip_value_t *val;
385
301
** Note: keyword should ordinarily be an uppercase string.
386
302
*/
387
303
 
388
 
GLOBAL_FUNCTION int
389
 
ip_int_array(keyword, arr, len)
390
 
char *keyword;
391
 
int *arr;
392
 
int len;
 
304
int ip_int_array(char *keyword, int *arr, int len)
393
305
{
394
306
  int i, errcod, cnt;
395
307
 
431
343
** Returns: IP Error code
432
344
*/
433
345
 
434
 
GLOBAL_FUNCTION int ip_double_array(keyword, arr, len)
435
 
char *keyword;
436
 
double *arr;
437
 
int len;
 
346
int ip_double_array(char *keyword, double *arr, int len)
438
347
{
439
348
  int i, errcod, cnt;
440
349