Commit Graph

62 Commits

Author SHA1 Message Date
Eliseo Martínez
36340803af Enable -Wconversion: os_unix.c. 2015-02-18 20:54:14 -05:00
Eliseo Martínez
690e43b461 Enable -Wconversion: Passing-by: Remove dead code (MACOS_CONVERT).
MacOS (pre Mac OS X) is not supported anymore.
2015-02-18 20:54:12 -05:00
Thiago de Arruda
419da839e0 cleanup: Remove unused functions and builtin termcaps 2015-02-16 23:17:39 -03:00
Thiago de Arruda
9a2dd7c498 ui: Rewrite the builtin terminal UI
Now all terminal-handling code was moved to src/nvim/tui, which implements a
new terminal UI based on libtermkey and unibilium
2015-02-16 23:17:39 -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
Eliseo Martínez
4d0ef9a6b9 coverity/13745: Argument cannot be negative: RI.
Problem    : Argument cannot be negative @ 1165.
Diagnostic : Real issue.
Rationale  : len can be assigned a negative value @ 1162;
             len is passed as an unsigned argument @ 1165.
Resolution : Refactor variable's types:
             - Use ftello instead of ftell to avoid using long.
             - Assert ftello result is safely convertible to size_t.
             - Introduce variable read_size to avoid using i (int).
2015-02-02 01:21:58 -05:00
Eliseo Martínez
323f0488c2 coverity/15019: String not null terminated: FP.
Problem    : String not null terminated @ 1165.
Diagnostic : False positive.
Rationale  : Code below terminates string (with NUL or '\n').
Resolution : Add explanatory comment, and assert termination.
             Mark as Intentional at coverity's database.
2015-02-02 01:21:58 -05:00
Justin M. Keyes
5c6348e999 Merge pull request #1816 from Pyrohh/macro_cleanup
Macro cleanup
2015-01-15 09:59:45 -05: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
Thiago de Arruda
8596776bf6 ui: Implement set_{title,icon} 2015-01-14 08:31:20 -03:00
Justin M. Keyes
4e28e1aeb6 Merge pull request #1685 from justinmk/coverity74718
coverity/74718
2014-12-20 14:52:53 -05:00
Justin M. Keyes
22a681a2d5 coverity/74718: invalid FUNC_ATTR_NONNULL_ARG
- avoid null passed to ELOG format string
- receive (char *) internally
- modify identifier names for consistency
- edit comments for concision and consistency
2014-12-20 10:37:11 -05:00
Michael Reed
6f50fd6c35 Remove VMS remnants 2014-12-19 15:28:49 -05:00
Florian Walch
c780075afa vim-patch:7.4.423
Problem:    expand("$shell") does not work as documented.
Solution:   Do not escape the $ when expanding environment variables.

https://code.google.com/p/vim/source/detail?r=v7-4-423
2014-12-18 15:41:27 +01:00
Michael Reed
3969823759 docs: Remove BeOS/Haiku remnants 2014-12-09 19:24:58 -05:00
Thiago de Arruda
14f88b6865 term: Move more mouse functions to mouse.c 2014-12-02 07:21:28 -03:00
Justin M. Keyes
414199c54b Merge pull request #1491 from Pyrohh/os2-and-misc-cleanup
Remove MiNT, NeXTSTEP, OS/2 References
2014-11-28 15:38:43 -05:00
Scott Prager
275f6e3a6b mch_early_init() -> early_init().
Move general initialization functions to early_init, which simplifies
test/unit/helpers.lua, which requires all these functions.
2014-11-28 14:27:58 -05:00
Scott Prager
d5ea183633 update mch_suspend
Use the portable uv_kill.
Don't bother with archaic BeOS.
2014-11-28 14:27:58 -05:00
Scott Prager
8d271bb57b mch_init -> term_init 2014-11-28 14:27:16 -05:00
Scott Prager
a3ef5723a9 mch_write -> term_write
Switch from POSIX's write() to fwrite(stdout,...) and disable buffering
since vim buffers output explicitly and flushes when needed, like when a
key is typed.
2014-11-28 14:24:27 -05:00
Michael Reed
ba1e2ce287 Remove OS/2 references
Paul Slootman was removed from the top of os_unix.c as OS/2 is no longer
supported, but is still credited in runtime/doc/intro.txt.
2014-11-27 23:42:40 -05:00
Michael Reed
83a4c9d58c Remove Atari MiNT references 2014-11-27 23:42:40 -05:00
Michael Reed
c8d57e25e9 Remove NeXTSTEP references
Remove trailing whitespace as well.
2014-11-27 23:42:40 -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
Thiago de Arruda
75a5674cd2 event: Ensure the event loop has been cleaned up in event_teardown
- Add input_teardown/signal_teardown to take care of closing signal/stdin
  handles.
