aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.c
Commit message (Collapse)AuthorAge
...
* cleanup: remove mch_fopen in favor of os_fopenJustin M. Keyes2019-07-25
|
* refactor: use int for Columns and RowsBjörn Linse2019-07-19
|
* vim-patch:8.0.1496: VIM_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629) vim-patch:8.0.1481
* multigrid: Fix lint errorsUtkarsh Maheshwari2018-12-31
|
* multigrid: Change screen_* functions to grid_* functionsUtkarsh Maheshwari2018-12-31
|
* Remove has_mbytes from lines local to parent commitZviRackover2018-08-31
|
* Refactor: remove mb_ptr2len_len, mb_ptr2cells and mb_ptr2cells_lenZviRackover2018-08-31
| | | | Remove occurences of these macros.
* hardcopy: refactor mch_print_start_line()Jan Edmund Lazo2018-08-01
| | | | | | | | Refactor the following affected functions: - prt_line_number() - prt_header() These use prt_set_font(), refactored in 872a76f3dac14fdcb7dc7b34cecd3acb4370d56f for TriState.
* hardcopy: bold,italic,underline are TriStateJan Edmund Lazo2018-08-01
|
* hardcopy: refactor mch_print_text_out()Jan Edmund Lazo2018-07-19
| | | | Combine variable declaration and initialization to add const.
* vim-patch:8.1.0056: crash when using :hardcopy with illegal byteJan Edmund Lazo2018-07-19
| | | | | | Problem: Crash when using :hardcopy with illegal byte. Solution: Check for string_convert() returning NULL. (Dominique Pelle) https://github.com/vim/vim/commit/43dee181f596c81b99e200b6cdfeb02ecfed42c8
* vim-patch:8.0.1503: access memory beyond end of stringJan Edmund Lazo2018-07-18
| | | | | | | Problem: Access memory beyond end of string. (Coverity) Solution: Keep allocated memory in separate pointer. Avoid outputting the NUL character. https://github.com/vim/vim/commit/cdd09aa51a8d34bb384460af4f91026dbff5bf48
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* *: Add comment to all C filesZyX2017-04-19
|
* hardcopy: Remove unneeded prt_do_conv assignmentZyX2017-04-16
|
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* hardcopy.c: fix dead assignmentSander Bosma2017-02-20
| | | | | | `has_mbyte` is deprecated (globals.h), so `outputlen` is always assigned within the if statement. Therefore, the previous initialization is unnecessary.
* refactor: Replace vim_strcat() with xstrlcat().Justin M. Keyes2017-01-23
|
* vim-patch:7.4.1702Michael Ennen2016-12-01
| | | | | | | | Problem: Using freed memory when parsing 'printoptions' fails. Solution: Save the old options and restore them in case of an error. (Dominique) https://github.com/vim/vim/commit/4afc7c5d4a73340831077a02bfe1f74935e7f4a1
* hardcopy.c: Fix -Wmaybe-uninitialized warning.Justin M. Keyes2016-10-08
|
* 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
* vim-patch:7.4.1552James McCoy2016-07-08
| | | | | | | Problem: ":colorscheme" does not use 'packpath'. Solution: Also use in "start" and "opt" directories in 'packpath'. https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
* *: Fix new linter errorsZyX2016-05-01
| | | | Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
* Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
|
* *: Make set_vim_var_\* functions have proper argument typesZyX2016-04-18
|
* 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
|
* src: README.txt -> README.mdMichael Reed2015-11-23
| | | | | The former no longer exists in this repo; see the top of src/nvim/README.md.
* Remove char_u: add_pathsep()Mark Bainter2015-05-06
|
* Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* Fix a couple uninitialized variable warnings in the release build.John Szakmeister2015-04-18
| | | | | | Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com> Reviewed-by: Marco Hinz <mh.codebro@gmail.com> Reviewed-by: Björn Linse <bjorn.linse@gmail.com>
* 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: split some more functions from misc1.cbobtwinkles2015-03-24
| | | | | | | | | | | This commit pulls the some environment-variable handling functions out of misc1.c and in to os/env.c. Previously submited as #1231, this is the start of a patch series that does that work based on a more up-to-date master branch. Major tasks accomplished: - move functions and fix includes - fix clint/clang analysis warnings - correct documentation comments
* Merge pull request #2118 from rev112/fix_redundant_castJohn Szakmeister2015-03-13
|\ | | | | Remove redundant casts
| * Remove redundant castsAnton Ovchinnikov2015-03-09
| |
* | version: don't use NVIM_VERSION_* directly outside version.cBjörn Linse2015-03-08
|/ | | | This avoids recompiles after commiting.
* 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
* Enable -Wconversion: ui.c.Eliseo Martínez2015-02-18
| | | | | | | | | | | | | | | Refactoring summary: - ui_write(): len: int --> size_t * parse_abstract_ui_codes(): len: int --> size_t * string_convert(): lenp: int * --> size_t * - string_convert_ext(): lenp : int * --> size_t * unconvlenp: int * --> size_t * * utf8len_tab_zero: char[] --> uint8_t[] * iconv_string(): slen : int --> size_t unconvlenp: int * --> size_t * resultlenp: int * --> size_t * - mch_print_text_out(): len: int --> size_t * out_pos: int --> size_t
* syntax: Refactor to store all term and gui attributes independentlyThiago de Arruda2015-02-16
| | | | | Now the attrentry_T structure will store all attributes in separate fields for cterm and rgb UIs.
* coverity/13762: Out-of-bounds read: RI.Eliseo Martínez2015-02-11
| | | | | | | | | | | | Problem : Out-of-bounds read @ 2213. Diagnostic : Real issue. Rationale : Error occurs if cmap == ARRAY_SIZE(prt_ps_mbfonts), but code takes the `if (prt_out_mbyte)` branch. That's it, if a matching encoding is found but not a matching charset. In that case, the first matching encoding is used. Resolution : Remember the value of cmap for the first matching encoding. Reset cmap to that value if first matching encoding is going to be used.
* hardcopy.c: Factor out float usageMichael Reed2015-01-24
|
* "halfway a line" is a very confusing phraseJack Danger Canty2015-01-22
| | | | | | | | | If you Google for this phrase found in the Vim documentation you'll find almost exclusively hits from the Vim documentation. I think changing "halfway a line" to "halfway through a line" makes more sense. There seems to be an pervasive odd use of the word 'halfway' in the original docs which I'm updating everywhere.
* Fix bad assert.Eliseo Martínez2015-01-14
| | | | | | | Problem : Assert can fail for legal values. Modulo-arithmetic of unsigned types can make so that n * 100 > n, but n has overflowed. Solution : Use alternative form of expression.
* Cleanup: Rename getdigits() family functions.Eliseo Martínez2015-01-11
|
* Cleanup: Refactor getdigits().Eliseo Martínez2015-01-11
| | | | | | | | | | | | | | | | Problem : getdigits() currently returns a long, but at most places, return value is casted (unsafely) into an int. Making casts safe would introduce a lot of fuss in the form of assertions checking for limits. Note : We cannot just change return type to int, because, at some places, legitimate long values are used. For example, in diff.c, for line numbers. Solution : Introduce new functions: - get_digits() : Gets an intmax_t from a string. - get_int_digits() : Wrapper for ints. - get_long_digits() : Wrapper for longs. And replace getdigits() invocations by the appropiate wrapper invocations.
* Cleanup: Refactor option_table_T.number: long --> int.Eliseo Martínez2015-01-11
|
* Cleanup: Refactor prt_{fg,bg,new_bg}col: int --> uint32_t.Eliseo Martínez2015-01-11
|
* Cleanup: Remove local var bg_color@prt_get_attr().Eliseo Martínez2015-01-11
|
* Cleanup: Fix bad assert.Eliseo Martínez2015-01-11
| | | | | Assert will fail on first loop iteration (in that case, prtpos.bytes_printed is 0).
* Remove long_u: hardcopy: Refactor long_u.Eliseo Martínez2015-01-10
| | | | | | | | | | | | | | | | - <color_related_stuff>: long_u --> uint32_t Everywhere long_u was used to hold a color value. Color values are supposed to be 32 bits at most. Supported architectures have 32 bits ints, so we could have used plain ints. But this wouldn't be future-proof, and would be wasteful if a future architecture has ints bigger than 32 bits. So, uint32_t is perfect to achieve optimal packing no matter the architecture. - bytes_to_print/bytes_printed: long_u --> size_t Seems like the correct thing, and gets rid of some casts.