Truxton options create

From truxwiki.com
Revision as of 04:27, 27 July 2020 by Sam (talk | contribs) (Created page with "This creates an options object. This is how you get configuration settings from Truxton. =Syntax= <syntaxhighlight lang="C"> uint64_t truxton_options_create(void); </syntaxhi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This creates an options object. This is how you get configuration settings from Truxton.

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);
}