aboutsummaryrefslogtreecommitdiff
path: root/src/garray.c
Commit message (Collapse)AuthorAge
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
| | | | | | Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.
* replaced `vim_free()` calls with `free()` callsMatthias Beyer2014-05-05
|
* revert #652Justin M. Keyes2014-05-01
| | | | | | | reverting broad cosmetic/style change because: - increases merge-conflicts - increases overhead of merging upstream Vim patches - reasons for change are ambiguous, so default to no change
* Remove NUL macroMarco Hinz2014-04-29
|
* garray: comment and refactor a bit moreNicolas Hillegeer2014-04-29
| | | | | | | The following functions are affected: - ga_remove_duplicate_strings - ga_append
* garray: refactor and optimize ga_concatNicolas Hillegeer2014-04-29
| | | | | | | | | | | | | | | I've checked all uses of ga_concat in the codebase: - ex_cmds2.c - ex_getln.c - eval.c - message.c - regexp-nfa.c - term.c - spell.c None of them concats the garray with itself. This makes it safe to use the faster memcpy() instead of memmove(). This change was also documented.
* garray: make parameter of ga_concat_strings constNicolas Hillegeer2014-04-29
|
* garray: implement ga_concat_strings_sepNicolas Hillegeer2014-04-29
| | | | | A generalized version of ga_concat_strings that can handle any separator. Reimplement ga_concat_strings on top of it.
* garray: reimplement ga_concat_strings with stpcpyNicolas Hillegeer2014-04-29
| | | | | | | Less useless strlen(), stpcpy() is a more natural fit for this task. ga_concat_strings() still has too much strlen() but that would be ugly to remove for a function that's not used very often (just once in the current codebase).
* garray: refactor ga_growNicolas Hillegeer2014-04-29
| | | | | | | - xrealloc will call xmalloc if the input pointer is NULL, no need to check twice. - use the early-quit idiom to decrease the indentation, which enhances readability.
* Fix garray.* according to -WconversionMarco Hinz2014-04-28
|
* No OOM error condition in ga_concat_strings(), concat_fnames(), concat_str()Felipe Oliveira Carvalho2014-04-24
| | | | | | - xmallocz() is not static anymore. There are many use cases for this function in the codebase and we should start using it. - Simpler types in ga_concat_strings()
* Remove OOM error handling code after ga_grow() callsFelipe Oliveira Carvalho2014-04-11
|
* Remove simpler cases of OOM error handling (after *alloc calls)Felipe Oliveira Carvalho2014-04-06
| | | | | | | | | | | | | | | | | | By simpler cases I mean cases where the OOM error is not expected to be handled by the caller of the function that calls `alloc`, `lalloc`, `xrealloc`, `xmalloc`, `alloc_clear`, and `lalloc_clear`. These are the functions that: - Do not return an allocated buffer - Have OOM as the only error condition I took note of the functions that expect the caller to handle the OOM error and will go through them to check all the callers that may be handling OOM error in future commits. I'm ignoring eval.c and ex_.c in this series of commits. eval.c will soon be obsolete and I will deal with ex_.c in later PRs.
* Extract memory.c from misc2.cJohn Schmidt2014-04-04
|
* Rename ga_init2() to ga_init()John Schmidt2014-03-31
|
* Inline ga_init()John Schmidt2014-03-31
|
* xrealloc(): similar to xmalloc()Felipe Oliveira Carvalho2014-03-31
| | | | | Replaced all calls to realloc by xrealloc. All `== NULL` tests can be removed and the code within `!= NULL` tests can be unwrapped.
* Move remove_duplicates to garray.cJohn Schmidt2014-03-29
|
* Use realloc instead of vim_reallocFelipe Oliveira Carvalho2014-03-26
|
* Use memmove instead of mch_memmoveFelipe Oliveira Carvalho2014-03-26
|
* Use memset instead of vim_memsetFelipe Oliveira Carvalho2014-03-25
| | | | | | | | | Ran some commands on terminal, reviewed changes, and made some manual changes too. find src | xargs perl -i -p -e "s/vim_memset/memset/g" git grep -l memset | egrep "\.c$" | xargs perl -i -p -e \ 's/(#include "vim\.h")/#include <string.h>\n\n\1/g'
* Issue #311 - Clean up blowfish.c/h, charset.c/h, diff.c/h, digraph.c/h, ↵David Z. Chen2014-03-16
| | | | garray.c/h, hashtab.c/h, popupmnu.c/h, sha256.c/h, version.c/h. Update uncrustify to move logical operators to the beginning of the line when splitting. Also, clean up arabic.c/h and farsi.c/h
* Remove USE_SYSTEM and code only run under USE_SYSTEMSimen Endsjø2014-03-05
|
* Extract garray.c from misc2.cFelipe Oliveira Carvalho2014-02-28
Start to split misc2.c in many other files (see #209).