- Call those functions in event_teardown, and ensure there are no active handles
  by entering an infinite loop when there are unclosed handles(think of this as
  an assertion that can't go unoticed on travis).
- Move event_teardown call to the end of mch_exit. That is required because
  event_poll may still be called in that function.
2014-11-02 16:47:50 -03:00
Thiago de Arruda
b280308ac6 msgpack-rpc: Create subdirectory for msgpack-rpc modules
Create the msgpack_rpc subdirectory and move all modules that deal with
msgpack-rpc to it. Also merge msgpack_rpc.c into msgpack_rpc/helpers.c
2014-10-21 11:05:49 -03:00
Scott Prager
3253e7ec09 vim-patch:7.4.359
Problem:    When 'ttymouse' is set to 'uxterm' the xterm version is not
            requested. (Tomas Janousek)
Solution:   Do not mark uxterm as a conflict mouse and add
            resume_get_esc_sequence().

https://code.google.com/p/vim/source/detail?r=v7-4-359
2014-09-19 20:23:06 -04:00
Scott Prager
83cd2979a1 vim-patch:7.4.305
Problem:    Making 'ttymouse' empty after the xterm version was requested
            causes problems. (Elijah Griffin)
Solution:   Do not check for DEC mouse sequences when the xterm version was
            requested.  Also don't request the xterm version when DEC mouse
            was enabled.

https://code.google.com/p/vim/source/detail?r=v7-4-305
2014-09-19 20:23:06 -04:00
Scott Prager
9445eaa297 vim-patch:7.4.235
Problem:    It is not easy to get the full path of a command.
Solution:   Add the exepath() function.

https://code.google.com/p/vim/source/detail?r=5ab2946f7ce560985830fbc3c453bb0f7a01f385
2014-09-17 01:00:24 -04:00
Thiago de Arruda
38dcfb6062 api/msgpack-rpc: Use EXT type to serialize Buffer/Window/Tabpage 2014-09-12 13:25:28 -03:00
Stefan Hoffmann
edcc1a9732 fileinfo: rename os_file_info_id_equal 2014-08-31 15:39:33 +02:00
Stefan Hoffmann
5d074a0aa6 fileinfo: rename os_get_file_info{,_link,_fd} 2014-08-31 15:37:55 +02:00
Thiago de Arruda
aa23d2f835 msgpack-rpc: Accept method names in requests 2014-08-29 22:08:58 -03:00
Thiago de Arruda
5b7a66ec3d api: Implement '--embedded-mode' command-line option
This option makes nvim run in "embedded mode", which creates an API channel via
stdin/stdout and disables all terminal-related code
2014-08-28 14:18:05 -03:00
Fredrik Fornwall
6dcd629ed6 Make ttyfast default to true on all terminals #1051 2014-08-18 03:59:40 +00:00
Justin M. Keyes
ad5ae68acd Merge #814 'Remove dead #ifdefed code' 2014-08-07 02:20:12 -04:00
Fredrik Fornwall
e6edfa9617 Drop SGI IRIS support. #1006 2014-08-07 01:37:18 -04:00
Pavel Platto
8b72ae7c78 Remove fix for select(). select() is not used anymore. 2014-08-02 09:18:06 +03:00
Pavel Platto
77cb6551a6 Remove EBCDIC: Remove IF_EB macros 2014-08-02 09:16:59 +03:00
Nicolas Hillegeer
1710fa4337 vim: move vim_acl_T to types.h
Also include "types.h" in os_unix.h because it declares functions that
return vim_acl_T.
2014-07-16 19:05:35 +02:00
Pavel Platto
286ce271e7 Extract tempfile module from fileio
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.
2014-07-14 21:14:40 +02:00
Pavel Platto
29e0cd1571 Refactor vim_tempname
- 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
2014-07-14 21:14:40 +02:00
Pavel Platto
47084ea765 Use strict function prototypes #945
`-Wstrict-prototypes` warn if a function is declared or defined without
specifying the argument types.

This warning disallow function prototypes with empty parameter list.
In C, a function declared with an empty parameter list accepts an
arbitrary number of arguments when being called. This is for historic
reasons; originally, C functions didn't have prototypes, as C evolved
from B, a typeless language. When prototypes were added, the original
typeless declarations were left in the language for backwards
compatibility.
Instead we should provide `void` in argument list to state
that function doesn't have arguments.

Also this warning disallow declaring type of the parameters after the
parentheses because Neovim header generator produce no declarations for
old-stlyle prototypes: it expects to find `{` after prototype.
2014-07-14 20:28:40 +02:00
Will Stamper
fdeb132cad vim-patch:7.4.295 #833
Problem:    Various typos, bad white space and unclear comments.
Solution:   Fix typos.  Improve white space. Update comments.

https://code.google.com/p/vim/source/detail?r=662ae48e7e246a63d38c9f3165b15b62252edaee
2014-07-11 16:38:49 -04: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
Klemen Košir
ef34a0ab13 Replace int with bool in some files. #654 2014-07-08 17:25:48 +00:00