aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/strings.c
Commit message (Collapse)AuthorAge
...
* 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
* Merge #6110 'refactor: Move vim_*printf to strings.c'.Justin M. Keyes2017-02-17
|\
| * strings: Fix “unexpected format specifier: %lp” ASAN errorZyX2017-02-15
| |
| * message,strings: Move vim_*printf functions to strings.cZyX2017-02-14
|/ | | | Allows eval/typval.h to #include message.h.
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | 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>
* refactor: Replace vim_strcat() with xstrlcat().Justin M. Keyes2017-01-23
|
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | 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
* strings: Change order of operands in condition.Jurica Bradaric2016-01-24
| | | | utf_ptr2char only needs to be called for l > 1.
* vim-patch:7.4.704Jurica Bradaric2016-01-24
| | | | | | | | | | Problem: Searching for a character matches an illegal byte and causes invalid memory access. (Dominique Pelle) Solution: Do not match an invalid byte when search for a character in a string. Fix equivalence classes using negative numbers, which result in illegal bytes. https://github.com/vim/vim/commit/d82a2a990bc329754e1b61c5af669c76ac202497
* shell: Unquote &shell* options before using themZyX2016-01-11
|
* src/*: Remove `VIM - Vi improved ...` headerMichael Reed2015-11-27
| | | | | | | | | | | | | | | | | | | Regarding the individual items in the header: `Vim - Vi improved by Bram Moolenar` Bram Moolenar is already mentioned throughout the documentation, as well as the intro screen. `:help uganda` It's already shown to all users who don't use `shortmess+=I` upon starting nvim, and is already placed prominently in help.txt, i.e., `:help` run with no arguments. `:help credits` Already mentioned near the top of help.txt. `README.md` Already mentioned in develop.txt.
* Remove unnecessary includes for errno.hRui Abreu Ferreira2015-11-25
|
* shada: Add support for converting strings that are read or writtenZyX2015-10-08
|
* Enable -Wconversion: normal.c.Eliseo Martínez2015-04-27
| | | | | | | | | | | | | | | | | | | | | | | | Refactor summary: - extern int opcount --> extern long opcount - bool find_decl(..., int len, ...) --> bool find_decl(..., size_t len, ...) * int find_ident_under_cursor(...) --> size_t find_ident_under_cursor(...) - int find_ident_at_pos(...) --> size_t find_ident_at_pos(...) - int modify_fname(..., int *usedlen, ..., int *fnamelen) --> int modify_fname(..., size_t *usedlen, ..., size_t *fnamelen) * char_u *eval_vars(..., int *usedlen, ...) --> char_u *eval_vars(..., size_t *usedlen, ...) - int find_cmdline_var(..., int *usedlen) --> ssize_t find_cmdline_var(..., size_t *usedlen) - static char_u *repl_cmdline(..., int srclen, ...) --> static char_u *repl_cmdline(..., size_t srclen, ...) - bool get_visual_text(..., int *lenp) --> bool get_visual_text(..., size_t *lenp) * char_u *find_file_name_in_path(..., int len, ...) --> char_u *find_file_name_in_path(..., size_t len, ...) - static char_u *eval_includeexpr(..., int len) --> static char_u *eval_includeexpr(..., size_t len) - char_u *find_file_in_path(..., int len, ...) --> char_u *find_file_in_path(..., size_t len, ...) * char_u *find_file_in_path_option(..., int len, ...) --> char_u *find_file_in_path_option(..., size_t len, ...) - char_u *find_directory_in_path(..., int len, ...) --> char_u *find_directory_in_path(..., size_t len, ...) * int spell_move_to(...) --> size_t spell_move_to(...) - int spell_check(...) --> size_t spell_check(...) - static int spell_bad_len --> static size_t spell_bad_len - void find_pattern_in_path(..., int len, ...) --> void find_pattern_in_path(..., size_t len, ...) Helped-by: Justin M. Keyes <justinkz@gmail.com>
* Replace vim_isspace() with ascii_isspace() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Replace vim_iswhite with ascii_iswhite() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* memory: Add `free` wrapper and refactor project to use itThiago de Arruda2015-04-13
| | | | | | We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim.
* refactor: Remove term modules and termcap optionsThiago de Arruda2015-02-21
| | | | | | | | | | | | | | | - Removed term.c, term.h and term_defs.h - Tests for T_* values were removed. screen.c was simplified as a consequence(the best strategy for drawing is implemented in the UI layer) - Redraw functions now call ui.c functions directly. Updates are flushed with `ui_flush()` - Removed all termcap options(they now return empty strings for compatibility) - &term/&ttybuiltin options return a constant value(nvim) - &t_Co is still available, but it mirrors t_colors directly - Remove cursor tracking from screen.c and the `screen_start` function. Now the UI is expected to maintain cursor state across any call, and reset it when resized. - Remove unused code
* ui: Remove/adapt some old code for a big UI refactorThiago de Arruda2015-02-16
| | | | | | | | | | | | | - Remove abstract_ui global, now it is always active - Remove some terminal handling code - Remove unused functions - Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs - Remove tgetent/terminfo from version.c - Remove curses/terminfo dependencies - Only start/stop termcap when starting/exiting the program - msg_use_printf will return true if there are no attached UIs( messages will be written to stdout) - Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
* Macro cleanup: PROTOMichael Reed2015-01-14
| | | | | | Regarding dict_lookup() in eval.c: both definitions are the same, the only difference being the spacing between the indirection operator and the indentation level.
* strings.c: replace copy_spaces, copy_chars with equivalent memset.Daniel Fairhead2014-12-12
|
* strings: Remove NONNUL_ALL from NULL-taking functions.Scott Prager2014-12-06
| | | | | vim_strup() is only used in a couple places, with no NULLs possible, so keep the attribute and remove the NULL check.
* Fix SegFault when getting full path for filesLBEaston2014-12-01
|
* Merge pull request #1497 from splinterofchaos/const-attrJustin M. Keyes2014-11-29
|\ | | | | constify and func-attribute memory.c and strings.c
| * strings: Enable -Wconvert.Scott Prager2014-11-27
| |