Denys Vlasenko | 74156331280 | bc: preparation to stop using p->exits when parsing if()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 5d18f6be90a | bc: fix "print 1,2,3" parsing
function old new delta
zbc_parse_stm... | | |
Denys Vlasenko | cb18b546f7e | bc: disallow empty statement as function body
$ bc
define z() <cr>
<cr>
bc: no statement after 'define'
functio... | | |
Denys Vlasenko | 2e8be023cbd | bc: allow only one <newline> between if() and stmt
Attempt to have more than one causes this error message:
$ bc -... | | |
Denys Vlasenko | e6c40c48d96 | bc: simplify bc_parse_pushName(), do not free name in it - avoids one strdup
function ... | | |
Denys Vlasenko | 563d93c9a4e | bc: simplify zbc_parse_break_or_continue(), logic is the same
function o... | | |
Denys Vlasenko | a50576a415a | bc: fold zbc_parse_else() into its only caller
While at it, allow newline between "else" and its body
Signed-off-by... | | |
Denys Vlasenko | 6d29879c676 | bc: fold bc_parse_noElse() into its only caller
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 9dc5d08baa4 | bc: delete unused (write-only) BcParse::nbraces member
function old ... | | |
Denys Vlasenko | 202dd1943c9 | bc: fixes for multi-line if/while/for
function old new delta
zbc_v... | | |
Denys Vlasenko | e9519e44a65 | bc: fix handling of 'return' not in functions, and 'define f()<newline>{...}'
function ... | | |
Denys Vlasenko | d1d29b4245a | bc: partially rewrite parser, tests pass, ^C might be broken now
The entire control construct (if/while/for/funcdef)... | | |
Denys Vlasenko | 99b37623356 | bc: lexer debugging, added some failing test cases
function old new ... | | |
Denys Vlasenko | fd51e0c4d22 | bc: simplify BC_INST_JUMP[_ZERO] handling
function old new delta
z... | | |
Denys Vlasenko | 7db384338a8 | bc: rewrite "block flag stack" using simple realloc'ed byte array
Each access to current top flag took a function ca... | | |
Denys Vlasenko | f10f17f8d3e | bc: drop zbc_parse_endBody() bool parameter, move its code to caller which uses it
function ... | | |
Denys Vlasenko | 0154d78738d | bc: shorten one message, make defines more readable
text data bss dec hex filename
979916 485... | | |
Denys Vlasenko | 7b1df3db975 | bc: pull zbc_lex_next() call out of zbc_parse_operator() into one caller that uses it
function ... | | |
Denys Vlasenko | 17df882a575 | bx: add more debug scaffolding
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 2ea53a45b7c | bc: convert macro bc_parse_push() to function, add debug infrastructure
function ... | | |
Denys Vlasenko | f86e960e7c2 | bc: rename zbc_parse_text() to ..._init(), reuse existing code for library parsing
function ... | | |
Denys Vlasenko | 0a23814e98f | bc: compress two constant arguments of bc_lex_assign() to one
function o... | | |
Denys Vlasenko | 8226912b2c0 | bc: remove stale comment, empty lines, regularize comment style
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.... | | |
Denys Vlasenko | 87b49beeda5 | bc: tweak bc_num_parseDecimal() for readability, logic is not changed
function ... | | |
Denys Vlasenko | 240d7ee3fcf | bc: shrink s() in library again
function old new delta
bc_lib ... | | |
Denys Vlasenko | fc9d26902ba | bc: yet another library shrink
function old new delta
bc_lib ... | | |
Denys Vlasenko | c06537d9bbe | bc: shrink internal library yet more
function old new delta
bc_lib... | | |
Denys Vlasenko | 203210e2535 | bc: shrink internal library more
function old new delta
bc_lib ... | | |
Denys Vlasenko | 3ac0c21a1fe | bc: shrink internal library
function old new delta
bc_lib ... | | |
Denys Vlasenko | 57b6918b0a1 | bc: group ENABLE_BC code a bit better, no logic changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 5f263f406c9 | bc: fix "dc only" bug
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | e755e30402e | bc: unbreak "only bc" and "only dc" configs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 89198a9e5d4 | bc: simplify bc_lex_whitespace()
function old new delta
bc_lex_whi... | | |
Denys Vlasenko | bbcecc41184 | bc: G.sbgn and G.send are unused, remove them
function old new del... | | |
Denys Vlasenko | 0fe270e7753 | bc: simplify filename saving in zbc_vm_file()
function old new del... | | |
Denys Vlasenko | 915c72b2730 | bc: do not append duplicate NUL, reduce indentation in bc_read_line()
Signed-off-by: Denys Vlasenko <vda.linux@googl... | | |
Denys Vlasenko | 82ea67fbfa9 | bc: change bc_read_line() and zbc_vm_stdin() to avoid double buffers
function ... | | |
Denys Vlasenko | b7e61e3e4ad | bc: further simplification in zbc_vm_stdin()
function old new delt... | | |
Denys Vlasenko | 818b602c885 | bc: fix another thinko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 335b4efd2f5 | bc: fix a thinko: dc uses [] string delimiters, bot bc!
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 766f67250f0 | bc: fix comment handling
function old new delta
bc_vm_run ... | | |
Denys Vlasenko | 7dc0a51286b | bc: further zbc_vm_stdin() optimizations
function old new delta
bc... | | |
Denys Vlasenko | 40534bb6e29 | bc: shrink zbc_vm_stdin()
function old new delta
bc_vm_run ... | | |
Denys Vlasenko | 89e785af98a | bc: trim config help text, add a few comments, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 9811ad02bdb | bc: unbreak CONFIG_FEATURE_BC_SIGNALS=y config
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | c2265f526ee | bc: remove lexer function pointer
function old new delta
zbc_lex_n... | | |
Denys Vlasenko | c0ef23ca400 | bc: remove parse function pointer
function old new delta
zbc_progr... | | |
Denys Vlasenko | 19f110751d3 | bc: convert two more functions to "z" logic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 8a89247e0a8 | bc: remove BC_STATUS_EOF (again), the condition is detectable as len==0
function ... | | |
Denys Vlasenko | d8078a79beb | dc: fix EOF handling in case of last line being incomplete
This wasn't working correctly:
$ echo -ne '10 20+p' | dc... | | |
Denys Vlasenko | 9a23b07c4c0 | testsuite: add bc and dc tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | d6ad3666dc5 | bc: further conversions to "z" logic
function old new delta
bc_pro... | | |
Denys Vlasenko | c2da68e896d | bc: optimize bc_parse_pushIndex()
function old new delta
bc_parse_... | | |
Denys Vlasenko | 26819db9a3f | bc: convert even more of lexer functions to "z" convention
function old ... | | |
Denys Vlasenko | ae0faf91d0b | bc: convert even more of lexer functions to "z" convention
function old ... | | |
Denys Vlasenko | 8cd468f6043 | bc: convert more of lexer functions to "z" convention
function old n... | | |
Denys Vlasenko | 9a34e89289d | bc: partially convert lexer functions to "z" convention
function old ... | | |
Denys Vlasenko | 251fbb57be4 | bc: code shrink in bc_num_cmp()
function old new delta
bc_num_cmp ... | | |
Denys Vlasenko | 16494f557fd | bc: simplify zbc_program_logical()
function old new delta
bc_progr... | | |
Denys Vlasenko | 69171dc466a | bc: simplify nested read() check
function old new delta
bc_vm_run ... | | |
Denys Vlasenko | 12b9eaf7871 | bc: in non-interactive config, POSIX error functions never return nonzero
function ... | | |
Denys Vlasenko | f0f069b08f8 | bc: use common_parse_init() in bc_vm_init()
function old new delta... | | |
Denys Vlasenko | 4dd3652c2fa | bc: fix EOF handling in bc_program_read()
$ bc -q
read()
2^D^D2
^ prints the result of read()'ed expression
fu... | | |
Denys Vlasenko | 2c6f563216d | bc: tweak comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | c008a73762e | bc: convert bc_program_asciify to "z" function
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 9f657e0f7de | bc: shrink bc_program_printString
function old new delta
zbc_progr... | | |
Denys Vlasenko | 259137d0f06 | bc: convert zbc_program_op to "z" function, fix a thinko in prev commits
function ... | | |
Denys Vlasenko | 728e7c9ecb1 | bc: convert bc_program_logical to "z" function
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 09d8df84ee9 | bc: do not use "(cond ? f1 : f2)(params)" idiom, it messes up static function optimizations
With direct calls, GCC n... | | |
Denys Vlasenko | 7f4daa4f584 | bc: convert arithmetic calc functions to "z" logic
In order for magic macros to work, a bit of reordering was necess... | | |
Denys Vlasenko | 1aeacefbb33 | bc: rename arithmetic calc functions to "z" functions, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@goog... | | |
Denys Vlasenko | c2d15dff42d | bc: move declarations around, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | c355c4a7d62 | bc: code shrink in zbc_lex_number()
function old new delta
zbc_lex... | | |
Denys Vlasenko | b402ff844c7 | bc: make bc_program_pushVar "z-function"
function old new delta
bc... | | |
Denys Vlasenko | 2930123279c | bc: improve "noninteractive" macro machinery so that even "return zero" code is not generated
Most affected function... | | |
Denys Vlasenko | 91cde95916b | bc: it's not clear bc_vm_file() always exits on errors, remove ERRORS_ARE_FATAL
Signed-off-by: Denys Vlasenko <vda.l... | | |
Denys Vlasenko | 628bf1bc63a | bc: more ERRORS_ARE_FATAL annotations
function old new delta
bc_pr... | | |
Denys Vlasenko | 88cfea6a818 | bc: stop checking for name length in bc_lex_name()
Gigabyte-long names are not a practical concern.
function ... | | |
Denys Vlasenko | fa35e598ab3 | bc: optimize non-interactive config: we know that many functions always succeed
function ... | | |
Denys Vlasenko | 86e63cdeca9 | bc: in non-interactive config, let compiler know that error funcs do not return
function ... | | |
Denys Vlasenko | 3a4d5a73a87 | tls: prepare for ECDH_anon ciphers
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | c67ff8a1b04 | tls: fix a potential (currently "disabled" by a macro) SHA1-related bug
Signed-off-by: Denys Vlasenko <vda.linux@goo... | | |
Denys Vlasenko | 63bfe0e4c0f | tls: if !ENABLE_FEATURE_TLS_SHA1, tls->MAC_size is always SHA256_OUTSIZE for AES-CBC
function ... | | |
Denys Vlasenko | 71fa5b0a4c3 | tls: introduce FEATURE_TLS_SHA1 to make SHA1 code optional
When disabled:
function ... | | |
Denys Vlasenko | dafbc2cdb88 | bc: simplify bc_num_parseDecimal() further
function old new delta
... | | |
Denys Vlasenko | 5ba55f1f356 | bc: make all function pointers FAST_FUNC, on i486 this saves ~400 bytes
function ... | | |
Denys Vlasenko | c665c183f15 | bc: 0xffffffffffffffff may be larger than unsigned long
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 8b4cf0dbb08 | bc: optimize bc_vec_concat()
function old new delta
bc_vec_concat ... | | |
Denys Vlasenko | a7f1a365404 | bc: simplify bc_program_len()
function old new delta
bc_program_le... | | |
Denys Vlasenko | 44d79d866dc | bc: simplify bc_program_print()
function old new delta
bc_program_... | | |
Denys Vlasenko | b696d9ec204 | bc: simplify bc_num_ulong2num()
function old new delta
bc_num_ulon... | | |
Denys Vlasenko | 9311e018030 | bc: move str-to-num conversion functions to their only caller, bc_num_parse()
Signed-off-by: Denys Vlasenko <vda.lin... | | |
Denys Vlasenko | 218ed1cf546 | bc: further simplify string-to-number conversion code
function old n... | | |
Denys Vlasenko | 4a024c77199 | bc: simplify string-tonumber conversion code
function old new delt... | | |
Denys Vlasenko | 3129f705fc6 | bc: no need to "set to zero" BcNum after bc_num_init(), it already is
function ... | | |
Denys Vlasenko | e20e00de341 | bc: add and use bc_num_init_DEF_SIZE()
function old new delta
bc_n... | | |
Denys Vlasenko | 5ec4b491258 | bc: in bc_program_execStr(), push two variables into inner scope
function ... | | |
Denys Vlasenko | 927a7d6853d | bc: in bc_program_exec(), push two variables into inner scope
While at it, delete empty lines.
function ... | | |
Denys Vlasenko | 8fa1e8e6e74 | bc: add accessors for G.prog.strs[idx], G.prog.fns[idx]
function old ... | | |
Denys Vlasenko | 0f37b3286a9 | bc: eliminate always the same params to bc_num_printBase()
function old ... | | |
Denys Vlasenko | ebc41c9d943 | bc: remove redundant error checks in bc_parse_print()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 5f1b90b91af | bc: stop propagating pointer to G.prog.nchars deep into printing functions
function ... | | |
Denys Vlasenko | 2a8ad487340 | bc: do not pass line width in parameters, it's in globals
function old ... | | |
Denys Vlasenko | ac6ed11f8d4 | bc: remove "ready for more input" message, GNU bc does not print that
function ... | | |
Denys Vlasenko | 32ec5f17058 | tls: AES-GCM: in GMULT, avoid memcpy, use one less variable in bit loop
function ... | | |
Denys Vlasenko | 6e7c65fca0c | bc: trim banner, use empty interactive prompts (GNU bc compat)
function ... | | |
Denys Vlasenko | d0bc5fdfea7 | dc: fix "small dc" to have standard command line API
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 23427a63fc8 | lineedit: fix "defined but not used" sigaction2 warning
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 51283b8109d | mdev: suppress aliasing warning
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | b437df11579 | inetd: suppress aliasing warning
function old new delta
sigprocmas... | | |
Denys Vlasenko | 136fe9bede2 | suppress gcc 8 aliasing warnings
function old new delta
sigprocmas... | | |
Denys Vlasenko | 9f00a0fdb15 | tls: make RIGHTSHIFTX() in AES-GCM faster
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | f522dd94207 | bc: replace G.eof with a special exit code of bc_vm_stdin()
function old... | | |
Denys Vlasenko | 2d615fee387 | bc: convert two macros to functions, unwing one complex max(a,min(b,c))
function ... | | |
Denys Vlasenko | 64074a1767f | bc: do not perform domr limit checks when they can't work (e.g. on 32-bit arches)
Also, optimize printing of message... | | |
Denys Vlasenko | ffdcebdffe8 | bc: pull temporary into a register
function old new delta
bc_num_u... | | |
Denys Vlasenko | 18c6b54f820 | bc: use more compact parsing data structures
function old new delt... | | |
Denys Vlasenko | b9c321d6d94 | bc: use only G_interrupt as interrupt flag
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | c7a7ce06b82 | bc: fix exit codes for FEATURE_CLEAN_UP=y
$ echo 0/0 | ./busybox bc; echo $?
bc: divide by zero
1
$ echo halt | ./bu... | | |
Denys Vlasenko | a1331371748 | dc: fix testsuite
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 6d0be10aae1 | bc: correctly parse dc options
function old new delta
bc_vm_init ... | | |
Denys Vlasenko | 4c9455f967e | dc: fix "dc does_not_exist" SEGVing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 52c210594cf | fix make_single_applets.sh
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | b23ac51d0cf | bc: code shrink - convert two macros to functions
function old new ... | | |
Denys Vlasenko | d00d2f9603d | bc: make keyword POSIXness check more readable
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | b6f60863cb9 | bc: move a function to reduce forward declarations
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | e55a5726001 | bc: small simplification in dc_lex_token()
Pulling array element into a temporary, taking address of this temporary
... | | |
Denys Vlasenko | 2fa11b6d35b | bc: add comment about BC_NUM_DEF_SIZE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 1ff88621497 | bc: fix for prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 4c30406df6d | bc: do not needlessly use strcat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 23c2e9fcf9a | bc: unbreak "BC only" and "DC only" configs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 9ca9ef2d5b4 | dc: re-enable "tiny dc" implementation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | a68a87cd60c | bc: unbreak FEATURE_CLEAN_UP build
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | a6f84e1a35b | bc: reuse common string
text data bss dec hex filename
987232 485 7296 995013 f2ec5 bus... | | |
Denys Vlasenko | 95f93bdc280 | bc: hook up line editing with history buffer
function old new delt... | | |
Denys Vlasenko | ed849351d11 | bc: add preparatory indent block, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 1a6a482d19b | bc: if ^C handling is not selected, there is no interactive mode
function ... | | |
Denys Vlasenko | 54214c38db9 | bc: fix "bc -v" printing version info twice, and not exiting
function ol... | | |
Denys Vlasenko | 1ff1c709440 | bc: make bc_vm_envArgs() NULL-terminate its argv, simplify bc_vm_envLen()
function ... | | |
Denys Vlasenko | e873ff9660a | bc: if FEATURE_CLEAN_UP, clean up allocations on exits
Will have exitcode 1 even on "quit" and "halt", is it a probl... | | |
Denys Vlasenko | 050b0fe9a7b | bc: do not allow "()" as a valid expression
function old new delta... | | |
Denys Vlasenko | cca79a00647 | bc: reorder functions, delete forward declarations, no code changes - part 2
Signed-off-by: Denys Vlasenko <vda.linu... | | |
Denys Vlasenko | b0e37614106 | bc: reorder functions, delete forward declarations, no code changes
Pure block moves of text
Signed-off-by: Denys V... | | |
Denys Vlasenko | aad652a69a7 | bc: remove unused strings
text data bss dec hex filename
987088 485 7296 994869 f2e35 b... | | |
Denys Vlasenko | 452df923f7f | bc: trivial simplification in bc_parse_return()
function old new d... | | |
Denys Vlasenko | 657d6bb2626 | bc: fix "warning: 's' may be used uninitialized in this function"
Signed-off-by: Denys Vlasenko <vda.linux@googlemai... | | |
Denys Vlasenko | bcb62a7f119 | bc: code shrink
function old new delta
bc_parse_expr ... | | |
Denys Vlasenko | 6543758b130 | bc: code shrink
function old new delta
bc_parse_operator ... | | |
Denys Vlasenko | f381a88234c | bc: make division operation interruptible
function old new delta
b... | | |
Denys Vlasenko | b3cb90124bc | bc: use unsigned division by 10 instead of signed
function old new ... | | |
Denys Vlasenko | 06fa65bd954 | bc: move ^C check fro power calculation to multiplication
function old ... | | |
Denys Vlasenko | b692c2faf1e | bc: bc_num_k(): move carry,i,j,len to inner scope
This might help compiler
function ... | | |
Denys Vlasenko | 0d7e46b1de8 | bc: tweak error messages
function old new delta
bc_lex_token ... | | |
Denys Vlasenko | 00646799151 | bc: fix inverted POSIXness test, improve messages, commonalize message strings
function ... | | |
Denys Vlasenko | 5318f81fbe5 | bc: print error line numbers
FILE:
print 1
print "
$ busybox bc -q FILE
bc: FILE:2: string end could not be found... | | |
Denys Vlasenko | 08c033c406e | bc: optimize pushing zero bytes to vectors
function old new delta
... | | |
Denys Vlasenko | 0409ad36a11 | bc: restore printing of script name on errors
Examples:
On stdin, no file name is available:
$ echo 'print "' | bu... | | |
Denys Vlasenko | 0ad36c46c7a | bc: do not check for errors when parsing/running internal library
function ... | | |
Denys Vlasenko | 24fb2cd62fc | bc: shrink error handling code by enabling tail-call optimization
function ... | | |
Denys Vlasenko | f359e004b0c | bc: make 2^1000000 interruptible faster
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 68cc0a676ee | bc: remove tabs from internal library
function old new delta
bc_li... | | |
Denys Vlasenko | 51fb8aa5c13 | bc: store library in ASCII, shrink keyword parsing code
Also, use ARRAY_SIZE() where appropriate
function ... | | |
Denys Vlasenko | cb9a99f3bb8 | bc: drop bc_map_init() macro
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 7d62801db93 | bc: create a few common functions
function old new delta
bc_char_v... | | |
Denys Vlasenko | d5f7703abb5 | bc: rewrite "BOOL * EXPR" idiom as if() statement
function old new ... | | |
Denys Vlasenko | 17c5472c5a3 | bc: switch to SA_RESTART signal handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | d70d4a02358 | bc: get rid of G.tty and G.flags
G.flags == option_mask32
function old ... | | |
Denys Vlasenko | 9b70f197b4d | bc: convert all status codes, remove bc_err_msgs[], bc_vm_error(), bc_vm_posixError()
function ... | | |
Denys Vlasenko | 60cf747b6c2 | bc: convert all non-POSIX BC_STATUS_foo codes
function old new del... | | |
Denys Vlasenko | d38af48e0ae | bc: convert BC_STATUS_EXEC_SIGNAL - its message string was never used
function ... | | |
Denys Vlasenko | abbc433d293 | bc: convert BC_STATUS_PARSE_NO_AUTO
function old new delta
bc_pars... | | |
Denys Vlasenko | 04a1c763a62 | bc: convert BC_STATUS_EXEC_MISMATCHED_PARAMS and BC_STATUS_EXEC_UNDEFINED_FUNC
Signed-off-by: Denys Vlasenko <vda.li... | | |
Denys Vlasenko | a02f84472a9 | bc: BC_STATUS_VEC_ITEM_EXISTS is not a real error code, its message was never used
It was only used to indicate rusu... | | |
Denys Vlasenko | bc5ce66617b | bc: simplify bc_lex_comment()
function old new delta
bc_lex_token ... | | |
Denys Vlasenko | c1c2470f843 | bc: handle BIN_FILE and LEX_BAD_CHAR errors at the site of detection
The most informative message can be generated a... | | |
Denys Vlasenko | d4744adf35c | bc: eliminate BC_STATUS_INPUT_EOF
function old new delta
fflush_an... | | |
Denys Vlasenko | cfdc1334c3e | bc: handle "limits" and "quit" immediately at parse time
No need to propagate a special exit code.
function ... | | |
Denys Vlasenko | 01cabafd054 | bc": drop unused error codes and strings
function old new delta
bc... | | |
Denys Vlasenko | b8860a8892f | bc: remove "error ids": serve no useful purpose, error message should be explanatory enough
function ... | | |
Denys Vlasenko | 1f67e935ac7 | bc: reduce forward declarations
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | d9d66556d74 | bc: use smaller datatypes for limits, match GNU bc 'limits' output
function ... | | |
Denys Vlasenko | 416ce76bcd2 | bc: better handle optional args of bc_program_pushVar()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | 9721f6c8b0b | bc: tweak help text
-v is supported but not shown
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> | | |
Denys Vlasenko | a0c421c118a | bc: simplify bc_vm_stdin()
function old new delta
bc_vm_run ... | | |
Denys Vlasenko | 71e1fc6b376 | bc: only check for ^C in bc_program_exec() main loop
Checking it in individual operations such as SQRT is not necess... | | |
Denys Vlasenko | df51539ed0c | bc: simpler calling convention for bc_read_file(), bc_program_search()
function ... | | |
Denys Vlasenko | e3b4f23cf30 | bc: bc_num_ulong2num(), bc_program_pushGlobal(), bc_program_stackLen() never fail
function ... | | |
Denys Vlasenko | a1d3ca24559 | bc: stop passing around pointers to G.prog, they are all constant
function ... | | |
Next → |