Re: [patch, libgfortran] PR78351 comma not terminating READ of formatted input field

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [patch, libgfortran] PR78351 comma not terminating READ of formatted input field

Andreas Schwab-2
On Nov 03 2018, Jerry DeLisle <[hidden email]> wrote:

> +  /* To support legacy code we have to scan the input string one byte
> +     at a time because we don't no where an early comma may be and the

s/no/know/

Andreas.

--
Andreas Schwab, [hidden email]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Reply | Threaded
Open this post in threaded view
|

Re: [patch, libgfortran] PR78351 comma not terminating READ of formatted input field

Bernhard Reutner-Fischer
On Sat, 3 Nov 2018 15:33:07 -0700
Jerry DeLisle <[hidden email]> wrote:

> diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
> index 31198a3cc39..0d26101cef0 100644
> --- a/libgfortran/io/transfer.c
> +++ b/libgfortran/io/transfer.c

> @@ -260,22 +250,80 @@ read_sf_internal (st_parameter_dt *dtp, size_t *length)
>        sseek (dtp->u.p.current_unit->s, -1, SEEK_CUR);
>      }
>  
> -  lorig = *length;
> -  if (is_char4_unit(dtp))
> +  /* To support legacy code we have to scan the input string one byte
> +     at a time because we don't no where an early comma may be and the

As Andreas said s/no/know/

> +     requested length could go passed the end of a comma shortened

s/passed/past/

> +      /* Get the first chracter of the string to establish the base

s/chracter/character/

> +      /* Now we scan the rest and exit deal with an end-of-file

s/ exit// ?