| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
printf() (#11106)
Problem: Multi-byte chars do not work properly with "%.*S" in printf().
Solution: Use mb_ptr2cells(). Daniel Hahler, closes vim/vim#4989)
https://github.com/vim/vim/commit/ce0fac28977af31f1dec411d3535b4de2c3169b3
|
|
|
|
|
|
| |
Problem: Libvterm cannot use vsnprintf(), it does not exist in C90.
Solution: Use vim_vsnprintf() instead.
https://github.com/vim/vim/commit/8327d1df1754b33d8a93b3411f30692f0042f4ce
|
|
|
|
|
|
|
|
|
|
|
|
| |
closes #8274
The parent commit tries a different approach, but that fails on Apple
Clang version:
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
which somehow compiles the check_c_source_compiles() check, but then
complains during later compilation that __fpclassify is not defined
(regardless of "#include <math.h>").
|
|
|
|
|
|
|
|
|
|
|
|
| |
closes #8274
- Instead of #undef and re-#define, define "xfoo" wrappers to avoid
include-order sensitivity.
- The warnings are bogus, caused by bad interaction between glibc and
clang 6+.
- https://bugs.llvm.org/show_bug.cgi?id=35268
- https://bugs.llvm.org/show_bug.cgi?id=39738
- https://bugzilla.redhat.com/show_bug.cgi?id=1472437
|
|
|
|
| |
This was broken in #9369 (4680ca2)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
log.c
message.c
strings.c
fixed some printf warnings in:
src/nvim/undo.c
src/nvim/eval.c
src/nvim/eval/encode.c
src/nvim/eval/typval.c
src/nvim/ex_getln.c
src/nvim/fileio.c
src/nvim/lua/executor.c
src/nvim/main.c
src/nvim/regexp_nfa.c
src/nvim/shada.c
src/nvim/spellfile.c
src/nvim/tui/terminfo.c
src/nvim/garray.h
|
|
|
|
|
|
| |
Problem: Illegal memory access in del_bytes().
Solution: Check for negative byte count. (Christian Brabandt, closes vim/vim#2466)
https://github.com/vim/vim/commit/191f18bad0b5c48afa05c3e8a00f3ced993f6a38
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Problem: Accessing invalid memory with overlong byte sequence.
Solution: Check for NUL character. (test by Dominique Pelle, closes vim/vim#2485)
https://github.com/vim/vim/commit/e6640ad44e2186bd3642b972115496d347cd1fdd
|
|/
|
|
| |
ref #1474
|
|
|
|
|
|
|
| |
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case. Avoid lower case macros use an
argument twice.
https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Problem: printf() does not work with 64 bit numbers.
Solution: use the "L" length modifier. (Ken Takata)
https://github.com/vim/vim/commit/38ee6b041e73ad31c3b6b99d56d20833b59b2b57
|
| |
|
|\
| |
| | |
Refactor functions which find character in a string
|
| |\ |
|
| | |
| | |
| | |
| | | |
Ref #1476
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Removes dead code (enc_utf8, enc_dbcs and has_mbyte now have hardcoded values),
relies on libc implementation being more optimized. Also where previously
negative character just would never be found it is an assertion error now.
Ref #1476
|
| | | |
|
| |/
|/|
| |
| | |
From Vim, misc2.c:vim_strsave_shellescape
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: When making a character lower case with tolower() changes the byte
cound, it is not made lower case.
Solution: Add strlow_save(). (Dominique Pelle, closes vim/vim#1406)
https://github.com/vim/vim/commit/cc5b22b3bfdc0e9e835cf7871166badda31447bd
Join almost identical strup_save and strlow_save functions to one
Function.
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Function was renamed and changed to return `const char *`.
|
| |
|
|
|
|
| |
Re-apply fix from #6311 which was accidentally regressed in #6231.
|
| |
|
|
|
|
|
|
|
| |
Problem: printf() handles floats wrong when there is a sign.
Solution: Fix placing the sign. Add tests. (Dominique Pelle)
https://github.com/vim/vim/commit/04186095346daa60e82e981dad114de2b641d672
|
|
|
|
|
|
|
| |
Problem: printf() doesn't handle infinity float values correctly.
Solution: Add a table with possible infinity values. (Dominique Pelle)
https://github.com/vim/vim/commit/e999782e369999539a1783a7ebe4eadcc6da28a8
|
|
|
|
|
|
|
|
| |
Problem: printf() test fails on Windows. "-inf" is not used.
Solution: Check for Windows-specific values for "nan". Add sign to "inf"
when appropriate.
https://github.com/vim/vim/commit/9992237a3e791fbc0c1ebf743ece1b75e1488410
|
|
|
|
|
|
| |
This looks mostly like a case where the compiler that ships with Ubuntu
12.04 has gone a little too far: `fmt_spec` is actually a char, as are
the literals, so there's really no issue.
|
|
|
|
|
|
| |
Problem: Not all systems understand %F in printf().
Solution: Use %f.
https://github.com/vim/vim/commit/965ed14973fd3f1b2aace7bae4d4722b71ca04f9
|
| |
|
|
|
|
|
|
|
|
| |
Problem: printf() gives an error when the argument for %s is not a string.
(Ozaki Kiichi)
Solution: Behave like invoking string() on the argument. (Ken Takata)
https://github.com/vim/vim/commit/e5a8f35b4286135f3469f3b00a6c2220553d9658
|
|
|
|
|
| |
As reported by clang-scan, `length_modifier` is never read in any code path
following this branch. It is safe to remove.
|
|
|
|
| |
Closes #6141
|
|\ |
|
| | |
|
|/
|
|
| |
Allows eval/typval.h to #include message.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #731
References #851
Note: This does not remove some intentional legacy usages of strncpy.
- memcpy isn't equivalent because it doesn't check the string
length of `src`, and doesn't zero-out the remainder of `dst`.
- xstrlcpy isn't equivalent because it doesn't zero-out the
remainder of `dst`. Some Vim logic depends on that (e.g.
ex_append which calls vim_strnsave).
Helped-by: Douglas Schneider <ds3@ualberta.ca>
Helped-by: oni-link <knil.ino@gmail.com>
Helped-by: James McCoy <jamessan@jamessan.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
|
|
|
| |
utf_ptr2char only needs to be called for l > 1.
|