From: Sami Kerola Date: Sat, 27 Jun 2020 17:57:48 +0000 (+0100) Subject: col: use typedef and enum to clarify struct X-Git-Tag: v2.37-rc1~461^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c5a421e09f628e7bc1156f8324ed7140ddf4434;p=thirdparty%2Futil-linux.git col: use typedef and enum to clarify struct Signed-off-by: Sami Kerola --- diff --git a/text-utils/col.c b/text-utils/col.c index f286de809f..5a58d810e7 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -86,15 +86,16 @@ /* number of lines to allocate */ #define NALLOC 64 -typedef char CSET; +typedef enum { + CS_NORMAL, + CS_ALTERNATE +} CSET; typedef struct char_str { -#define CS_NORMAL 1 -#define CS_ALTERNATE 2 int c_column; /* column character is in */ - CSET c_set; /* character set (currently only 2) */ wchar_t c_char; /* character in question */ int c_width; /* character width */ + CSET c_set; /* character set (currently only 2) */ } CHAR; typedef struct line_str LINE;