OSDN Git Service

2004-09-21 Steven G. Kargl <kargls@comcast.net>
[pf3gnuchains/gcc-fork.git] / libgfortran / libgfortran.h
index 6234e25..bbe6824 100644 (file)
@@ -1,5 +1,5 @@
 /* Common declarations for all of libgfor.
-   Copyright 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>, and
    Andy Vaught <andy@xena.eas.asu.edu>
 
@@ -87,7 +87,12 @@ typedef double GFC_REAL_8;
 typedef complex float GFC_COMPLEX_4;
 typedef complex double GFC_COMPLEX_8;
 
+/* The following two definitions must be consistent with the types used
+   by the compiler.  */
+/* The type used of array indices, amongst other things.  */
 typedef size_t index_type;
+/* The type used for the lengths of character variables.  */
+typedef GFC_INTEGER_4 gfc_charlen_type;
 
 /* This will be 0 on little-endian machines and one on big-endian machines.  */
 #define l8_to_l4_offset prefix(l8_to_l4_offset)
@@ -232,6 +237,11 @@ extern unsigned line;              /* Location of the current libray call (optional).  */
 #define filename prefix(filename)
 extern char *filename;
 
+/* Avoid conflicting prototypes of alloca() in system headers by using 
+   GCC's builtin alloca().  */
+
+#define gfc_alloca(x)  __builtin_alloca(x)
+
 
 /* main.c */
 
@@ -249,9 +259,6 @@ void get_args (int *, char ***);
 
 
 /* error.c */
-#define rtoa prefix(rtoa)
-char *rtoa (double f, int length, int oprec);
-
 #define itoa prefix(itoa)
 char *itoa (int64_t);
 
@@ -390,6 +397,12 @@ void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *);
 #define internal_unpack_8 prefix(internal_unpack_8)
 void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
 
+/* date_and_time.c */
+
+#define date_and_time prefix(date_and_time)
+void date_and_time (char *, char *, char *, gfc_array_i4 *,
+                   GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
+
 /* string_intrinsics.c */
 
 #define compare_string prefix(compare_string)
@@ -399,8 +412,23 @@ GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *,
 /* random.c */
 
 #define random_seed prefix(random_seed)
-void random_seed (GFC_INTEGER_4 * size, const gfc_array_i4 * put,
-             const gfc_array_i4 * get);
+void random_seed (GFC_INTEGER_4 * size, gfc_array_i4 * put,
+                 gfc_array_i4 * get);
+
+/* normalize.c */
+
+#define normalize_r4_i4 prefix(normalize_r4_i4)
+GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4);
+
+#define normalize_r8_i8 prefix(normalize_r8_i8)
+GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8);
+
+/* size.c */
+
+typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t;
+
+#define size0 prefix(size0)
+index_type size0 (const array_t * array); 
 
 #endif