aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * Enable -Wconversion on cursor.cPavel Platto2014-05-28
| |
| * Extract cursor.h from misc{1,2}.h and memline.hHinidu2014-05-28
|/
* Merge 'Refactor WStream to enable writing the same buffer to multiple targets'Thiago de Arruda2014-05-28
|\
| * Channel: Refactor: Extract register_channel functionThiago de Arruda2014-05-28
| |
| * Channel: Refactor: Extract serialize_event functionThiago de Arruda2014-05-28
| |
| * Build: Fix autocmd removal from cleanup functionThiago de Arruda2014-05-28
| |
| * API: Events: Add functions for {un}subscribing to broadcasted eventsThiago de Arruda2014-05-28
| |
| * API: Events: Automatically pass channel ids to API functionsThiago de Arruda2014-05-28
| | | | | | | | | | The dispatch function generator was customized to allow for API functions to declare a 'channel_id' as first argument.
| * API: Events: Add support for broadcasting eventsThiago de Arruda2014-05-28
| | | | | | | | | | The channel_send_event will now broadcast events to all subscribed channels if the 'id' parameter is 0.
| * API: Bugfix: Remove possible double-free in buffer_get_lineThiago de Arruda2014-05-28
| |
| * Add kvec.h macro libraryThiago de Arruda2014-05-28
| |
| * WStream: Refactor: Use reference count for memory managementThiago de Arruda2014-05-28
| | | | | | | | | | | | | | Now `wstream_write` receives pointers for WBuffer objects(created with wstream_new_buffer), which stores a reference count to determine when it's safe the free the buffer. This was done to enable writing of the same buffer to multiple WStream instances
| * Refactor: Use size_t for {w,r}streams.cThiago de Arruda2014-05-28
|/
* Merge #713 'Fix localization'Justin M. Keyes2014-05-27
|\
| * Fix localization: Update po files.Eliseo Martínez2014-05-27
| | | | | | | | Sync po files to code at 3a68a4861adcc950cdbde709d4841f8ea0c52b12.
| * Fix localization: Fix po files.Eliseo Martínez2014-05-27
| | | | | | | | | | | | | | | | Problem: Build fails because of some messages being repeated. Curiously, all repeated messages have this comment: "Explicit typecast avoids warning on Mac OS X 10.6". No idea why. Solution: Remove repeated messages.
| * Fix localization: Fix build: Improve checking.Eliseo Martínez2014-05-27
| | | | | | | | | | | | | | | | | | | | Problem : Currently, 'make check' gives no explanations when it fails, only the name of the po file which caused the halt. Then, you have to manually run check.vim on that file to see what happened. Solution : Generate a 'check.log' file on every execution of check.vim (overwriting if already existing). That way, when make halts, you can go there and see details about failure.
| * Fix localization: Fix build: Fix sjis-fixing executable.Eliseo Martínez2014-05-27
| | | | | | | | | | | | | | | | Problem: Executable used to fix japanese files with sjis encoding (sjiscorr) fails to compile. Solution: - Add mising includes. - Remove __END_DECLS. - Add removed comments.
| * Fix localization: Fix build: Fix sed issue on OSX.Eliseo Martínez2014-05-27
| | | | | | | | | | | | | | Problem: On OSX, sed commands processing files converted to encodings other that UTF-8 fail with "RE error: illegal byte sequence". Solution: Make sed execute with C locale throgh environment variables (LANG=C, LC_ALL=C, LC_CTYPE=C).
| * Fix localization: Fix build: Fix included source files.Eliseo Martínez2014-05-27
| | | | | | | | | | | | | | Problem : Previous build assumed all *.c files were in parent dir. It only included globals.h, too. Solution : Include all *.c and *.h files under parent dir (including subdirs).
| * Fix localization: Fix build: Fix dangling references.Eliseo Martínez2014-05-27
|/ | | | | Problem: Makefile references some files that don't exist anymore. Solution: Remove those references.
* Merge #756 'vim-patch:7.4.267'Justin M. Keyes2014-05-27
|\
| * vim-patch:7.4.267oni-link2014-05-27
|/ | | | | | | Problem: The '[ mark is in the wrong position after "gq". (Ingo Karkat) Solution: Add the setmark argument to do_join(). (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=75f222d67cea335efbe0274de6340dba174c1e7e
* Merge branch 'remove-multiple-protocol-support'Thiago de Arruda2014-05-27
|\
| * Refactor: Remove support for multiple protocolsThiago de Arruda2014-05-27
|/ | | | | This removes the boilerplate code supporting more than one RPC protocol as it was becoming hard to maintain and we probably won't ever need it.
* Merge pull request #749 from oni-link/vim-patch-7-4-285Justin M. Keyes2014-05-26
|\ | | | | vim-patch:7.4.285
| * vim-patch:7.4.285oni-link2014-05-22
| | | | | | | | | | | | | | | | Problem: When 'relativenumber' is set and deleting lines or undoing that, line numbers are not always updated. (Robert Arkwright) Solution: (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=5cb1828fd0056de3c166e71fbafc67a74c57d7b1
* | Merge branch 'api-events'Thiago de Arruda2014-05-26
|\ \
| * | API: Bugfix: Remove memory leak from buffer_get_lineThiago de Arruda2014-05-26
| | |
| * | API: Bugfix: Remove memory leak from buffer_set_nameThiago de Arruda2014-05-26
| | |
| * | API: Bugfix: Remove memory leak from buffer_set_sliceThiago de Arruda2014-05-26
| | |
| * | API: Bugfix: Remove memory leak from set_option_toThiago de Arruda2014-05-26
| | |
| * | Build: Enable valgrind's --leak-check when testing the APIThiago de Arruda2014-05-26
| | |
| * | Build: Add more files to clint-files.txt and fix errorsThiago de Arruda2014-05-26
| | |
| * | Build: Add api/{helpers,handle}.c to CONV_SRCSThiago de Arruda2014-05-26
| | |
| * | Build: Add 'nonnull' attributes to msgpack_rpc functionsThiago de Arruda2014-05-26
| | |
| * | API: Events: Implement channel_send_event and vimscript wrapperThiago de Arruda2014-05-26
| | | | | | | | | | | | | | | This function can be used to send arbitrary objects via the API channel back to connected clients, identified by channel id.
| * | API: Events: Return channel id from the API discover requestThiago de Arruda2014-05-26
| | | | | | | | | | | | | | | This refactors msgapck_rpc_{dipatch,call} to receive the channel id as argument. Now the discovery request returns the [id, metadata] array.
| * | API: Refactor: Close/free channels when their streams reach EOFThiago de Arruda2014-05-26
| | |
| * | API: Refactor: Duplicate/free string arguments coming from msgpackThiago de Arruda2014-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | When receiving strings *from* msgpack, we don't need to duplicate/free since the data only lives in the msgpack parse buffer until the end of the call. But in order to reuse `msgpack_rpc_free_object` when sending event data(which is sent *to* msgpack), Strings must be freed, which means they must also be allocated separately.
| * | Dead code: Remove unused vimscript functions(from FEAT_CLIENTSERVER)Thiago de Arruda2014-05-26
|/ /
* | Merge pull request #761 'fix a few strncpy calls by using xstrlcpy'Thiago de Arruda2014-05-26
|\ \
| * | coverity: fix BUFFER_SIZE_WARNING with str{n,l}cpyNicolas Hillegeer2014-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to issue #760 These coverity warnings are of the form: >>> CID 62602: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes... This is caused by strncpy not alway NULL-terminated the destination buffer (for example in the case where strlen(src) >= size(dst)). It's better to replace that with (x)strlcpy, which always NULL-terminates. Most of these are related to the set_api_error macro, which uses strncpy. The error struct is used (for example) in msgpack_rpc_error, where strlen is executed on it, so it needs to be NULL-terminated. (x)strlcpy, unlike strncpy, always NULL-terminates the destination buffer. Relevant parts of the coverity report: *** CID 62602: Buffer not null terminated (BUFFER_SIZE_WARNING) /src/nvim/api/vim.c: 236 in vim_set_current_buffer() 230 if (try_end(err)) { 231 return; 232 } 233 234 char msg[256]; 235 snprintf(msg, sizeof(msg), "failed to switch to buffer %d", (int)buffer); >>> CID 62602: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes on >>> destination array "err->msg" of size 256 bytes might leave the >>> destination string unterminated. 236 set_api_error(msg, err); 237 return; 238 } 239 240 try_end(err); 241 } *** CID 62603: Buffer not null terminated (BUFFER_SIZE_WARNING) /src/nvim/api/private/helpers.c: 70 in try_end() 64 } else if (msg_list != NULL && *msg_list != NULL) { 65 int should_free; 66 char *msg = (char *)get_exception_string(*msg_list, 67 ET_ERROR, 68 NULL, 69 &should_free); >>> CID 62603: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes on >>> destination array "err->msg" of size 256 bytes might leave the >>> destination string unterminated. 70 strncpy(err->msg, msg, sizeof(err->msg)); 71 err->set = true; 72 free_global_msglist(); 73 74 if (should_free) { 75 free(msg); /src/nvim/api/private/helpers.c: 78 in try_end() 72 free_global_msglist(); 73 74 if (should_free) { 75 free(msg); 76 } 77 } else if (did_throw) { >>> CID 62603: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes on >>> destination array "err->msg" of size 256 bytes might leave the >>> destination string unterminated. 78 set_api_error((char *)current_exception->value, err); 79 } 80 81 return err->set; 82 } 83 *** CID 62604: Buffer not null terminated (BUFFER_SIZE_WARNING) /src/nvim/api/private/helpers.c: 592 in set_option_value_err() 586 opt_flags))) 587 { 588 if (try_end(err)) { 589 return; 590 } 591 >>> CID 62604: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes on >>> destination array "err->msg" of size 256 bytes might leave the >>> destination string unterminated. 592 set_api_error(errmsg, err); 593 } *** CID 62605: Buffer not null terminated (BUFFER_SIZE_WARNING) /src/nvim/os/server.c: 114 in server_start() 108 if (addr_len > sizeof(ip) - 1) { 109 // Maximum length of a ip address buffer is 15(eg: 255.255.255.255) 110 addr_len = sizeof(ip); 111 } 112 113 // Extract the address part >>> CID 62605: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 16 bytes on >>> destination array "ip" of size 16 bytes might leave the destination >>> string unterminated. 114 strncpy(ip, addr, addr_len); 115 116 int port = NEOVIM_DEFAULT_TCP_PORT; 117 118 if (*ip_end == ':') { 119 char *port_end; /src/nvim/os/server.c: 88 in server_start() 82 83 void server_start(char *endpoint, ChannelProtocol prot) 84 { 85 char addr[ADDRESS_MAX_SIZE]; 86 87 // Trim to `ADDRESS_MAX_SIZE` >>> CID 62605: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes on >>> destination array "addr" of size 256 bytes might leave the >>> destination string unterminated. 88 strncpy(addr, endpoint, sizeof(addr)); 89 90 // Check if the server already exists 91 if (map_has(cstr_t)(servers, addr)) { 92 EMSG2("Already listening on %s", addr); 93 return; *** CID 62606: Buffer not null terminated (BUFFER_SIZE_WARNING) /src/nvim/os/server.c: 186 in server_stop() 180 void server_stop(char *endpoint) 181 { 182 Server *server; 183 char addr[ADDRESS_MAX_SIZE]; 184 185 // Trim to `ADDRESS_MAX_SIZE` >>> CID 62606: Buffer not null terminated (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 256 bytes on >>> destination array "addr" of size 256 bytes might leave the >>> destination string unterminated. 187 188 if ((server = map_get(cstr_t)(servers, addr)) == NULL) { 189 EMSG2("Not listening on %s", addr); 190 return; 191 }
| * | memory: add xstrlcpyNicolas Hillegeer2014-05-26
|/ / | | | | | | | | | | Less "blow a hole in your foot" than strncpy. As also indicated by coverity. Implementation inspired by the linux kernel (very similar to OSX's Libc implementation as well).
* | Merge #733 'Simplify edit.c functions replace_{push,pop}.'Justin M. Keyes2014-05-24
|\ \
| * | Simplify edit.c functions replace_{push,pop}.oni-link2014-05-24
|/ / | | | | | | | | | | * Replace xmalloc (+memmove) with xrealloc * Code style adjustments. * Remove obsolete TODO comment
* | Add Reddit link to README. ref #704Rainer Borene2014-05-24
| |
* | Merge pull request #757 from elmart/remove-long_uJustin M. Keyes2014-05-24
|\ \ | | | | | | Remove project-specific integer types: long_u. (1)
| * | Remove long_u: hashtab: Enable clint: Add to clint.Eliseo Martínez2014-05-24
| | | | | | | | | | | | | | | - Add hashtab.[ch] to clint file. - Fix clint errors.
| * | Remove long_u: hashtab: Enable clint: Sort clint file.Eliseo Martínez2014-05-24
| | |