]> icculus.org git repositories - taylor/freespace2.git/blob - include/osregistry.h
make numlock not overlap with pause
[taylor/freespace2.git] / include / osregistry.h
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell 
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 #ifndef _FS2_REGISTRY_HEADER_FILE
10 #define _FS2_REGISTRY_HEADER_FILE
11
12 #include <stdlib.h>
13
14 // ------------------------------------------------------------------------------------------------------------
15 // REGISTRY DEFINES/VARS
16 //
17
18 // exectuable defines
19 extern char *Osreg_company_name;
20 extern char *Osreg_class_name;
21 extern char *Osreg_app_name;
22 extern char *Osreg_title;
23
24
25 // ------------------------------------------------------------------------------------------------------------
26 // REGISTRY FUNCTIONS
27 //
28
29
30 // initialize the registry. setup default keys to use
31 void os_init_registry_stuff(char *company, char *app, char *version);
32
33 // Removes a value from to the INI file.  Passing
34 // name=NULL will delete the section.
35 void os_config_remove( char *section, char *name );
36
37 // Writes a string to the registry
38 void os_config_write_string( char *section, char *name, char *value );
39
40 // same as previous function except we don't use the application name to build up the keyname
41 void os_config_write_string2( char *section, char *name, char *value );
42
43 // Writes an unsigned int to the INI file.  
44 void os_config_write_uint( char *section, char *name, unsigned int value );
45
46 // Reads a string from the INI file.  If default is passed,
47 // and the string isn't found, returns ptr to default otherwise
48 // returns NULL;    Copy the return value somewhere before
49 // calling os_read_string again, because it might reuse the
50 // same buffer.
51 char * os_config_read_string( char *section, char *name, char *default_value=NULL );
52
53 // same as previous function except we don't use the application name to build up the keyname
54 char * os_config_read_string2( char *section, char *name, char *default_value=NULL );
55
56 // Reads a string from the INI file.  Default_value must 
57 // be passed, and if 'name' isn't found, then returns default_value
58 unsigned int  os_config_read_uint( char *section, char *name, unsigned int default_value );
59
60 // uses Ex versions of Windows registry functions
61 char * os_config_read_string_ex( char *keyname, char *name, char *default_value );
62
63 #endif
64