Anonymous avatar Anonymous committed 1b2f5c4

- sync to 2.0.24

Comments (0)

Files changed (8)

 
 #include "gd.h"
 
-   BGD_EXPORT  gdFontPtr gdFontTiny;
-   BGD_EXPORT  gdFontPtr gdFontGetTiny(void);
+   BGD_EXPORT_DATA_IMPL  gdFontPtr gdFontTiny;
+   BGD_DECLARE(gdFontPtr) gdFontGetTiny(void);
 
 #ifdef __cplusplus
 }
 /* number of antialised colors for indexed bitmaps */
 #define NUMCOLORS 8
 
-char *
-gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
 		  double ptsize, double angle, int x, int y, char *string)
 {
   /* 2.0.6: valid return */
 }
 
 #ifndef HAVE_LIBFREETYPE
-char *
-gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
 		   double ptsize, double angle, int x, int y, char *string,
 		   gdFTStringExtraPtr strex)
 {
   return "libgd was not built with FreeType font support\n";
 }
 
-char *
-gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
 		 double ptsize, double angle, int x, int y, char *string)
 {
   return "libgd was not built with FreeType font support\n";
 static gdCache_head_t *fontCache;
 static FT_Library library;
 
-void
-gdFreeFontCache ()
+BGD_DECLARE(void) gdFreeFontCache ()
 {
   gdFontCacheShutdown ();
 }
 
-void
-gdFontCacheShutdown ()
+BGD_DECLARE(void) gdFontCacheShutdown ()
 {
   if (fontCache)
     {
 /********************************************************************/
 /* gdImageStringFT -  render a utf8 string onto a gd image          */
 
-char *
-gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
 		 double ptsize, double angle, int x, int y, char *string)
 {
   return gdImageStringFTEx (im, brect, fg, fontlist,
 			    ptsize, angle, x, y, string, 0);
 }
 
-int
-gdFontCacheSetup (void)
+BGD_DECLARE(int) gdFontCacheSetup (void)
 {
   if (fontCache)
     {
 }
 
 
-char *
-gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
+BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
 		   double ptsize, double angle, int x, int y, char *string,
 		   gdFTStringExtraPtr strex)
 {
 	}
 
 /* EAM DEBUG */
-#if (defined(FREETYPE_MAJOR) && (FREETYPE_MAJOR >=2 ) && (FREETYPE_MINOR >= 1))
+/* TBB: get this exactly right: 2.1.3 *or better*, all possible cases. */
+/* 2.0.24: David R. Morrison: use the more complete ifdef here. */
+
+#if ((defined(FREETYPE_MAJOR)) && (((FREETYPE_MAJOR == 2) && (((FREETYPE_MINOR == 1) && (FREETYPE_PATCH >= 3)) || (FREETYPE_MINOR > 1))) || (FREETYPE_MAJOR > 2)))
       if (font->face->charmap->encoding == FT_ENCODING_MS_SYMBOL)
 	{
 	  /* I do not know the significance of the constant 0xf000. */
 #define MAXY(x) MAX4(x[1],x[3],x[5],x[7])
 #define MINY(x) MIN4(x[1],x[3],x[5],x[7])
 
-char *
+BGD_DECLARE(char *)
 gdImageStringFTCircle (gdImagePtr im,
 		       int cx,
 		       int cy,
 #define SUPERBITS1 1
 #define SUPERBITS2 2
 
-gdImagePtr
+BGD_DECLARE(gdImagePtr)
 gdImageSquareToCircle (gdImagePtr im, int radius)
 {
   int x, y;
   * Silently does nothing for pct<0, as not a useful blurring function
   * Leaves transparency/alpha-channel untouched
   */
-void
+BGD_DECLARE(void)
 gdImageSharpen (gdImagePtr im, int pct)
 {
   int x, y;
 	of the original has been remapped to rho (distance from center).
 	This is known as a "polar coordinate transform." */
 
- BGD_EXPORT gdImagePtr gdImageSquareToCircle(gdImagePtr im, int radius);
+ BGD_DECLARE(gdImagePtr) gdImageSquareToCircle(gdImagePtr im, int radius);
 
 /* Draws the text 'top' and 'bottom' on 'im', curved along the
 	edge of a circle of radius 'radius', with its
 
 	Returns 0 on success, or an error string. */	
 
-BGD_EXPORT char *gdImageStringFTCircle(
+BGD_DECLARE(char *) gdImageStringFTCircle(
 	gdImagePtr im,
 	int cx,
 	int cy,
   * Leaves transparency/alpha-channel untouched
   */
 
- BGD_EXPORT void gdImageSharpen (gdImagePtr im, int pct);
+ BGD_DECLARE(void) gdImageSharpen (gdImagePtr im, int pct);
 
 #endif /* GDFX_H */
 
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
   return realloc (ptr, size);
 }
 
-void
-gdFree (void *ptr)
+BGD_DECLARE(void) gdFree (void *ptr)
 {
   free (ptr);
 }
 
 /* TBB: strtok_r is not universal; provide an implementation of it. */
 
- BGD_EXPORT  char *gd_strtok_r (char *s, char *sep, char **state);
+ char * gd_strtok_r (char *s, char *sep, char **state);
 
 /* These functions wrap memory management. gdFree is
 	in gd.h, where callers can utilize it to correctly
-
 /* gdkanji.c (Kanji code converter)                            */
 /*                 written by Masahito Yamaga (ma@yama-ga.com) */
 
 #include "gdhelpers.h"
 
 #ifndef HAVE_LIBXPM
-gdImagePtr
-gdImageCreateFromXpm (char *filename)
+BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm (char *filename)
 {
   fprintf (stderr, "libgd was not built with xpm support\n");
   return (NULL);
 
 #include <X11/xpm.h>
 
-gdImagePtr
-gdImageCreateFromXpm (char *filename)
+BGD_DECLARE(gdImagePtr) gdImageCreateFromXpm (char *filename)
 {
   XpmInfo info;
   XpmImage image;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.