+Tue Feb 2 22:38:19 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
+
+ * toplev.h (read_integral_parameter): Declare.
+ * toplev.c (read_integral_parameter): New function.
+
Fri Jan 29 21:00:56 1999 Bob Manson <manson@charmed.cygnus.com>
* resource.c, resource.h: New files.
FILE *aux_info_file;
FILE *rtl_dump_file = NULL;
+/* Decode the string P as an integral parameter.
+ If the string is indeed an integer return its numeric value else
+ issue an Invalid Option error for the option PNAME and return DEFVAL. */
+
+int
+read_integral_parameter (p, pname, defval)
+ char *p;
+ char *pname;
+ int defval;
+{
+ char *endp = p;
+
+ while (*endp)
+ {
+ if (*endp >= '0' && *endp <= '9')
+ endp++;
+ else
+ {
+ error ("Invalid option `%s'", pname);
+ return defval;
+ }
+ }
+
+ return atoi (p);
+}
+
+
/* Time accumulators, to count the total time spent in various passes. */
int parse_time;
struct rtx_def;
#endif
+extern int read_integral_parameter PROTO ((char *, char *, int));
extern int count_error PROTO ((int));
extern void strip_off_ending PROTO ((char *, int));
extern void print_time PROTO ((const char *, int));