Author: chromatic
Date: Sat Apr 7 22:53:46 2007
New Revision: 18034
Modified:
trunk/compilers/imcc/main.c
Log:
[IMCC] Minor cleanups in preparation to move main() to src/main.c.
Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c (original)
+++ trunk/compilers/imcc/main.c Sat Apr 7 22:53:46 2007
@@ -29,7 +29,7 @@
usage(FILE* fp)
{
fprintf(fp,
- "parrot -[abcCEfgGhjprStvVwy.] [-d [FLAGS]] "
+ "parrot -[abcCEfgGhjprStvVwy.] [-d [FLAGS]] [-D [FLAGS]]"
"[-O [level]] [-o FILE] <file>\n");
}
@@ -59,7 +59,7 @@
" 0010 thread debugging\n"
" 0020 eval/compile\n"
" 0040 fill I, N registers with garbage\n"
- " 0080 show, when a context is destroyed\n"
+ " 0080 show when a context is destroyed\n"
"\n"
"--trace -t [Flags] ...\n"
" 0001 opcodes\n"
@@ -185,7 +185,7 @@
};
static int
-is_all_hex_digitis(const char *s)
+is_all_hex_digits(const char *s)
{
for (; *s; s++)
if (!isxdigit(*s))
@@ -214,7 +214,7 @@
SET_FLAG(PARROT_PROFILE_FLAG);
break;
case 't':
- if (opt.opt_arg && is_all_hex_digitis(opt.opt_arg)) {
+ if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) {
SET_TRACE(strtoul(opt.opt_arg, 0, 16));
}
else
@@ -236,7 +236,7 @@
SET_CORE(PARROT_CGOTO_CORE);
break;
case 'd':
- if (opt.opt_arg && is_all_hex_digitis(opt.opt_arg)) {
+ if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) {
IMCC_INFO(interp)->debug = strtoul(opt.opt_arg, 0, 16);
}
else {
@@ -244,7 +244,7 @@
}
break;
case 'D':
- if (opt.opt_arg && is_all_hex_digitis(opt.opt_arg)) {
+ if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) {
SET_DEBUG(strtoul(opt.opt_arg, 0, 16));
}
else
@@ -397,7 +397,7 @@
YYSTYPE val;
void *yyscanner;
- do_yylex_init( interp, &yyscanner);
+ do_yylex_init(interp, &yyscanner);
IMCC_push_parser_state(interp);
while ((c = yylex(&val, yyscanner, interp))) {
@@ -488,11 +488,11 @@
case ADV_ARROW: printf("=>");break;
default:
- if (c < 255)
- printf("%c", c);
- else
- printf("%s ", val.s);
- break;
+ if (c < 255)
+ printf("%c", c);
+ else
+ printf("%s ", val.s);
+ break;
}
}
}
@@ -513,7 +513,7 @@
interp = Parrot_new(NULL);
- do_yylex_init( interp, &yyscanner);
+ do_yylex_init(interp, &yyscanner);
Parrot_block_DOD(interp);
Parrot_block_GC(interp);