OSDN Git Service

2006-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / libgfortran / io / io.h
index b829ad4..822930e 100644 (file)
@@ -46,10 +46,6 @@ typedef enum
 bt;
 
 
-typedef enum
-{ SUCCESS = 1, FAILURE }
-try;
-
 struct st_parameter_dt;
 
 typedef struct stream
@@ -414,7 +410,10 @@ typedef struct st_parameter_dt
           /* A namelist specific flag used to enable reading input from 
             line_buffer for logical reads.  */
          unsigned line_buffer_enabled : 1;
-         /* 18 unused bits.  */
+         /* An internal unit specific flag used to identify that the associated
+            unit is internal.  */
+         unsigned unit_is_internal : 1;
+         /* 17 unused bits.  */
 
          char last_char;
          char nml_delim;
@@ -429,20 +428,28 @@ typedef struct st_parameter_dt
          struct format_data *fmt;
          jmp_buf *eof_jump;
          namelist_info *ionml;
-
+         /* A flag used to identify when a non-standard expanded namelist read
+            has occurred.  */
+         int expanded_read;
          /* Storage area for values except for strings.  Must be large
             enough to hold a complex value (two reals) of the largest
             kind.  */
          char value[32];
          gfc_offset size_used;
        } p;
-      /* This pad size must be greater than or equal to the pad_size declared in
-        trans-io.c (gfc_build_io_library_fndecls)  */
-      char pad[16 * sizeof (char *) + 34 * sizeof (int)];
+      /* This pad size must be equal to the pad_size declared in
+        trans-io.c (gfc_build_io_library_fndecls).  The above structure
+        must be smaller or equal to this array.  */
+      char pad[16 * sizeof (char *) + 32 * sizeof (int)];
     } u;
 }
 st_parameter_dt;
 
+/* Ensure st_parameter_dt's u.pad is bigger or equal to u.p.  */
+extern char check_st_parameter_dt[sizeof (((st_parameter_dt *) 0)->u.pad)
+                                 >= sizeof (((st_parameter_dt *) 0)->u.p)
+                                 ? 1 : -1];
+
 #undef CHARACTER1
 #undef CHARACTER2
 
@@ -671,9 +678,6 @@ internal_proto(stream_ttyname);
 extern gfc_offset stream_offset (stream *s);
 internal_proto(stream_offset);
 
-extern int unit_to_fd (int);
-internal_proto(unit_to_fd);
-
 extern int unpack_filename (char *, const char *, int);
 internal_proto(unpack_filename);
 
@@ -693,6 +697,12 @@ internal_proto(unit_lock);
 extern int close_unit (gfc_unit *);
 internal_proto(close_unit);
 
+extern gfc_unit *get_internal_unit (st_parameter_dt *);
+internal_proto(get_internal_unit);
+
+extern void free_internal_unit (st_parameter_dt *);
+internal_proto(free_internal_unit);
+
 extern int is_internal_unit (st_parameter_dt *);
 internal_proto(is_internal_unit);
 
@@ -703,7 +713,7 @@ extern gfc_unit *find_unit (int);
 internal_proto(find_unit);
 
 extern gfc_unit *find_or_create_unit (int);
-internal_proto(find_unit);
+internal_proto(find_or_create_unit);
 
 extern gfc_unit *get_unit (st_parameter_dt *, int);
 internal_proto(get_unit);
@@ -851,9 +861,6 @@ extern void list_formatted_write (st_parameter_dt *, bt, void *, int, size_t,
 internal_proto(list_formatted_write);
 
 /* error.c */
-extern try notify_std (int, const char *);
-internal_proto(notify_std);
-
 extern notification notification_std(int);
 internal_proto(notification_std);