[hackers] [st][PATCH 04/23] Move Glyph/Font workarounds closer to typedefs

From: Devin J. Pohly <djpohly_AT_gmail.com>
Date: Sun, 24 Sep 2017 16:11:26 -0500

---
 st.c | 3 ---
 st.h | 1 +
 x.c  | 4 +---
 3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/st.c b/st.c
index 825197c..c070f46 100644
--- a/st.c
+++ b/st.c
_AT_@ -28,9 +28,6 @@
 #include <X11/cursorfont.h>
 #include <X11/Xft/Xft.h>
 
-#define Glyph Glyph_
-#define Font Font_
-
 #include "st.h"
 #include "win.h"
 
diff --git a/st.h b/st.h
index 53d5009..ed7fa52 100644
--- a/st.h
+++ b/st.h
_AT_@ -94,6 +94,7 @@ typedef XftGlyphFontSpec GlyphFontSpec;
 
 typedef uint_least32_t Rune;
 
+#define Glyph Glyph_
 typedef struct {
 	Rune u;           /* character code */
 	ushort mode;      /* attribute flags */
diff --git a/x.c b/x.c
index 8aeb9c0..529cb48 100644
--- a/x.c
+++ b/x.c
_AT_@ -15,9 +15,6 @@
 #include <X11/Xft/Xft.h>
 #include <X11/XKBlib.h>
 
-#define Glyph Glyph_
-#define Font Font_
-
 static char *argv0;
 
 #include "arg.h"
_AT_@ -59,6 +56,7 @@ typedef struct {
 } XSelection;
 
 /* Font structure */
+#define Font Font_
 typedef struct {
 	int height;
 	int width;
-- 
2.14.1
Received on Sun Sep 24 2017 - 23:11:26 CEST

This archive was generated by hypermail 2.3.0 : Sun Sep 24 2017 - 23:24:41 CEST