blob: 6eef75e42bb476905888ae4dcb6eb5e0a9207875 (
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
57
58
|
/*@@
@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 = "$Header$";
CCTK_FILEVERSION(main_ProcessParameterDatabase_c)
int ParseFile(FILE *ifp,
int (*set_function)(const char *, const char *));
/*@@
@routine CCTKi_ProcessParameterDatabase
@date Thu Sep 24 10:37:07 1998
@author Tom Goodale
@desc
@enddesc
@calls
@calledby
@history
@endhistory
@@*/
int CCTKi_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;
}
|