-/* Copyright (C) 2002, 2003, 2004, 2005, 2006
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Andy Vaught
/* format.c-- parse a FORMAT string into a binary format suitable for
* interpretation during I/O statements */
-#include "config.h"
+#include "io.h"
#include <ctype.h>
#include <string.h>
-#include "libgfortran.h"
-#include "io.h"
#define FARRAY_SIZE 64
fmt->format_string_len--;
c = toupper (*fmt->format_string++);
}
- while (c == ' ' && !literal);
+ while ((c == ' ' || c == '\t') && !literal);
return c;
}
case FMT_DOLLAR:
get_fnode (fmt, &head, &tail, FMT_DOLLAR);
tail->repeat = 1;
- notify_std (GFC_STD_GNU, "Extension: $ descriptor");
+ notify_std (&dtp->common, GFC_STD_GNU, "Extension: $ descriptor");
goto between_desc;
case FMT_T:
{
fmt->saved_token = t;
fmt->value = 1; /* Default width */
- notify_std(GFC_STD_GNU, posint_required);
+ notify_std (&dtp->common, GFC_STD_GNU, posint_required);
}
}
goto finished;
case FMT_SLASH:
- get_fnode (fmt, &head, &tail, FMT_SLASH);
- tail->repeat = 1;
-
- /* Fall Through */
-
case FMT_COLON:
+ get_fnode (fmt, &head, &tail, t);
+ tail->repeat = 1;
goto optional_comma;
case FMT_END:
if (f != NULL)
fmt->format_string = f->source;
- st_sprintf (buffer, "%s\n", message);
+ sprintf (buffer, "%s\n", message);
j = fmt->format_string - dtp->format;
*p++ = '^';
*p = '\0';
- generate_error (&dtp->common, ERROR_FORMAT, buffer);
+ generate_error (&dtp->common, LIBERROR_FORMAT, buffer);
}