aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io
AgeCommit message (Collapse)AuthorFilesLines
2010-05-08Fix typo in symbol visibility specificationJanne Blomqvist1-1/+1
From-SVN: r159187
2010-05-07Remove free_memJanne Blomqvist9-45/+50
From-SVN: r159160
2010-04-30unix.c (raw_truncate): Explicit cast from integer-scal to pointer.Kai Tietz1-4/+28
2010-04-30 Kai Tietz <kai.tietz@onevision.com> PR/43844 * io/unix.c (raw_truncate): Explicit cast from integer-scal to pointer. (empfile): Use for mingw GetTempPath and avoid double slash for path. From-SVN: r158925
2010-04-24unix.c (tempfile): Correct logic for mktemp case.Kai Tietz1-8/+9
2010-04-24 Kai Tietz <kai.tietz@onevision.com> PR/43844 * io/unix.c (tempfile): Correct logic for mktemp case. From-SVN: r158686
2010-04-01PR libfortran/43605 FTELL intrinsic, take 2.Janne Blomqvist1-15/+16
Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr> From-SVN: r157932
2010-04-01transfer.c: Update copyright.Paul Thomas8-8/+10
2010-04-01 Paul Thomas <pault@gcc.gnu.org> * io/transfer.c : Update copyright. * io/unix.c : ditto * io/read.c : ditto * io/io.h : ditto * io/unix.h : ditto * io/inquire.c : ditto * io/format.c : ditto * io/list_read.c : ditto * runtime/error.c : ditto * libgfortran.h : ditto * intrinsics/date_and_time.c: ditto * intrinsics/args.c : ditto From-SVN: r157924
2010-04-01PR libfortran/43605 Fix FTELL for formatted filesJanne Blomqvist1-5/+5
Co-Authored-By: Manfred Schwarb <manfred99@gmx.ch> From-SVN: r157914
2010-03-30re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)Jerry DeLisle1-3/+8
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-29re PR libfortran/43551 (Buffered direct I/O reads wrong record)Tobias Burnus1-7/+11
2010-03-29 Tobias Burnus <burnus@net-b.de> PR fortran/43551 * io/unix.c (buf_write): Set physical_offset after lseek. 2010-03-29 Tobias Burnus <burnus@net-b.de> PR fortran/43551 * gfortran.dg/direct_io_12.f90: New test. From-SVN: r157792
2010-03-26re PR fortran/43517 (spurious end-of-file condition when namelist read ↵Jerry DeLisle1-0/+3
follows formatted read) 2010-03-25 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/43517 * io/read.c (read_x): Return if seen EOR condition. From-SVN: r157737
2010-03-22re PR fortran/43409 (I/O: INQUIRE for SIZE does not work.)Jerry DeLisle1-1/+1
2010-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/43409 * io/io.h: Fix type of size in st_parameter_inquire structure. From-SVN: r157618
2010-03-20re PR fortran/43409 (I/O: INQUIRE for SIZE does not work.)Jerry DeLisle3-0/+30
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-18transfer.c (read_sf_internal): Remove stray function declaration used during ↵Jerry DeLisle1-3/+1
debigging. 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-18re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)Jerry DeLisle3-34/+83
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-12format.c (parse_format_list): Add to ERROR, WARNING, SILENT enumerators ↵Kai Tietz1-2/+2
NOTIFICATION_ prefix. 2010-03-12 Kai Tietz <kai.tietz@onevision.com> PR/42950 * io/format.c (parse_format_list): Add to ERROR, WARNING, SILENT enumerators NOTIFICATION_ prefix. * runtime/error.c (notification_std): Likewise. * libgfortran.h (notification): Likewise. (GFC_LARGEST_BUF): Check for HAVE_GFC_INTEGER_16. From-SVN: r157407
2010-03-11re PR fortran/43228 (NAMELIST I/O: Reading at 2 dimensions (rank) array values.)Tobias Burnus1-0/+8
2010-03-11 Tobias Burnus <burnus@net-b.de> PR fortran/43228 * io/list_read.c (nml_parse_qualifier): Disable expanded_read for array sections. 2010-03-11 Tobias Burnus <burnus@net-b.de> PR fortran/43228 * gfortran.dg/namelist_61.f90: New test. From-SVN: r157389
2010-03-11re PR libfortran/43320 (200.sixtrack fails setup)Jerry DeLisle1-0/+2
2010-03-10 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/43320 * io/transfer.c (next_record_r): Add hit_eof based on item_count condition. From-SVN: r157377
2010-03-09re PR fortran/43265 (No EOF condition if reading with '(x)' from an empty file)Jerry DeLisle3-23/+65
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-08libgfortran.h (_POSIX): Define if __MINGW32__ is defined.Kai Tietz1-5/+5
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-25transfer.c (require_type): Subtract one from item_count for output of error ↵Jerry DeLisle1-1/+8
message. 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-24* io/write_float.def (WRITE_FLOAT): Use __builtin_signbit.Rainer Orth1-2/+2
From-SVN: r157048
2010-02-23list_read.c (list_formatted_read_scalar): Remove duplicate code.Jerry DeLisle1-3/+0
2010-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> * io/list_read.c (list_formatted_read_scalar): Remove duplicate code. From-SVN: r156988
2010-02-07re PR libfortran/42742 (Handle very large format strings correctly)Jerry DeLisle1-5/+2
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-06PR libfortranJerry DeLisle1-1/+14
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-04re PR fortran/42901 (reading array of structures from namelist fails)Jerry DeLisle1-15/+23
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-15format.c (parse_format): Set limit on size of format strings that will be ↵Jerry DeLisle1-1/+6
cached. 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
2010-01-03PR libfortran/42420 Large file capable stat for MingWJanne Blomqvist1-10/+18
From-SVN: r155593
2009-12-08re PR libfortran/41711 ([F08] BOZ edit-descr does not support reading large ↵Tobias Burnus1-0/+2
kind reals) 2009-12-08 Tobias Burnus <burnus@net-b.de> PR fortran/41711 * io/read.c (set_integer): Support kind=10 for reading real/complex BOZ. 2009-12-08 Tobias Burnus <burnus@net-b.de> PR fortran/41711 * gfortran.dg/boz_15.f90: New test. From-SVN: r155088
2009-12-04PR libfortran/40812 Large file support for MinGWJanne Blomqvist2-22/+55
From-SVN: r154984
2009-11-30unix.c (find_file): Add variable id conditionally for mingw targets.Kai Tietz1-1/+4
2009-11-30 Kai Tietz <Kai.Tietz@onevision.com> * io/unix.c (find_file): Add variable id conditionally for mingw targets. From-SVN: r154806
2009-11-28pack_generic.c (pack_internal): Remove unused zero_sized variable.Jakub Jelinek2-7/+2
* intrinsics/pack_generic.c (pack_internal): Remove unused zero_sized variable. * intrinsics/unpack_generic.c (unpack0): Remove unused size variable. * io/write.c (namelist_write_newline): Remove unused length variable. * io/unix.c (find_file): Remove unused id variable. * m4/ifunction.m4 (SCALAR_ARRAY_FUNCTION): Remove unused sstride variable. * generated/maxloc1_16_i1.c: Regenerated. * generated/maxloc1_16_i16.c: Regenerated. * generated/maxloc1_16_i2.c: Regenerated. * generated/maxloc1_16_i4.c: Regenerated. * generated/maxloc1_16_i8.c: Regenerated. * generated/maxloc1_16_r10.c: Regenerated. * generated/maxloc1_16_r16.c: Regenerated. * generated/maxloc1_16_r4.c: Regenerated. * generated/maxloc1_16_r8.c: Regenerated. * generated/maxloc1_4_i1.c: Regenerated. * generated/maxloc1_4_i16.c: Regenerated. * generated/maxloc1_4_i2.c: Regenerated. * generated/maxloc1_4_i4.c: Regenerated. * generated/maxloc1_4_i8.c: Regenerated. * generated/maxloc1_4_r10.c: Regenerated. * generated/maxloc1_4_r16.c: Regenerated. * generated/maxloc1_4_r4.c: Regenerated. * generated/maxloc1_4_r8.c: Regenerated. * generated/maxloc1_8_i1.c: Regenerated. * generated/maxloc1_8_i16.c: Regenerated. * generated/maxloc1_8_i2.c: Regenerated. * generated/maxloc1_8_i4.c: Regenerated. * generated/maxloc1_8_i8.c: Regenerated. * generated/maxloc1_8_r10.c: Regenerated. * generated/maxloc1_8_r16.c: Regenerated. * generated/maxloc1_8_r4.c: Regenerated. * generated/maxloc1_8_r8.c: Regenerated. * generated/maxval_i1.c: Regenerated. * generated/maxval_i16.c: Regenerated. * generated/maxval_i2.c: Regenerated. * generated/maxval_i4.c: Regenerated. * generated/maxval_i8.c: Regenerated. * generated/maxval_r10.c: Regenerated. * generated/maxval_r16.c: Regenerated. * generated/maxval_r4.c: Regenerated. * generated/maxval_r8.c: Regenerated. * generated/minloc1_16_i1.c: Regenerated. * generated/minloc1_16_i16.c: Regenerated. * generated/minloc1_16_i2.c: Regenerated. * generated/minloc1_16_i4.c: Regenerated. * generated/minloc1_16_i8.c: Regenerated. * generated/minloc1_16_r10.c: Regenerated. * generated/minloc1_16_r16.c: Regenerated. * generated/minloc1_16_r4.c: Regenerated. * generated/minloc1_16_r8.c: Regenerated. * generated/minloc1_4_i1.c: Regenerated. * generated/minloc1_4_i16.c: Regenerated. * generated/minloc1_4_i2.c: Regenerated. * generated/minloc1_4_i4.c: Regenerated. * generated/minloc1_4_i8.c: Regenerated. * generated/minloc1_4_r10.c: Regenerated. * generated/minloc1_4_r16.c: Regenerated. * generated/minloc1_4_r4.c: Regenerated. * generated/minloc1_4_r8.c: Regenerated. * generated/minloc1_8_i1.c: Regenerated. * generated/minloc1_8_i16.c: Regenerated. * generated/minloc1_8_i2.c: Regenerated. * generated/minloc1_8_i4.c: Regenerated. * generated/minloc1_8_i8.c: Regenerated. * generated/minloc1_8_r10.c: Regenerated. * generated/minloc1_8_r16.c: Regenerated. * generated/minloc1_8_r4.c: Regenerated. * generated/minloc1_8_r8.c: Regenerated. * generated/minval_i1.c: Regenerated. * generated/minval_i16.c: Regenerated. * generated/minval_i2.c: Regenerated. * generated/minval_i4.c: Regenerated. * generated/minval_i8.c: Regenerated. * generated/minval_r10.c: Regenerated. * generated/minval_r16.c: Regenerated. * generated/minval_r4.c: Regenerated. * generated/minval_r8.c: Regenerated. * generated/product_c10.c: Regenerated. * generated/product_c16.c: Regenerated. * generated/product_c4.c: Regenerated. * generated/product_c8.c: Regenerated. * generated/product_i1.c: Regenerated. * generated/product_i16.c: Regenerated. * generated/product_i2.c: Regenerated. * generated/product_i4.c: Regenerated. * generated/product_i8.c: Regenerated. * generated/product_r10.c: Regenerated. * generated/product_r16.c: Regenerated. * generated/product_r4.c: Regenerated. * generated/product_r8.c: Regenerated. * generated/sum_c10.c: Regenerated. * generated/sum_c16.c: Regenerated. * generated/sum_c4.c: Regenerated. * generated/sum_c8.c: Regenerated. * generated/sum_i1.c: Regenerated. * generated/sum_i16.c: Regenerated. * generated/sum_i2.c: Regenerated. * generated/sum_i4.c: Regenerated. * generated/sum_i8.c: Regenerated. * generated/sum_r10.c: Regenerated. * generated/sum_r16.c: Regenerated. * generated/sum_r4.c: Regenerated. * generated/sum_r8.c: Regenerated. From-SVN: r154729
2009-11-19Move includes after include guardsJanne Blomqvist3-6/+8
From-SVN: r154343
2009-11-19re PR fortran/42090 (I/O: Problems when reading partial records in formatted ↵Jerry DeLisle1-1/+3
direct access files) 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-11-03Forgot files from r153825Janne Blomqvist3-0/+368
From-SVN: r153827
2009-11-02Split up io/io.hJanne Blomqvist14-282/+31
From-SVN: r153825
2009-10-29re PR libfortran/41711 ([F08] BOZ edit-descr does not support reading large ↵Jerry DeLisle1-16/+247
kind reals) 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-13re PR libfortran/41683 (F2003 Repeat specification after P descriptor rejected)Jerry DeLisle1-1/+2
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-12re PR fortran/38439 (I/O PD edit descriptor inconsistency)Jerry DeLisle1-7/+4
2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/38439 * io/format.c (parse_format_list): Correct logic for FMT_F reading vs writing. Code clean-up. From-SVN: r152657
2009-10-11re PR fortran/38439 (I/O PD edit descriptor inconsistency)Jerry DeLisle1-16/+10
2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/38439 * io/format.c (parse_format_list): Add check for tokens not allowed after P specifier. Fix comments. Remove un-needed code. Fix the default exponent list. Correct pointer assignment error. From-SVN: r152644
2009-10-06re PR libfortran/35862 ([F2003] Implement new rounding modes for run time)Jerry DeLisle1-10/+9
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-29re PR libfortran/35862 ([F2003] Implement new rounding modes for run time)Jerry DeLisle5-15/+195
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-19re PR fortran/41328 (bad iostat when reading DOS file in a character array ↵Jerry DeLisle1-1/+1
(non-advancing)) 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-13re PR fortran/41328 (bad iostat when reading DOS file in a character array ↵Jerry DeLisle1-10/+15
(non-advancing)) 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-12re PR fortran/41219 (libgfortran build warnings)Jerry DeLisle1-1/+1
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-08re PR fortran/41192 (NAMELIST input with just a comment ("&NAME ! comment ↵Jerry DeLisle1-8/+8
\") fails) 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-17re PR fortran/41075 ([F2008] Implement unlimited format item)Jerry DeLisle2-2/+36
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-14re PR libfortran/32784 ([win32] Using 'CONOUT$', 'CONIN$', or 'CONERR$' as ↵Jerry DeLisle1-0/+21
assigned file generates Fortran runtime error: Bad file descriptor) 2009-08-14 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/32784 io/unix.c (regular_file): Add support for CONIO on mingw. From-SVN: r150779
2009-08-02re PR fortran/40853 (I/O: Namelist read error)Jerry DeLisle1-1/+1
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-23re PR libfortran/32784 ([win32] Using 'CONOUT$', 'CONIN$', or 'CONERR$' as ↵Jerry DeLisle1-0/+20
assigned file generates Fortran runtime error: Bad file descriptor) 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-17When finalizing I/O transfer, set current_record to 0 before returning.Janne Blomqvist1-1/+5
PR libfortran/40714 Co-Authored-By: Jerry DeLisle <jvdelisle@gcc.gnu.org> From-SVN: r149757