Nilorea Library
C utilities for networking, threading, graphics
n_config_file.c File Reference

common function More...

#include <stdio.h>
#include <errno.h>
#include "nilorea/n_common.h"
#include "nilorea/n_config_file.h"
#include "nilorea/n_pcre.h"
+ Include dependency graph for n_config_file.c:

Go to the source code of this file.

Functions

int destroy_config_file (CONFIG_FILE **cfg_file)
 Destroy a loaded config file. More...
 
void destroy_config_file_section (void *ptr)
 Destroy a config file section. More...
 
void free_no_null (void *ptr)
 local free for config entries More...
 
char * get_config_section_value (CONFIG_FILE *cfg_file, char *section_name, int section_position, char *entry, int entry_position)
 Function to parse sections and get entries values. More...
 
int get_nb_config_file_sections (CONFIG_FILE *cfg_file, char *section_name)
 Get the number of config file with section_name. More...
 
int get_nb_config_file_sections_entries (CONFIG_FILE *cfg_file, char *section_name, int section_position, char *entry)
 Get the number of config file with section_name. More...
 
CONFIG_FILEload_config_file (char *filename, int *errors)
 load a config file More...
 
int write_config_file (CONFIG_FILE *cfg_file, char *filename)
 write a config file More...
 

Detailed Description

common function

Author
Castagnier Mickael
Version
1.0
Date
24/03/05

Definition in file n_config_file.c.

Function Documentation

◆ destroy_config_file_section()

void destroy_config_file_section ( void *  ptr)

Destroy a config file section.

Parameters
ptrA pointer to a config file section

Definition at line 33 of file n_config_file.c.

References destroy_ht(), and Free.

Referenced by load_config_file().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_no_null()

void free_no_null ( void *  ptr)

local free for config entries

Parameters
ptrthe ptr to free

Definition at line 19 of file n_config_file.c.

Referenced by load_config_file().

+ Here is the caller graph for this function: