GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
wofi-config(3) FreeBSD Library Functions Manual wofi-config(3)

wofi - Config functions and documentation

The functions documented here are used for manipulating maps that represent config entries. They are defined in config.h.

The following functions are used to work with configs.

void config_put(struct map* map, char* line)
Parses a single config line and inserts the result into the map

struct map* map - The map to insert into.

char* line - The config line to insert. Should be in the format of key=value.

void config_load(struct map* map, const char* config)
Loads a config file into the given map

struct map* map - The map to load the config into.

const char* config - The path to a config file. Should contain lines with the format of key=value.

char* config_get(struct map* config, const char* key, char* def_opt)
Gets a config entry, if the entry is not set then it returns def_opt.

struct map* config - The map to get the value from.

const char* key - The key to lookup.

char* def_opt - The default value to be returned if the key does not exist.

uint8_t config_get_mnemonic(struct map* config, const char* key, char* def_opt, uint8_t num_choices, ...)
Gets an enum value from the config. If the value is not set then it returns def_opt.

struct map* config - The map to get the value from.

const char* key - The key to lookup.

char* def_opt - The default value to be returned if the key does not exist.

uint8_t num_choices - The number of enum options available.

varargs - The list of enum options available.


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.