aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/read.c')
-rw-r--r--libgfortran/io/read.c32
1 files changed, 13 insertions, 19 deletions
diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c
index 34454d6..962c0a2 100644
--- a/libgfortran/io/read.c
+++ b/libgfortran/io/read.c
@@ -36,7 +36,6 @@ Boston, MA 02111-1307, USA. */
void
set_integer (void *dest, int64_t value, int length)
{
-
switch (length)
{
case 8:
@@ -95,7 +94,6 @@ max_value (int length, int signed_flag)
int
convert_real (void *dest, const char *buffer, int length)
{
-
errno = 0;
switch (length)
@@ -204,7 +202,6 @@ read_a (fnode * f, char *p, int length)
static char *
eat_leading_spaces (int *width, char *p)
{
-
for (;;)
{
if (*width == 0 || *p != ' ')
@@ -325,11 +322,11 @@ read_decimal (fnode * f, char *dest, int length)
set_integer (dest, v, length);
return;
-bad:
+ bad:
generate_error (ERROR_READ_VALUE, "Bad value during integer read");
return;
-overflow:
+ overflow:
generate_error (ERROR_READ_OVERFLOW,
"Value overflowed during integer read");
return;
@@ -461,11 +458,11 @@ read_radix (fnode * f, char *dest, int length, int radix)
set_integer (dest, v, length);
return;
-bad:
+ bad:
generate_error (ERROR_READ_VALUE, "Bad value during integer read");
return;
-overflow:
+ overflow:
generate_error (ERROR_READ_OVERFLOW,
"Value overflowed during integer read");
return;
@@ -588,20 +585,18 @@ read_f (fnode * f, char *dest, int length)
}
}
-/* No exponent has been seen, so we use the current scale factor */
-
+ /* No exponent has been seen, so we use the current scale factor */
exponent = -g.scale_factor;
goto done;
-bad_float:
+ bad_float:
generate_error (ERROR_READ_VALUE, "Bad value during floating point read");
if (buffer != scratch)
free_mem (buffer);
return;
-/* At this point the start of an exponent has been found */
-
-exp1:
+ /* At this point the start of an exponent has been found */
+ exp1:
while (w > 0 && *p == ' ')
{
w--;
@@ -623,11 +618,10 @@ exp1:
if (w == 0)
goto bad_float;
-/* At this point a digit string is required. We calculate the value
- of the exponent in order to take account of the scale factor and
- the d parameter before explict conversion takes place. */
-
-exp2:
+ /* At this point a digit string is required. We calculate the value
+ of the exponent in order to take account of the scale factor and
+ the d parameter before explict conversion takes place. */
+ exp2:
if (!isdigit (*p))
goto bad_float;
@@ -654,7 +648,7 @@ exp2:
exponent = exponent * exponent_sign;
-done:
+ done:
/* Use the precision specified in the format if no decimal point has been
seen. */
if (!seen_dp)