nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 89ae4a343c92ccbff1bb59e437db235bede0a266
parent 61525a1e29620e51033c7e6296d096a4f6f76846
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sun,  8 Oct 2006 15:21:23 +0000

miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3898 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 4++++
Msrc/chars.c | 8++------
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,4 +1,8 @@ CVS code - +- chars.c: + nstrncasecmp() + - When returning, use the "?" operator instead of an if/else + clause. (DLR) - files.c: input_tab() - Since the field precision operator used in the sprintf() uses diff --git a/src/chars.c b/src/chars.c @@ -514,10 +514,7 @@ int nstrncasecmp(const char *s1, const char *s2, size_t n) break; } - if (n > 0) - return tolower(*s1) - tolower(*s2); - else - return 0; + return (n > 0) ? tolower(*s1) - tolower(*s2) : 0; } #endif @@ -1026,8 +1023,7 @@ bool is_valid_mbstring(const char *s) return #ifdef ENABLE_UTF8 - use_utf8 ? - (mbstowcs(NULL, s, 0) != (size_t)-1) : + use_utf8 ? (mbstowcs(NULL, s, 0) != (size_t)-1) : #endif TRUE; }