aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unit.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2014-03-04 04:33:40 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2014-03-04 04:33:40 +0000
commit75b2dba9ae820b3e5c083830b408854a93e8eed1 (patch)
treecc43dea2c41d8e23a38dab1078510f8394771d85 /libgfortran/io/unit.c
parent915182a087847bbb0778bf351b5154fa2a83a13c (diff)
downloadgcc-75b2dba9ae820b3e5c083830b408854a93e8eed1.zip
gcc-75b2dba9ae820b3e5c083830b408854a93e8eed1.tar.gz
gcc-75b2dba9ae820b3e5c083830b408854a93e8eed1.tar.bz2
re PR fortran/60148 (strings in NAMELIST do not honor DELIM= in open statement)
2014-03-03 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/60148 * io/inquire.c (inquire_via_unit): In the case of DELIM_UNSPECIFIED set inquire return string to "NONE". * io/list_read.c (read_character): In the case of DELIM_NONE and namelists, complete the character read using the namelist variable length. * io/open.c (new_unit): Don't set delim status to none if not specified so that DELIM_UNSPECIFIED can be used later. * io/transfer.c (data_transfer_init): For namelist I/O, if the unit delim status is unspecified set the current status to quote. Otherwise, set current status to the unit status. * io/unit.c (get_internel_unit, init_unit): Remember to set flags_delim initially to DELIM_UNSPECIFIED so defaults come out correctly. * io/write.c (write_character): Add a new function argument "mode" to signify that raw output is to be used vs output with delimiters. If the mode is set to DELIM (1) proceed with delimiters. (list_formatted_write_scalar): Write the separator only if a delimiter was previously specified. Update the call to write_character with the mode argument given. (namelist_write_newline): Use the mode argument. (nml_write_obj): Use the mode argument. Remove use of tmp_delim. Write the semi-colon or comma correctly only when needed with using delimiters. Cleanup whitespace. (namelist_write): If delim is not specified in namelist I/O, default to using quotes. Get rid of the tmp_delim variable and use the new mode argument in write_character. From-SVN: r208302
Diffstat (limited to 'libgfortran/io/unit.c')
-rw-r--r--libgfortran/io/unit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c
index f9b594d..901d66f 100644
--- a/libgfortran/io/unit.c
+++ b/libgfortran/io/unit.c
@@ -464,6 +464,7 @@ get_internal_unit (st_parameter_dt *dtp)
iunit->flags.status = STATUS_UNSPECIFIED;
iunit->flags.sign = SIGN_SUPPRESS;
iunit->flags.decimal = DECIMAL_POINT;
+ iunit->flags.delim = DELIM_UNSPECIFIED;
iunit->flags.encoding = ENCODING_DEFAULT;
iunit->flags.async = ASYNC_NO;
iunit->flags.round = ROUND_UNSPECIFIED;
@@ -584,6 +585,7 @@ init_units (void)
u->flags.position = POSITION_ASIS;
u->flags.sign = SIGN_SUPPRESS;
u->flags.decimal = DECIMAL_POINT;
+ u->flags.delim = DELIM_UNSPECIFIED;
u->flags.encoding = ENCODING_DEFAULT;
u->flags.async = ASYNC_NO;
u->flags.round = ROUND_UNSPECIFIED;