X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libgfortran%2Flibgfortran.h;h=644a0adc7844557bfaaf50d283d58948c9ef38c3;hb=bbaaa7b1b75800e7d846f34dc9f7bcd04ae6ded9;hp=8a57bfaf17c6c46051e1df552261210d953f9e31;hpb=f23886abacad045dae2b04895dddea4aaec2db1c;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 8a57bfaf17c..644a0adc784 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -33,6 +33,7 @@ Boston, MA 02110-1301, USA. */ #include #include +#include #ifndef M_PI #define M_PI 3.14159265358979323846264338327 @@ -196,6 +197,18 @@ typedef off_t gfc_offset; #include "kinds.h" +/* Define the type used for the current record number for large file I/O. + The size must be consistent with the size defined on the compiler side. */ +#ifdef HAVE_GFC_INTEGER_8 +typedef GFC_INTEGER_8 GFC_IO_INT; +#else +#ifdef HAVE_GFC_INTEGER_4 +typedef GFC_INTEGER_4 GFC_IO_INT; +#else +#error "GFC_INTEGER_4 should be available for the library to compile". +#endif +#endif + /* The following two definitions must be consistent with the types used by the compiler. */ /* The type used of array indices, amongst other things. */ @@ -228,6 +241,24 @@ internal_proto(l8_to_l4_offset); #define GFC_REAL_16_HUGE LDBL_MAX #endif +#define GFC_REAL_4_DIGITS FLT_MANT_DIG +#define GFC_REAL_8_DIGITS DBL_MANT_DIG +#ifdef HAVE_GFC_REAL_10 +#define GFC_REAL_10_DIGITS LDBL_MANT_DIG +#endif +#ifdef HAVE_GFC_REAL_16 +#define GFC_REAL_16_DIGITS LDBL_MANT_DIG +#endif + +#define GFC_REAL_4_RADIX FLT_RADIX +#define GFC_REAL_8_RADIX FLT_RADIX +#ifdef HAVE_GFC_REAL_10 +#define GFC_REAL_10_RADIX FLT_RADIX +#endif +#ifdef HAVE_GFC_REAL_16 +#define GFC_REAL_16_RADIX FLT_RADIX +#endif + #ifndef GFC_MAX_DIMENSIONS #define GFC_MAX_DIMENSIONS 7 #endif @@ -339,6 +370,7 @@ typedef struct int pedantic; int convert; size_t record_marker; + int max_subrecord_length; } compile_options_t; @@ -348,6 +380,7 @@ internal_proto(compile_options); extern void init_compile_options (void); internal_proto(init_compile_options); +#define GFC_MAX_SUBRECORD_LENGTH 2147483639 /* 2**31 - 9 */ /* Structure for statement options. */ @@ -366,7 +399,7 @@ typedef enum ERROR_EOR = -2, ERROR_END = -1, ERROR_OK = 0, /* Indicates success, must be zero. */ - ERROR_OS, /* Operating system error, more info in errno. */ + ERROR_OS = 5000, /* Operating system error, more info in errno. */ ERROR_OPTION_CONFLICT, ERROR_BAD_OPTION, ERROR_MISSING_OPTION, @@ -382,6 +415,7 @@ typedef enum ERROR_INTERNAL_UNIT, ERROR_ALLOCATION, ERROR_DIRECT_EOR, + ERROR_SHORT_RECORD, ERROR_LAST /* Not a real error, the last error # + 1. */ } error_codes; @@ -414,6 +448,11 @@ typedef enum { SILENT, WARNING, ERROR } notification; +/* This is returned by notify_std and several io functions. */ +typedef enum +{ SUCCESS = 1, FAILURE } +try; + /* The filename and line number don't go inside the globals structure. They are set by the rest of the program and must be linked to. */ @@ -492,6 +531,9 @@ internal_proto(translate_error); extern void generate_error (struct st_parameter_common *, int, const char *); internal_proto(generate_error); +extern try notify_std (struct st_parameter_common *, int, const char *); +internal_proto(notify_std); + /* fpu.c */ extern void set_fpu (void); @@ -545,6 +587,9 @@ internal_proto(init_units); extern void close_units (void); internal_proto(close_units); +extern int unit_to_fd (int); +internal_proto(unit_to_fd); + /* stop.c */ extern void stop_numeric (GFC_INTEGER_4); @@ -604,6 +649,11 @@ extern void internal_unpack_c10 (gfc_array_c10 *, const GFC_COMPLEX_10 *); internal_proto(internal_unpack_c10); #endif +#if defined HAVE_GFC_COMPLEX_16 +extern void internal_unpack_c16 (gfc_array_c16 *, const GFC_COMPLEX_16 *); +internal_proto(internal_unpack_c16); +#endif + /* string_intrinsics.c */ extern GFC_INTEGER_4 compare_string (GFC_INTEGER_4, const char *, @@ -616,14 +666,6 @@ extern void random_seed (GFC_INTEGER_4 * size, gfc_array_i4 * put, gfc_array_i4 * get); iexport_proto(random_seed); -/* normalize.c */ - -extern GFC_REAL_4 normalize_r4_i4 (GFC_UINTEGER_4, GFC_UINTEGER_4); -internal_proto(normalize_r4_i4); - -extern GFC_REAL_8 normalize_r8_i8 (GFC_UINTEGER_8, GFC_UINTEGER_8); -internal_proto(normalize_r8_i8); - /* size.c */ typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t;