Age | Commit message (Collapse) | Author |
|
Problem: is*() and to*() function may be unsafe
Solution: Add SAFE_* macros and start using those instead
(Keith Thompson)
Use SAFE_() macros for is*() and to*() functions
The standard is*() and to*() functions declared in <ctype.h> have
undefined behavior for negative arguments other than EOF. If plain char
is signed, passing an unchecked value from argv for from user input
to one of these functions has undefined behavior.
Solution: Add SAFE_*() macros that cast the argument to unsigned char.
Most implementations behave sanely for negative arguments, and most
character values in practice are non-negative, but it's still best
to avoid undefined behavior.
The change from #13347 has been omitted, as this has already been
separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a
(v9.0.2054)
fixes: #13332
closes: #13347
Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11805)
|
|
Problem: It is not easy to see what client-server commands are doing.
Solution: Add channel log messages if ch_log() is available. Move the
channel logging and make it available with the +eval feature.
|
|
Problem: Various small issues.
Solution: Various small fixes.
|
|
Problem: X11: using --remote-wait may keep the CPU busy.
Solution: Set the timeout for select() on every call. (Jacopo Secchiero,
closes #9973)
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
|
|
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
|
|
Problem: Various spelling mistakes in comments.
Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
|
|
Problem: The +title feature adds a lot of #ifdef but little code.
Solution: Graduate the +title feature.
|
|
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
|
|
Problem: Debugging where a delay comes from is not easy.
Solution: Use different values when calling ui_delay().
|
|
Problem: Alloc() returning "char_u *" causes a lot of type casts.
Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to
check the simple allocations.
|
|
Problem: Using "int" for alloc() often results in compiler warnings.
Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim
only works with 32 bit ints anyway.
|
|
Problem: Too many #ifdefs.
Solution: Graduate FEAT_MBYTE, part 2.
|
|
Problem: Build error when using if_xcmdsrv.c.
Solution: Add missing part of 8.1.0779.
|
|
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
#3302) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
|
|
Problem: Unnecessary static function prototypes.
Solution: Remove unnecessary prototypes.
|
|
Problem: Too many #ifdefs.
Solution: Graduate the +autocmd feature. Takes away 450 #ifdefs and
increases code size of tiny Vim by only 40 Kbyte.
|
|
Problem: Various small problems in source files.
Solution: Fix the problems.
|
|
Problem: Memory leak when remote_foreground() fails.
Solution: Free the error message.
|
|
Problem: A failing client-server request can make Vim hang.
Solution: Add a timeout argument to functions that wait.
|
|
Problem: The client-server test may hang when failing.
Solution: Set a timer. Add assert_report()
|
|
Problem: Not enough testing for the client-server feature.
Solution: Add more tests. Add the remote_startserver() function. Fix that
a locally evaluated expression uses function-local variables.
|
|
Problem: There are still a few macros that should be all-caps.
Solution: Make a few more macros all-caps.
|
|
Problem: Sometimes VimL is used, which is confusing.
Solution: Consistently use "Vim script". (Hirohito Higashi)
|
|
Problem: Modelines in source code are inconsistant.
Solution: Use the same line in most files. Add 'noet'. (Naruhiko Nishino)
|
|
Problem: remote_expr() hangs. (Ramel)
Solution: Check for messages in the waiting loop.
|
|
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
|
|
Problem: Still using __ARGS.
Solution: Remove __ARGS in several files. (script by Hirohito Higashi)
Also remove use of HAVE_STDARG_H.
|
|
Problem: Freeze and crash when there is a sleep in a remote command.
(Karl Yngve Lervåg)
Solution: Remove a message from the queue before dealing with it. (James
Kolb)
|
|
Problem: Compiler warning for unused variable. (Tony Mechelynck)
Solution: Remove the variable. Also fix int vs long_u mixup.
|
|
Problem: Crash when changing the 'tags' option from a remote command.
(Benjamin Fritz)
Solution: Instead of executing messages immediately, use a queue, like for
netbeans. (James Kolb)
|
|
Problem: More problems reported by coverity.
Solution: Avoid the warnings. (Christian Brabandt)
|
|
Problem: The X command server responds slowly
Solution: Change the loop that waits for replies. (Brian Burns)
|
|
Problem: The X command server doesn't work perfectly. It sends an empty
reply for as-keys requests.
Solution: Remove duplicate ga_init2(). Do not send a reply for as-keys
requests. (Brian Burns)
|
|
Problem: Netbeans hangs reading from a socket at the maximum block size.
Solution: Use select() or poll(). (Xavier de Gaye)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|