Commits

Anonymous committed 46da631

- sync to 2.0.29

  • Participants
  • Parent commits f742931

Comments (0)

Files changed (3)

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef GDFX_H
 #define GDFX_H 1
 
 
 #endif /* GDFX_H */
 
+
+#ifdef __cplusplus
+}
+#endif

File src/gdhelpers.c

 gd_strtok_r (char *s, char *sep, char **state)
 {
   char separators[256];
-  char *start;
   char *result = 0;
   memset (separators, 0, sizeof (separators));
   while (*sep)
       /* Pick up where we left off */
       s = *state;
     }
-  start = s;
   /* 1. EOS */
   if (!(*s))
     {

File src/gdhelpers.h

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #ifndef GDHELPERS_H
 #define GDHELPERS_H 1
 
 void *gdMalloc (size_t size);
 void *gdRealloc (void *ptr, size_t size);
 
+/* Returns nonzero if multiplying the two quantities will
+	result in integer overflow. Also returns nonzero if 
+	either quantity is negative. By Phil Knirsch based on
+	netpbm fixes by Alan Cox. */
+
+int overflow2(int a, int b);
+
 /* 2.0.16: portable mutex support for thread safety. */
 
 #ifdef WIN32
 #endif /* WIN32 */
 
 #endif /* GDHELPERS_H */
+
+#ifdef __cplusplus
+}
+#endif