1 /* 2 netrik -- The ANTRIK Internet Viewer 3 Copyright (C) Olaf D. Buddenhagen AKA antrik, et al (see AUTHORS) 4 Published under the GNU GPL; see LICENSE for details. 5 */ 6 /* 7 * cfg.h -- declare structure for storing configuration 8 * 9 * (C) 2001, 2002 Patrice Neff 10 * 2001, 2002, 2003 antrik 11 */ 12 13 #ifndef __cfg_h 14 #define __cfg_h 15 16 enum Parser_mode { 17 FUSSY_HTML, /* immediately quit on any errors or warnings */ 18 CLEAN_HTML, /* pause with warning message after parsing completes if any warnings or errors occured */ 19 VALID_HTML, /* pause only if errors occured (not on warnings) */ 20 BROKEN_HTML, /* pause only if severe errors occured for which we have no good workaround */ 21 IGNORE_BROKEN /* never pause */ 22 }; 23 24 /* struct to store config */ 25 /* also change cfg.c if you add a property */ 26 struct Config { 27 int force_colors; /* don't use terminals default colors for normal text */ 28 int term_width; /* use screen width from terminfo as output width */ 29 enum Parser_mode parser; /* behaviour on HTML errors */ 30 int debug; /* print debug messages */ 31 int warn_unknown; /* issue warnings when encountering unknown elements or attributes */ 32 int dump; /* dump whole page and exit */ 33 int wget; /* use wget to retrieve files via HTTP instead of builtin loader */ 34 int link_margin; /* number of lines at bottom&top of screen which can't have highlighted links */ 35 int anchor_offset; /* when jumping to anchors, scroll so that the anchor will appear at 1/anchor_offset below the screen top (if 0, show anchor at link_margin) */ 36 int cursor_keys; /* use arrow keys for cursor movement instead of navigation */ 37 char *anchor_mark; /* marker displayed at end of line(s) when activating anchor */ 38 int inverse_bold; /* terminal can't display bright background directly, only over reverse video */ 39 int bright_background; /* use color definitions for bright background */ 40 int color; /* try using colors */ 41 int proxy; /* use "http_proxy" or "HTTP_PROXY" environment variables */ 42 }; 43 extern struct Config cfg; 44 45 #endif 46