blob: 42327f6bca31076e6b0405f1e227f1e6c10df61a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*@@
@file ProcessParameterDatabase.c
@date Thu Sep 24 10:34:46 1998
@author Tom Goodale
@desc
Routines to determine the parameters and store them.
@enddesc
@@*/
#include <stdio.h>
#include "cctk_Flesh.h"
#include "ParameterData.h"
static char *rcsid = "$Id$";
int ParseFile(FILE *ifp,
int (*set_function)(const char *, const char *));
/*@@
@routine ProcessParameterDatabase
@date Thu Sep 24 10:37:07 1998
@author Tom Goodale
@desc
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int ProcessParameterDatabase(tFleshConfig *ConfigData)
{
int retval;
FILE *parameter_file;
if((parameter_file = fopen(ConfigData->parameter_file_name, "r")))
{
ParseFile(parameter_file, CCTKi_SetParameter);
fclose(parameter_file);
retval = 0;
}
else
{
fprintf(stderr, "Unable to open parameter file '%s'\n",
ConfigData->parameter_file_name);
retval = 1;
}
return 0;
}
|