Tuxánci 2
Successor to Tuxánci
 
Loading...
Searching...
No Matches
config.c File Reference

Writing and reading config files. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

Functions

void configInit (void)
 Init the config path.
 
void configDestroy (void)
 Clean up config stuff.
 
char * configRead (const char *entry)
 Read config file.
 
void configWrite (const char *entry, const char *data)
 Write to config file.
 
void configDefaults (void)
 Create default config.
 

Variables

char * configFile = NULL
 Config file path stored here.
 

Detailed Description

Writing and reading config files.

Function Documentation

◆ configRead()

char * configRead ( const char * entry)

Read config file.

Parameters
entryEntry to read from config file
Returns
Contents of the entry in the config file

◆ configWrite()

void configWrite ( const char * entry,
const char * data )

Write to config file.

Parameters
entryEntry to write to
dataWhat to put in the entry