From: Michael Göhler Date: Sat, 2 Apr 2016 21:46:51 +0000 (+0200) Subject: env vars documentation X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=commitdiff_plain;h=7a83ae3f48dc8ef279fb9168bd809048def70406 env vars documentation --- diff --git a/mdp.1 b/mdp.1 index ba7c24a..01523af 100644 --- a/mdp.1 +++ b/mdp.1 @@ -56,6 +56,26 @@ Display usage message and exit. .BR \-v ", " \-\^\-version Display version and license information. . +.SH ENVIRONMENT VARIABLES +.SS "Output Control" +.TP +.BR MDP_LIST_HEAD[1-3],\ MDP_LIST_OPEN[1-3] +Controls the list characters of unordered lists. + +The default is equivalent to: +.br +MDP_LIST_OPEN1=' | ' +.br +MDP_LIST_OPEN2=' | ' +.br +MDP_LIST_OPEN3=' | ' +.br +MDP_LIST_HEAD1=' +- ' +.br +MDP_LIST_HEAD2=' +- ' +.br +MDP_LIST_HEAD3=' +- ' +. .SH MARKDOWN FORMATTING For a complete list of supported markups, refer the sample presentation (sample.md) provided alongside diff --git a/src/viewer.c b/src/viewer.c index 2c4c8fa..89365bf 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -61,6 +61,18 @@ static short red_ramp_invert[24] = { 15, 231, 231, 224, 224, 225, 206, 207, 201, 200, 199, 199, 198, 198, 197, 197, 196, 196}; +// unordered list characters +// +// override via env vars: +// export MDP_LIST_OPEN1=" " MDP_LIST_OPEN2=" " MDP_LIST_OPEN3=" " +// export MDP_LIST_HEAD1=" ■ " MDP_LIST_HEAD2=" ● " MDP_LIST_HEAD3=" ▫ " +static const char *list_open1 = " | "; +static const char *list_open2 = " | "; +static const char *list_open3 = " | "; +static const char *list_head1 = " +- "; +static const char *list_head2 = " +- "; +static const char *list_head3 = " +- "; + int ncurses_display(deck_t *deck, int notrans, int nofade, int invert, int reload, int noreload, int slidenum) { int c = 0; // char @@ -517,27 +529,6 @@ int ncurses_display(deck_t *deck, int notrans, int nofade, int invert, int reloa return reload; } -static const char *list_open1 = " | "; -static const char *list_open2 = " | "; -static const char *list_open3 = " | "; -static const char *list_head1 = " +- "; -static const char *list_head2 = " +- "; -static const char *list_head3 = " +- "; -/* -export MDP_LIST_OPEN1=" " -export MDP_LIST_OPEN2=" " -export MDP_LIST_OPEN3=" " -export MDP_LIST_HEAD1=" ■ " -export MDP_LIST_HEAD2=" ▫ " -export MDP_LIST_HEAD3=" ● " - -export MDP_LIST_OPEN1=" │ " -export MDP_LIST_OPEN2=" │ " -export MDP_LIST_OPEN3=" │ " -export MDP_LIST_HEAD1=" ▇─ " -export MDP_LIST_HEAD2=" ▓─ " -export MDP_LIST_HEAD3=" ▒─ " -*/ void setup_list_strings(void) { const char *str;