BC_STATUS_LEX_NO_STRING_END,
BC_STATUS_LEX_NO_COMMENT_END,
BC_STATUS_LEX_EOF,
-#ifdef ENABLE_DC
+#if ENABLE_DC
BC_STATUS_LEX_EXTENDED_REG,
-#endif // ENABLE_DC
+#endif
BC_STATUS_PARSE_BAD_TOKEN,
BC_STATUS_PARSE_BAD_EXP,
BC_STATUS_VEC_OUT_OF_BOUNDS,
BC_STATUS_VEC_ITEM_EXISTS,
-#ifdef ENABLE_BC
+#if ENABLE_BC
BC_STATUS_POSIX_NAME_LEN,
BC_STATUS_POSIX_COMMENT,
BC_STATUS_POSIX_BAD_KW,
BC_STATUS_POSIX_FOR2,
BC_STATUS_POSIX_FOR3,
BC_STATUS_POSIX_BRACE,
-#endif // ENABLE_BC
+#endif
BC_STATUS_QUIT,
BC_STATUS_LIMITS,
#define BC_ERR_IDX_MATH (3)
#define BC_ERR_IDX_EXEC (4)
#define BC_ERR_IDX_VEC (5)
-#ifdef ENABLE_BC
+#if ENABLE_BC
#define BC_ERR_IDX_POSIX (6)
-#endif // ENABLE_BC
+#endif
#define BC_VEC_INVALID_IDX ((size_t) -1)
#define BC_VEC_START_CAP (1 << 5)
typedef enum BcInst {
-#ifdef ENABLE_BC
+#if ENABLE_BC
BC_INST_INC_PRE,
BC_INST_DEC_PRE,
BC_INST_INC_POST,
BC_INST_DEC_POST,
-#endif // ENABLE_BC
+#endif
BC_INST_NEG,
BC_INST_BOOL_OR,
BC_INST_BOOL_AND,
-#ifdef ENABLE_BC
+#if ENABLE_BC
BC_INST_ASSIGN_POWER,
BC_INST_ASSIGN_MULTIPLY,
BC_INST_ASSIGN_DIVIDE,
BC_INST_ASSIGN_MODULUS,
BC_INST_ASSIGN_PLUS,
BC_INST_ASSIGN_MINUS,
-#endif // ENABLE_BC
+#endif
BC_INST_ASSIGN,
BC_INST_NUM,
BC_INST_STR,
BC_INST_PRINT_STR,
-#ifdef ENABLE_BC
+#if ENABLE_BC
BC_INST_JUMP,
BC_INST_JUMP_ZERO,
BC_INST_RET0,
BC_INST_HALT,
-#endif // ENABLE_BC
+#endif
BC_INST_POP,
BC_INST_POP_EXEC,
-#ifdef ENABLE_DC
+#if ENABLE_DC
BC_INST_MODEXP,
BC_INST_DIVMOD,
BC_INST_NQUIT,
BC_INST_INVALID = -1,
-#endif // ENABLE_DC
+#endif
} BcInst;
BC_LEX_KEY_SQRT,
BC_LEX_KEY_WHILE,
-#ifdef ENABLE_DC
+#if ENABLE_DC
BC_LEX_EQ_NO_REG,
BC_LEX_OP_MODEXP,
BC_LEX_OP_DIVMOD,
BC_LEX_PRINT_POP,
BC_LEX_NQUIT,
BC_LEX_SCALE_FACTOR,
-#endif // ENABLE_DC
+#endif
} BcLexType;
} BcParse;
-#ifdef ENABLE_BC
+#if ENABLE_BC
BcStatus bc_main(int argc, char *argv[]);
static BcStatus bc_parse_parse(BcParse *p);
static BcStatus bc_parse_expr(BcParse *p, uint8_t flags, BcParseNext next);
-#endif // ENABLE_BC
+#endif
#ifdef ENABLE_DC
BcNum hexb;
-#ifdef ENABLE_DC
+#if ENABLE_DC
BcNum strmb;
-#endif // ENABLE_DC
+#endif
BcVec results;
BcVec stack;
#define BC_PROG_MAIN (0)
#define BC_PROG_READ (1)
-#ifdef ENABLE_DC
+#if ENABLE_DC
#define BC_PROG_REQ_FUNCS (2)
-#endif // ENABLE_DC
+#endif
#define BC_PROG_STR(n) (!(n)->num && !(n)->cap)
#define BC_PROG_NUM(r, n) \
const char *name;
#if ENABLE_FEATURE_BC_SIGNALS
const char *sig_msg;
-#endif // ENABLE_FEATURE_BC_SIGNALS
+#endif
const char *help;
bool bc;
} BcGlobals;
-#ifdef ENABLE_BC
+#if ENABLE_BC
static BcStatus bc_vm_posixError(BcStatus s, const char *file, size_t line,
const char *msg);
-#endif // ENABLE_BC
+#endif
static void bc_vm_exit(BcStatus s);
static void bc_vm_printf(FILE *restrict f, const char *fmt, ...);
static BcGlobals bcg;
-#ifdef ENABLE_BC
+#if ENABLE_BC
static const char bc_name[] = "bc";
-#if ENABLE_FEATURE_BC_SIGNALS
+# if ENABLE_FEATURE_BC_SIGNALS
static const char bc_sig_msg[] = "\ninterrupt (type \"quit\" to exit)\n";
-#endif // ENABLE_FEATURE_BC_SIGNALS
-#endif // ENABLE_BC
+# endif
+#endif
-#ifdef ENABLE_DC
+#if ENABLE_DC
static const char dc_name[] = "dc";
-#if ENABLE_FEATURE_BC_SIGNALS
+# if ENABLE_FEATURE_BC_SIGNALS
static const char dc_sig_msg[] = "\ninterrupt (type \"q\" to exit)\n";
-#endif // ENABLE_FEATURE_BC_SIGNALS
-#endif // ENABLE_DC
+# endif
+#endif
static const char bc_copyright[] =
"Copyright (c) 2018 Gavin D. Howard and contributors\n"
"Math",
"Runtime",
"Vector",
-#ifdef ENABLE_BC
+#if ENABLE_BC
"POSIX",
-#endif // ENABLE_BC
+#endif
};
static const uint8_t bc_err_ids[] = {
BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM,
BC_ERR_IDX_LEX, BC_ERR_IDX_LEX, BC_ERR_IDX_LEX, BC_ERR_IDX_LEX,
-#ifdef ENABLE_DC
+#if ENABLE_DC
BC_ERR_IDX_LEX,
-#endif // ENABLE_DC
+#endif
BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE,
BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE, BC_ERR_IDX_PARSE,
BC_ERR_IDX_MATH, BC_ERR_IDX_MATH, BC_ERR_IDX_MATH, BC_ERR_IDX_MATH,
BC_ERR_IDX_MATH,
-#ifdef ENABLE_DC
+#if ENABLE_DC
BC_ERR_IDX_MATH,
-#endif // ENABLE_DC
+#endif
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC, BC_ERR_IDX_EXEC,
BC_ERR_IDX_EXEC,
BC_ERR_IDX_VEC, BC_ERR_IDX_VEC,
-#ifdef ENABLE_BC
+#if ENABLE_BC
BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX,
BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX,
BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX, BC_ERR_IDX_POSIX,
-#endif // ENABLE_BC
+#endif
BC_ERR_IDX_VM, BC_ERR_IDX_VM, BC_ERR_IDX_VM,
};
"string end could not be found",
"comment end could not be found",
"end of file",
-#ifdef ENABLE_DC
+#if ENABLE_DC
"extended register",
-#endif // ENABLE_DC
+#endif
"bad token",
"bad expression",
"index is out of bounds",
"item already exists",
-#ifdef ENABLE_BC
+#if ENABLE_BC
"POSIX only allows one character names; the following is bad:",
"POSIX does not allow '#' script comments",
"POSIX does not allow the following keyword:",
"POSIX does not allow an empty condition expression in a for loop",
"POSIX does not allow an empty update expression in a for loop",
"POSIX requires the left brace be on the same line as the function header",
-#endif // ENABLE_BC
+#endif
};
static const char bc_func_main[] = "(main)";
static const char bc_func_read[] = "(read)";
-#ifdef ENABLE_BC
+#if ENABLE_BC
static const BcLexKeyword bc_lex_kws[20] = {
BC_LEX_KW_ENTRY("auto", 4, true),
BC_LEX_KW_ENTRY("break", 5, true),
BC_PARSE_NEXT(2, BC_LEX_NLINE, BC_LEX_EOF);
#endif // ENABLE_BC
-#ifdef ENABLE_DC
+#if ENABLE_DC
static const BcLexType dc_lex_regs[] = {
BC_LEX_OP_REL_EQ, BC_LEX_OP_REL_LE, BC_LEX_OP_REL_GE, BC_LEX_OP_REL_NE,
BC_LEX_OP_REL_LT, BC_LEX_OP_REL_GT, BC_LEX_SCOLON, BC_LEX_COLON,
};
#endif // ENABLE_DC
-static const char bc_num_hex_digits[] = "0123456789ABCDEF";
-
static const BcNumBinaryOp bc_program_ops[] = {
bc_num_pow, bc_num_mul, bc_num_div, bc_num_mod, bc_num_add, bc_num_sub,
};
static const char bc_program_stdin_name[] = "<stdin>";
static const char bc_program_ready_msg[] = "ready for more input\n";
-#ifdef ENABLE_BC
+#if ENABLE_BC
static const char *bc_lib_name = "gen/lib.bc";
static const char bc_lib[] = {
continue;
}
-#endif // ENABLE_FEATURE_BC_SIGNALS
+#endif
return BC_STATUS_IO_ERR;
}
static BcStatus bc_read_file(const char *path, char **buf)
{
BcStatus s = BC_STATUS_BIN_FILE;
- size_t size = ((size_t) -1), read;
+ size_t size = ((size_t) -1);
+ size_t i;
*buf = xmalloc_open_read_close(path, &size);
- for (read = 0; read < size; ++read) {
- if (BC_READ_BIN_CHAR((*buf)[read])) goto read_err;
+ for (i = 0; i < size; ++i) {
+ if (BC_READ_BIN_CHAR((*buf)[i]))
+ goto read_err;
}
return BC_STATUS_SUCCESS;
"quiet\0"No_argument"q"
"mathlib\0"No_argument"l"
"interactive\0"No_argument"i";
-#endif // ENABLE_FEATURE_BC_LONG_OPTIONS
+#endif
static const char bc_args_opt[] ALIGN1 = "xwvsqli";
#if ENABLE_FEATURE_BC_LONG_OPTIONS
*flags = getopt32long(argv, bc_args_opt, bc_args_lopt);
-#else // ENABLE_FEATURE_BC_LONG_OPTIONS
+#else
*flags = getopt32(argv, bc_args_opt);
-#endif // ENABLE_FEATURE_BC_LONG_OPTIONS
+#endif
if ((*flags) & BC_FLAG_V) bc_vm_info(NULL);
if (do_exit) exit((int) s);
}
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
static void bc_num_printChar(size_t num, size_t width, bool radix,
size_t *nchars, size_t line_len)
{
bc_vm_putchar((char) num);
*nchars = *nchars + width;
}
-#endif // ENABLE_DC
+#endif
static void bc_num_printDigits(size_t num, size_t width, bool radix,
size_t *nchars, size_t line_len)
{
- size_t exp, pow, div;
+ size_t exp, pow;
bc_num_printNewline(nchars, line_len);
bc_vm_putchar(radix ? '.' : ' ');
++(*nchars);
bc_num_printNewline(nchars, line_len);
- for (exp = 0, pow = 1; exp < width - 1; ++exp, pow *= 10);
+ for (exp = 0, pow = 1; exp < width - 1; ++exp, pow *= 10)
+ continue;
for (exp = 0; exp < width; pow /= 10, ++(*nchars), ++exp) {
+ size_t dig;
bc_num_printNewline(nchars, line_len);
- div = num / pow;
- num -= div * pow;
- bc_vm_putchar(((char) div) + '0');
+ dig = num / pow;
+ num -= dig * pow;
+ bc_vm_putchar(((char) dig) + '0');
}
}
}
bc_num_printNewline(nchars, line_len);
- bc_vm_putchar(bc_num_hex_digits[num]);
+ bc_vm_putchar(bb_hexdigits_upcase[num]);
*nchars = *nchars + width;
}
return s;
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
static BcStatus bc_num_stream(BcNum *n, BcNum *base, size_t *nchars, size_t len)
{
return bc_num_printNum(n, base, 1, nchars, len, bc_num_printChar);
}
-#endif // ENABLE_DC
+#endif
static void bc_num_init(BcNum *n, size_t req)
{
return s;
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
static BcStatus bc_num_modexp(BcNum *a, BcNum *b, BcNum *c, BcNum *restrict d)
{
BcStatus s;
free(*((char **) string));
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
static void bc_result_copy(BcResult *d, BcResult *src)
{
d->t = src->t;
return bc_lex_next(l);
}
-#ifdef ENABLE_BC
+#if ENABLE_BC
static BcStatus bc_lex_identifier(BcLex *l)
{
BcStatus s;
}
#endif // ENABLE_BC
-#ifdef ENABLE_DC
+#if ENABLE_DC
static BcStatus dc_lex_register(BcLex *l)
{
BcStatus s = BC_STATUS_SUCCESS;
bc_parse_updateFunc(p, func);
}
-#ifdef ENABLE_BC
+#if ENABLE_BC
static BcStatus bc_parse_else(BcParse *p);
static BcStatus bc_parse_stmt(BcParse *p);
}
#endif // ENABLE_BC
-#ifdef ENABLE_DC
+#if ENABLE_DC
static BcStatus dc_parse_register(BcParse *p)
{
BcStatus s;
return BC_STATUS_EXEC_BAD_TYPE;
if (!assign && !BC_PROG_NUM((*r), (*ln))) return BC_STATUS_EXEC_BAD_TYPE;
-#ifdef ENABLE_DC
-#else // ENABLE_DC
-#endif // ENABLE_DC
-
return s;
}
s = bc_program_num(p, *r, n, false);
if (s) return s;
-#ifdef ENABLE_DC
-#endif // ENABLE_DC
-
if (!BC_PROG_NUM((*r), (*n))) return BC_STATUS_EXEC_BAD_TYPE;
return s;
{
size_t i, len = strlen(str);
-#ifdef ENABLE_DC
+#if ENABLE_DC
if (len == 0) {
bc_vm_putchar('\0');
return;
}
-#endif // ENABLE_DC
+#endif
for (i = 0; i < len; ++i, ++(*nchars)) {
return s;
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
static BcStatus bc_program_assignStr(BcProgram *p, BcResult *r, BcVec *v,
bool push)
{
if ((ptr->t == BC_RESULT_ARRAY) != !var) return BC_STATUS_EXEC_BAD_TYPE;
bc_program_search(p, name, &v, var);
-#ifdef ENABLE_DC
+#if ENABLE_DC
if (ptr->t == BC_RESULT_STR && !var) return BC_STATUS_EXEC_BAD_TYPE;
if (ptr->t == BC_RESULT_STR) return bc_program_assignStr(p, ptr, v, true);
-#endif // ENABLE_DC
+#endif
s = bc_program_num(p, ptr, &n, false);
if (s) return s;
ib = left->t == BC_RESULT_IBASE;
sc = left->t == BC_RESULT_SCALE;
-#ifdef ENABLE_DC
+#if ENABLE_DC
if (right->t == BC_RESULT_STR) {
return bc_program_assignStr(p, right, v, false);
}
-#endif // ENABLE_DC
+#endif
if (left->t == BC_RESULT_CONSTANT || left->t == BC_RESULT_TEMP)
return BC_STATUS_PARSE_BAD_ASSIGN;
-#ifdef ENABLE_BC
+#if ENABLE_BC
if (inst == BC_INST_ASSIGN_DIVIDE && !bc_num_cmp(r, &p->zero))
return BC_STATUS_MATH_DIVIDE_BY_ZERO;
s = bc_program_ops[inst - BC_INST_ASSIGN_POWER](l, r, l, p->scale);
if (s) return s;
-#else // ENABLE_BC
+#else
bc_num_copy(l, r);
-#endif // ENABLE_BC
+#endif
if (ib || sc || left->t == BC_RESULT_OBASE) {
BcStatus s = BC_STATUS_SUCCESS;
BcResult r;
char *name = bc_program_name(code, bgn);
-#ifdef ENABLE_DC // Exclude
+#if ENABLE_DC // Exclude
BcNum *num;
BcVec *v;
-#else // ENABLE_DC
+#else
(void) pop, (void) copy;
-#endif // ENABLE_DC Exclude
+#endif
r.t = BC_RESULT_VAR;
r.d.id.name = name;
-#ifdef ENABLE_DC
+#if ENABLE_DC
bc_program_search(p, name, &v, true);
num = bc_vec_top(v);
return s;
}
-#ifdef ENABLE_BC
+#if ENABLE_BC
static BcStatus bc_program_incdec(BcProgram *p, char inst)
{
BcStatus s;
s = bc_program_num(p, opnd, &num, false);
if (s) return s;
-#ifdef ENABLE_DC
+#if ENABLE_DC
if (!BC_PROG_NUM(opnd, num) && !len) return BC_STATUS_EXEC_BAD_TYPE;
-#endif // ENABLE_DC
+#endif
bc_num_init(&res.d.n, BC_NUM_DEF_SIZE);
if (inst == BC_INST_SQRT) s = bc_num_sqrt(num, &res.d.n, p->scale);
-#ifdef ENABLE_BC
+#if ENABLE_BC
else if (len != 0 && opnd->t == BC_RESULT_ARRAY) {
s = bc_num_ulong2num(&res.d.n, (unsigned long) ((BcVec *) num)->len);
}
-#endif // ENABLE_BC
-#ifdef ENABLE_DC
+#endif
+#if ENABLE_DC
else if (len != 0 && !BC_PROG_NUM(opnd, num)) {
char **str;
s = bc_num_ulong2num(&res.d.n, strlen(*str));
if (s) goto err;
}
-#endif // ENABLE_DC
+#endif
else {
BcProgramBuiltIn f = len ? bc_program_len : bc_program_scale;
s = bc_num_ulong2num(&res.d.n, f(num));
return s;
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
static BcStatus bc_program_divmod(BcProgram *p)
{
BcStatus s;
bc_num_free(&p->ib);
bc_num_free(&p->ob);
bc_num_free(&p->hexb);
-#ifdef ENABLE_DC
+#if ENABLE_DC
bc_num_free(&p->strmb);
-#endif // ENABLE_DC
+#endif
bc_vec_free(&p->fns);
bc_vec_free(&p->fn_map);
bc_vec_free(&p->vars);
bc_num_ten(&p->hexb);
p->hexb.num[0] = 6;
-#ifdef ENABLE_DC
+#if ENABLE_DC
bc_num_init(&p->strmb, BC_NUM_DEF_SIZE);
bc_num_ulong2num(&p->strmb, UCHAR_MAX + 1);
-#endif // ENABLE_DC
+#endif
bc_num_init(&p->last, BC_NUM_DEF_SIZE);
bc_num_zero(&p->last);
switch (inst) {
-#ifdef ENABLE_BC
+#if ENABLE_BC
case BC_INST_JUMP_ZERO:
{
s = bc_program_prep(p, &ptr, &num);
break;
}
-#ifdef ENABLE_BC
+#if ENABLE_BC
case BC_INST_ASSIGN_POWER:
case BC_INST_ASSIGN_MULTIPLY:
case BC_INST_ASSIGN_DIVIDE:
case BC_INST_ASSIGN_MODULUS:
case BC_INST_ASSIGN_PLUS:
case BC_INST_ASSIGN_MINUS:
-#endif // ENABLE_BC
+#endif
case BC_INST_ASSIGN:
{
s = bc_program_assign(p, inst);
break;
}
-#ifdef ENABLE_DC
+#if ENABLE_DC
case BC_INST_MODEXP:
{
s = bc_program_modexp(p);
}
errno = err;
}
-#endif // ENABLE_FEATURE_BC_SIGNALS
+#endif
static void bc_vm_info(const char *const help)
{
return s * (!bcg.ttyin || !!strcmp(file, bc_program_stdin_name));
}
-#ifdef ENABLE_BC
+#if ENABLE_BC
static BcStatus bc_vm_posixError(BcStatus s, const char *file, size_t line,
const char *msg)
{
BcStatus s = BC_STATUS_SUCCESS;
size_t i;
-#ifdef ENABLE_BC
+#if ENABLE_BC
if (vm->flags & BC_FLAG_L) {
bc_lex_file(&vm->prs.l, bc_lib_name);
s = bc_program_exec(&vm->prog);
if (s) return s;
}
-#endif // ENABLE_BC
+#endif
for (i = 0; !s && i < vm->files.len; ++i)
s = bc_vm_file(vm, *((char **) bc_vec_item(&vm->files, i)));
sa.sa_handler = bc_vm_sig;
sa.sa_flags = 0;
sigaction(SIGINT, &sa, NULL);
-#endif // ENABLE_FEATURE_BC_SIGNALS
+#endif
memset(vm, 0, sizeof(BcVm));
bc_vec_init(&vm->files, sizeof(char *), NULL);
-#ifdef ENABLE_BC
+#if ENABLE_BC
vm->flags |= BC_FLAG_S * bcg.bc * (getenv("POSIXLY_CORRECT") != NULL);
if (bcg.bc) s = bc_vm_envArgs(vm);
-#endif // ENABLE_BC
+#endif
bc_program_init(&vm->prog, len, exe.init, exe.exp);
exe.init(&vm->prs, &vm->prog, BC_PROG_MAIN);
bcg.ttyin = isatty(0);
bcg.tty = bcg.ttyin || (vm.flags & BC_FLAG_I) || isatty(1);
-#ifdef ENABLE_BC
+#if ENABLE_BC
bcg.posix = vm.flags & BC_FLAG_S;
bcg.warn = vm.flags & BC_FLAG_W;
-#endif // ENABLE_BC
-#ifdef ENABLE_DC
+#endif
+#if ENABLE_DC
bcg.exreg = vm.flags & BC_FLAG_X;
-#endif // ENABLE_DC
+#endif
if (bcg.ttyin && !(vm.flags & BC_FLAG_Q)) bc_vm_info(NULL);
st = bc_vm_exec(&vm);
return st;
}
-#ifdef ENABLE_BC
+#if ENABLE_BC
BcStatus bc_main(int argc, char *argv[])
{
BcVmExe exec;
bcg.bc = true;
bcg.name = bc_name;
-#if ENABLE_FEATURE_BC_SIGNALS
+# if ENABLE_FEATURE_BC_SIGNALS
bcg.sig_msg = bc_sig_msg;
-#endif // ENABLE_FEATURE_BC_SIGNALS
+# endif
exec.init = bc_parse_init;
exec.exp = bc_parse_expression;
return bc_vm_run(argc, argv, exec, "BC_LINE_LENGTH");
}
-#endif // ENABLE_BC
+#endif
-#ifdef ENABLE_DC
+#if ENABLE_DC
BcStatus dc_main(int argc, char *argv[])
{
BcVmExe exec;
bcg.bc = false;
bcg.name = dc_name;
-#if ENABLE_FEATURE_BC_SIGNALS
+# if ENABLE_FEATURE_BC_SIGNALS
bcg.sig_msg = dc_sig_msg;
-#endif // ENABLE_FEATURE_BC_SIGNALS
+# endif
exec.init = dc_parse_init;
exec.exp = dc_parse_expr;
return bc_vm_run(argc, argv, exec, "DC_LINE_LENGTH");
}
-#endif // ENABLE_DC
+#endif