]> git.mxchange.org Git - simgear.git/blobdiff - simgear/metar/Antoi.cpp
Tidy up the autoconf/automake configuration a bit.
[simgear.git] / simgear / metar / Antoi.cpp
index 8b471ae566acfba344d170b2e5b813028ef624da..ba884c1e09ce0ccd07f2e2fb81f86221fc37cb34 100644 (file)
@@ -1,13 +1,5 @@
-#pragma comment(compiler)
-#pragma comment(date)
-#pragma comment(timestamp)
 #include <stdlib.h>
  
-#pragma title("antoi - char array to integer")
-#pragma pagesize (80)
-#pragma page(1)
 /********************************************************************/
 /*                                                                  */
 /*  Title:         antoi                                            */
 /*           in the conversion.                                     */
 /*                                                                  */
 /*  Output:- An integer corresponding to the value in the character */
-/*           array or MAXNEG (-2147483648) if the function is       */
+/*           array or INT32_MIN (-2147483647-1) if the function is  */
 /*           unable to acquire system storage.                      */
 /*                                                                  */
 /*  Modification History:                                           */
 /*                 None                                             */
 /*                                                                  */
 /********************************************************************/
+
+#ifdef HAVE_STDINT_H
+#  include <stdint.h>
+#endif
+
+#ifndef INT32_MIN
+#  define INT32_MIN (-2147483647-1)
+#endif
+
 int antoi(char * string, int len)
 {
  
@@ -55,7 +55,7 @@ int antoi(char * string, int len)
  
     tmpstr = (char *)malloc((len+1) * sizeof(char));
  
-    if (tmpstr == NULL) return (-2147483648);
+    if (tmpstr == NULL) return INT32_MIN;
  
     for (i = 0; i < len; i++)
        tmpstr[i] = string[i];
@@ -70,4 +70,3 @@ int antoi(char * string, int len)
  
 } /* end antoi */
  
-#pragma page(1)