Commit Graph

625 Commits

Author SHA1 Message Date
John Schmidt
4e1b364a3e Remove alloc_clear
Use `xcalloc` instead.
Inline `alloc_tv` and `alloc_string_tv` in eval.c
2014-04-28 07:41:45 -03:00
Steven Myint
c70a526a5d Remove deprecated "--use-mirrors"
In newer versions of `pip`, it is obsolete. See the following relevant links.

https://pip.readthedocs.org/en/latest/news.html
https://github.com/eddyxu/cpp-coveralls/pull/37
2014-04-26 08:48:30 -04:00
Marco Hinz
342764d70e vim-patch:7.4.260
Problem:  It is possible to define a function with a colon in the name.  It
          is possible to define a function with a lower case character if a
          "#" appears after the name.
Solution: Disallow using a colon other than with "s:".  Ignore "#" after the
          name.

https://code.google.com/p/vim/source/detail?r=6bc874e4789a0f912b4fd6b23afecf19d80b1605
2014-04-25 14:09:04 -03:00
Marco Hinz
a6e1738db3 Tests: prettify Makefile 2014-04-25 14:08:45 -03:00
Marco Hinz
6a63b0986f vim-patch:7.4.261
Problem:  When updating the window involves a regexp pattern, an
          interactive substitute to replace a "\n" with a line
          break fails. (Ingo Karkat)

Solution: Set reg_line_lbr in vim_regsub() and vim_regsub_multi().

https://code.google.com/p/vim/source/detail?r=43c6cd07c8defd8505acbe479c6970764c08e6f9
2014-04-25 14:06:01 -03:00
Eliseo Martínez
ae4090b2ce Broken build on 32 bit: Pending TODO: Reenable assertion.
On a1a0c00589, an assertion was disabled
because of breaking 32bit build.
This fixes that so that it now always works.
2014-04-24 10:59:44 -03:00
Chris Watkins
c3fb8240bc Add the neovim style guide to the contributing guide. 2014-04-24 10:50:50 -03:00
Chris Watkins
b951cf5bfc Remove O_EXTRA which was only for EMX and cygwin. 2014-04-24 10:49:14 -03:00
Stefan Hoffmann
bf9aeda01c Remove mch_screenmode, inline EMSG into ex_mode() 2014-04-24 10:38:42 -03:00
Felipe Oliveira Carvalho
3f38c384ef Add cast to unsigned to improve div by 2 in find_internal_func() 2014-04-24 10:32:47 -03:00
Felipe Oliveira Carvalho
db23cb05d1 Use /2 and 2* instead of >>1 and <<1 which are tricky with signed types
Today's compilers generate shift instructions to perform division and
multiplications by powers of 2 [1]. `(x >> 1)` looks straightforward enough, but
if x is signed the code will fail when x < 0. The compiler knows better: use
`x / 2`.

That's why we have code like this:

    (long)((long_u)Rows >> 1))

instead of the cleaner version that generates the same or better machine code:

    Rows / 2

[1] http://goo.gl/J4WpG7
2014-04-24 10:32:47 -03:00
Felipe Oliveira Carvalho
9a5b3eee5f Remove OOM test in set_context_in_menu_cmd() 2014-04-24 10:31:32 -03:00
Felipe Oliveira Carvalho
c68410de52 No OOM error condition in some ml_* functions
- ml_add_stack()
 - ml_encrypt_data()
 - ml_updatechunk()
2014-04-24 10:31:32 -03:00
Felipe Oliveira Carvalho
5421f84443 No OOM error condition in get_register() and yank_copy_line() 2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
f298be9fe1 Add FUNC_ATTR_NONNULL_RET to some functions 2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
244ca83be5 No OOM error conditions in quickfix.c and regex_nfa.c
quickfix.c

 - ll_new_list
 - ll_get_or_alloc_list

regex_nfa.c

 - realloc_post_list -> EMIT -> nfa_emit_equi_class
 - nfa_regcomp_start

Use xrealloc() in realloc_post_list() (regexp_nfa.c)

  Test plan: force a call to realloc_post_list() for every use of the EMIT macro;
  open nvim and test regexp search.
2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
e76d146029 No OOM error in call_shell() and read_string() 2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
28b03dd190 No OOM error conditions in some functions of window.c
- alloc_tabpage()
 - win_alloc_lines()
 - win_alloc_aucmd_win()
 - new_frame()
 - win_alloc()

TODO: don't handle OOM after calls to dict_alloc()
2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
6d193b0b37 No OOM errors in mb_str2wide, slang_alloc, open_spellbuf 2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
bd3587e91d No OOM error condition in cs_make_vim_style_matches()
Even though cs_reset() never returns anything different of `CS_SUCCESS` I can't
change its return type to `void`. cs_reset() is used in the `cs_cmds` table.
2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
aa32fbb838 No OOM error condition in save_patterns() 2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
c4c855a129 No OOM error condition in prt_build_cid_fontname()
- Replace alloc() with xmalloc[z]() and remove unnecessary casts in hardcopy.c
 - Use xstrndup in hardcopy.c
2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
42f1bd9b22 No OOM error condition in ga_concat_strings(), concat_fnames(), concat_str()
- 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()
2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
4b6b9117b3 No OOM error condition in prep_exarg() 2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
15d8f702a8 (verbose_)?try_malloc() to use on buf_write()
There will be more use cases for try_malloc(): see #556.

 - Reimplemented xmalloc() using try_malloc().
 - verbose_try_malloc() is just like try_malloc() but shows an out-of-memory
	 error message before returning NULL.
 - Let the compiler generate size>>1 assembly for signed types. We're not using
	 old compilers here.
 - Add proper function attributes to the new functions in memory.h
