diff --git a/src/bmp.h b/src/bmp.h index d902baa..5644fab 100644 --- a/src/bmp.h +++ b/src/bmp.h @@ -1,3 +1,6 @@ +#ifndef BMP_H +#define BMP_H 1 + #ifdef __cplusplus extern "C" { #endif @@ -18,9 +21,6 @@ extern "C" { ---------------------------------------------------------------------------- */ -#ifndef BMP_H -#define BMP_H 1 - #define BMP_PALETTE_3 1 #define BMP_PALETTE_4 2 @@ -104,8 +104,8 @@ extern "C" { } bmp_info_t; -#endif - #ifdef __cplusplus } #endif + +#endif diff --git a/src/gd.h b/src/gd.h index 24d63a0..878eade 100644 --- a/src/gd.h +++ b/src/gd.h @@ -1,11 +1,11 @@ -#ifdef __cplusplus -extern "C" { -#endif +#ifndef GD_H +#define GD_H 1 #include -#ifndef GD_H -#define GD_H 1 +#ifdef __cplusplus +extern "C" { +#endif /* Version information. This gets parsed by build scripts as well as * gcc so each #define line in this group must also be splittable on @@ -94,11 +94,6 @@ extern "C" { #endif #endif -#ifdef __cplusplus - extern "C" - { -#endif - /* gd.h: declarations file for the graphic-draw module. * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided @@ -1634,16 +1629,11 @@ BGD_DECLARE(int) gdReleaseVersion(void); BGD_DECLARE(const char *) gdExtraVersion(void); BGD_DECLARE(const char *) gdVersionString(void); - -#ifdef __cplusplus -} -#endif - /* newfangled special effects */ #include "gdfx.h" -#endif /* GD_H */ - #ifdef __cplusplus } #endif + +#endif /* GD_H */ diff --git a/src/gd_io.h b/src/gd_io.h index 490b922..c7a5025 100644 --- a/src/gd_io.h +++ b/src/gd_io.h @@ -1,12 +1,12 @@ -#ifdef __cplusplus -extern "C" { -#endif - #ifndef GD_IO_H #define GD_IO_H 1 #include +#ifdef __cplusplus +extern "C" { +#endif + #ifdef VMS # define Putchar gdPutchar #endif @@ -93,8 +93,8 @@ int gdGetIntLSB(signed int *result, gdIOCtx *ctx); int gdSeek(gdIOCtx *ctx, const int offset); long gdTell(gdIOCtx *ctx); -#endif - #ifdef __cplusplus } #endif + +#endif diff --git a/src/gd_io_stream.h b/src/gd_io_stream.h index 7b2d06a..dd76d77 100644 --- a/src/gd_io_stream.h +++ b/src/gd_io_stream.h @@ -26,9 +26,9 @@ } gdImageDestroy(im_in); */ -#ifdef __cplusplus #ifndef _gd_io_stream_h #define _gd_io_stream_h +#ifdef __cplusplus #include "gd.h" #include @@ -121,5 +121,5 @@ inline gdIOCtx * gdNewOstreamCtx (std::ostream * __stream) return new ostreamIOCtx(* __stream); } -#endif /* _gd_io_stream_h */ #endif /* __cplusplus */ +#endif /* _gd_io_stream_h */ diff --git a/src/gdfx.h b/src/gdfx.h index dbd7498..b00f573 100644 --- a/src/gdfx.h +++ b/src/gdfx.h @@ -1,10 +1,10 @@ +#ifndef GDFX_H +#define GDFX_H 1 + #ifdef __cplusplus extern "C" { #endif -#ifndef GDFX_H -#define GDFX_H 1 - BGD_DECLARE(gdImagePtr) gdImageSquareToCircle(gdImagePtr im, int radius); BGD_DECLARE(char *) gdImageStringFTCircle( @@ -22,9 +22,8 @@ BGD_DECLARE(char *) gdImageStringFTCircle( BGD_DECLARE(void) gdImageSharpen (gdImagePtr im, int pct); -#endif /* GDFX_H */ - - #ifdef __cplusplus } #endif + +#endif /* GDFX_H */ diff --git a/src/gdhelpers.h b/src/gdhelpers.h index 2a96b8b..9c7ef10 100644 --- a/src/gdhelpers.h +++ b/src/gdhelpers.h @@ -1,10 +1,10 @@ +#ifndef GDHELPERS_H +#define GDHELPERS_H 1 + #ifdef __cplusplus extern "C" { #endif -#ifndef GDHELPERS_H -#define GDHELPERS_H 1 - /* sys/types.h is needed for size_t on Sparc-SunOS-4.1 */ #ifndef _WIN32_WCE #include @@ -69,8 +69,8 @@ extern "C" { #define DPI2DPCM(dpi) (unsigned int)((dpi)/2.54 + 0.5) #define DPI2DPM(dpi) (unsigned int)((dpi)/0.0254 + 0.5) -#endif /* GDHELPERS_H */ - #ifdef __cplusplus } #endif + +#endif /* GDHELPERS_H */ diff --git a/src/gdpp.h b/src/gdpp.h index 8720c5b..ca5e255 100644 --- a/src/gdpp.h +++ b/src/gdpp.h @@ -19,9 +19,9 @@ im.Gif(out); } */ -#ifdef __cplusplus #ifndef _gdpp_h #define _gdpp_h +#ifdef __cplusplus #ifdef HAVE_CONFIG_H #include "config.h" @@ -1541,5 +1541,5 @@ protected: /// Read in an image from a standard library input stream std::istream & operator>> (std::istream & in, GD::Image & img); -#endif /* _gdpp_h */ #endif /* __cplusplus */ +#endif /* _gdpp_h */ diff --git a/src/jisx0208.h b/src/jisx0208.h index d49dddc..118c23e 100644 --- a/src/jisx0208.h +++ b/src/jisx0208.h @@ -1,9 +1,9 @@ +#ifndef JISX0208_H +#define JISX0208_H #ifdef __cplusplus extern "C" { #endif -#ifndef JISX0208_H -#define JISX0208_H /* This file was derived from "src/VF_Ftype.c" in VFlib2-2.24.2 by Dr. Kakugawa */ @@ -1299,8 +1299,8 @@ extern "C" { } }; -#endif /* JISX0208_H */ - #ifdef __cplusplus } #endif + +#endif /* JISX0208_H */ diff --git a/src/wbmp.h b/src/wbmp.h index f163b4b..9a93d6e 100644 --- a/src/wbmp.h +++ b/src/wbmp.h @@ -1,7 +1,3 @@ -#ifdef __cplusplus -extern "C" { -#endif - /* WBMP * ---- * WBMP Level 0: B/W, Uncompressed @@ -16,6 +12,10 @@ extern "C" { #ifndef __WBMP_H #define __WBMP_H 1 +#ifdef __cplusplus +extern "C" { +#endif + /* WBMP struct * ----------- * A Wireless bitmap structure @@ -44,8 +44,8 @@ extern "C" { void freewbmp(Wbmp *wbmp); void printwbmp(Wbmp *wbmp); -#endif - #ifdef __cplusplus } #endif + +#endif