File: osregistry.h

package info (click to toggle)
freespace2 3.7.4%2Brepack-1.1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye
  • size: 22,268 kB
  • sloc: cpp: 393,535; ansic: 4,106; makefile: 1,091; xml: 181; sh: 137
file content (56 lines) | stat: -rw-r--r-- 1,860 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * Copyright (C) Volition, Inc. 1999.  All rights reserved.
 *
 * All source code herein is the property of Volition, Inc. You may not sell 
 * or otherwise commercially exploit the source or things you created based on the 
 * source.
 *
*/

#ifndef _FS2_REGISTRY_HEADER_FILE
#define _FS2_REGISTRY_HEADER_FILE


#include <stdlib.h>

// ------------------------------------------------------------------------------------------------------------
// REGISTRY DEFINES/VARS
//

// exectuable defines
extern const char *Osreg_company_name;
extern const char *Osreg_class_name;
extern const char *Osreg_app_name;
extern const char *Osreg_title;
#ifdef SCP_UNIX
extern const char *Osreg_user_dir;
#endif


// ------------------------------------------------------------------------------------------------------------
// REGISTRY FUNCTIONS
//


// initialize the registry. setup default keys to use
void os_init_registry_stuff( const char *company, const char *app, const char *version );

// Writes a string to the registry
void os_config_write_string( const char *section, const char *name, const char *value );

// Writes an unsigned int to the INI file.  
void os_config_write_uint( const char *section, const char *name, unsigned int value );

// Reads a string from the INI file.  If default is passed,
// and the string isn't found, returns ptr to default otherwise
// returns NULL;    Copy the return value somewhere before
// calling os_read_string again, because it might reuse the
// same buffer.
const char * os_config_read_string( const char *section, const char *name, const char *default_value=0 /*NULL*/ );

// Reads a string from the INI file.  Default_value must 
// be passed, and if 'name' isn't found, then returns default_value
unsigned int  os_config_read_uint( const char *section, const char *name, unsigned int default_value );

#endif