diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-03-10 16:15:14 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-03-10 16:15:14 +0000 |
commit | 3ab46568c7db5b4305a9f376b724e648a065e4ee (patch) | |
tree | ebee567982000d252350c54624edbd68acd97cdb /mfd/prog.c | |
parent | d7149c558e4caa5625b4b57b4df1b463e945b973 (diff) | |
download | mailfromd-3ab46568c7db5b4305a9f376b724e648a065e4ee.tar.gz mailfromd-3ab46568c7db5b4305a9f376b724e648a065e4ee.tar.bz2 |
Port r1632 of branches/release_4_3_patches.
git-svn-id: file:///svnroot/mailfromd/trunk@1634 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'mfd/prog.c')
-rw-r--r-- | mfd/prog.c | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -269,8 +269,8 @@ struct eval_environ { mu_stream_t stream; /* Capture stream */ /* Non-local exits */ - prog_counter_t defcatch[mf_status_count]; - prog_counter_t catch[mf_status_count]; + prog_counter_t defcatch[mf_exception_count]; + prog_counter_t catch[mf_exception_count]; /* Built-in private data */ void **bi_priv_array; @@ -749,7 +749,7 @@ instr_ston(eval_environ_t env) if (PROG_TRACE_ENGINE) prog_trace(env, "STON %s", s); if (*p) - env_throw(env, mf_ston_conv, + env_throw(env, mfe_ston_conv, "Cannot convert stack value to number (stopped at %8.8s)", p); @@ -791,7 +791,7 @@ instr_symbol(eval_environ_t env) if (PROG_TRACE_ENGINE) prog_trace(env, "SYMBOL %s", symbol); if (!s) - env_throw(env, mf_macroundef, _("Macro not defined: %s"), + env_throw(env, mfe_macroundef, _("Macro not defined: %s"), symbol); if (PROG_TRACE_ENGINE) @@ -1084,7 +1084,7 @@ instr_div(eval_environ_t env) if (PROG_TRACE_ENGINE) prog_trace(env, "DIV %ld %ld", a, b); if (b == 0) - env_throw(env, mf_divzero, + env_throw(env, mfe_divzero, "Division by zero at %08x", (unsigned int) env->pc); push(env, (STKVAL) (a / b)); } @@ -1185,7 +1185,7 @@ instr_regcomp(eval_environ_t env) if (v) { char errbuf[512]; regerror(v, &rtx->re, errbuf, sizeof(errbuf)); - env_throw(env, mf_regcomp, + env_throw(env, mfe_regcomp, "compiling regex `%s': %s", expr, errbuf); @@ -1436,11 +1436,11 @@ instr_catch(eval_environ_t env) if (PROG_TRACE_ENGINE) prog_trace(env, "CATCH %ld, %ld", entry, off); - for (i = 0; i < mf_status_count; i++) + for (i = 0; i < mf_exception_count; i++) if (mask & EXMASK(i)) { if (PROG_TRACE_ENGINE) prog_trace(env, "CATCH TARGET: %s", - mf_status_str((mf_status)i)); + mf_exception_str((mf_exception)i)); env->catch[i] = entry; } @@ -1454,9 +1454,9 @@ dump_catch(prog_counter_t i) printf("%ld (%ld)", (long) prog[i], i + (long) prog[i]); printf("; Targets: "); - for (i = 0; i < mf_status_count; i++) + for (i = 0; i < mf_exception_count; i++) if (mask & EXMASK(i)) - printf("%s ", mf_status_str((mf_status)i)); + printf("%s ", mf_exception_str((mf_exception)i)); } void @@ -1466,7 +1466,7 @@ instr_throw(eval_environ_t env) size_t off = (size_t) get_arg(env, 0); advance_pc(env, 1); adjust_stack(env, 1); - if (n > mf_status_count) + if (n > mf_exception_count) runtime_error(env, _("Invalid exception number: %lu"), n); env_throw_0(env, (mf_status) n, off); } @@ -1474,7 +1474,7 @@ instr_throw(eval_environ_t env) void dump_throw(prog_counter_t i) { - printf("%s", mf_status_str((mf_status) prog[i])); + printf("%s", mf_exception_str((mf_exception) prog[i])); } @@ -1513,7 +1513,7 @@ instr_saveex(eval_environ_t env) if (PROG_TRACE_ENGINE) prog_trace(env, "SAVEEX %x", exmask); push(env, (STKVAL) exmask); - for (i = 0; i < mf_status_count; i++) { + for (i = 0; i < mf_exception_count; i++) { if (EXMASK(i) & exmask) push(env, (STKVAL) env->catch[i]); } @@ -1533,7 +1533,7 @@ instr_restex(eval_environ_t env) if (PROG_TRACE_ENGINE) prog_trace(env, "RESTEX %x", exmask); - for (i = 0; i < mf_status_count; i++) { + for (i = 0; i < mf_exception_count; i++) { if (EXMASK(i) & exmask) env->catch[i] = (prog_counter_t) env->dataseg[env->base-i-1]; @@ -1862,7 +1862,7 @@ env_vsprintf(eval_environ_t env, const char *biname, } void -env_throw_0(eval_environ_t env, mf_status status, size_t off) +env_throw_0(eval_environ_t env, mf_exception status, size_t off) { prog_counter_t pc = env->catch[status]; if (pc) { @@ -1884,7 +1884,7 @@ env_throw_0(eval_environ_t env, mf_status status, size_t off) } void -env_throw(eval_environ_t env, mf_status status, const char *fmt, ...) +env_throw(eval_environ_t env, mf_exception status, const char *fmt, ...) { va_list ap; size_t off; @@ -1895,7 +1895,7 @@ env_throw(eval_environ_t env, mf_status status, const char *fmt, ...) } void -env_throw_bi(eval_environ_t env, mf_status status, const char *biname, +env_throw_bi(eval_environ_t env, mf_exception status, const char *biname, const char *fmt, ...) { va_list ap; |