2010-03-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265
* io/transfer.c (next_record_r): Only call hit_eof for specific
conditions when an EOF is encountered.
From-SVN: r157810
2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/43409
* ioparm.def: Change inquire size variable to type pointer to
GFC_IO_INT type.
2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/43409
* io/unix.h: Add prototype for new function to return file size.
* io/unix.c (file_size): New function.
* io/inquire.c (inquire_via_unit): Use new function.
(inquire_via_filename): Use new function.
From-SVN: r157593
2010-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/transfer.c (read_sf_internal): Remove stray function declaration
used during debigging.
From-SVN: r157531
2010-03-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265
* io/io.h: Delete prototype for read_sf, making it static.
* io/read.c (read_x): Modify to call hit_eof if PAD="no".
* io/transfer.c (read_sf_internal): New static function extracted from
read_sf for use on internal units only. Handle empty string case.
(read_sf): New factoring of this function, make it static. Add special
conditions for EOF based on ADVANCE="no", PAD="no", and whether any
bytes have been previously read from the record.
(read_block_form): Modify to call read_sf or read_sf_internal.
(next_record_r): Add a done flag similar to next_record_w. Call hit_eof
if internal array unit next record returns finished, meaning an EOF was
found and not done, ie not the last record expected. For external
units call hit_eof if item_count is 1 or there are no pending spaces.
(next_record): Update call to next_record_r.
From-SVN: r157527
2010-03-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265
* io/read.c: Include fbuf.h and unix.h to enable lower level I/O for
read_x. (read_x): Replace the use of read_sf with equivalent lower level
I/O, eliminating unneeded code and handling EOF and EOR conditions.
* io/io.h: Revise prototype for read_sf.
* io/transfer.c (read_sf): Delete no_error parameter and all uses of it.
(read_block_form): Likewise.
(next_record_r): Delete wrong code call to hit_eof.
From-SVN: r157310
2010-03-08 Kai TIetz <kai.tietz@onevision.com>
PR/42950
* libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
(gfc_printf): Define to gnu_printf for __MINGW32__ case,
otherwise to __printf__.
(gfc_strtof,gfc_strtod,gfc_strtold): Define for mingw case
to POSIX compatible converter functions.
(runtime_error): Use instead gfc_printf as formatter
attribute name.
(runtime_error_at): Likewise.
(runtime_warning_at): Likewise.
(st_printf): Likewise.
* intrinsics/date_and_time.c (localtime_r): Undefine
possible defined macro.
(gmtime_r): Likewise.
* io/read.c (convert_real): Use gfc_strtof, gfc_strtod,
and gfc_strtold.
From-SVN: r157271
2010-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/transfer.c (require_type): Subtract one from item_count for output
of error message. Add comment before formatted_transfer function
explaining why the item_count is off by one.
From-SVN: r157060
2010-02-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42742
* io/format.c (reset_fnode_counters): Use the correct pointer to the
head of the fnode list. (parse_format): Remove previous hack that set
limit on size of format string for caching.
From-SVN: r156568
2010-02-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran
* io/transfer.c (read_sf): Handle EOR and EOF conditions for
ADVANCE="no" with PAD="yes" or PAD="no".
From-SVN: r156540
2010-02-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/42901
* io/list_read.c (nml_get_obj_data): Add new qualifier flag, clean up
code, and adjust logic to set namelist info pointer correctly for array
qualifiers of derived type components.
From-SVN: r156487
2010-01-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/format.c (parse_format): Set limit on size of format strings that
will be cached.
From-SVN: r155939
2009-11-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/42090
* io/transfer.c (skip_record): Set bytes_left_subrecord to zero after
skipping the remaining bytes in the record.
(next_record_r): Call skip_record with the number of bytes_left to be
skipped.
From-SVN: r154316
2009-10-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41711
* libgfortran.h: Define larger sizes for BOZ conversion buffers.
* io/write.c (extract_uint): Include case where size is 10 if integer
is large enough. (write_int): Rename to write_boz. (write_boz): Factor
out extract_uint and delete the conversion function.
(btoa_big): New binary conversion function.
(otoa_big): New octal conversion function.
(ztoa_big): New hexidecimal conversion function.
(write_b): Modify to use new function.
(write_o): Likewise.
(write_z): Likewise.
From-SVN: r153724
2009-10-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41683
* io/format.c (parse_format_list): Allow a repeat specifier immediately
after a P specifier.
From-SVN: r152695
2009-10-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/35862
* write_float.def (outout_float): Fix handling of special case where no
digits after the decimal point and values less than 1.0. Adjust index
into digits string. (WRITE_FLOAT): Remove special case code from macro.
From-SVN: r152483
2009-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/35862
* io.h (gfc_unit): Add round_status.
(format_token): Add enumerators for rounding format specifiers.
* transfer.c (round_opt): New options table.
(formatted_transfer_scalar_read): Add set round_status for each rounding
format token. (formatted_transfer_scalar_write): Likewise.
* format.c (format_lex): Tokenize the rounding format specifiers.
(parse_format_list): Parse the rounding format specifiers.
* write_float.def (outout_float): Modify rounding code to use new
variable rchar to set the appropriate rounding. Fix some whitespace.
* unit.c (get_internal_unit): Initialize rounding mode for internal
units. (init_units): Likewise.
From-SVN: r152263
2009-09-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41328
* io/transfer.c (read_sf): Set at_eof flag on short read if any
characters were successfully read so that EOF condition with no EOR
marker succeeds.
From-SVN: r151877
2009-09-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41328
* io/transfer.c (read_sf): Adjust fbuf position and do proper
fbuf reads to traverse CR, CR-LF, and LF style line ends.
From-SVN: r151665
2009-09-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41219
* io/write.c (write_a_char4): Use correct type for crlf constant.
From-SVN: r151653
2009-09-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41192
* io/list_read.c (eat_line): Enable eat_line to function on
internal units.
PR libgfortran/41219
* io/list_read.c (nml_read_obj): Replace GFC_DTYPE_UNKNOWN with
BT_NULL to get rid of warning.
From-SVN: r151495
2009-08-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41075
* io/io.h (enum format_token): Add FMT_STAR.
* io/format.c (format_lex): Add case for FMT_STAR.
(parse_format_list): Parse FMT_STAR and check for left paren
after. (next_format0): Modify helper function to check for
unimited format and return the repeated format node. Update
comments to clarify.
From-SVN: r150844
2009-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* io/list_read.c (nml_get_obj_data): Do not set nl
pointer to first_nl if nl->next is NULL.
From-SVN: r150356
2009-07-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/32784
* unix.c (regular_file): Check for CONIN$ CONOUT$, and CONERR$ and open
the respective /dev/conin or /dev/conout devices. This is Cygwin
specific.
From-SVN: r149970
2009-07-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40330
PR libfortran/40662
* io/io.h (st_parameter_dt): Define format_not_saved bit used to signal
whether the parsed format data was previously saved. Used to determine
if the current format data should be freed or not.
* io/transfer.c (st_read_done): Use the format_not_saved bit.
(st_write_done): Likewise.
* io/format.c (parse_format_list): Add boolean pointer to arg list. This
pointer is used to return status to the caller regarding whether it is
safe to cache the parsed format data. Currently, if a FMT_STRING token
is encounetered, it is not safe to cache. Also, added a local boolean
variable to hold this information as recursive calls to
parse_format_list are made. Remove previous save_format logic.
(parse_format): Do not use the format caching facility if the current
unit is an internal unit or if it is not safe to save parsed format
data.
From-SVN: r149398
2009-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40508
* io/format.c: Don't save parsed format data for internal units.
From-SVN: r148823