Age | Commit message (Collapse) | Author |
|
|
|
(whitespace, digit, digit_value, integer_expected_error): Remove.
(is_int): Remove; replaced by...
(find_int): New function.
(binary_operator): Don't let integers overflow in comparisons;
return the correct answer instead. Simplify the code.
(unary_operator): Convert the integer ourself, since find_int
no longer does so.
|
|
comparison functions.
Include "strnumcmp.h".
(NEGATION_SIGN, NUMERIC_ZERO, fraccompare):
Remove; moved to strnumcmp.
(decimal_point): Now int, to simplify converison overhead with
new API. All uses changed.
(thousands_sep): Now -1 if there isn't one, as per new API.
All uses changed.
(numcompare): Move contents to strnumcmp module, except for
skipping blanks.
|
|
(looks_like_integer): New function.
(toarith): Use it. Also, use xstrtoimax rather than rolling our
own diagnostics.
(eval2): Don't look for trouble if !evaluate; this simplifies things.
Compare numbers using string comparison, so that overflow is
not possible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(Also, correct a comment that claimed that expr detects integer
overflow; it does so only when converting from strings.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
so that unistd-safer.h (GPL'ed code) need not be included.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setup_dir, free_dir): New functions.
(enter_dir, leave_dir): Define trivial
alternatives of _LGPL_PACKAGE. Move to fts-cycle.c if !_LGPL_PACKAGE.
(HT_INITIAL_SIZE, ENTER_DIR): Remove. All uses removed.
(LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
(struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
Move to fts-cycle.c.
(fts_open): Use setup_dir.
(fts_close): Use free_dir.
(fts_read): Have just one copy of the ENTER_DIR code rather than three.
This adds a label and some gotos, but the alternatives were messier.
Check for memory allocation failure when entering a dir.
(fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
|
|
(FTS): New member fts_cycle, that is a union that contains the
old active_dir_ht and cycle_state. All uses changed to mention
fts_cycle.ht and fts_cycle.state.
|
|
(gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
|
|
(gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
|
|
fts.c, with the following changes:
(setup_dir, free_dir): New functions.
(enter_dir): Now returns bool. Return true if successful, false
if memory exhausted. All callers changed.
Do not bother partly cleaning up on
memory allocation failure; that is free_dir's job.
However, free ad if hash_insert fails, to avoid memory leak.
(enter_dir, leave_dir): Accommodate change to FTS by inspecting
fts->fts_options to see which union member to use.
|
|
|
|
Spotted by Paul Eggert.
|
|
|
|
Remove inaccurate-but-harmless `const' attributes.
|
|
|
|
`error (EXIT_FAILURE, ...' to avoid a gcc warning in caller,
about variables being used uninitialized.
|
|
|
|
Use #define rather than a static function, to avoid a warning
when the function was not used.
|
|
|
|
|
|
|
|
|
|
it's always true now.
|
|
(factor_LDADD): Remove, as factor no longer needs sqrt.
|
|
(gl_PREREQ): Add gl_LOCALCHARSET.
|
|
(cu_LIB_CHECK): Renamed from gl_LIB_CHECK.
Don't check for sqrt; factor no longer needs it.
Revamp tests for floor, modf, rint, to define SEQ_LIBM.
Redo tests for fesetround to act like the other wons.
Use "cu_saved_libs" for local var name, not "ac_su_saved_lib".
|