Configuration and command line option processing unit. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <sys/ioctl.h>
#include "mcx_utils.h"
Functions | |
void | mcx_initcfg (Config *cfg) |
void | mcx_clearcfg (Config *cfg) |
void | mcx_savedata (float *dat, int len, Config *cfg) |
void | mcx_printlog (Config *cfg, char *str) |
void | mcx_normalize (float field[], float scale, int fieldlen) |
void | mcx_error (int id, char *msg) |
void | mcx_assert (int ret) |
void | mcx_readconfig (char *fname, Config *cfg) |
void | mcx_writeconfig (char *fname, Config *cfg) |
void | mcx_loadconfig (FILE *in, Config *cfg) |
void | mcx_saveconfig (FILE *out, Config *cfg) |
void | mcx_loadvolume (char *filename, Config *cfg) |
int | mcx_parsedebugopt (char *debugopt) |
void | mcx_progressbar (unsigned int n, unsigned int ntotal, Config *cfg) |
int | mcx_readarg (int argc, char *argv[], int id, void *output, char *type) |
int | mcx_remap (char *opt) |
void | mcx_parsecmd (int argc, char *argv[], Config *cfg) |
void | mcx_usage (char *exename) |
Variables | |
const char | shortopt [] |
const char * | fullopt [] |
const char * | debugflag = "MCBWDIOXATRP" |
Configuration and command line option processing unit.
const char* fullopt[] |
{"--help","--interactive","--input","--photon", "--thread","--blocksize","--session","--array", "--gategroup","--reflect","--reflect3","--debug","--savedet", "--repeat","--save2pt","--printlen","--minenergy", "--normalize","--skipradius","--log","--listgpu", "--printgpu","--root","--unitinmm","--continuity",""}
const char shortopt[] |
{'h','i','f','n','t','T','s','a','g','b','B','D', 'd','r','S','p','e','U','R','l','L','I','o','u','C','\0'}