Home
last modified time | relevance | path

Searched refs:BC_ERR (Results 1 – 19 of 19) sorted by relevance

/freebsd/contrib/bc/src/
H A Dbc_parse.c347 if (BC_ERR(comma)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_args()
428 if (BC_ERR(!(flags & BC_PARSE_ARRAY))) in bc_parse_name()
446 if (BC_ERR(p->l.t != BC_LEX_RBRACKET)) in bc_parse_name()
465 if (BC_ERR(flags & BC_PARSE_NOCALL)) in bc_parse_name()
502 if (BC_ERR(p->l.t != BC_LEX_LPAREN)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_noArgBuiltin()
526 if (BC_ERR(p->l.t != BC_LEX_LPAREN)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_builtin()
546 if (BC_ERR(p->l.t != BC_LEX_RPAREN)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_builtin()
570 if (BC_ERR(p->l.t != BC_LEX_LPAREN)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_builtin3()
581 if (BC_ERR(p->l.t != BC_LEX_COMMA)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_builtin3()
588 if (BC_ERR(p->l.t != BC_LEX_COMMA)) bc_parse_err(p, BC_ERR_PARSE_TOKEN); in bc_parse_builtin3()
[all …]
H A Dread.c89 if (BC_ERR(BC_READ_BIN_CHAR(buf[i]))) return true; in bc_read_binary()
257 if (BC_ERR(bc_read_binary(vec->v, vec->len - 1))) in bc_read_line()
291 if (BC_ERR(fd < 0)) bc_verr(BC_ERR_FATAL_FILE_ERR, path); in bc_read_file()
295 if (BC_ERR(fstat(fd, &pstat) == -1)) goto malloc_err; in bc_read_file()
298 if (BC_ERR(S_ISDIR(pstat.st_mode))) in bc_read_file()
315 if (BC_ERR(r < 0)) goto read_err; in bc_read_file()
324 if (BC_ERR(bc_read_binary(buf, size))) in bc_read_file()
H A Dhistory.c198 if (BC_ERR(h->hist == NULL)) bc_vm_fatalError(BC_ERR_FATAL_ALLOC_ERR); in bc_history_init()
201 if (BC_ERR(h->el == NULL)) bc_vm_fatalError(BC_ERR_FATAL_ALLOC_ERR); in bc_history_init()
285 if (BC_ERR(line == NULL)) in bc_history_line()
711 if (BC_ERR(n <= 0)) goto err; in bc_history_readCode()
730 if (BC_ERR(n <= 0)) goto err; in bc_history_readCode()
742 if (BC_ERR(n <= 0)) goto err; in bc_history_readCode()
754 if (BC_ERR(n <= 0)) goto err; in bc_history_readCode()
770 if (BC_ERR(n < 0)) bc_vm_fatalError(BC_ERR_FATAL_IO_ERR); in bc_history_readCode()
846 if (BC_ERR(tcgetattr(STDIN_FILENO, &h->orig_termios) == -1)) in bc_history_enableRaw()
879 while (BC_ERR(err < 0) && errno == EINTR); in bc_history_enableRaw()
[all …]
H A Ddc_lex.c68 if (BC_ERR(!isalpha(c) && c != '_')) in dc_lex_register()
81 if (BC_ERR(l->buf[l->i - 1] == '\n')) in dc_lex_register()
144 if (BC_ERR(c == '\0' && depth)) in dc_lex_string()
160 if (BC_ERR(c == '\0' && depth)) in dc_lex_string()
H A Dfile.c105 if (BC_ERR(written == -1)) in bc_file_output()
194 if (BC_ERR(s)) in bc_file_flush()
237 if (BC_ERR(s)) in bc_file_write()
302 if (BC_ERR(r < 0)) in bc_file_vprintf()
434 if (BC_ERR(fputc(c, f->f) == EOF)) in bc_file_putchar()
H A Dprogram.c66 if (BC_ERR(!BC_PROG_NUM(r, n))) bc_err(BC_ERR_EXEC_TYPE); in bc_program_type_num()
79 if (BC_ERR((r->t != BC_RESULT_ARRAY) != (!t))) bc_err(BC_ERR_EXEC_TYPE); in bc_program_type_match()
454 if (BC_ERR((*r)->t == BC_RESULT_VOID)) bc_err(BC_ERR_EXEC_VOID_VAL); in bc_program_operand()
486 if (BC_ERR(!BC_PROG_STACK(&p->results, idx + 2))) in bc_program_binPrep()
514 if (BC_ERR(lt == BC_RESULT_STR)) bc_err(BC_ERR_EXEC_TYPE); in bc_program_binPrep()
570 if (BC_ERR(lt >= min && lt <= BC_RESULT_ONE)) bc_err(BC_ERR_EXEC_TYPE); in bc_program_assignPrep()
601 if (BC_ERR(!BC_PROG_STACK(&p->results, idx + 1))) in bc_program_prep()
794 if (BC_ERR(vm->read_prs.l.t != BC_LEX_NLINE && in bc_program_read()
964 if (BC_ERR(!BC_PROG_STACK(&p->results, idx + 1))) in bc_program_print()
982 if (BC_ERR(pop)) bc_err(BC_ERR_EXEC_VOID_VAL); in bc_program_print()
[all …]
H A Dvm.c450 if (BC_ERR(id == BC_ERR_IDX_FATAL || fout_s == BC_STATUS_ERROR_FATAL ||
457 if (BC_ERR(fout_s == BC_STATUS_ERROR_FATAL))
461 else if (BC_ERR(s == BC_STATUS_ERROR_FATAL))
472 if (BC_ERR(vm->status)) BC_JMP;
803 if (BC_ERR(BC_VM_MUL_OVERFLOW(n, size, res)))
816 if (BC_ERR(res >= SIZE_MAX || res < a))
833 if (BC_ERR(ptr == NULL))
839 if (BC_ERR(ptr == NULL)) bc_vm_fatalError(BC_ERR_FATAL_ALLOC_ERR);
854 if (BC_ERR(temp == NULL))
860 if (BC_ERR(temp == NULL)) bc_vm_fatalError(BC_ERR_FATAL_ALLOC_ERR);
[all …]
H A Drand.c220 if (BC_ERR(nread != sizeof(ulong))) bc_vm_fatalError(BC_ERR_FATAL_IO_ERR); in bc_rand_frand()
244 if (BC_ERR(!BCRYPT_SUCCESS(s))) buf[0] = 0; in bc_rand_winrand()
452 while (BC_ERR(BC_RAND_ZERO(rng))) in bc_rand_srand()
503 if (BC_ERR(BC_RAND_ZERO(rng))) bc_rand_srand(rng); in bc_rand_int()
590 if (BC_ERR(BC_RAND_ZERO(rng))) bc_rand_srand(rng); in bc_rand_getRands()
H A Ddc_parse.c199 if (BC_ERR(flags & BC_PARSE_NOREAD)) in dc_parse_token()
417 if (BC_ERR(need_expr && !have_expr)) bc_err(BC_ERR_EXEC_READ_EXPR); in dc_parse_expr()
433 if (BC_ERR(p->l.t == BC_LEX_EOF)) bc_parse_err(p, BC_ERR_PARSE_EOF); in dc_parse_parse()
H A Dlex.c96 if (BC_ERR(!c || buf[i + 1] == '\0')) in bc_lex_comment()
243 if (BC_ERR(!BC_LEX_NUM_CHAR(c, false, true))) in bc_lex_number()
316 if (BC_ERR(l->last == BC_LEX_EOF)) bc_lex_err(l, BC_ERR_PARSE_EOF); in bc_lex_next()
H A Dargs.c102 if (BC_ERR(!strvalid)) in bc_args_builtin()
278 if (BC_ERR(!bc_num_strValid(opts.optarg))) in bc_args()
H A Dlibrary.c98 if (BC_ERR(r != 0)) return BCL_ERROR_FATAL_ALLOC_ERR; in bcl_start()
105 if (BC_ERR(tls_real == TLS_OUT_OF_INDEXES)) in bcl_start()
132 if (BC_ERR(r != 0)) return BCL_ERROR_FATAL_ALLOC_ERR; in bcl_setspecific()
141 if (BC_ERR(!r)) return BCL_ERROR_FATAL_ALLOC_ERR; in bcl_setspecific()
185 if (BC_ERR(vm == NULL)) return BCL_ERROR_FATAL_ALLOC_ERR; in bcl_init()
188 if (BC_ERR(e != BCL_ERROR_NONE)) in bcl_init()
233 if (BC_ERR(vm != NULL && vm->err)) in bcl_init()
404 if (BC_ERR(vm->err && ctxt != NULL)) in bcl_ctxt_create()
1139 if (BC_ERR(vm->err)) in bcl_divmod_helper()
1375 if (BC_ERR(BCL_NO_GE in bcl_string_helper()
[all...]
H A Dbc_lex.c90 if (BC_ERR(l->str.len - 1 > 1)) in bc_lex_identifier()
129 if (BC_ERR(c == '\0') && !vm->eof && l->mode != BC_MODE_FILE) in bc_lex_string()
H A Dnum.c67 if (BC_ERR(BC_VM_MUL_OVERFLOW(a, b, res))) bc_err(BC_ERR_MATH_OVERFLOW); in bc_num_mulOverflow()
1005 if (BC_ERR(!zero)) return true; in bc_num_nonInt()
1033 if (BC_ERR(bc_num_nonInt(b, &temp))) bc_err(BC_ERR_MATH_NON_INTEGER); in bc_num_intop()
2115 if (BC_ERR(bc_num_nonInt(b, &btemp))) bc_err(BC_ERR_MATH_NON_INTEGER); in bc_num_p()
3666 if (BC_ERR(BC_NUM_NEG(n))) bc_err(BC_ERR_MATH_NEGATIVE); in bc_num_bigdig()
3667 if (BC_ERR(bc_num_cmp(n, &vm->max) >= 0)) bc_err(BC_ERR_MATH_OVERFLOW); in bc_num_bigdig()
3883 if (BC_ERR(BC_NUM_NEG(a))) bc_err(BC_ERR_MATH_NEGATIVE); in bc_num_irand()
3894 if (BC_ERR(bc_num_nonInt(a, &atemp))) bc_err(BC_ERR_MATH_NON_INTEGER); in bc_num_irand()
4141 if (BC_ERR(BC_NUM_NEG(a))) bc_err(BC_ERR_MATH_NEGATIVE); in bc_num_sqrt()
4370 if (BC_ERR(BC_NUM_ZERO(c))) bc_err(BC_ERR_MATH_DIVIDE_BY_ZERO); in bc_num_modexp()
[all …]
H A Dparse.c223 if (BC_ERR(vm->status)) BC_JMP; in bc_parse_reset()
H A Dlang.c76 if (BC_ERR(idx == aptr->idx && type == aptr->type)) in bc_func_insert()
/freebsd/contrib/bc/include/
H A Dlibrary.h236 if (BC_ERR((e) != BCL_ERROR_NONE)) \
254 if (BC_ERR(c == NULL)) \
271 if (BC_ERR(c == NULL)) \
300 if (BC_ERR(no_gen_ >= (c)->nums.len)) \
326 if (BC_ERR(no_gen_ >= (c)->nums.len)) \
H A Dstatus.h175 #define BC_ERR(e) BC_UNLIKELY(e) macro
/freebsd/contrib/bc/gen/
H A Dstrgen.c169 if (BC_ERR(fd < 0)) in bc_read_file()
177 if (BC_ERR(fstat(fd, &pstat) == -1)) in bc_read_file()
184 if (BC_ERR(S_ISDIR(pstat.st_mode))) in bc_read_file()
206 if (BC_ERR(r < 0)) exit(e); in bc_read_file()