ttypedefs instead of #defines - st - [fork] customized build of st, the simple terminal
(HTM) git clone git://src.adamsgaard.dk/st
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit dc74c4f729a4350267f269c767aa6e377d8d4fbc
(DIR) parent b8d6171cb00c28e4c90e58e101554097003b59d3
(HTM) Author: noname@inventati.org <noname@inventati.org>
Date: Sat, 5 Apr 2014 20:54:01 +0400
ttypedefs instead of #defines
Replaced #defines with typedefs where possible, patch attached.
Diffstat:
M st.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/st.c b/st.c
t@@ -36,10 +36,6 @@ char *argv0;
#define Glyph Glyph_
#define Font Font_
-#define Draw XftDraw *
-#define Colour XftColor
-#define Colourmap Colormap
-#define Rectangle XRectangle
#if defined(__linux)
#include <pty.h>
t@@ -180,6 +176,10 @@ typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned short ushort;
+typedef XftDraw *Draw;
+typedef XftColor Colour;
+typedef Colormap Colourmap;
+
typedef struct {
char c[UTF_SIZ]; /* character code */
ushort mode; /* attribute flags */
t@@ -3110,7 +3110,7 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) {
FcCharSet *fccharset;
Colour *fg, *bg, *temp, revfg, revbg, truefg, truebg;
XRenderColor colfg, colbg;
- Rectangle r;
+ XRectangle r;
int oneatatime;
frcflags = FRC_NORMAL;