Difference between revisions of "Truxton options create"
Jump to navigation
Jump to search
| Line 3: | Line 3: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
uint64_t truxton_options_create(void); | uint64_t truxton_options_create(void); | ||
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 14: | Line 14: | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="3"> |
void process_free(void) | void process_free(void) | ||
{ | { | ||
| Line 30: | Line 30: | ||
truxton_options_destroy(options); | truxton_options_destroy(options); | ||
} | } | ||
| − | </ | + | </source> |
Revision as of 11:02, 18 January 2021
This creates an options object. This is how you get configuration settings from Truxton's configuration system.
Contents
Syntax
uint64_t truxton_options_create(void);
Parameters
None.
Return value
A handle to an options object.
Sample
void process_free(void)
{
uint64_t options = truxton_options_create();
if ( truxton_options_get_boolean("pfree") == 1 )
{
printf( "Yes, we will process free space\n" );
}
else
{
printf( "No, we will not process free space\n" );
}
truxton_options_destroy(options);
}