aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
Commit message (Collapse)AuthorAge
...
* main,version: Remove USR_EXRC_FILE*ZyX2015-10-23
|
* option: Add `//` to the end of default `&directory`ZyX2015-10-23
|
* stdpaths: Add documentationZyX2015-10-23
|
* main,os/env: Fix lint errorsZyX2015-10-23
|
* stdpaths: Do NOT create data directoriesZyX2015-10-23
| | | | | | This is none of option.c business to create *possibly unneeded* **default** directories **before** user specified where he actually wants to place the files.
* stdpaths: Give proper error message in case directory creation failedZyX2015-10-23
|
* shada: Move shada file to a new locationZyX2015-10-23
|
* stdpaths,main: Remove all remaining memory leaksZyX2015-10-23
|
* stdpaths: Export get_xdg function (renamed) and use it for runtimepathZyX2015-10-23
|
* stdpaths: Rename export functions so that they have common prefixZyX2015-10-23
|
* stdpaths: Remove useless functions get_user_*_dirZyX2015-10-23
|
* stdpaths: Fix some issues, specificallyZyX2015-10-23
| | | | | | | - Remove/add includes - Do not pretend that returns are const - Add function attributes - Allocate memory always in get_xdg
* option: Use different default value for &runtimepathZyX2015-10-23
|
* os/env: Add functions that can iterate over colon-separated variablesZyX2015-10-23
|
* option,main: Partial support of XDG base directory specificationKeerthan Jaic2015-10-23
| | | | | | | | | | | | - 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.
* os/time: Make Timestamp be 64-bit unsigned integerZyX2015-10-08
|
* viminfo: First version of ShaDa file dumpingZyX2015-10-08
| | | | | | | | | | | | | | | | | | | | 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).
* os/fs: Define os_strerror as an alias to uv_strerrorZyX2015-10-08
| | | | It is not needed to know that os/* uses libuv.
* os/input: Don't advance past incomplete sequences in input_enqueueThiago de Arruda2015-10-01
| | | | | This allows callers to incrementally process buffers that are filled by incomplete chunks more easily.
* remove HAVE_DUP #1072Justin M. Keyes2015-09-12
| | | | | Vim defines this for Windows, so there's no Neovim-supported system for which this would not be defined.
* do_path_expand: Avoid non-readable directories. #3273Felipe Morales2015-09-04
| | | | | | | | | | 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
* Windows: Define USE_CRNL on Windows. #3249Seth Jackson2015-08-28
|
* Windows: avoid "uv_" naming conflicts. #3225Seth Jackson2015-08-27
|
* os/os_defs.h cleanup: Remaining signal stuffMichael Reed2015-08-27
| | | | | | | | | | | | 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>
* os/os_defs.h cleanup: SIGHASARGMichael Reed2015-08-27
| | | | It's always defined, so the #else is redundant.
* os/os_defs.h cleanup: SIGHAS3ARGSMichael Reed2015-08-27
| | | | | | | | | | | 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.
* os/os-defs.h cleanup: Don't include <time.h>Michael Reed2015-08-27
| | | | | Any files which need definitions from <time.h> should include it, not "os/os_defs.h".
* MSVC: Define `inline` and `restrict`. #3237Seth Jackson2015-08-25
| | | | | | | | 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
* Windows: Define ssize_t and SSIZE_MAX. #3228Seth Jackson2015-08-25
| | | | | 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.
* remove references to <sys/time.h>Justin M. Keyes2015-08-24
| | | | | Since gettimeofday() was replaced by os_time in fb5a786bdb5b7b52b9c36b3eb8b6d2cc002aa8f3 we do not need sys/time.h.
* Windows: is_executable(): do not check exec bit.Rui Abreu Ferreira2015-08-23
| | | | | | | | | 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/fs.c: remove os_file_is_readonly()Justin M. Keyes2015-08-17
| | | | | | | | | | | | | | | | | | | 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.
* os_file_is_*: libuv implJustin M. Keyes2015-08-17
| | | | | | - 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
* win_defs.h: define R_OK, W_OK for MSVC.Rui Abreu Ferreira2015-08-17
|
* fs.c: implement os_file_is_readable()Justin M. Keyes2015-08-17
| | | | | | | Use access() because: - We already use it for os_file_is_writable() - Vim's old check_file_readonly() ends up using access() after all.
* eval: Fix jobwait() to process multiple jobs concurrentlyThiago de Arruda2015-08-13
| | | | | | | | | | | | | 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()`
* rstream: Pass read count to read eventsThiago de Arruda2015-08-13
| | | | This is necessary to keep events in the same order received from the OS.
* event: Refactor async event processingThiago de Arruda2015-08-13
| | | | | | | | | | - 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.
* process: Pass loop reference during initializationThiago de Arruda2015-08-13
| | | | | Change the API so that it is passed to {uv,pty}_process_init instead of `process_spawn`.
* loop: Simplify loop.c and move some code to input.cThiago de Arruda2015-08-13
| | | | | | - Declare poll timer in Loop structure instead of a loop_poll_events local variable. - Move deferred event management to input.c
* shell.c: A full RBuffer with no NL can freeze shell output. #3156oni-link2015-08-11
| | | | | | | | | | | | | | | 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() for non UNIX system #2729Rui Abreu Ferreira2015-08-04
| | | | | | | | 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.
* os/fs: Move mkdir_recurse from eval.c to os/fs.cZyX2015-07-26
|
* os/fs: Define os_strerror as an alias to uv_strerrorZyX2015-07-26
| | | | It is not needed to know that os/* uses libuv.
* 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.
* rstream/wstream: Unify structures and simplify APIThiago de Arruda2015-07-17
| | | | | | | | | | | | | - 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.
* 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.
* Remove dead WIFSTOPPED and WIFCONTINUED checksFredrik Fornwall2015-07-13
| | | | | | | | | 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.
* os/*defs: restore some comments and formatting.Justin M. Keyes2015-07-06
|
* refactor: remove SYS_MENU_FILE (unused)Yamakaky2015-07-06
|