$Revision: 1.9 $
Properties module (pr) - this _should_ eventually get merged in with the
Status: NOT REVUED, NOT TESTED
- Online References:
-
Instructions for use:
To get a property:
use the PR_get_property("Property.name") function from your other code.
Included Files
Preprocessor definitions
#define COMMENT_CHARACTER
#define MAX_PROPERTIES 1024
Each property has a
typedef struct _Property* Property
struct _Property |
|
{ |
|
char* token; | Token to be found in properties file.
|
char* value; | Value to be found in properties file.
|
} |
|
Array of Properties
Property Properties[1024]
The number of properties.
int Prop_count
The name of properties file.
char* Prop_file_name
Sets the properties file name. Then sets the properties with a call to set_properties().
More:
Authors:
ottrey
- Online References:
char* PR_get_property ( const char* token, const char* default_value )
Sets the properties file name. Then sets the properties with a call to set_properties().
More:
Authors:
ottrey
- Online References:
void PR_load ( const char* prop_file_name )
Sets the properties from the properties file.
More:
Authors:
ottrey
- Online References:
char* PR_set ( void )
Calls:
| add_property() | modules/pr/properties.c
|
| purge_properties() | modules/pr/properties.c
|
| fclose(), fgets(), fopen(), fprintf(), sprintf(), strcat(), strchr(), strcpy(), strlen(), strncpy(), strrchr(), wr_real_malloc()
|
Called by:
| PR_load() | modules/pr/properties.c
|
References Variables:
| Prop_count | modules/pr/properties.c
|
| Prop_file_name | modules/pr/properties.c
|
Returns the properties as a string.
More:
Authors:
ottrey
Pre-Conditions:
The properties must be loaded first with load_properties().
- Online References:
char* PR_to_string ( void )
Adds a new property to the Properties array.
More:
Authors:
ottrey
- Online References:
static void add_property ( const char* token, const char* value )
Purges the old properties.
More:
Authors:
ottrey
- Online References:
static void purge_properties ( void )