that might disagree about consts. */
unsigned long strtoul ();
+static int is_num PARAMS ((const char *, int, int, int));
static void set_default_dirlist PARAMS ((char *dirlist_ptr));
static void set_section_start PARAMS ((char *sect, char *valstr));
static void help PARAMS ((void));
#define OPTION_COUNT ((int) (sizeof ld_options / sizeof ld_options[0]))
-/* Test "string" for containing a string of digits that form a number
-between "min" and "max". The return value is the number or "err". */
-static
-int is_num( char *string, int min, int max, int err)
+/* Test STRING for containing a string of digits that form a number
+ between MIN and MAX. The return value is the number or ERR. */
+
+static int
+is_num (string, min, max, err)
+ const char *string;
+ int min;
+ int max;
+ int err;
{
int result = 0;
- for ( ; *string; ++string)
- {
- if (!isdigit(*string))
+ for (; *string; ++string)
{
- result = err;
- break;
+ if (! isdigit (*string))
+ {
+ result = err;
+ break;
+ }
+ result = result * 10 + (*string - '0');
}
- result = result * 10 + (*string - '0');
- }
if (result < min || result > max)
result = err;
switch (optc)
{
default:
+ fprintf (stderr,
+ _("%s: use the --help option for usage information\n"),
+ program_name);
xexit (1);
case 1: /* File name. */
lang_add_input_file (optarg, lang_input_file_is_file_enum,
ignored. Someday we should handle it correctly. FIXME. */
break;
case OPTION_SPLIT_BY_RELOC:
- config.split_by_reloc = atoi (optarg);
+ config.split_by_reloc = strtoul (optarg, NULL, 0);
break;
case OPTION_SPLIT_BY_FILE:
config.split_by_file = true;
words = is_num (optarg, 1, 10, 0);
if (words == 0)
{
- fprintf (stderr, _("Invalid argument to option \"mpc860c0\"\n"));
+ fprintf (stderr,
+ _("%s: Invalid argument to option \"mpc860c0\"\n"),
+ program_name);
xexit (1);
}
link_info.mpc860c0 = words * 4; /* convert words to bytes */
printf (_("%s: emulation specific options:\n"), program_name);
ldemul_list_emulation_options (stdout);
printf ("\n");
-
- printf (_("\nReport bugs to bug-gnu-utils@gnu.org\n"));
+
+ printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
}