diff options
author | kraxel <kraxel> | 2004-06-08 08:36:57 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2004-06-08 08:36:57 +0000 |
commit | 3c6816cd0d4eb03edd3b2ee1474ce2fbcbf79c63 (patch) | |
tree | 049c97b8bc4c8cdbb77f0e0ed14860fe831a6b6d /fbiconfig.h | |
parent | 41ca47fd936acb3524c69e417c03a979b2c0adb3 (diff) | |
download | fbida-3c6816cd0d4eb03edd3b2ee1474ce2fbcbf79c63.tar.gz |
- fbi: add config file support to fbi
- fbi: misc fixes
Diffstat (limited to 'fbiconfig.h')
-rw-r--r-- | fbiconfig.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/fbiconfig.h b/fbiconfig.h index ff99e7e..7dcde2c 100644 --- a/fbiconfig.h +++ b/fbiconfig.h @@ -1,2 +1,65 @@ +#include "parseconfig.h" + +#define O_CMDLINE "cmdline", "options" +#define O_OPTIONS "config", "options" + +#define O_HELP O_CMDLINE, "help" +#define O_VERSION O_CMDLINE, "version" +#define O_WRITECONF O_CMDLINE, "writeconf" +#define O_FILE_LIST O_CMDLINE, "file-list" +#define O_TEXT_MODE O_CMDLINE, "text-mode" +#define O_AUTO_ZOOM O_CMDLINE, "auto-zoom" + +#define O_AUTO_UP O_OPTIONS, "auto-up" +#define O_AUTO_DOWN O_OPTIONS, "auto-down" +#define O_QUIET O_OPTIONS, "quiet" +#define O_VERBOSE O_OPTIONS, "verbose" +#define O_RANDOM O_OPTIONS, "random" +#define O_ONCE O_OPTIONS, "once" +#define O_COMMENTS O_OPTIONS, "comments" +#define O_EDIT O_OPTIONS, "edit" +#define O_BACKUP O_OPTIONS, "backup" +#define O_PRESERVE O_OPTIONS, "preserve" + +#define O_VT O_OPTIONS, "vt" +#define O_SCROLL O_OPTIONS, "scroll" +#define O_TIMEOUT O_OPTIONS, "timeout" +#define O_PCD_RES O_OPTIONS, "photocd-res" + +#define O_GAMMA O_OPTIONS, "gamma" + +#define O_DEVICE O_OPTIONS, "device" +#define O_FONT O_OPTIONS, "font" +#define O_VIDEO_MODE O_OPTIONS, "video-mode" + +#define GET_HELP() cfg_get_bool(O_HELP, 0) +#define GET_VERSION() cfg_get_bool(O_VERSION, 0) +#define GET_WRITECONF() cfg_get_bool(O_WRITECONF, 0) +#define GET_TEXT_MODE() cfg_get_bool(O_TEXT_MODE, 0) +#define GET_AUTO_ZOOM() cfg_get_bool(O_AUTO_ZOOM, 0) + +#define GET_AUTO_UP() cfg_get_bool(O_AUTO_UP, 0) +#define GET_AUTO_DOWN() cfg_get_bool(O_AUTO_DOWN, 0) +#define GET_QUIET() cfg_get_bool(O_QUIET, 0) +#define GET_VERBOSE() cfg_get_bool(O_VERBOSE, 1) +#define GET_RANDOM() cfg_get_bool(O_RANDOM, 0) +#define GET_ONCE() cfg_get_bool(O_ONCE, 0) +#define GET_COMMENTS() cfg_get_bool(O_COMMENTS, 0) +#define GET_EDIT() cfg_get_bool(O_EDIT, 0) +#define GET_BACKUP() cfg_get_bool(O_BACKUP, 0) +#define GET_PRESERVE() cfg_get_bool(O_PRESERVE, 0) + +#define GET_VT() cfg_get_int(O_VT, 0) +#define GET_SCROLL() cfg_get_int(O_SCROLL, 50) +#define GET_TIMEOUT() cfg_get_int(O_TIMEOUT, 0) +#define GET_PCD_RES() cfg_get_int(O_PCD_RES, 3) + +#define GET_GAMMA() cfg_get_float(O_GAMMA, 1) + +/* -------------------------------------------------------------------------- */ + +extern struct cfg_cmdline fbi_cmd[]; +extern struct cfg_cmdline fbi_cfg[]; void fbi_read_config(void); void fbi_write_config(void); + |