diff --git a/ChangeLog b/ChangeLog index 5a18cb3b2..768bb743a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2016-01-12 Werner Lemberg + + 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 Don't use macro names that start with `_[A-Z]' [1/3]. diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 5adae8e49..7523cd93c 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 #endif diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index e4bab9872..047476ca5 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 #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 3c0888eba..e0452f1b7 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 9a43c0749..ce57b67f9 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 @@ -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 8a9204bc2..83edbbac0 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