| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is none of option.c business to create *possibly unneeded* **default**
directories **before** user specified where he actually wants to place the
files.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Remove/add includes
- Do not pretend that returns are const
- Add function attributes
- Allocate memory always in get_xdg
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add functions that are able to query XDG.
- Replace defaults for
- &runtimepath. Does not follow #78.
- &viewdir.
- &undodir.
- &directory.
- &backupdir. Does not follow #78.
- vimrc location.
- Remove user vimrc file line from :version message.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
What works:
1. ShaDa file dumping: header, registers, jump list, history, search patterns,
substitute strings, variables.
2. ShaDa file reading: registers, global marks, variables.
Most was not tested.
TODO:
1. Merging.
2. Reading history, local marks, jump and buffer lists.
3. Documentation update.
4. Converting some data from &encoding.
5. Safer variant of dumping viminfo (dump to temporary file then rename).
6. Removing old viminfo code (currently masked with `#if 0` in a ShaDa file for
reference).
|
|
|
|
| |
It is not needed to know that os/* uses libuv.
|
|
|
|
|
| |
This allows callers to incrementally process buffers that are filled by
incomplete chunks more easily.
|
|
|
|
|
| |
Vim defines this for Windows, so there's no Neovim-supported system for
which this would not be defined.
|
|
|
|
|
|
|
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/3164
Closes https://github.com/neovim/neovim/issues/3194
Closes https://github.com/neovim/neovim/issues/3221
Helped-by: @splinterofchaos
Helped-by: @oni-link
Helped-by: @justinmk
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
RETSIGTYPE, SIGRETURN, and SIGDEFARG are always defined the same, so
inline them for simplicity; SIGDUMMYARG, however, is unused, so remove
it.
Even if these things don't work on windows, the signal handler in
if_cscope.c is already wrapped with '#idef UNIX', as is its only call
site.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
|
|
|
|
| |
It's always defined, so the #else is redundant.
|
|
|
|
|
|
|
|
|
|
|
| |
SIGHAS3ARGS appears in Vim's source code like this:
/* List 3 arg systems here. I guess __sgi, please test and correct me. jw. */
if defined(__sgi) && defined(HAVE_SIGCONTEXT)
define SIGHAS3ARGS
endif
Given we don't support SGI, remove it.
|
|
|
|
|
| |
Any files which need definitions from <time.h> should include it,
not "os/os_defs.h".
|
|
|
|
|
|
|
|
| |
MSVC 2015 defines __func__ (C++11).
https://msdn.microsoft.com/en-us/library/dn919276.aspx
MSVC only allows inline in C++ and requires __inline in C instead.
https://msdn.microsoft.com/en-us/library/bw1hbe6y.aspx
|
|
|
|
|
| |
Remove R_OK, W_OK defines because os/os.h includes <uv.h> which includes
uv-win.h which defines R_OK and W_OK.
|
|
|
|
|
| |
Since gettimeofday() was replaced by os_time in
fb5a786bdb5b7b52b9c36b3eb8b6d2cc002aa8f3 we do not need sys/time.h.
|
|
|
|
|
|
|
|
|
| |
In Windows there is no equivalent to the filesystem executable bit; the
documentation states that for Windows :executable() returns
1 for all files. But this behaviour was broken because is_executable()
checked for the UNIX bit.
When WIN32 is defined we now skip the S_IXUSR check.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
os_file_is_readonly() in its current form is equivalent to
!os_file_is_writable(). This does not appear to be a bug, because Vim's
use of check_file_readonly() (which we changed to os_file_is_readonly())
is equivalent to !os_file_is_writable() in every case.
os_file_is_readonly() also fails this test:
returns false if the file is non-read, non-write
A more useful form would define behavior under these cases:
- path is executable (but not writable)
- path is non-existent
- path is directory
But there is no reason for os_file_is_readonly() to exist, so remove it.
|
|
|
|
|
|
| |
- uv_fs_access() is far more robust than access(). In particular, it
handles utf16 paths (Windows).
- Still need R_OK, W_OK in win_defs.h
|
| |
|
|
|
|
|
|
|
| |
Use access() because:
- We already use it for os_file_is_writable()
- Vim's old check_file_readonly() ends up using access() after all.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new event processing architecture changed `jobwait()` semantics: Only one
job is processed at time since process_wait only focuses on one queue.
This fixes the problem with a few changes:
- Allow the event queue polled by `process_wait` to be overriden by a new
argument.
- Allow the parent queue to be overriden with `queue_replace_parent`
- Create a temporary queue that serves as the parent for all jobs passed to
`jobwait()`
|
|
|
|
| |
This is necessary to keep events in the same order received from the OS.
|
|
|
|
|
|
|
|
|
|
| |
- Improve the implementation of deferred/immediate events.
- Use the new queue module to change how/when events are queued/processed by
giving a private queue to each emitter.
- Immediate events(which only exist to break uv_run recursion) are now
represented in the `loop->fast_events` queue.
- Events pushed to child queues are propagated to the event loop main queue and
processed as K_EVENT keys.
|
|
|
|
|
| |
Change the API so that it is passed to {uv,pty}_process_init instead of
`process_spawn`.
|
|
|
|
|
|
| |
- Declare poll timer in Loop structure instead of a loop_poll_events local
variable.
- Move deferred event management to input.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
out_data_cb() can return without emptying the full RBuffer (no NL was
seen). Because the shell output stream is stopped until space in the
Rbuffer is freed up, no more shell output is written.
To prevent this, output the full RBuffer when write_output() did not
write anything.
write_output() can also process the same RBuffer content more than once,
if no NL was seen. To prevent NUL bytes from producing new lines (if
lines are not written to a buffer), translate NUL to SOH(1).
Fixes #2983
|
|
|
|
|
|
|
|
| |
os_get_user_name() requires getuid(), which is only available in UNIX. Return
FAIL for non UNIX systems.
On FAIL os_get_user_name() fills the buffer with the uid. In Windows libuv
uses 0 for uid in stat structs, so 0 is used here too.
|
| |
|
|
|
|
| |
It is not needed to know that os/* uses libuv.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Simplify RStream/WStream API and make it more consistent with libuv.
- Move into the event loop layer(event subdirectory)
- Remove uv_helpers module.
- Simplify job/process internal modules/API.
- Unify RStream and WStream into a single structure. This is necessary because
libuv streams can be readable and writable at the same time(and because the
uv_helpers.c hack to associate multiple streams with libuv handle was removed)
- Make struct definition public, allowing more flexible/simple memory
management by users of the module.
- Adapt channel/job modules to cope with the changes.
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
| |
These macros would never return true since the preceding waitpid() call
did not specify the WUNTRACED or WCONTINUED options (which is correct
since we only care for processes that exited here).
Besides removing dead code, this improves portability since WIFCONTINUED
is not defined on all platforms.
|
| |
|
| |
|