commit dcdae2cc3ae7b53c12306adfce0a8fb704975711
parent 091d16144690a7ce112a6d51bc15c2fbe62f57df
Author: Frederic Cambus <fred@statdns.com>
Date: Tue, 22 Sep 2020 23:04:02 +0200
Define CR, LF, TAB, SUB, and ESC macros only once.
Diffstat:
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/config.h b/src/config.h
@@ -15,6 +15,12 @@
#include <stdint.h>
+#define LF '\n'
+#define CR '\r'
+#define TAB '\t'
+#define SUB 26
+#define ESC 27
+
static const uint8_t ansi_palette_red[] = {
0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa, 0x00, 0xaa,
0x55, 0xff, 0x55, 0xff, 0x55, 0xff, 0x55, 0xff
diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c
@@ -30,12 +30,6 @@
#define ANSI_SEQUENCE_MAX_LENGTH 14
#define ANSI_BUFFER_SIZE 65536
-#define LF '\n'
-#define CR '\r'
-#define TAB '\t'
-#define SUB 26
-#define ESC 27
-
/* Character structure */
struct ansiChar {
int32_t column;
diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c
@@ -20,10 +20,6 @@
#include "fonts.h"
#include "output.h"
-#define LF '\n'
-#define CR '\r'
-#define TAB '\t'
-#define SUB 26
/* Character structure */
struct pcbChar {