mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
dump: Define DUMP_COLOR_MODE_NONE
This commit is contained in:
parent
773549180d
commit
9bc79e4ecf
@ -14,8 +14,9 @@
|
||||
* (The function names could be generated with the ## preprocessor
|
||||
* operator, but that would make grepping more difficult.)
|
||||
*
|
||||
* At most one of the following macros may be defined:
|
||||
* One of the following macros must be defined:
|
||||
*
|
||||
* - DUMP_COLOR_MODE_NONE
|
||||
* - DUMP_COLOR_MODE_16
|
||||
* - DUMP_COLOR_MODE_256
|
||||
* - DUMP_COLOR_MODE_TRUE
|
||||
|
@ -11,8 +11,9 @@
|
||||
* - DUMP_FUNCTION_SPECIALIZED: The name of the function that this
|
||||
* file should define.
|
||||
*
|
||||
* At most one of the following macros may be defined:
|
||||
* One of the following macros must be defined:
|
||||
*
|
||||
* - DUMP_COLOR_MODE_NONE
|
||||
* - DUMP_COLOR_MODE_16
|
||||
* - DUMP_COLOR_MODE_256
|
||||
* - DUMP_COLOR_MODE_TRUE
|
||||
@ -158,12 +159,12 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
|
||||
#endif /* !DUMP_CHARSET_UTF8 */
|
||||
}
|
||||
|
||||
#if defined(DUMP_COLOR_MODE_16) || defined(DUMP_COLOR_MODE_256) || defined(DUMP_COLOR_MODE_TRUE)
|
||||
#ifndef DUMP_COLOR_MODE_NONE
|
||||
for (;x < width; x++) {
|
||||
if (write_char(' ', out))
|
||||
return -1;
|
||||
}
|
||||
#endif /* DUMP_COLOR_MODE_16 || DUMP_COLOR_MODE_256 || DUMP_COLOR_MODE_TRUE */
|
||||
#endif /* !DUMP_COLOR_MODE_NONE */
|
||||
|
||||
/* Print end of line. */
|
||||
if (write_char('\n', out))
|
||||
|
@ -228,10 +228,12 @@ write_true_color(const unsigned char *str, const unsigned char *color,
|
||||
|
||||
#endif /* CONFIG_TRUE_COLOR */
|
||||
|
||||
#define DUMP_COLOR_MODE_NONE
|
||||
#define DUMP_FUNCTION_COLOR dump_nocolor
|
||||
#define DUMP_FUNCTION_UTF8 dump_nocolor_utf8
|
||||
#define DUMP_FUNCTION_UNIBYTE dump_nocolor_unibyte
|
||||
#include "dump-color-mode.h"
|
||||
#undef DUMP_COLOR_MODE_NONE
|
||||
#undef DUMP_FUNCTION_COLOR
|
||||
#undef DUMP_FUNCTION_UTF8
|
||||
#undef DUMP_FUNCTION_UNIBYTE
|
||||
|
Loading…
Reference in New Issue
Block a user