Commit Graph

57 Commits

Author SHA1 Message Date
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
8bff79d3fd term: Fix shell_resized for abstract_ui 2015-01-13 21:21:20 -03:00
Thiago de Arruda
784bda0704 ui: Fix redraw bug caused by race conditions with remote clients
Before sending a resize command to the UIs, flush the current output buffer to
ensure no redraw commands for a screen with invalid size are processed.
2015-01-13 21:21:20 -03:00
Thiago de Arruda
b4f516a36a ui: Fix out_flush/ui_write behavior to always flush for abstract_ui 2015-01-13 21:21:19 -03:00
Thiago de Arruda
f0a944d3cf ui: Add mising T_CSV code to abstract_ui termcap
This code is required for screen.c to set a vertical scroll region, which is a
great optimization when scrolling vertically split windows.
2015-01-13 11:53:27 -03:00
Michael Reed
16d0976150 Remove QNX/pterm remnants
The function qnx_init() (wrapped in an ifdef in main.c) doesn't even
exist.
2015-01-11 21:00:06 -05:00
Eliseo Martínez
7f7262e933 Cleanup: Rename getdigits() family functions. 2015-01-11 21:04:08 +01:00
Eliseo Martínez
bb737b6f0e Cleanup: Refactor variables: long --> int.
At 31c8440fee, some variables were changed
from int to long, to avoid -Wconversion errors. Long type was the
appropiate one because getdigits() was returning a long.
Now that we have get_int_digits() and get_long_digits(), we can revert
mentioned variables to int, and use get_int_digits() without having
-Wconversion warnings.
2015-01-11 17:18:39 +01:00
Eliseo Martínez
04c0658024 Cleanup: Refactor getdigits().
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.
2015-01-11 17:18:39 +01:00
Eliseo Martínez
85904c992e Remove long_u: term: Remove dead code using long_u.
get_long_from_buf() seems not to be used anywhere, and is the only place
where instances of long_u remain at term.c.
2015-01-10 10:52:21 +01:00
Eliseo Martínez
31c8440fee Remove long_u: term: Enable -Wconversion. 2015-01-10 10:52:21 +01:00
Steven Oliver
f3b06ba6d1 globals.h: Remove unused global variable 2015-01-02 21:10:08 -05:00
Michael Reed
a62fe49d3c Remove Amiga remnants
Notes regarding the removal of specific items:

  - Aztec C: only on the Amiga.
  - mch_check_win(): doesn't exist anymore.
  - Comment in ex_cmds.c: It seems the context for this comment was
    removed, but the comment was inadvertantly left alone.
2014-12-19 15:28:49 -05:00
Michael Reed
3969823759 docs: Remove BeOS/Haiku remnants 2014-12-09 19:24:58 -05:00
Thiago de Arruda
07e569a25d ui: Add abstract_ui termcap and split UI layer
This is how Nvim behaves when the "abstract_ui" termcap is activated:

- No data is written/read to stdout/stdin by default.
- Instead of sending data to stdout, ui_write will parse the termcap codes
  and invoke dispatch functions in the ui.c module.
- The dispatch functions will forward the calls to all attached UI
  instances(each UI instance is an implementation of the UI layer and is
  registered with ui_attach).
- Like with the "builtin_gui" termcap, "abstract_ui" does not contain any key
  sequences. Instead, vim key strings(<cr>, <esc>, etc) are parsed directly by
  input_enqueue and the translated strings are pushed to the input buffer.

With this new input model, its not possible to send mouse events yet. Thats
because mouse sequence parsing happens in term.c/check_termcodes which must
return early when "abstract_ui" is activated.
2014-12-08 23:44:23 -03:00
Thiago de Arruda
6436908ffe mouse: Remove CHECK_DOUBLE_CLICK conditionals
This is now always defined.
2014-12-02 07:21:34 -03:00
Thiago de Arruda
14f88b6865 term: Move more mouse functions to mouse.c 2014-12-02 07:21:28 -03:00
Thiago de Arruda
8a5a8dbf0f term: Remove most calls to settmode
Nvim now relies much less on setting terminal mode to cooked mode, remove most
calls to settmode, except for those that happen on startup or when suspending.
Eventually even those will be handled by the UI layer.
2014-12-02 07:15:07 -03:00
Thiago de Arruda
05f8d261fe term: Move "set_shellsize" to screen.c as "screen_resize" 2014-12-02 07:15:06 -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
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
83a4c9d58c Remove Atari MiNT references 2014-11-27 23:42:40 -05:00
Thiago de Arruda
1865b8c1c1 ui: Remove ui_delay, ui_breakcheck and ui_set_shellsize
These functions only used to call another os_* function, so remove them and
replace all occurences in the project.
2014-11-27 14:27:18 -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
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
1de8fe30c8 Remove unused USE_TERM_CONSOLE ifdefs #1015
This is unused after dropped amiga and msdos support.
2014-08-07 01:52:03 -04:00
Fredrik Fornwall
e6edfa9617 Drop SGI IRIS support. #1006 2014-08-07 01:37:18 -04:00
Pavel Platto
77cb6551a6 Remove EBCDIC: Remove IF_EB macros 2014-08-02 09:16:59 +03:00
Pavel Platto
6ff5759ed2 Remove BEOS_PR_OR_BETTER 2014-08-02 09:13:06 +03:00
Pavel Platto
1fbee0fe45 Remove BeOS DR8 specific hack
It is already partially removed from screen.c
2014-08-02 09:13:06 +03:00
Fredrik Fornwall
44afe610f8 Partial C99 cleanup of term.c #1020 2014-08-01 13:20:11 -04:00
Fredrik Fornwall
bfaab2e351 Remove FEAT_MOUSE_JSB
This is never built and references some obscure jsb terminal
2014-07-29 18:08:15 +02:00
Nicolas Hillegeer
fb5a786bdb term: replace gettimeofday()
gettimeofday() is not portable, replace with os_hrtime() wherever possible.
The new code should behave equivalently to the old implementation.

Because of this, HAVE_GETTIMEOFDAY is no longer necessary To be able to
handle double clicks.
2014-07-21 19:29:29 +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
Pavel Platto
0868818d3e Include stdbool.h in some files which use it
Done by manual inspection of the output of this script:
grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool
grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include
grep -F -x -v -f has_include has_bool
2014-07-11 18:33:07 -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
Klemen Košir
a568e8b644 Replaced most TRUE/FALSE macros in arabic, mbyte and spell. #645 2014-07-08 17:34:08 +00:00
Klemen Košir
ef34a0ab13 Replace int with bool in some files. #654 2014-07-08 17:25:48 +00:00
Brandon Coleman
7f21665673 move/remove W_* macros
move W_ENDCOL to screen.c
remove the rest of the W_* macros
2014-06-12 01:20:36 -05:00
ZyX
6498b281fa Remove remaining declarations with new script: finddeclarations.pl 2014-06-02 11:04:18 -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
76066e56fc Remove FEAT_TITLE
'title' and 'icon' options
2014-05-28 13:08:55 -04:00
Hinidu
75f152d09b Remove FEAT_MENU
Support for :menu command. It can be used in terminal Vim too.
2014-05-28 13:08:54 -04:00