freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 9d0b76d 4/5: Don't use macro names that start with `_


From: Werner LEMBERG
Subject: [freetype2] master 9d0b76d 4/5: Don't use macro names that start with `_[A-Z]' [2/3].
Date: Tue, 12 Jan 2016 21:28:57 +0000

branch: master
commit 9d0b76d7f6e87b68ee739688be693f28094b23bf
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Don't use macro names that start with `_[A-Z]' [2/3].
    
    Such macro names are reserved for both C and C++.
    
    * include/freetype/ftimage.h, src/raster/ftraster.c,
    src/smooth/ftgrays.c, src/smooth/ftgrays.h:
    s/_STANDALONE_/STANDALONE_/.
---
 ChangeLog                  |   10 ++++++++++
 include/freetype/ftimage.h |    4 ++--
 src/raster/ftraster.c      |   24 ++++++++++++------------
 src/raster/ftraster.h      |    2 +-
 src/smooth/ftgrays.c       |   22 +++++++++++-----------
 src/smooth/ftgrays.h       |    2 +-
 6 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5a18cb3..768bb74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2016-01-12  Werner Lemberg  <address@hidden>
 
+       Don't use macro names that start with `_[A-Z]' [2/3].
+
+       Such macro names are reserved for both C and C++.
+
+       * include/freetype/ftimage.h, src/raster/ftraster.c,
+       src/smooth/ftgrays.c, src/smooth/ftgrays.h:
+       s/_STANDALONE_/STANDALONE_/.
+
+2016-01-12  Werner Lemberg  <address@hidden>
+
        Don't use macro names that start with `_[A-Z]' [1/3].
 
        Such macro names are reserved for both C and C++.
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index 5adae8e..7523cd9 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -28,8 +28,8 @@
 #define FTIMAGE_H_
 
 
-  /* _STANDALONE_ is from ftgrays.c */
-#ifndef _STANDALONE_
+  /* STANDALONE_ is from ftgrays.c */
+#ifndef STANDALONE_
 #include <ft2build.h>
 #endif
 
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index e4bab98..047476c 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -18,7 +18,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* This file can be compiled without the rest of the FreeType engine, by */
-  /* defining the _STANDALONE_ macro when compiling it.  You also need to  */
+  /* defining the STANDALONE_ macro when compiling it.  You also need to   */
   /* put the files `ftimage.h' and `ftmisc.h' into the $(incdir)           */
   /* directory.  Typically, you should do something like                   */
   /*                                                                       */
@@ -27,9 +27,9 @@
   /* - copy `include/freetype/ftimage.h' and `src/raster/ftmisc.h' to your */
   /*   current directory                                                   */
   /*                                                                       */
-  /* - compile `ftraster' with the _STANDALONE_ macro defined, as in       */
+  /* - compile `ftraster' with the STANDALONE_ macro defined, as in        */
   /*                                                                       */
-  /*     cc -c -D_STANDALONE_ ftraster.c                                   */
+  /*     cc -c -DSTANDALONE_ ftraster.c                                    */
   /*                                                                       */
   /* The renderer can be initialized with a call to                        */
   /* `ft_standard_raster.raster_new'; a bitmap can be generated            */
@@ -47,7 +47,7 @@
   /*                                                                       */
   /*************************************************************************/
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 
   /* The size in bytes of the render pool used by the scan-line converter  */
   /* to do all of its work.                                                */
@@ -60,7 +60,7 @@
 #include "ftmisc.h"
 #include "ftimage.h"
 
-#else /* !_STANDALONE_ */
+#else /* !STANDALONE_ */
 
 #include <ft2build.h>
 #include "ftraster.h"
@@ -68,7 +68,7 @@
 
 #include "rastpic.h"
 
-#endif /* !_STANDALONE_ */
+#endif /* !STANDALONE_ */
 
 
   /*************************************************************************/
@@ -173,7 +173,7 @@
 #define FT_COMPONENT  trace_raster
 
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 
   /* Auxiliary macros for token concatenation. */
 #define FT_ERR_XCAT( x, y )  x ## y
@@ -226,7 +226,7 @@
             raster_done_                                            \
          };
 
-#else /* !_STANDALONE_ */
+#else /* !STANDALONE_ */
 
 
 #include FT_INTERNAL_OBJECTS_H
@@ -242,7 +242,7 @@
 #define Raster_Err_Unsupported  Raster_Err_Cannot_Render_Glyph
 
 
-#endif /* !_STANDALONE_ */
+#endif /* !STANDALONE_ */
 
 
 #ifndef FT_MEM_SET
@@ -3041,7 +3041,7 @@
   /****                         a static object.                  *****/
 
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 
 
   static int
