[hackers] [st] typedefs instead of #defines || noname_AT_inventati.org

From: <git_AT_suckless.org>
Date: Tue, 15 Apr 2014 08:14:58 +0200

commit dc74c4f729a4350267f269c767aa6e377d8d4fbc
Author: noname_AT_inventati.org <noname_AT_inventati.org>
Date: Sat Apr 5 20:54:01 2014 +0400

    typedefs instead of #defines
    
    Replaced #defines with typedefs where possible, patch attached.

diff --git a/st.c b/st.c
index 70caf82..df660ff 100644
--- a/st.c
+++ b/st.c
_AT_@ -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>
_AT_@ -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 */
_AT_@ -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;
Received on Tue Apr 15 2014 - 08:14:58 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 15 2014 - 08:24:23 CEST