logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

wofi - Config functions and documentation

Config Functions

       The following functions are used to work with configs.

       voidconfig_put(structmap*map,char*line)
              Parses a single config line and inserts the result into the map

              structmap*map - The map to insert into.

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

       voidconfig_load(structmap*map,constchar*config)
              Loads a config file into the given map

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

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

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

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

              constchar*key - The key to lookup.

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

       intconfig_get_mnemonic(structmap*config,constchar*key,char*def_opt,intnum_choices,...)
              Gets an enum value from the config. If the value is not set then it returns def_opt.

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

              constchar*key - The key to lookup.

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

              intnum_choices - The number of enum options available.

              varargs - The list of enum options available.

                                                                                                  wofi-config(3)

Description

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

Name

       wofi - Config functions and documentation

See Also