OSDN Git Service

2009-04-10 Janne Blomqvist <jb@gcc.gnu.org>
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Apr 2009 08:26:56 +0000 (08:26 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 10 Apr 2009 08:26:56 +0000 (08:26 +0000)
        * io/io.h (move_pos_offset): Remove prototype.
        * io/transfer.c (formatted_transfer_scalar_read): Use sseek
        instead of move_pos_offset.
        * io/unix.c (move_pos_offset): Remove.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145876 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/io.h
libgfortran/io/transfer.c
libgfortran/io/unix.c

index ed6162b..b3fb58c 100644 (file)
@@ -1,5 +1,12 @@
 2009-04-10  Janne Blomqvist  <jb@gcc.gnu.org>
 
+        * io/io.h (move_pos_offset): Remove prototype.
+        * io/transfer.c (formatted_transfer_scalar_read): Use sseek
+        instead of move_pos_offset.
+        * io/unix.c (move_pos_offset): Remove.
+
+2009-04-10  Janne Blomqvist  <jb@gcc.gnu.org>
+
        PR libfortran/39665 libfortran/39702 libfortran/39709
        * io/io.h (st_parameter_dt): Revert aligned attribute from u.p.value.
         * io/list_read.c (read_complex): Read directly into user pointer.
index 7e4742e..c9b3db3 100644 (file)
@@ -707,9 +707,6 @@ fnode;
 
 /* unix.c */
 
-extern int move_pos_offset (stream *, int);
-internal_proto(move_pos_offset);
-
 extern int compare_files (stream *, stream *);
 internal_proto(compare_files);
 
index 343dfb8..717041d 100644 (file)
@@ -1153,7 +1153,7 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind
          if (dtp->u.p.skips < 0)
            {
               if (is_internal_unit (dtp))  
-                move_pos_offset (dtp->u.p.current_unit->s, dtp->u.p.skips);
+                sseek (dtp->u.p.current_unit->s, dtp->u.p.skips, SEEK_CUR);
               else
                 fbuf_seek (dtp->u.p.current_unit, dtp->u.p.skips, SEEK_CUR);
              dtp->u.p.current_unit->bytes_left -= (gfc_offset) dtp->u.p.skips;
@@ -1329,7 +1329,7 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin
          if (dtp->u.p.skips < 0)
            {
               if (is_internal_unit (dtp))  
-               move_pos_offset (dtp->u.p.current_unit->s, dtp->u.p.skips);
+               sseek (dtp->u.p.current_unit->s, dtp->u.p.skips, SEEK_CUR);
               else
                 fbuf_seek (dtp->u.p.current_unit, dtp->u.p.skips, SEEK_CUR);
              dtp->u.p.current_unit->bytes_left -= (gfc_offset) dtp->u.p.skips;
index fe181a1..4d5ec70 100644 (file)
@@ -146,31 +146,6 @@ typedef struct
 unix_stream;
 
 
-/*move_pos_offset()--  Move the record pointer right or left
- *relative to current position */
-
-int
-move_pos_offset (stream* st, int pos_off)
-{
-  unix_stream * str = (unix_stream*)st;
-  if (pos_off < 0)
-    {
-      str->logical_offset += pos_off;
-
-      if (str->ndirty > str->logical_offset)
-       {
-         if (str->ndirty + pos_off > 0)
-           str->ndirty += pos_off;
-         else
-            str->ndirty = 0;
-       }
-
-    return pos_off;
-  }
-  return 0;
-}
-
-
 /* fix_fd()-- Given a file descriptor, make sure it is not one of the
  * standard descriptors, returning a non-standard descriptor.  If the
  * user specifies that system errors should go to standard output,