1get_config_string(3) Allegro manual get_config_string(3)
2
3
4
6 get_config_string - Retrieves a string from the configuration file.
7 Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 const char *get_config_string(const char *section, const char *name,
14 const char *def);
15
17 Retrieves a string variable from the current config file. The section
18 name may be set to NULL to read variables from the root of the file, or
19 used to control which set of parameters (eg. sound or joystick) you are
20 interested in reading. Example:
21
22 const char *lang = get_config_string("system", "language", "EN");
23
24
26 Returns a pointer to the constant string found in the configuration
27 file. If the named variable cannot be found, or its entry in the con‐
28 fig file is empty, the value of `def' is returned.
29
30
32 set_config_file(3), set_config_string(3), get_config_argv(3), get_con‐
33 fig_float(3), get_config_hex(3), get_config_int(3), get_config_id(3),
34 get_config_text(3), exconfig(3)
35
36
37
38Allegro version 4.4.3 get_config_string(3)