This is a set of functions which control the read-in of configuration data. 更多...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdbool.h>
#include <errno.h>
#include <ctype.h>
#include <limits.h>
#include "../include/var_struc.h"
函数 | |
static void | config_check (void) |
This function check whether the configuration data is reasonable and set the default. All configuration data is in tha array 'config[]'. 更多... | |
static int | config_read (FILE *fp) |
This function read the configuration data file, and store the configuration data in the array 'config[]'. 更多... | |
void | configurate (const char *add_in) |
This function controls configuration data reading and validation. 更多... | |
void | config_write (const char *add_out, const double *cpu_time, const char *name) |
This function write configuration data and program record into the file 'log.dat'. 更多... | |
This is a set of functions which control the read-in of configuration data.
在文件 config_handle.c 中定义.
|
static |
This function check whether the configuration data is reasonable and set the default. All configuration data is in tha array 'config[]'.
在文件 config_handle.c 第 39 行定义.
|
static |
This function read the configuration data file, and store the configuration data in the array 'config[]'.
[in] | fp | The pointer to the configuration data file. |
1 | Success to read in configuration data file. |
0 | Failure to read in configuration data file. |
在文件 config_handle.c 第 162 行定义.
void config_write | ( | const char * | add_out, |
const double * | cpu_time, | ||
const char * | name | ||
) |
This function write configuration data and program record into the file 'log.dat'.
The parameters in the log file refer to 'doc/config.csv'.
[in] | add_out | Address of the output data folder of the test example. |
[in] | cpu_time | Array of the CPU time recording. |
[in] | name | Name of the test example. |
在文件 config_handle.c 第 253 行定义.
void configurate | ( | const char * | add_in | ) |
This function controls configuration data reading and validation.
The parameters in the configuration data file refer to 'doc/config.csv'.
[in] | add_in | Adress of the initial data folder of the test example. |
在文件 config_handle.c 第 208 行定义.