[Patch, libfortran] Split io.h into multiple include files

Janne Blomqvist blomqvist.janne@gmail.com
Fri Oct 30 23:21:00 GMT 2009


Hi,

the attached patch splits io.h into multiple include files such that a
few of the components of the I/O library now have their own header
files. This makes it easier to get a grip on the structure, makes
dependencies between components slightly easier to grasp, and reduces
the compilation cascade if one edits one of the new lower level
headers. Regtested on  x86_64-unknown-linux-gnu, Ok for trunk?

2009-10-31  Janne Blomqvist  <jb@gcc.gnu.org>

	* Makefile.am (gfor_io_headers): Add fbuf.h, format.h, unix.h.
	* Makefile.in: Regenerated.
	* io/fbuf.h: New file.
	* io/format.h: New file.
	* io/unix.h: New file.
	* io/io.h (struct stream): Move to unix.h, add forward declaration.
	(sread): Likewise.
	(swrite): Likewise.
	(sseek): Likewise.
	(stell): Likewise.
	(struncate): Likewise.
	(sflush): Likewise.
	(sflush): Likewise.
	(sclose): Likewise.
	(compared_files): Move prototype to unix.h.
	(open_external): Likewise.
	(open_internal): Likewise.
	(mem_alloc_w): Likewise.
	(mem_alloc_r): Likewise.
	(input_stream): Likewise.
	(output_stream): Likewise.
	(error_stream): Likewise.
	(compare_file_filename): Likewise.
	(find_file): Likewise.
	(delete_file): Likewise.
	(file_exists): Likewise.
	(inquire_sequential): Likewise.
	(inquire_direct): Likewise.
	(inquire_formatted): Likewise.
	(inquire_unformatted): Likewise.
	(inquire_read): Likewise.
	(inquire_write): Likewise.
	(inquire_readwrite): Likewise.
	(file_length): Likewise.
	(is_seekable): Likewise.
	(is_special): Likewise.
	(flush_if_preconnected): Likewise.
	(empty_internal_buffer): Likewise.
	(stream_isatty): Likewise.
	(stream_ttyname): Likewise.
	(unpack_filename): Likewise.
	(struct fbuf): Move to fbuf.h, add forward declaration.
	(fbuf_init): Move prototype to fbuf.h.
	(fbuf_destroy): Likewise.
	(fbuf_reset): Likewise.
	(fbuf_alloc): Likewise.
	(fbuf_flush): Likewise.
	(fbuf_seek): Likewise.
	(fbuf_read): Likewise.
	(fbuf_getc_refill): Likewise.
	(fbuf_getc): Move inline function to fbuf.h.
	(enum format_token): Move to format.h.
	(struct fnode): Move to format.h, add forward declaration.
	(parse_format): Move prototype to format.h.
	(next_format): Likewise.
	(unget_format): Likewise.
	(format_error): Likewise.
	(free_format_data): Likewise.
	(free_format_hash_table): Likewise.
	(init_format_hash): Likewise.
	(free_format_hash): Likewise.
	* io/close.c: Include unix.h.
	* io/fbuf.c: Include fbuf.h and unix.h.
	* io/file_pos.c: Include fbuf.h and unix.h.
	* io/format.c: Include format.h.
	* io/inquire.c: Include unix.h.
	* io/intrinsics.c: Include fbuf.h and unix.h.
	* io/list_read.c: Include fbuf.h and unix.h.
	* io/open.c: Include fbuf.h and unix.h.
	* io/read.c: Include format.h.
	* io/transfer.c: Include fbuf.h, format.h, and unix.h.
	* io/unit.c: Likewise.
	* io/unix.c: Include unix.h.
	* io/write.c: Include format.h and unix.h.


-- 
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: includefix.diff
Type: text/x-patch
Size: 24874 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091030/f4612d6f/attachment.bin>


More information about the Fortran mailing list