aboutsummaryrefslogtreecommitdiff
path: root/tcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2011-08-11 17:07:56 +0200
committergrischka <grischka>2011-08-11 17:07:56 +0200
commitbf374a5f238360d6a5055d79f53065fa95a26047 (patch)
treeed7cdfeab603cc28a9715a3abcd23df550bdca2f /tcc.c
parent74a24d77fd9c08ad9a6b3b6c0f434c7314dae639 (diff)
downloadtinycc-bf374a5f238360d6a5055d79f53065fa95a26047.tar.gz
tinycc-bf374a5f238360d6a5055d79f53065fa95a26047.tar.bz2
rename error/warning -> tcc_(error/warning)
Diffstat (limited to 'tcc.c')
-rw-r--r--tcc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tcc.c b/tcc.c
index ada67a0..0c51451 100644
--- a/tcc.c
+++ b/tcc.c
@@ -254,11 +254,11 @@ static void exec_other_tcc(TCCState *s, char **argv, const char *optarg)
printf("tcc: using '%s'\n", child_name), fflush(stdout);
execvp(argv[0] = child_path, argv);
}
- error("'%s' not found", child_name);
+ tcc_error("'%s' not found", child_name);
case 0: /* ignore -march etc. */
break;
default:
- warning("unsupported option \"-m%s\"", optarg);
+ tcc_warning("unsupported option \"-m%s\"", optarg);
}
}
#endif
@@ -301,7 +301,7 @@ static int parse_args(TCCState *s, int argc, char **argv)
for(;;) {
p1 = popt->name;
if (p1 == NULL)
- error("invalid option -- '%s'", r);
+ tcc_error("invalid option -- '%s'", r);
r1 = r + 1;
for(;;) {
if (*p1 == '\0')
@@ -319,7 +319,7 @@ static int parse_args(TCCState *s, int argc, char **argv)
optarg = r1;
} else {
if (optind >= argc)
- error("argument to '%s' is missing", r);
+ tcc_error("argument to '%s' is missing", r);
optarg = argv[optind++];
}
} else {
@@ -334,7 +334,7 @@ static int parse_args(TCCState *s, int argc, char **argv)
case TCC_OPTION_I:
if (tcc_add_include_path(s, optarg) < 0)
- error("too many include paths");
+ tcc_error("too many include paths");
break;
case TCC_OPTION_D:
parse_option_D(s, optarg);
@@ -443,7 +443,7 @@ static int parse_args(TCCState *s, int argc, char **argv)
break;
case TCC_OPTION_Wl:
if ((r = (char *) tcc_set_linker(s, (char *)optarg, TRUE)))
- error("unsupported linker option '%s'", r);
+ tcc_error("unsupported linker option '%s'", r);
break;
case TCC_OPTION_E:
output_type = TCC_OUTPUT_PREPROCESS;
@@ -459,7 +459,7 @@ static int parse_args(TCCState *s, int argc, char **argv)
default:
if (s->warn_unsupported) {
unsupported_option:
- warning("unsupported option '%s'", r);
+ tcc_warning("unsupported option '%s'", r);
}
break;
}
@@ -528,9 +528,9 @@ int main(int argc, char **argv)
if (output_type == TCC_OUTPUT_OBJ && !reloc_output) {
/* accepts only a single input file */
if (nb_objfiles != 1)
- error("cannot specify multiple files with -c");
+ tcc_error("cannot specify multiple files with -c");
if (nb_libraries != 0)
- error("cannot specify libraries with -c");
+ tcc_error("cannot specify libraries with -c");
}
if (output_type == TCC_OUTPUT_PREPROCESS) {
@@ -539,7 +539,7 @@ int main(int argc, char **argv)
} else {
s->outfile = fopen(outfile, "w");
if (!s->outfile)
- error("could not open '%s'", outfile);
+ tcc_error("could not open '%s'", outfile);
}
}
@@ -557,7 +557,7 @@ int main(int argc, char **argv)
filename = files[i];
if (filename[0] == '-' && filename[1] == 'l') {
if (tcc_add_library(s, filename + 2) < 0) {
- error_noabort("cannot find %s", filename);
+ tcc_error_noabort("cannot find %s", filename);
ret = 1;
}
} else {