My Project
Classes | Enumerations | Functions | Variables
options.h File Reference
#include <stdio.h>
#include <stdbool.h>

Go to the source code of this file.

Classes

struct  Options
 

Enumerations

enum  PlayType { EDAX_FIXED_LEVEL , EDAX_TIME_PER_GAME , EDAX_TIME_PER_MOVE }
 

Functions

void options_usage (void)
 Print options usage. More...
 
int options_read (const char *, const char *)
 Read an option. More...
 
void options_parse (const char *)
 parse options from a file More...
 
void options_bound (void)
 Keep options between realistic values. More...
 
void options_free (void)
 free allocated resources. More...
 
void options_dump (FILE *f)
 Print all global options. More...
 
void version (void)
 Print version & copyright. More...
 
void usage (void)
 Programme usage. More...
 

Variables

Options options
 

Detailed Description

Options reader.

Date
1998 - 2017
Author
Richard Delorme
Version
4.4

Options header.

Date
1998 - 2017
Author
Richard Delorme
Version
4.4

Enumeration Type Documentation

◆ PlayType

enum PlayType
Enumerator
EDAX_FIXED_LEVEL 
EDAX_TIME_PER_GAME 
EDAX_TIME_PER_MOVE 

Function Documentation

◆ options_bound()

void options_bound ( void  )

Keep options between realistic values.

◆ options_dump()

void options_dump ( FILE *  f)

Print all global options.

Parameters
foutput stream.

◆ options_free()

void options_free ( void  )

free allocated resources.

◆ options_parse()

void options_parse ( const char *  file)

parse options from a file

Parameters
fileOption file name.

◆ options_read()

int options_read ( const char *  option,
const char *  value 
)

Read an option.

Parameters
optionOption name.
valueOption value.
Returns
The number of arguments read (0, 1 or 2).

◆ options_usage()

void options_usage ( void  )

Print options usage.

◆ usage()

void usage ( void  )

Programme usage.

◆ version()

void version ( void  )

Print version & copyright.

Variable Documentation

◆ options

Options options
extern

global options with default value