[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2-demos] master 0e55395: * graph/x11/grx11.[ch]: Header clean-u
From: |
Alexei Podtelezhnikov |
Subject: |
[freetype2-demos] master 0e55395: * graph/x11/grx11.[ch]: Header clean-up. |
Date: |
Fri, 23 Oct 2020 11:29:26 -0400 (EDT) |
branch: master
commit 0e55395d63d7a54bf06aeacd867cb232872fc98e
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>
* graph/x11/grx11.[ch]: Header clean-up.
---
ChangeLog | 4 ++++
graph/x11/grx11.c | 30 +++++++-----------------------
graph/x11/grx11.h | 13 +++++++++++--
3 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 377d7be..5822149 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2020-10-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+ * graph/x11/grx11.[ch]: Header clean-up.
+
+2020-10-23 Alexei Podtelezhnikov <apodtele@gmail.com>
+
* graph/grobjs.c (grNewBitmap): Add padding to 15/16-bit bitmaps.
2020-10-23 Alexei Podtelezhnikov <apodtele@gmail.com>
diff --git a/graph/x11/grx11.c b/graph/x11/grx11.c
index 140198b..7aa3afc 100644
--- a/graph/x11/grx11.c
+++ b/graph/x11/grx11.c
@@ -20,26 +20,9 @@
#include <vms_x_fix.h>
#endif
-#define xxTEST
-
-#ifdef TEST
-#include <ctype.h>
-#define LOG(x) printf x
-#define visualClass(x) ( x == StaticGray ? "StaticGray" : \
- x == GrayScale ? "GrayScale" : \
- x == StaticColor ? "StaticColor" : \
- x == PseudoColor ? "PseudoColor" : \
- x == TrueColor ? "TrueColor" : \
- x == DirectColor ? "DirectColor" : "unknown" )
-#define grAlloc malloc
-#else
-#define LOG(x) /* nothing */
-#endif
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/types.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -47,15 +30,16 @@
#include <X11/cursorfont.h>
#include <X11/keysym.h>
-#include "grobjs.h"
-#include "grdevice.h"
#include "grx11.h"
+#define xxTEST
-#if defined( __cplusplus ) || defined( c_plusplus )
-#define Class c_class
+#ifdef TEST
+#include <ctype.h>
+#define LOG(x) printf x
+#define grAlloc malloc
#else
-#define Class class
+#define LOG(x) /* nothing */
#endif
@@ -954,7 +938,7 @@
LOG(( ", colors %3d, bits %2d, %s\n",
visual->colormap_size,
visual->bits_per_rgb,
- visualClass( visual->Class ) ));
+ visualClass( visual ) ));
x11dev.format = *pformat;
x11dev.visual = visual->visual;
diff --git a/graph/x11/grx11.h b/graph/x11/grx11.h
index cc6292d..abb779f 100644
--- a/graph/x11/grx11.h
+++ b/graph/x11/grx11.h
@@ -19,8 +19,17 @@
#ifndef GRX11_H_
#define GRX11_H_
-#ifdef __cplusplus
-#define class c_class
+#define visualClass(x) ( x->Class == StaticGray ? "StaticGray" : \
+ x->Class == GrayScale ? "GrayScale" : \
+ x->Class == StaticColor ? "StaticColor" : \
+ x->Class == PseudoColor ? "PseudoColor" : \
+ x->Class == TrueColor ? "TrueColor" : \
+ x->Class == DirectColor ? "DirectColor" : "unknown" )
+
+#if defined( __cplusplus ) || defined( c_plusplus )
+#define Class c_class
+#else
+#define Class class
#endif
#include "grobjs.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2-demos] master 0e55395: * graph/x11/grx11.[ch]: Header clean-up.,
Alexei Podtelezhnikov <=