toplev.h (read_integral_parameter): Declare.
* toplev.h (read_integral_parameter): Declare. * toplev.c (read_integral_parameter): New function. From-SVN: r24985
This commit is contained in:
parent
ca545bb569
commit
132e01b1e6
3 changed files with 33 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
27
gcc/toplev.c
27
gcc/toplev.c
|
@ -1244,6 +1244,33 @@ FILE *asm_out_file;
|
|||
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;
|
||||
|
|
|
@ -26,6 +26,7 @@ union tree_node;
|
|||
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));
|
||||
|
|
Loading…
Add table
Reference in a new issue