MAOS
Multithreaded Adaptive Optics Simulator
|
Macros | |
#define | format2key |
Functions | |
void | open_config_prefix (const char *fn, const char *prefix, const char *prekey) |
void | open_config (const char *fn, int priority) |
void | close_config (const char *format,...) |
int | readcfg_peek (const char *format,...) |
int | readcfg_peek_n (const char *format,...) |
int | readcfg_peek_priority (const char *format,...) |
int | readcfg_peek_index (const char *format,...) |
void | readcfg_ignore (const char *format,...) |
char * | readcfg_str (const char *format,...) |
int | readcfg_int (const char *format,...) |
real | readcfg_dbl (const char *format,...) |
int | readcfg_strarr (char ***res, int len, int relax, const char *format,...) |
int | readcfg_intarr (int **ret, int len, int relax, const char *format,...) |
int | readcfg_dblarr (real **ret, int len, int relax, const char *format,...) |
dmat * | readstr_dmat (int n, int relax, const char *key, const char *str) |
dmat * | readcfg_dmat (int n, int relax, const char *format,...) |
lmat * | readcfg_lmat (int n, int relax, const char *format,...) |
dcell * | readcfg_dcell (const char *format,...) |
Routines to read .conf type config files. Each entry is composed of a key and a value. The entries are maintained in a hash table. Each entry can be retrieved from the key.
#define format2key |
void close_config | ( | const char * | format, |
... | |||
) |
Save all configs to file and check for unused config options.
int readcfg_peek | ( | const char * | format, |
... | |||
) |
Check whether a have a record of a key.
int readcfg_peek_n | ( | const char * | format, |
... | |||
) |
Check the size of an array input
int readcfg_peek_priority | ( | const char * | format, |
... | |||
) |
Return priority value of the record
int readcfg_peek_index | ( | const char * | format, |
... | |||
) |
Return index value of the record
void readcfg_ignore | ( | const char * | format, |
... | |||
) |
Ignore an entry and do not warn if it does not exist.
char* readcfg_str | ( | const char * | format, |
... | |||
) |
Obtain a string value from the key.
int readcfg_int | ( | const char * | format, |
... | |||
) |
Read integer
real readcfg_dbl | ( | const char * | format, |
... | |||
) |
Read real
int readcfg_strarr | ( | char *** | ret, |
int | len, | ||
int | relax, | ||
const char * | format, | ||
... | |||
) |
Read string array of len elements
int readcfg_intarr | ( | int ** | ret, |
int | len, | ||
int | relax, | ||
const char * | format, | ||
... | |||
) |
Read integer array of len elements
int readcfg_dblarr | ( | real ** | ret, |
int | len, | ||
int | relax, | ||
const char * | format, | ||
... | |||
) |
Read integer array of len elements
dmat* readstr_dmat | ( | int | n, |
int | relax, | ||
const char * | key, | ||
const char * | str | ||
) |
Read as a dmat. It can be a file name or an array.
[in] | n | Number of elements requested |
[in] | relax | 1: allow fewer values and fill the rest |
[in] | key | the key that needs the value. |
[in] | str | input |
dmat* readcfg_dmat | ( | int | n, |
int | relax, | ||
const char * | format, | ||
... | |||
) |
Read as a dmat. It can be a file name or an array.
lmat* readcfg_lmat | ( | int | n, |
int | relax, | ||
const char * | format, | ||
... | |||
) |
Read as an lmat.
dcell* readcfg_dcell | ( | const char * | format, |
... | |||
) |
Read dcell