aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
Commit message (Collapse)AuthorAge
* 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
* os/fs: Rename os_file_exists to os_path_exists (#4973)Daniel Xu2016-07-06
| | | | Because the old name did not indicate that the function would return true on directories as well.
* Linting.KillTheMule2016-05-02
|
* vim-patch:7.4.672KillTheMule2016-05-02
| | | | | | | | | | | Problem: When completing a shell command, directories in the current directory are not listed. Solution: When "." is not in $PATH also look in the current directory for directories. https://github.com/vim/vim/commit/b5971141dff0c69355fd64196fcc0d0d071d4c82 Most of it applied manually.
* os_nodetype: impl with libuvJustin M. Keyes2016-04-29
|
* Merge tempfile.c back into fileio.cJurica Bradaric2016-04-20
|
* Misc. macro cleanupMichael Reed2016-01-14
| | | | | | | | | | - ROOT_UID's comment is misleading, as it's always defined to 0. - SEEK_{SET,END} & O_NOFOLLOW should already be defined on Unix-like systems in <stdio.h> and <fcntl.h>, respectively. In any case, neither of those #ifdef blocks should be in the middle of source files. - The S_IS{LNK,DIR,...} macros should only be undefined on Windows.
* Stop using <stropts.h>Michael Reed2016-01-12
| | | | | | | | | | In Vim, at least the constant `I_PUSH` is used from <stropts.h>, but Neovim doesn't seem to use anything from said header. Besides that, POSIX.1-2008[1] marks this header as obsolescent, and there don't seem to be many platforms that even have it. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stropts.h.html#tag_13_52_11
* 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.
* 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 instances of TRUE/FALSE macroSteven Oliver2015-09-04
| | | | | | memory.c os_unix.c path.c
* job: Replace by a better process abstraction layerThiago de Arruda2015-07-17
| | | | | | | | | | | | | - New libuv/pty process abstraction with simplified API and no globals. - Remove nvim/os/job*. Jobs are now a concept that apply only to programs spawned by vimscript job* functions. - Refactor shell.c/channel.c to use the new module, which brings a number of advantages: - Simplified API, less code - No slots in the user job table are used - Not possible to acidentally receive data from vimscript - Implement job table in eval.c, which is now a hash table with unilimited job slots and unique job ids.
* event loop: New abstraction layer with refactored time/signal APIThiago de Arruda2015-07-17
| | | | | | | | | | - Add event loop abstraction module under src/nvim/event. The src/nvim/event/loop module replaces src/nvim/os/event - Remove direct dependency on libuv signal/timer API and use the new abstraction instead. - Replace all references to uv_default_loop() by &loop.uv, a new global variable that wraps libuv main event loop but allows the event loop functions to be reused in other contexts.
* input: stream_set_blocking(): libuv implJustin M. Keyes2015-05-27
| | | | | | | | | - Create a private libuv loop instead of re-using uv_default_loop(), to avoid conflict[1] with existing watcher(s) on the fd. - Expose the global "input" fd as a getter instead of a mutable global. [1] .deps/build/src/libuv/src/unix/core.c:833: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
* Remove char_u: add_pathsep()Mark Bainter2015-05-06
|
* Replace vim_iswhite with ascii_iswhite() defined in ascii.hFelipe Oliveira Carvalho2015-04-24
|
* 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.
* Update comments for expand_wildcards functions.oni-link2015-04-05
| | | | | | | | | | | | | | | | | Be more specific in the description of mch_expand_wildcards(): This function will never free memory pointed to by its arguments. If OK is returned, *file will always point to allocated memory. *num_file is set to the number of pointers in *file. If FAIL is returned *file is set to NULL and *num_file to 0. If gen_expand_wildcards() returns FAIL, no memory allocation in this function needs to be undone. If expand_wildcards() returns FAIL, no memory allocation in this function needs to be undone. Helped-by: Eliseo Martínez <eliseomarmol@gmail.com> Helped-by: Michael Reed <m.reed@mykolab.com>
* os_scandir: fname_case -> path_fix_caseScott Prager2015-03-31
| | | | | | | | | | Use os_scandir(). fname_case() only gets used when `defined(USE_FNAME_CASE)` (on operating systems with case-insensitive file systems), but may be useful in other contexts, so move it to path.c. (See the TODO.) Remove the unused parameter, len.
* Un-mch mch_has_(exp_)wildcard().Scott Prager2015-03-31
| | | | | Merge mch_has_wildcard() and mch_has_exp_wildcar() with their upstream equivalents for Windows and replace the "mch_" suffix with "path_".
* ui: Replace cursor_{on,off} by busy_{stop,start}Thiago de Arruda2015-03-15
| | | | | | | | | | | | | | | | | | | | | | | | Switching cursor off is only necessary in two occasions: - When redrawing to avoid terminal flickering - When the editor is busy The first can now be handled by the TUI, so most calls to ui_cursor_off can be removed from the core. So, before this commit it was only necessary to switch the cursor off to notify the user that nvim was running some long operation. Now the cursor_{on,off} functions have been replaced by busy_{stop,start} which can be handled in a UI-specific way(turning the cursor off or showing a busy indicator, for example). To make things even more simpler, nvim is always busy except when waiting for user input or other asynchronous events: It automatically switches to a non-busy state when the event loop is about to be entered for more than 100 milliseconds. `ui_busy_start` can be called when its not desired to change the busy state in the event loop (As its now done by functions that perform blocking shell invocations).
* Macro cleanup: HAVE_SANDBOXMichael Reed2015-03-05
|
* 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: os_unix.c.Eliseo Martínez2015-02-18
|
* Enable -Wconversion: Passing-by: Remove dead code (MACOS_CONVERT).Eliseo Martínez2015-02-18
| | | | MacOS (pre Mac OS X) is not supported anymore.
* cleanup: Remove unused functions and builtin termcapsThiago de Arruda2015-02-16
|
* ui: Rewrite the builtin terminal UIThiago de Arruda2015-02-16
| | | | | Now all terminal-handling code was moved to src/nvim/tui, which implements a new terminal UI based on libtermkey and unibilium
* ui: Remove/adapt some old code for a big UI refactorThiago de Arruda2015-02-16
| | | | | | | | | | | | | - 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`)
* coverity/13745: Argument cannot be negative: RI.Eliseo Martínez2015-02-02
| | | | | | | | | | | 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).
* coverity/15019: String not null terminated: FP.Eliseo Martínez2015-02-02
| | | | | | | | 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.
* Merge pull request #1816 from Pyrohh/macro_cleanupJustin M. Keyes2015-01-15
|\ | | | | Macro cleanup
| * Macro cleanup: PROTOMichael Reed2015-01-14
| | | | | | | | | | | | 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.
* | ui: Implement set_{title,icon}Thiago de Arruda2015-01-14
|/
* Merge pull request #1685 from justinmk/coverity74718Justin M. Keyes2014-12-20
|\ | | | | coverity/74718
| * coverity/74718: invalid FUNC_ATTR_NONNULL_ARGJustin M. Keyes2014-12-20
| | | | | | | | | | | | | | - avoid null passed to ELOG format string - receive (char *) internally - modify identifier names for consistency - edit comments for concision and consistency
* | Remove VMS remnantsMichael Reed2014-12-19
| |
* | vim-patch:7.4.423Florian Walch2014-12-18
|/ | | | | | | 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
* docs: Remove BeOS/Haiku remnantsMichael Reed2014-12-09
|
* term: Move more mouse functions to mouse.cThiago de Arruda2014-12-02
|
* Merge pull request #1491 from Pyrohh/os2-and-misc-cleanupJustin M. Keyes2014-11-28
|\ | | | | Remove MiNT, NeXTSTEP, OS/2 References
| * Remove OS/2 referencesMichael Reed2014-11-27
| | | | | | | | | | 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.
| * Remove Atari MiNT referencesMichael Reed2014-11-27
| |
| * Remove NeXTSTEP referencesMichael Reed2014-11-27
| | | | | | | | Remove trailing whitespace as well.
* | mch_early_init() -> early_init().Scott Prager2014-11-28
| | | | | | | | | | Move general initialization functions to early_init, which simplifies test/unit/helpers.lua, which requires all these functions.
* | update mch_suspendScott Prager2014-11-28
| | | | | | | | | | Use the portable uv_kill. Don't bother with archaic BeOS.
* | mch_init -> term_initScott Prager2014-11-28
| |
* | mch_write -> term_writeScott Prager2014-11-28
|/ | | | | | 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.
* ui: Remove redundant ui.h includesThiago de Arruda2014-11-27
| | | | Also move read_error_exit to os/input.c
* event: Ensure the event loop has been cleaned up in event_teardownThiago de Arruda2014-11-02
| | | | | | | | | | - 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.
* msgpack-rpc: Create subdirectory for msgpack-rpc modulesThiago de Arruda2014-10-21
| | | | | 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