From: Michael D. Lowis Date: Thu, 10 Nov 2016 15:57:56 +0000 (-0500) Subject: minor cleanup X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bf987037a47052737c73f600f871231838627c7a;p=projs%2Ftide.git minor cleanup --- diff --git a/inc/X.h b/inc/X.h index 02c64af..8a49295 100644 --- a/inc/X.h +++ b/inc/X.h @@ -7,12 +7,12 @@ typedef enum { } MouseAct; typedef enum { - MOUSE_BTN_LEFT = 0, - MOUSE_BTN_MIDDLE, - MOUSE_BTN_RIGHT, - MOUSE_BTN_WHEELUP, - MOUSE_BTN_WHEELDOWN, - MOUSE_BTN_NONE + MOUSE_BTN_LEFT = 0, + MOUSE_BTN_MIDDLE, + MOUSE_BTN_RIGHT, + MOUSE_BTN_WHEELUP, + MOUSE_BTN_WHEELDOWN, + MOUSE_BTN_NONE } MouseBtn; typedef struct { diff --git a/inc/stdc.h b/inc/stdc.h index 3a12993..29b8947 100644 --- a/inc/stdc.h +++ b/inc/stdc.h @@ -46,12 +46,6 @@ typedef intptr_t intptr; *****************************************************************************/ void die(const char* msgfmt, ...); -//static char* estrdup(const char *s) { -// char* ns = (char*)emalloc(strlen(s) + 1); -// strcpy(ns,s); -// return ns; -//} - /* Option Parsing * * This following macros implement a simple POSIX-style option parsing strategy. diff --git a/inc/utf.h b/inc/utf.h index 465b8b4..82ad5a8 100644 --- a/inc/utf.h +++ b/inc/utf.h @@ -1,9 +1,11 @@ -#define UTF_MAX 6u /* maximum number of bytes that make up a rune */ -#define RUNE_SELF 0x80 /* byte values larger than this are *not* ascii */ -#define RUNE_ERR 0xFFFD /* rune value representing an error */ -#define RUNE_MAX 0x10FFFF /* Maximum decodable rune value */ -#define RUNE_EOF UINT32_MAX /* rune value representing end of file */ -#define RUNE_CRLF UINT32_MAX-1 /* rune value representing a \r\n sequence */ +enum { + UTF_MAX = 6u, /* maximum number of bytes that make up a rune */ + RUNE_SELF = 0x80, /* byte values larger than this are *not* ascii */ + RUNE_ERR = 0xFFFD, /* rune value representing an error */ + RUNE_MAX = 0x10FFFF, /* Maximum decodable rune value */ + RUNE_EOF = UINT32_MAX, /* rune value representing end of file */ + RUNE_CRLF = UINT32_MAX-1, /* rune value representing a \r\n sequence */ +}; /* Represents a unicode code point */ typedef uint32_t Rune;