2014-04-24 10:31:31 -03:00
Felipe Oliveira Carvalho
1befc49414 Use xmalloc() and xmemdupz() in file_pat_to_reg_pat()
Unfortunately there's still a case where NULL can be returned from
file_pat_to_reg_pat().

xmemdupz() and xmallocz() aren't static anymore. There are many use cases for
these function.
2014-04-24 10:31:31 -03:00
oni-link
471da2de81 vim-patch:7.4.237
Problem:    When some patches was not included has("patch-7.4.123") may return
            true falsely.
Solution:   Check for the specific patch number.

https://code.google.com/p/vim/source/detail?r=71b165a378ad580818f6d497ecf0f8ad054a9683
2014-04-24 10:30:36 -03:00
John Szakmeister
8c5f3aebc8 Install the libncurses5-dev:i386 package to get the correct symlinks. 2014-04-23 10:45:31 -03:00
John Szakmeister
f9885f0b6a Allow a single unittest file to be run.
With this, you can now run a single unit test file using:

    TEST_FILE=/path/to/file make unittest

For example, to just run the path unit tests, you can do:

    TEST_FILE=test/unit/path.moon make unittest
2014-04-23 07:11:59 -04:00
John Szakmeister
247984d132 Make it easy to get a verbose build of Neovim.
This allows you to do

    make VERBOSE=1

from the top-level and see the actual compile lines.
2014-04-23 07:08:12 -04:00
Eliseo Martínez
557e41b119 Use portable format specifiers: Clint advice & other.
- Modify Clint advice to reflect preference for fixed sized macros.
- Cleanup comment to eliminate referecen to "%ld".
2014-04-23 06:56:34 -03:00
Eliseo Martínez
12c8094dae Use portable format specifiers: Case %l[uoxX] - *.po files.
Fix uses of plain "%lu", "%lo", "%lx" and "%lX"  within *.po files:
- Replace "%l<whatever>" with "%" PRI<whatever>64.
2014-04-23 06:56:34 -03:00
Eliseo Martínez
2dd98267f0 Use portable format specifiers: Remove dead code. 2014-04-23 06:56:33 -03:00
Eliseo Martínez
30b062e7d8 Use portable format specifiers: Case %lu - localized - EMSGN.
Fix uses of plain "%lu" within EMSGN():
- Replace "%lu" with "%" PRIu64.
- No argument cast needed. EMSGN() will take care of that.
2014-04-23 06:56:33 -03:00
Eliseo Martínez
357f54f331 Use portable format specifiers: Case %l[uoxX] - plain - sprintf.
Fix uses of plain "%lu", "%lo", "%lx" and "%lX" within sprintf():
- Replace "%l<whatever>" with "%" PRI<whatever>64.
- Cast corresponding argument to (uint64_t).
2014-04-23 06:56:33 -03:00
Eliseo Martínez
b9c550ebd5 Use portable format specifiers: Support 'll' in vim_snprintf.
Add support for 'll' length specifier in vim_snprintf/vim_vsnprintf.
2014-04-23 06:56:33 -03:00
Eliseo Martínez
20fdaaaa94 Use portable format specifiers: Case %ld - *.po files.
Fix uses of plain "%ld" within *.po files:
- Replace "%ld" with "%<PRId64>".
2014-04-23 06:56:33 -03:00
Eliseo Martínez
28bac30c19 Use portable format specifiers: Case %ld - localized - N_.
Fix uses of plain "%ld" within N_():
- Replace "%ld" with "%" PRId64.
2014-04-23 06:56:33 -03:00
Eliseo Martínez
b8f3ff2a69 Use portable format specifiers: Case %ld - localized - EMSGN.
Fix uses of localized "%ld" within EMSGN():
- Replace "%ld" with "%" PRId64.
- No argument cast needed. EMSGN() will take care of that.
2014-04-23 06:56:33 -03:00
Eliseo Martínez
bf3b9d0ecb Use portable format specifiers: Case %ld - plain - EMSGN.
Fix uses of plain "%ld" within EMSGN():
- Replace "%ld" with "%" PRId64.
- No argument cast needed. EMSGN() will take care of that.
2014-04-23 06:56:33 -03:00
Eliseo Martínez
5b0aa1cb57 Use portable format specifiers: Adapt EMSGN/emsgn to use (int64_t). 2014-04-23 06:56:33 -03:00
Eliseo Martínez
f4b81576cc Use portable format specifiers: Case %ld - localized - vim_snprintf_add.
Fix uses of localized "%ld" within vim_snprintf_add():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
22dd4f62d3 Use portable format specifiers: Case %ld - localized - vim_snprintf.
Fix uses of localized "%ld" within vim_snprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
3f8061f16c Use portable format specifiers: Case %ld - plain - vim_snprintf.
Fix uses of plain "%ld" within vim_snprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
c049cb2b51 Use portable format specifiers: Case %ld - localized - smsg.
Fix uses of localized "%ld" within smsg():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
182b84e1c3 Use portable format specifiers: Case %ld - plain - smsg.
Fix uses of plain "%ld" within smsg():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
1bffe66508 Use portable format specifiers: Case %ld - plain - fprintf.
Fix uses of plain "%ld" within fprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
b536c22550 Use portable format specifiers: Case %ld - localized - sprintf.
Fix uses of localized "%ld" within sprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
fb94edf373 Use portable format specifiers: Case %ld - plain - sprintf.
Fix uses of plain "%ld" within sprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
2014-04-23 06:56:32 -03:00
Eliseo Martínez
f916cf067d Use portable format specifiers: Remove branching with LONG_LONG_OFF_T.
After previous commits, branching code by using macro LONG_LONG_OFF_T
becomes unneccesary. Remove it.
2014-04-23 06:56:32 -03:00