gcc/libgfortran
Janne Blomqvist 15877a88eb Part 1 of PR 25561.
2008-05-15  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/25561
	* Makefile.am: Add fbuf.c to gfor_io_src.
	* Makefile.in: Regenerate.
	* io/io.h (read_block): Remove.
	(struct stream): Remove alloc_r_at function pointer.
	(salloc_r): Remove.
	(salloc_r_at): Remove.
	(salloc_w_at): Remove.
	(salloc_w): Remove offset argument.
	(struct fbuf): New struct for format buffer.
	(struct gfc_unit): Add fbuf.
	(read_block_form): New prototype.
	(fbuf_init): Likewise.
	(fbuf_destroy): Likewise.
	(fbuf_reset): Likewise.
	(fbuf_alloc): Likewise.
	(fbuf_flush): Likewise.
	(fbuf_seek): Likewise.
	* io/file_pos.c (formatted_backspace): Change to use sread.
	(unformatted_backspace): Likewise.
	(st_backspace): Flush format buffer.
	(st_rewind): Likewise.
	* io/list_read.c (next_char): Likewise.
	(nml_query): Tidying, flush format buffer.
	* io/open.c (new_unit): Init format buffer.
	* io/read.c (read_l): Change to use read_block_form.
	(read_a): Likewise.
	(read_decimal): Likewise.
	(read_radix): Likewise.
	(read_f): Likewise.
	(read_x): Empty reads also for stream I/O.
	* io/transfer.c (read_sf): Change to use sread.
	(read_block): Rename to read_block_form, change prototype, use sread.
	(read_block_direct): Don't seek stream files.
	(write_block): Change to use fbuf if external file, don't seek stream
	files.
	(write_buf): Don't seek stream files.
	(formatted_transfer_scalar): Use fbuf for external files.
	(us_read): Change to use sread.
	(pre_position): Do nothing for stream I/O.
	(data_transfer_init): Flush fbuf when switching from write to read, if
	POS is specified, seek stream file to correct offset.
	(skip_record): Change to use sread.
	(min_off): New function.
	(next_record_r): Change to use sread.
	(next_record_w): Change to use sset/sseek, flush fbuf.
	(finalize_transfer): Flush fbuf.
	* io/unit.c (init_units): Init fbuf for stdout, stderr.
	(close_unit_1): Destroy fbuf.
	(finish_last_advance_record): Flush fbuf, no need to seek.
	* io/unix.c (fd_alloc_r_at): Remove unused where argument.
	(fd_alloc_w_at): Likewise.
	(fd_read): Remove third argument to fd_alloc_r_at.
	(fd_write): Remove third argument to fd_alloc_w_at.
	(fd_sset): Likewise.
	(fd_open): Don't set alloc_r_at.
	(mem_alloc_r_at): Remove unused where argument.
	(mem_alloc_w_at): Likewise.
	(mem_read): Don't incorrectly return previous errno, remove unused
	third argument to alloc function.
	(mem_write): Likewise.
	(mem_set): Likewise.
	(open_internal): Don't set alloc_r_at pointer.
	* io/fbuf.c: New file.

From-SVN: r135373
2008-05-15 18:53:34 +03:00
..
config
generated re PR fortran/35995 (ANY, ALL, and COUNT errors for zero sized sections) 2008-05-04 19:07:28 +00:00
intrinsics libgfortran.h (gfc_char4_t): New type. 2008-05-14 21:51:27 +00:00
io Part 1 of PR 25561. 2008-05-15 18:53:34 +03:00
m4 re PR fortran/35995 (ANY, ALL, and COUNT errors for zero sized sections) 2008-05-04 19:07:28 +00:00
runtime re PR libfortran/36094 (Runtime error show_locus not working correctly) 2008-05-02 01:33:16 +00:00
acinclude.m4 libgomp/ 2008-04-21 20:55:19 +00:00
aclocal.m4 re PR other/35457 (Error building GCC trunk on CELL SPU) 2008-04-18 10:28:53 +00:00
c99_protos.h
ChangeLog libgfortran.h (gfc_char4_t): New type. 2008-05-14 21:51:27 +00:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
config.h.in re PR libfortran/32972 (performance of pack/unpack) 2008-04-13 20:15:58 +00:00
configure libgomp/ 2008-04-21 20:55:19 +00:00
configure.ac re PR libfortran/32972 (performance of pack/unpack) 2008-04-13 20:15:58 +00:00
configure.host
fmain.c
gfortran.map libgfortran.h (gfc_char4_t): New type. 2008-05-14 21:51:27 +00:00
libgfortran.h libgfortran.h (gfc_char4_t): New type. 2008-05-14 21:51:27 +00:00
libtool-version
Makefile.am Part 1 of PR 25561. 2008-05-15 18:53:34 +03:00
Makefile.in Part 1 of PR 25561. 2008-05-15 18:53:34 +03:00
mk-kinds-h.sh
mk-sik-inc.sh
mk-srk-inc.sh