#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "segCommon.h"
#include "segStdLib.h"
#include "segConfig.h"
Functions | |
void | segFreeConfig (SEG_CONFIG *configData) |
Free memory space for a structure variable with configuration parameters. | |
int | segReadConfig (SEG_CONFIG **configData, char *cFile) |
Read a configuration file of the given file name. |
void segFreeConfig | ( | SEG_CONFIG * | configData | ) |
Free memory space for a structure variable with configuration parameters.
[in] | configData | Structure variable containing configuration parameters |
int segReadConfig | ( | SEG_CONFIG ** | configData, | |
char * | cFile | |||
) |
Read a configuration file of the given file name.
The function reads values of different parameters written in the configuration file.
[in,out] | configData | Structure variable containing configuration parameters |
[in] | cFile | Name of the configuration file |
ERROR_ALLOC | Memory allocation error | |
ERROR_FOPEN | Opening the configuration file failed | |
RTN_ERROR | Illegal configuration was found | |
otherwise | Number of configuration parameters loaded |