Commit Graph

136 Commits

Author SHA1 Message Date
Jurica Bradaric
ee56470157 vim-patch:7.4.704
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.

d82a2a990b
2016-01-24 09:15:30 +01:00
ZyX
3b7c4093e2 shell: Unquote &shell* options before using them 2016-01-11 05:24:44 +03:00
Michael Reed
53ee6425c8 src/*: Remove VIM - Vi improved ... header
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.
2015-11-27 16:25:10 -05:00
Rui Abreu Ferreira
4f24b9e06f Remove unnecessary includes for errno.h 2015-11-25 16:38:33 -05:00
ZyX
ee282cf49e shada: Add support for converting strings that are read or written 2015-10-08 21:59:57 +03:00
Eliseo Martínez
7c956dcbe8 Enable -Wconversion: normal.c.
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>
2015-04-27 19:27:07 +02:00
Felipe Oliveira Carvalho
bcfc37ea98 Replace vim_isspace() with ascii_isspace() defined in ascii.h 2015-04-24 20:37:13 -03:00
Felipe Oliveira Carvalho
93bf201119 Replace vim_iswhite with ascii_iswhite() defined in ascii.h 2015-04-24 20:37:13 -03:00
Thiago de Arruda
34c48aaf12 memory: Add free wrapper and refactor project to use it
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.
2015-04-13 08:22:44 -03:00
Thiago de Arruda
3baba1e7bc refactor: Remove term modules and termcap options
- 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
2015-02-21 05:08:21 -03:00
Thiago de Arruda
e0e41b30c6 ui: Remove/adapt some old code for a big UI refactor
- 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`)
2015-02-16 23:17:39 -03:00
Michael Reed
d86ebc7afb Macro cleanup: PROTO
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.
2015-01-14 15:07:16 -05:00
Daniel Fairhead
f8e3cfe220 strings.c: replace copy_spaces, copy_chars with equivalent memset. 2014-12-12 08:11:47 +00:00
Scott Prager
4964d65362 strings: Remove NONNUL_ALL from NULL-taking functions.
vim_strup() is only used in a couple places, with no NULLs possible, so
keep the attribute and remove the NULL check.
2014-12-06 14:41:21 -05:00
LBEaston
8f0e76fc50 Fix SegFault when getting full path for files 2014-12-01 13:01:01 +11:00
Justin M. Keyes
3e665efea4 Merge pull request #1497 from splinterofchaos/const-attr
constify and func-attribute memory.c and strings.c
2014-11-29 22:48:23 -05:00
Scott Prager
f75de5e671 strings: Enable -Wconvert. 2014-11-27 14:38:26 -05:00
Scott Prager
ecf81c3f20 strings/memory: constify and func_attr.
Fix MB_COPY_cHAR() to accept const pointers.
2014-11-27 14:38:26 -05:00
Thiago de Arruda
bf6bb27e79 ui: Remove redundant ui.h includes
Also move read_error_exit to os/input.c
2014-11-27 15:00:30 -03:00
Brandon Coleman
0fff487690 move errno.h include out of vim.h 2014-07-09 00:18:20 +02:00
Brandon Coleman
bf219e1442 move <inttypes.h> include out of vim.h 2014-07-09 00:18:19 +02:00
Brandon Coleman
82b71a3056 move ascii.h include out of vim.h 2014-07-09 00:18:18 +02:00
Brandon Coleman
a4f441e547 remove stdbool.h include from vim.h and globals.h 2014-07-09 00:18:17 +02:00
Felipe Oliveira Carvalho
85100bb01d No OOM in concat_str() (few remaining cases)
Also fixed the duplicated declaration (path.c and strings.c)
2014-06-16 01:40:27 -03:00
Felipe Oliveira Carvalho
8234f2839f No OOM in vim_strsave_escaped[_ext]() 2014-06-16 01:36:31 -03:00
Felipe Oliveira Carvalho
f7e64c3c5f No OOM in vim_strnsave_up()
And some cleanup in strsave_up()
2014-06-16 01:36:30 -03:00
ZyX
70929f7e16 Add automatic generation of headers
- 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.
2014-06-02 11:04:17 -03:00
Hinidu
ac116088af Remove FEAT_QUICKFIX 2014-05-28 13:08:54 -04:00
Hinidu
4e0fc575d7 Remove FEAT_MBYTE
Multi-byte character handling.
2014-05-28 13:08:54 -04:00
Justin M. Keyes
e2e47803bd Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'
- replace alloc with xmalloc
2014-05-22 13:00:51 -04:00
John Schmidt
85338fe1d5 Remove cryptography
As discussed in #694, vim encryption uses old,
obsolete algorithms that are poorly implemented.
Since insecure cryptography is worse than no
cryptgraphy, the community voted in favor of
removing all crypto.

Various alternatives to the old crypto is
being discussed in #701.

Closes #694.
2014-05-20 08:31:06 -03:00
Felipe Oliveira Carvalho
21784aeb00 Replace alloc() with xmalloc() and remove immediate OOM checks 2014-05-19 14:50:23 -03:00
Felipe Oliveira Carvalho
a80d7e86c1 Remove NULL/non-NULL tests after calls to vim_str(n)save() 2014-05-19 14:50:23 -03:00
Felipe Oliveira Carvalho
b63d2626ed Implement vim_str(n)save using xstrdup and strncpy/xmalloc 2014-05-19 14:50:22 -03:00
Eliseo Martínez
409cc138f2 Introduce nvim namespace: Fix project-local includes.
Prepend 'nvim/' in all project-local (non-system) includes.
2014-05-15 20:46:01 +02:00
Eliseo Martínez
da51dc9cf2 Introduce nvim namespace: Move files.
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.
2014-05-15 20:46:01 +02:00