aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os_unix.c
Commit message (Collapse)AuthorAge
* refactor: eliminate os_unix.c #21621Justin M. Keyes2023-01-02
|
* refactor: rename mch_get_acl => os_get_aclJustin M. Keyes2022-12-16
|
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor: format with uncrustify #15755dundargoc2021-09-24
|
* refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
| | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* refactor: rename mch_exit => os_exitJustin M. Keyes2020-02-02
| | | | | - No code changes - Move it to main.c
* refactor: move various things to os/shell.cJustin M. Keyes2020-02-02
| | | | | - No code changes - Rename mch_expand_wildcards => os_expand_wildcards
* doc: fix typosBrian Wignall2019-11-27
| | | | close #11459
* os_can_exe: remove char_uJustin M. Keyes2019-07-21
|
* refactor: use int for Columns and RowsBjörn Linse2019-07-19
|
* vim-patch:8.0.1496: VIM_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629) vim-patch:8.0.1481
* cleanup: remove HAVE_SELINUX #10040Justin M. Keyes2019-05-21
| | | | We never define HAVE_SELINUX, and no one has asked for it. So remove the dead code.
* UI: add "compositor" layer to merge grids for TUI use in a correct wayBjörn Linse2019-02-02
| | | | | | | | Initially we will use this for the popupmenu, floating windows will follow soon NB: writedelay + compositor is weird, we need more flexible redraw introspection.
* os_unix: Log exit code before freeing all memoryJames McCoy2018-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with -DEXITFREE, the ILOG call would result in a crash trying to access VV_PROGPATH, which had already been released: (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007f8f761082f1 in __GI_abort () at abort.c:79 #2 0x00007f8f760ffa8a in __assert_fail_base (fmt=0x7f8f76253ec8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x1c74280 <.str.8> " ,\t\n", file=file@entry=0x1c73fe2 "256]'", line=line@entry=610, function=function@entry=0x1c742e0 <.str.9+32> "") at assert.c:92 #3 0x00007f8f760ffb02 in __GI___assert_fail (assertion=0x1c74280 <.str.8> " ,\t\n", file=0x1c73fe2 "256]'", line=610, function=0x1c742e0 <.str.9+32> "") at assert.c:101 #4 0x00000000012d87c1 in vim_getenv (name=0x2f5a460 <get_special_key_name.string+64> "NVIM_LOG_FILE") at ../src/nvim/os/env.c:608 #5 0x00000000012d6538 in expand_env_esc (srcp=0x1c2f4e0 <.str.10+32> "", dst=0x2f5a460 <get_special_key_name.string+64> "NVIM_LOG_FILE", dstlen=4095, esc=false, one=false, prefix=0x0) at ../src/nvim/os/env.c:351 #6 0x00000000012d85af in expand_env_esc (srcp=0x625000000100 "\004", dst=0x7ffeed88cf40 "", dstlen=32766, esc=237, one=136, prefix=0x60200401c8b4 <error: Cannot access memory at address 0x60200401c8b4>) at ../src/nvim/os/env.c:472 #7 0x0000000000eb4274 in do_log_to_file (log_file=0x0, log_level=0, context=0x0, func_name=0x0, line_num=0, eol=false, fmt=0x0) at ../src/nvim/log.c:254 #8 0x0000000000eb305b in open_log_file () at ../src/nvim/log.c:164 #9 0x0000000000eb2cc6 in logmsg (log_level=<error reading variable: Cannot access memory at address 0x268>, context=<error reading variable: Cannot access memory at address 0x260>, func_name=<error reading variable: Cannot access memory at address 0x258>, line_num=<error reading variable: Cannot access memory at address 0x254>, eol=<error reading variable: Cannot access memory at address 0x253>, fmt=<error reading variable: Cannot access memory at address 0x248>) at ../src/nvim/log.c:109 #10 0x00000000013022c7 in mch_free_acl (aclent=0x4f59100) at ../src/nvim/os_unix.c:132 #11 0x0000000000efddac in getout (exitval=0) at ../src/nvim/main.c:681 #12 0x0000000000c1bb3e in ex_quit (eap=0x7ffeed88cd00) at ../src/nvim/ex_docmd.c:6067 #13 0x0000000000bab781 in do_one_cmd (cmdlinep=0x7ffeed88f180, flags=10, cstack=0x7ffeed88f1a0, fgetline=0x0, cookie=0x0) at ../src/nvim/ex_docmd.c:2228 #14 0x0000000000b8de6d in do_cmdline (cmdline=0x7ffeed891ae2 "quit", fgetline=0x0, cookie=0x0, flags=10) at ../src/nvim/ex_docmd.c:592 #15 0x0000000000b94036 in do_cmdline_cmd (cmd=0x7ffeed891ae2 "quit") at ../src/nvim/ex_docmd.c:268 #16 0x0000000000efb900 in exe_commands (parmp=0x7ffeed890900) at ../src/nvim/main.c:1699 #17 0x0000000000ee96b2 in main (argc=11, argv=0x7ffeed890fa8) at ../src/nvim/main.c:524
* log: RPC, input, other eventsJustin M. Keyes2018-09-19
|
* UI/cleanup: Remove most redraw_later_clear() callsJustin M. Keyes2018-09-12
| | | | | | Vim :! may "mess up the screen" because of e.g. switching between cooked mode, but Nvim just uses pipes. So maybe we can avoid these redraw_later_clear() CYA calls.
* ui: flush UI state on exitBjörn Linse2018-09-09
|
* exit: annotate FUNC_ATTR_NORETURN functions #7954 (#7954)Justin M. Keyes2018-02-07
| | | | This should fix a particular false positive from clang 5.0.0 scan-build, which thinks that nlua_init() can continue after preserve_exit().
* input: only change mode of input fd if there is an input fdBjörn Linse2017-11-25
|
* loop_close: Avoid infinite loop, and log it.Justin M. Keyes2017-06-07
| | | | | | Avoids a hang, and also helps diagnose issues like: https://github.com/neovim/neovim/pull/6594#issuecomment-298321826
* lint: fix indentation of FUNC_ATTR linesBjörn Linse2017-06-03
|
* os_unix: Mark mch_exit as NORETURNJames McCoy2017-05-12
|
* *: Add comment to all C filesZyX2017-04-19
|
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* linter: make os_unix.c pass the linterraichoo2017-03-06
|
* make backtick-expansion work with `shell=fish`raichoo2017-03-06
|
* 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
|