FS2_Open
Open source remastering of the Freespace 2 engine
osregistry.h
Go to the documentation of this file.
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 the
6  * source.
7  *
8 */
9 
10 #ifndef _FS2_REGISTRY_HEADER_FILE
11 #define _FS2_REGISTRY_HEADER_FILE
12 
13 
14 #include <stdlib.h>
15 
16 // ------------------------------------------------------------------------------------------------------------
17 // REGISTRY DEFINES/VARS
18 //
19 
20 // exectuable defines
21 extern const char *Osreg_company_name;
22 extern const char *Osreg_class_name;
23 extern const char *Osreg_app_name;
24 extern const char *Osreg_title;
25 #ifdef SCP_UNIX
26 extern const char *Osreg_user_dir;
27 #endif
28 
29 
30 // ------------------------------------------------------------------------------------------------------------
31 // REGISTRY FUNCTIONS
32 //
33 
34 
35 // initialize the registry. setup default keys to use
36 void os_init_registry_stuff( const char *company, const char *app, const char *version );
37 
38 // Writes a string to the registry
39 void os_config_write_string( const char *section, const char *name, const char *value );
40 
41 // Writes an unsigned int to the INI file.
42 void os_config_write_uint( const char *section, const char *name, unsigned int value );
43 
44 // Reads a string from the INI file. If default is passed,
45 // and the string isn't found, returns ptr to default otherwise
46 // returns NULL; Copy the return value somewhere before
47 // calling os_read_string again, because it might reuse the
48 // same buffer.
49 const char * os_config_read_string( const char *section, const char *name, const char *default_value=0 /*NULL*/ );
50 
51 // Reads a string from the INI file. Default_value must
52 // be passed, and if 'name' isn't found, then returns default_value
53 unsigned int os_config_read_uint( const char *section, const char *name, unsigned int default_value );
54 
55 #endif
56 
const char * Osreg_company_name
Definition: osregistry.cpp:28
GLsizei const GLfloat * value
Definition: Glext.h:5646
const char * Osreg_user_dir
unsigned int os_config_read_uint(const char *section, const char *name, unsigned int default_value)
Definition: osregistry.cpp:372
const char * Osreg_class_name
Definition: osregistry.cpp:29
const char * os_config_read_string(const char *section, const char *name, const char *default_value=0)
Definition: osregistry.cpp:322
const char * Osreg_app_name
Definition: osregistry.cpp:35
GLuint const GLchar * name
Definition: Glext.h:5608
void os_config_write_string(const char *section, const char *name, const char *value)
Definition: osregistry.cpp:221
void os_config_write_uint(const char *section, const char *name, unsigned int value)
Definition: osregistry.cpp:269
void os_init_registry_stuff(const char *company, const char *app, const char *version)
Definition: osregistry.cpp:423
const char * Osreg_title
Definition: osregistry.cpp:36