@@ -3068,7 +3068,7 @@
   }
 
 
-#else /* !_STANDALONE_ */
+#else /* !STANDALONE_ */
 
 
   static int
@@ -3102,7 +3102,7 @@
   }
 
 
-#endif /* !_STANDALONE_ */
+#endif /* !STANDALONE_ */
 
 
   static void
diff --git a/src/raster/ftraster.h b/src/raster/ftraster.h
index 3c0888e..e0452f1 100644
--- a/src/raster/ftraster.h
+++ b/src/raster/ftraster.h
@@ -33,7 +33,7 @@ FT_BEGIN_HEADER
   /* Uncomment the following line if you are using ftraster.c as a         */
   /* standalone module, fully independent of FreeType.                     */
   /*                                                                       */
-/* #define _STANDALONE_ */
+/* #define STANDALONE_ */
 
   FT_EXPORT_VAR( const FT_Raster_Funcs )  ft_standard_raster;
 
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 9a43c07..ce57b67 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -18,7 +18,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* This file can be compiled without the rest of the FreeType engine, by */
-  /* defining the _STANDALONE_ macro when compiling it.  You also need to  */
+  /* defining the STANDALONE_ macro when compiling it.  You also need to   */
   /* put the files `ftgrays.h' and `ftimage.h' into the current            */
   /* compilation directory.  Typically, you could do something like        */
   /*                                                                       */
@@ -27,9 +27,9 @@
   /* - copy `include/freetype/ftimage.h' and `src/smooth/ftgrays.h' to the */
   /*   same directory                                                      */
   /*                                                                       */
-  /* - compile `ftgrays' with the _STANDALONE_ macro defined, as in        */
+  /* - compile `ftgrays' with the STANDALONE_ macro defined, as in         */
   /*                                                                       */
-  /*     cc -c -D_STANDALONE_ ftgrays.c                                    */
+  /*     cc -c -DSTANDALONE_ ftgrays.c                                     */
   /*                                                                       */
   /* The renderer can be initialized with a call to                        */
   /* `ft_gray_raster.raster_new'; an anti-aliased bitmap can be generated  */
@@ -91,7 +91,7 @@
 #define FT_COMPONENT  trace_smooth
 
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 
 
   /* The size in bytes of the render pool used by the scan-line converter  */
@@ -256,7 +256,7 @@ typedef ptrdiff_t  FT_PtrDist;
          };
 
 
-#else /* !_STANDALONE_ */
+#else /* !STANDALONE_ */
 
 
 #include <ft2build.h>
@@ -274,7 +274,7 @@ typedef ptrdiff_t  FT_PtrDist;
 #define ErrRaster_Memory_Overflow   Smooth_Err_Out_Of_Memory
 
 
-#endif /* !_STANDALONE_ */
+#endif /* !STANDALONE_ */
 
 
 #ifndef FT_MEM_SET
@@ -1601,7 +1601,7 @@ typedef ptrdiff_t  FT_PtrDist;
   }
 
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 
   /*************************************************************************/
   /*                                                                       */
@@ -1883,7 +1883,7 @@ typedef ptrdiff_t  FT_PtrDist;
     return FT_THROW( Invalid_Outline );
   }
 
-#endif /* _STANDALONE_ */
+#endif /* STANDALONE_ */
 
 
   typedef struct  gray_TBand_
@@ -2162,7 +2162,7 @@ typedef ptrdiff_t  FT_PtrDist;
   /**** RASTER OBJECT CREATION: In stand-alone mode, we simply use *****/
   /****                         a static object.                   *****/
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 
   static int
   gray_raster_new( void*       memory,
@@ -2187,7 +2187,7 @@ typedef ptrdiff_t  FT_PtrDist;
     FT_UNUSED( raster );
   }
 
-#else /* !_STANDALONE_ */
+#else /* !STANDALONE_ */
 
   static int
   gray_raster_new( FT_Memory   memory,
@@ -2217,7 +2217,7 @@ typedef ptrdiff_t  FT_PtrDist;
     FT_FREE( raster );
   }
 
-#endif /* !_STANDALONE_ */
+#endif /* !STANDALONE_ */
 
 
   static void
diff --git a/src/smooth/ftgrays.h b/src/smooth/ftgrays.h
index 8a9204b..83edbba 100644
--- a/src/smooth/ftgrays.h
+++ b/src/smooth/ftgrays.h
@@ -24,7 +24,7 @@
 #endif
 
 
-#ifdef _STANDALONE_
+#ifdef STANDALONE_
 #include "ftimage.h"
 #else
 #include <ft2build.h>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]