OpenVAS Libraries  7.0.6
Macros | Functions
hash_table_file.c File Reference
#include <fcntl.h>
#include <unistd.h>
#include "system.h"
#include "hash_table_file.h"

Macros

#define GROUP_NONE   "GHashTableGKeyFile"
 Groupname placeholder. So far, no further order (like groups) is supported. More...
 

Functions

GHashTable * hash_table_file_read_text (const char *text, gsize length)
 Reads key/value pairs (strings) from a text into a GHashtable. More...
 

Detailed Description

Functions to create a GKeyFile from a GHashTable and vice versa. Both are assumed to contain strings only. Key-value pairs are 'flat', the structuring group- elements of an GKeyFile are not used. Instead, all pairs are written added to the group "GHashTableGKeyFile" (defined in GROUP_NONE).

Macro Definition Documentation

#define GROUP_NONE   "GHashTableGKeyFile"

Groupname placeholder. So far, no further order (like groups) is supported.

Function Documentation

GHashTable* hash_table_file_read_text ( const char *  text,
gsize  length 
)

Reads key/value pairs (strings) from a text into a GHashtable.

The text has to follow freedesktop.org specifications (e.g. be the text of a ini- file).

Parameters
textThe text to use.
lengthLenght of text.
Returns
A GHashTable, mirroring the text or NULL in case of an error.
See Also
GKeyFile