aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.c
Commit message (Collapse)AuthorAge
...
* Remove long_u: hardcopy: Enable -Wconversion.Eliseo Martínez2015-01-10
|
* Use ARRAY_SIZE where Coccinelle wasn't able to do itFelipe Oliveira Carvalho2014-12-18
|
* ui: Remove redundant ui.h includesThiago de Arruda2014-11-27
| | | | Also move read_error_exit to os/input.c
* ui: Remove ui_delay, ui_breakcheck and ui_set_shellsizeThiago de Arruda2014-11-27
| | | | | These functions only used to call another os_* function, so remove them and replace all occurences in the project.
* coverity/13765,13766,13767,13768: Fix memory leaks in hardcopy.coni-link2014-11-16
| | | | | | | | The function mch_print_begin() returns early in case of an error, but without freeing allocated memory. To fix this, use stack allocation instead of heap allocation for the variables res_prolog, res_encoding, res_cidfont and res_cmap.
* Fix warnings: hardcopy.c: mch_print_text_out(): Bad free: FP + RI.Eliseo Martínez2014-11-11
| | | | | | | | | | | | | | | | | | Problem : Bad free @ 3058. Diagnostic : False positive uncovering a real issue. Rationale : Signaled error occurs if p gets assigned `(char_u*)""` at line 3009 and then is freed at line 3058. But that cannot happen because of the last guard condition before `free` (`*p != NUL`). So, signaled error is a false positive. Now, examining this code more carefully reveals a real issue: not freeing an empty string may not be always correct, as an empty (but allocated) string could also be returned in `p = string_convert(&prt_conv, p, &len);` if passed '&len' points to 0). Which would in fact be a memory leak. Resolution : Remove the exceptional case. Make p always point to allocated memory, and always free it, when `prt_do_conv` is on.
* version: update user-facing version indicatorsJustin M. Keyes2014-10-07
| | | | | | | - VIM_VERSION_LONG and VIM_VERSION_LONG_DATE do not affect plugins, they are only cosmetic. - Vim-related version identifiers will be preserved for plugin compatibility (has("patchXXX") and v:version).
* Remove EBCDIC: Remove IF_EB macrosPavel Platto2014-08-02
|
* Remove EBCDIC: Clean up commentsPavel Platto2014-08-02
|
* Extract `tempfile` module from fileioPavel Platto2014-07-14
| | | | | | | Though this module is relatively small it has very clear boundaries. The last argument for extracting `tempfile` was the errors which I got when I was writing unittests for it: `cimport './src/nvim/fileio.h'` does not work for some reason.
* Refactor vim_tempnamePavel Platto2014-07-14
| | | | | | | | | - temp_count is uint32_t now instead of long because it supposed to be at most 999999999 (comment on line 5227) temporary files. The most probably it was a long for compatibility with systems where int is 16-bit. - Use "nvim" as prefix for temp folder name instead of "v" - Remove unused parameter from vim_tempname
* move errno.h include out of vim.hBrandon Coleman2014-07-09
|
* move <inttypes.h> include out of vim.hBrandon Coleman2014-07-09
|
* move locale.h include out of vim.hBrandon Coleman2014-07-09
|
* move ascii.h include out of vim.hBrandon Coleman2014-07-09
|
* ga_growsize should be >= 1Felipe Oliveira Carvalho2014-06-30
| | | | | | | | | | | I know it could be 0 sometimes. Running the tests with `assert(gap->ga_growsize > 0)` in ga_grow() crashes nvim while running the tests. - Add a setter for ga_growsize that checks whether the value passed is >=1 (log in case it's not) - log when ga_grow() tries to use a ga_growsize that's not >=1 - use GA_EMPTY_INIT_VALUE is many places
* Replace vim_strncpy calls: hardcopy.cDouglas Schneider2014-06-13
|
* Add automatic generation of headersZyX2014-06-02
| | | | | | | | | | | | | | | | | - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception.
* Replace ga->ga_len > 0 checks with !GA_EMPTY(ga)Felipe Oliveira Carvalho2014-05-17
| | | | | | | | | | | | | | | | | | | | | | Used Coccinelle to perform the changes ```diff @@ expression E; @@ <... ( - E.ga_len > 0 + !GA_EMPTY(&E) | - E->ga_len > 0 + !GA_EMPTY(E) ) ...> ``` `spatch --in-place --sp-file ga_empty.cocci <C_FILE>`
* Introduce nvim namespace: Fix unmasked strings.h issue.Eliseo Martínez2014-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: Now that nvim/strings.h is correctly namespaced, an issue that had been masked until now arises: When compiling, we get a lot of errors because of everywhere the functions in nvim/strings.h are used, there's no include to import them. But, how could this compile and work previously, then? It turns out that: - In every such case, we are also including vim.h, which in turn includes os_unix_defs.h. - os_unix_defs.h includes <string.h> and also <strings.h> in some systems (e.g. OSX). - Build had been modified previously to (even when importing system headers), prefer equally-named local ones. That was in fact done as a previous attempt to solve the same issue we are trying to solve another way now. So, we were including our "strings.h" as a side-effect of including <strings.h> through "vim.h" --> "os_unix_defs.h". Solution: Correctly include "nvim/strings.h" in every file needing it.
* Introduce nvim namespace: Fix project-local includes.Eliseo Martínez2014-05-15
| | | | Prepend 'nvim/' in all project-local (non-system) includes.
* 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.