backport: re PR fortran/45710 (Adjust format and padding for WRITE of NAMELIST group to internal file)
2010-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> Backport from mainline: PR libfortran/45710 * io/write.c (namelist_write_newline): Pad character array internal unit records with spaces. From-SVN: r165079
This commit is contained in:
parent
ba466cc65e
commit
92e0f542f1
|
@ -1,3 +1,10 @@
|
|||
2010-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
Backport from mainline:
|
||||
PR libfortran/45710
|
||||
* io/write.c (namelist_write_newline): Pad character array internal
|
||||
unit records with spaces.
|
||||
|
||||
2010-10-01 Release Manager
|
||||
|
||||
* GCC 4.4.5 released.
|
||||
|
|
|
@ -1194,10 +1194,15 @@ namelist_write_newline (st_parameter_dt *dtp)
|
|||
if (is_array_io (dtp))
|
||||
{
|
||||
gfc_offset record;
|
||||
int finished, length;
|
||||
int finished;
|
||||
char *p;
|
||||
int length = dtp->u.p.current_unit->bytes_left;
|
||||
|
||||
p = write_block (dtp, length);
|
||||
if (p == NULL)
|
||||
return;
|
||||
memset (p, ' ', length);
|
||||
|
||||
length = (int) dtp->u.p.current_unit->bytes_left;
|
||||
|
||||
/* Now that the current record has been padded out,
|
||||
determine where the next record in the array is. */
|
||||
record = next_array_record (dtp, dtp->u.p.current_unit->ls,
|
||||
|
|
Loading…
Reference in New Issue