write.c (write_logical): Don't print extra blank.
* io/write.c (write_logical): Don't print extra blank. (write_integer): Base field width on kind. (list_formatted_write): Output initial blank. Co-Authored-By: Paul Brook <paul@codesourcery.com> From-SVN: r81914
This commit is contained in:
parent
000aa32a49
commit
d464f8e99e
2 changed files with 33 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-05-16 Janne Blomqvist <jblomqvi@cc.hut.fi>
|
||||
Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* io/write.c (write_logical): Don't print extra blank.
|
||||
(write_integer): Base field width on kind.
|
||||
(list_formatted_write): Output initial blank.
|
||||
|
||||
2004-05-16 Janne Blomqvist <jblomqvi@cc.hut.fi>
|
||||
|
||||
* io/io.h (flush): Add prototype.
|
||||
|
|
|
@ -875,12 +875,10 @@ write_char (char c)
|
|||
|
||||
|
||||
/* write_logical()-- Write a list-directed logical value */
|
||||
/* Default logical output should be L2
|
||||
according to DEC fortran Manual. */
|
||||
|
||||
static void
|
||||
write_logical (const char *source, int length)
|
||||
{
|
||||
write_char (' ');
|
||||
write_char (extract_int (source, length) ? 'T' : 'F');
|
||||
}
|
||||
|
||||
|
@ -893,10 +891,33 @@ write_integer (const char *source, int length)
|
|||
char *p;
|
||||
const char *q;
|
||||
int digits;
|
||||
int width = 12;
|
||||
int width;
|
||||
|
||||
q = itoa (extract_int (source, length));
|
||||
|
||||
switch (length)
|
||||
{
|
||||
case 1:
|
||||
width = 4;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
width = 6;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
width = 11;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
width = 20;
|
||||
break;
|
||||
|
||||
default:
|
||||
width = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
digits = strlen (q);
|
||||
|
||||
if(width < digits )
|
||||
|
@ -1039,6 +1060,7 @@ list_formatted_write (bt type, void *p, int len)
|
|||
{
|
||||
g.first_item = 0;
|
||||
char_flag = 0;
|
||||
write_char (' ');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue