Lines Matching defs:radix

1256 /* Validate an input or output radix setting, and make sure the user
1258 setting the input radix to "10" never changes it! */
1267 set_input_radix_1 (int from_tty, unsigned radix)
1269 /* We don't currently disallow any input radix except 0 or 1, which don't
1271 radix greater than 1, even if we don't have unique digits for every
1272 value from 0 to radix-1, but in practice we lose on large radix values.
1273 We should either fix the lossage or restrict the radix range more.
1276 if (radix < 2)
1278 /* FIXME: cagney/2002-03-17: This needs to revert the bad radix
1280 error ("Nonsense input radix ``decimal %u''; input radix unchanged.",
1281 radix);
1283 input_radix = radix;
1286 printf_filtered ("Input radix now set to decimal %u, hex %x, octal %o.\n",
1287 radix, radix, radix);
1298 set_output_radix_1 (int from_tty, unsigned radix)
1300 /* Validate the radix and disallow ones that we aren't prepared to
1301 handle correctly, leaving the radix unchanged. */
1302 switch (radix)
1314 /* FIXME: cagney/2002-03-17: This needs to revert the bad radix
1316 error ("Unsupported output radix ``decimal %u''; output radix unchanged.",
1317 radix);
1319 output_radix = radix;
1322 printf_filtered ("Output radix now set to decimal %u, hex %x, octal %o.\n",
1323 radix, radix, radix);
1327 /* Set both the input and output radix at once. Try to set the output radix
1328 first, since it has the most restrictive range. An radix that is valid as
1329 an output radix is also valid as an input radix.
1331 It may be useful to have an unusual input radix. If the user wishes to
1332 set an input radix that is not valid as an output radix, he needs to use
1333 the 'set input-radix' command. */
1338 unsigned radix;
1340 radix = (arg == NULL) ? 10 : parse_and_eval_long (arg);
1341 set_output_radix_1 (0, radix);
1342 set_input_radix_1 (0, radix);
1346 radix, radix, radix);
1364 printf_filtered ("Input radix set to decimal %u, hex %x, octal %o.\n",
1366 printf_filtered ("Output radix set to decimal %u, hex %x, octal %o.\n",
1455 c = add_set_cmd ("input-radix", class_support, var_uinteger,
1457 "Set default input radix for entering numbers.",
1462 c = add_set_cmd ("output-radix", class_support, var_uinteger,
1464 "Set default output radix for printing of values.",
1469 /* The "set radix" and "show radix" commands are special in that they are
1474 add_cmd ("radix", class_support, set_radix,
1476 Use 'set input-radix' or 'set output-radix' to independently set each.\n\
1479 add_cmd ("radix", class_support, show_radix,
1481 Use 'show input-radix' or 'show output-radix' to independently show each.",