aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/strings.c
Commit message (Collapse)AuthorAge
...
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: format with uncrustify #15842dundargoc2021-10-02
| | | | * refactor: format with uncrustify * refactor: convert function comments to doxygen
* vim-patch:8.2.3393: escaping for fish shell is skipping some charactersJason Cox2021-09-02
| | | | | | | Problem: Escaping for fish shell is skipping some characters. Solution: Escape character after backslash if needed. (Jason Cox, closes vim/vim#8827) https://github.com/vim/vim/commit/6631597452d4644f485a09e4036d117e5f91de70
* vim-patch:8.2.3385: escaping for fish shell does not work properlyJason Cox2021-09-02
| | | | | | Problem: Escaping for fish shell does not work properly. Solution: Insert a backslash before a backslash. (Jason Cox, closes vim/vim#8810) https://github.com/vim/vim/commit/6e82351130ddb8d13cf3748b47f07cae77886fc7
* clang/'Dead nested assignment': don't assign unused value to precision #15012dundargoc2021-07-07
|
* vim-patch:8.2.0271: the "num64" feature is available everywhereJan Edmund Lazo2020-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The "num64" feature is available everywhere and building without it causes problems. Solution: Graduage the "num64" feature. (James McCoy, closes vim/vim#5650) https://github.com/vim/vim/commit/82f654e092ac5b86316bc1b30c0b07a849813186 Restore Test_printf_spec_b() from patch 7.4.2221.. N/A patches for version.c: vim-patch:8.2.0594: MS-Windows: cannot build with WINVER set to 0x0501 Problem: MS-Windows: cannot build with WINVER set to 0x0501. Solution: Only use inet_ntop() when available. (Ozaki Kiichi, closes vim/vim#5946) https://github.com/vim/vim/commit/b6fb0516ec862a18fdffe06c9400d507a7193835 vim-patch:8.2.0965: has_funcundefined() is not used Problem: Has_funcundefined() is not used. Solution: Delete the function. (Dominique Pellé, closes vim/vim#6242) https://github.com/vim/vim/commit/5055c56cfbedc6326c607d40c7a1241682f7675e vim-patch:8.2.1370: MS-Windows: warning for using fstat() with stat_T Problem: MS-Windows: warning for using fstat() with stat_T. Solution: use _fstat64() if available. (Naruhiko Nishino, closes vim/vim#6625) https://github.com/vim/vim/commit/c753478b82613df37b145764e27f5514542edb97 vim-patch:8.2.2056: configure fails when building with implicit-function-declaration Problem: Configure fails when building with the "implicit-function-declaration" error enabled, specifically on Mac. Solution: Declear the functions like in the source code. (suggestion by Clemens Lang, closes vim/vim#7380) https://github.com/vim/vim/commit/ce7be3a0e6f19bc85990bb8fcfe5e208944777b4
* vim-patch:8.1.0806: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 2. https://github.com/vim/vim/commit/fc3abf47fbe1e426f2b676c316c81ee9ff607075
* vim-patch:8.1.2083: multi-byte chars do not work properly with "%.*S" in ↵Daniel Hahler2019-09-28
| | | | | | | 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
* vim-patch:8.0.0709: libvterm cannot use vsnprintf()Jan Edmund Lazo2019-04-04
| | | | | | Problem: Libvterm cannot use vsnprintf(), it does not exist in C90. Solution: Use vim_vsnprintf() instead. https://github.com/vim/vim/commit/8327d1df1754b33d8a93b3411f30692f0042f4ce
* build: Fix -Wconversion warnings for fpclassify et alJustin M. Keyes2019-01-21
| | | | | | | | | | | | 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>").
* build: Fix -Wconversion warnings for fpclassify et alJustin M. Keyes2019-01-20
| | | | | | | | | | | | 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
* strings: make vim_snprintf handle %d correctly againBjörn Linse2018-12-24
| | | | This was broken in #9369 (4680ca2)
* strings: use (u)int16_t for %h printf formatJan Edmund Lazo2018-12-16
|
* add func_attr_printf in :MichaHoffmann2018-09-24
| | | | | | | | | | | | | | | | | | | | | | 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
* vim-patch:8.0.1468: illegal memory access in del_bytes()Jan Edmund Lazo2018-08-24
| | | | | | 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
* Merge #8833 from janlazo/vim-8.0.1004Justin M. Keyes2018-08-12
|\
| * vim-patch:8.0.1421: accessing invalid memory with overlong byte sequenceJan Edmund Lazo2018-08-09
| | | | | | | | | | | | 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
* | refactor: Replace vim_strrchr() with strrchar() (#8718)ZviRackover2018-08-11
|/ | | | ref #1474
* vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | 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
* strings.c: Fix PVS/V781: value of 'l + 1' is checked after it was usedJustin M. Keyes2018-05-20
|
* strings: Fix PVS/V547: condition already checked by surrounding ifZyX2018-04-22
|
* strings: Fix PVS/V779: wrong assert() positionZyX2018-04-22
|
* Fix for lintGeorge Zhao2018-01-19
|
* Fix warning about math functions, include isnan, isinf, fpclassify.George Zhao2018-01-18
|
* strings/tv_float: Explicitly cast v_number to float_T for -WconversionJames McCoy2017-06-06
|
* vim-patch:7.4.2029James McCoy2017-06-04
| | | | | | | Problem: printf() does not work with 64 bit numbers. Solution: use the "L" length modifier. (Ken Takata) https://github.com/vim/vim/commit/38ee6b041e73ad31c3b6b99d56d20833b59b2b57
* strings: Return NUL from vim_strchr for invalid inputZyX2017-05-09
|
* Merge #6460 from ZyX-I/1476-changesJustin M. Keyes2017-05-08
|\ | | | | Refactor functions which find character in a string
| * Merge branch 'master' into 1476-changesZyX2017-04-10
| |\
| * | strings: Remove vim_strbyteZyX2017-04-07
| | | | | | | | | | | | Ref #1476
| * | strings: Replace vim_strchr implementation with a saner oneZyX2017-04-07
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | *: Add comment to all C filesZyX2017-04-19
| | |
* | | win: vim_strsave_shellescape: Handle 'shellslash'.Justin M. Keyes2017-04-12
| |/ |/| | | | | From Vim, misc2.c:vim_strsave_shellescape
* | vim-patch:8.0.0243Björn Linse2017-04-10
| | | | | | | | | | | | | | | | | | | | | | 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.
* | mbyte: replace vim_tolower with mb_tolower handling locale correctlyBjörn Linse2017-04-10
|/
* eval: Move remaining get_tv_string* functions to eval/typval.cZyX2017-03-29
|
* eval: Move get_tv_number[_chk] to eval/typval.cZyX2017-03-29
|
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* eval: Split eval.c into smaller filesZyX2017-03-29
|
* vim_vsnprintf: fix conversion warning #6333John Szakmeister2017-03-22
| | | | Re-apply fix from #6311 which was accidentally regressed in #6231.
* strings: Fix problems found during code reviewJurica Bradaric2017-03-21
|
* vim-patch:7.4.2291Jurica Bradaric2017-03-20
| | | | | | | 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
* vim-patch:7.4.2280Jurica Bradaric2017-03-20
| | | | | | | 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
* vim-patch:7.4.2266Jurica Bradaric2017-03-20
| | | | | | | | 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
* vim_vsnprintf: fix conversion error #6311John Szakmeister2017-03-18
| | | | | | 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.
* vim-patch:7.4.2292 (#6304)Jack Bracewell2017-03-17
| | | | | | Problem: Not all systems understand %F in printf(). Solution: Use %f. https://github.com/vim/vim/commit/965ed14973fd3f1b2aace7bae4d4722b71ca04f9
* strings.c: Fix problems found during code review.Jurica Bradaric2017-03-06
|
* vim-patch:7.4.2220Jurica Bradaric2017-03-06
| | | | | | | | 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
* strings.c: remove unused assignmentJente Hidskes2017-02-20
| | | | | As reported by clang-scan, `length_modifier` is never read in any code path following this branch. It is safe to remove.
* string.c: Include <stdarg.h> for va_list type and va_* macrosJames McCoy2017-02-19
| | | | Closes #6141