#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "libdshconfig.h"
#include "config.h"
Defines | |
#define | _GNU_SOURCE |
Functions | |
static void * | rpl_malloc (size_t n) |
A GNU-compatible malloc, Code to work with autoconf AC_FUNC_MALLOC. | |
const char * | dshconfig_searchdata (const dshconfig *d, const char *index) |
Function to search member. | |
dshconfig_internal * | dshconfig_splitline (const char *original, char delimiter) |
The function used to split a line. | |
static dshconfig_internal * | read_oneline (FILE *f, int delimiter) |
The ugly function to do the config file reading. | |
dshconfig * | open_dshconfig (FILE *file, char delimiter) |
reads a dsh config file, and load it up in memory | |
void | free_dshconfig_internal (dshconfig_internal *i) |
Frees up memory for dshconfig_internal. | |
void | free_dshconfig (dshconfig *d) |
Frees up memory allocated by open_dshconfig. |
#define _GNU_SOURCE |
const char* dshconfig_searchdata | ( | const dshconfig * | d, | |
const char * | index | |||
) |
Function to search member.
dshconfig_internal* dshconfig_splitline | ( | const char * | original, | |
char | delimiter | |||
) |
The function used to split a line.
void free_dshconfig | ( | dshconfig * | d | ) |
Frees up memory allocated by open_dshconfig.
void free_dshconfig_internal | ( | dshconfig_internal * | i | ) |
Frees up memory for dshconfig_internal.
It is allocated by dshconfig_splitline.
soname 1 adds this feature
dshconfig* open_dshconfig | ( | FILE * | file, | |
char | delimiter | |||
) |
reads a dsh config file, and load it up in memory
static dshconfig_internal* read_oneline | ( | FILE * | f, | |
int | delimiter | |||
) | [static] |
The ugly function to do the config file reading.
It will read one non-commentline and return to the caller.
Return value of NULL indicates termination and/or error.
static void * rpl_malloc | ( | size_t | n | ) | [static] |
A GNU-compatible malloc, Code to work with autoconf AC_FUNC_MALLOC.