fish-shell/src
Kurtis Rader a928517e95 improve converting strings to ints/longs
The existing code is inconsistent, and in a couple of cases wrong, about
dealing with strings that are not valid ints. For example, there are
locations that call wcstol() and check errno without first setting errno
to zero. Normalize the code to a consistent pattern.  This is mostly to
deal with inconsistencies between BSD, GNU, and other UNIXes.

This does make some syntax more liberal. For example `echo $PATH[1 .. 3]`
is now valid due to uniformly allowing leading and trailing whitespace
around numbers. Whereas prior to this change you would get a "Invalid
index value" error. Contrast this with `echo $PATH[ 1.. 3 ]` which was
valid and still is.
2016-11-25 18:52:15 -08:00
..
autoload.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
autoload.h eliminate many "unused parameter" warnings 2016-10-09 14:38:26 -07:00
builtin.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
builtin.h use consistent mechanism to validate var names 2016-11-22 16:18:20 -08:00
builtin_commandline.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
builtin_commandline.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_complete.cpp allow complete -d '' 2016-11-17 14:53:50 -08:00
builtin_complete.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_jobs.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
builtin_jobs.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_printf.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
builtin_printf.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_set.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
builtin_set.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_set_color.cpp lint: missing default in switch statements 2016-10-29 18:27:51 -07:00
builtin_set_color.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_string.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
builtin_string.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_test.cpp lint: missing break in switch statement 2016-11-02 14:07:12 -07:00
builtin_test.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_ulimit.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
builtin_ulimit.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
color.cpp Improve compatibility with 0-16 color terminals. 2016-07-24 17:02:29 -07:00
color.h lint: deal with "double negative" warnings 2016-10-20 21:14:40 -07:00
common.cpp detect if the magic fish wide chars can be encoded 2016-11-07 13:19:09 -08:00
common.h use binary search for enum map lookups 2016-11-11 18:02:43 -08:00
complete.cpp lint: problems with default in switch statements 2016-11-03 16:19:41 -07:00
complete.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
env.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
env.h lint: missing default in switch statements 2016-10-29 18:27:51 -07:00
env_universal_common.cpp use consistent mechanism to validate var names 2016-11-22 16:18:20 -08:00
env_universal_common.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
event.cpp lint: missing break in switch statement 2016-11-02 14:07:12 -07:00
event.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
exec.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
exec.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
expand.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
expand.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
fallback.cpp lint: misc cleanups 2016-11-04 20:12:51 -07:00
fallback.h Remove nan() fallback 2016-10-09 07:09:52 -07:00
fish.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
fish_indent.cpp cppcheck: incorrect printf specifiers 2016-11-06 04:29:47 -08:00
fish_key_reader.cpp lint: misc cleanups 2016-11-04 20:12:51 -07:00
fish_tests.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
fish_version.cpp restyle fish modules to match project style 2016-04-30 19:52:13 -07:00
fish_version.h restyle fish modules to match project style 2016-04-30 19:52:13 -07:00
function.cpp lint: unnecessary else statement 2016-10-28 17:43:20 -07:00
function.h revert the --shadow-builtin flag 2016-08-24 22:56:19 -07:00
highlight.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
highlight.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
history.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
history.h fix some lint warnings 2016-11-15 21:15:22 -08:00
input.cpp lint: long variable name 2016-11-03 16:19:41 -07:00
input.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
input_common.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
input_common.h remove unused function 2016-10-22 21:08:53 -07:00
intern.cpp simplify oclint error suppression for scoped_lock 2016-07-20 22:30:58 -07:00
intern.h restyle intern module to match project style 2016-05-01 20:28:46 -07:00
io.cpp lint: Use early exit/continue 2016-10-31 18:17:38 -07:00
io.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
iothread.cpp lint: long variable name 2016-11-03 16:19:41 -07:00
iothread.h restyle iothread module to match project style 2016-05-01 21:54:54 -07:00
kill.cpp fix random lint issues 2016-05-29 22:24:29 -07:00
kill.h restyle kill module to match project style 2016-05-01 22:18:59 -07:00
lru.h fix more style bogosities that have crept in 2016-10-10 19:52:22 -07:00
output.cpp lint: misc cleanups 2016-11-04 20:12:51 -07:00
output.h Stop swallowing the cartesian product 2016-07-24 17:56:34 -07:00
pager.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
pager.h fix regression introduced by commit 851e449 2016-10-25 20:56:15 -07:00
parse_constants.h use enum_map for parser enums 2016-11-11 18:56:56 -08:00
parse_execution.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
parse_execution.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
parse_productions.cpp use enum_map for parser enums 2016-11-11 18:56:56 -08:00
parse_productions.h use enum_map for parser enums 2016-11-11 18:56:56 -08:00
parse_tree.cpp use enum_map for parser enums 2016-11-11 18:56:56 -08:00
parse_tree.h lint: deal with "double negative" warnings 2016-10-20 21:14:40 -07:00
parse_util.cpp use consistent mechanism to validate var names 2016-11-22 16:18:20 -08:00
parse_util.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
parser.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
parser.h Ensure we continue to cover enums in switches 2016-07-30 13:10:21 -07:00
parser_keywords.cpp fix some style bogosities that crept in 2016-05-27 14:44:30 -07:00
parser_keywords.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
path.cpp lint: missing break in switch statement 2016-11-02 14:07:12 -07:00
path.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
postfork.cpp lint: "collapsible if statements" warnings 2016-10-22 19:09:40 -07:00
postfork.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
print_help.cpp lint: "collapsible if statements" warnings 2016-10-22 19:09:40 -07:00
print_help.h restyle proc module to match project style 2016-05-02 22:07:58 -07:00
proc.cpp lint: prefer early exits and continue 2016-11-04 20:12:51 -07:00
proc.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
reader.cpp Nuke spurious newline of shell exit. 2016-11-19 16:00:54 -08:00
reader.h eliminate many "unused parameter" warnings 2016-10-09 14:38:26 -07:00
sanity.cpp add (or restore) config.h to all files 2016-05-18 22:30:21 +00:00
sanity.h restyle sanity & screen module to match project style 2016-05-03 12:53:54 -07:00
screen.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
screen.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
signal.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
signal.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
tokenizer.cpp fix some lint warnings 2016-11-15 21:15:22 -08:00
tokenizer.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
utf8.cpp lint: constant if expression 2016-10-29 19:01:19 -07:00
utf8.h Fix wide char related tests on Cygwin 2016-05-26 20:24:03 -07:00
util.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
util.h restyle remaining modules to match project style 2016-05-03 16:09:45 -07:00
wcstringutil.cpp fix some style bogosities that crept in 2016-05-27 14:44:30 -07:00
wcstringutil.h Be a bit more consistent and proper. 2016-06-05 21:32:57 -07:00
wgetopt.cpp lint: Use early exit/continue 2016-10-31 13:29:10 -07:00
wgetopt.h Restyle touched .cpp files 2016-06-12 11:34:35 -07:00
wildcard.cpp lint: constant conditional operator 2016-11-01 21:19:34 -07:00
wildcard.h Make IWYU output in lint.cpp less messy 2016-06-23 17:26:08 -07:00
wutil.cpp improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00
wutil.h improve converting strings to ints/longs 2016-11-25 18:52:15 -08:00