2014-05-29 Chris Allegretta <chrisa@asty.org>
* src/chars.c (addstrings): Needs to be available even on non-utf-8 sustems. * nano-regress: Added --disable-utf8 to regression check git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4933 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
cbc6e5197f
commit
82a411077a
@ -1,3 +1,8 @@
|
||||
2014-05-29 Chris Allegretta <chrisa@asty.org>
|
||||
* src/chars.c (addstrings): Needs to be available even on
|
||||
non-utf-8 sustems.
|
||||
* nano-regress: Added --disable-utf8 to regression check
|
||||
|
||||
2014-05-28 Chris Allegretta <chrisa@asty.org>
|
||||
* doc/syntax/mutt.nanorc: Include Benno's awesome signature
|
||||
matcher, modified slightly to also work for quoted sigs.
|
||||
|
@ -8,7 +8,7 @@ sub combinations {
|
||||
return @rest, map { [$first, @$_] } @rest;
|
||||
}
|
||||
|
||||
my @allargs=("--enable-debug", "--disable-wrapping", "--disable-justify", "--disable-extra", "--enable-tiny", "--disable-browser --disable-help --disable-mouse --disable-operatingdir --disable-speller", "--disable-multibuffer", "--disable-nanorc", "--with-slang");
|
||||
my @allargs=("--enable-debug", "--disable-wrapping", "--disable-justify", "--disable-extra", "--enable-tiny", "--disable-utf8", "--disable-multibuffer", "--disable-nanorc", "--with-slang");
|
||||
my @combos = combinations(@allargs);
|
||||
|
||||
my $i = 0;
|
||||
|
23
src/chars.c
23
src/chars.c
@ -43,17 +43,6 @@ static const wchar_t bad_wchar = 0xFFFD;
|
||||
static const char *const bad_mbchar = "\xEF\xBF\xBD";
|
||||
static const int bad_mbchar_len = 3;
|
||||
|
||||
/* Concatenate two allocated strings. */
|
||||
char* addstrings(char* str1, size_t len1, char* str2, size_t len2)
|
||||
{
|
||||
str1 = charealloc(str1, len1 + len2 + 1);
|
||||
str1[len1] = '\0';
|
||||
strncat(&str1[len1], str2, len2);
|
||||
free(str2);
|
||||
|
||||
return str1;
|
||||
}
|
||||
|
||||
/* Enable UTF-8 support. */
|
||||
void utf8_init(void)
|
||||
{
|
||||
@ -67,6 +56,18 @@ bool using_utf8(void)
|
||||
}
|
||||
#endif /* ENABLE_UTF8 */
|
||||
|
||||
/* Concatenate two allocated strings. */
|
||||
char* addstrings(char* str1, size_t len1, char* str2, size_t len2)
|
||||
{
|
||||
str1 = charealloc(str1, len1 + len2 + 1);
|
||||
str1[len1] = '\0';
|
||||
strncat(&str1[len1], str2, len2);
|
||||
free(str2);
|
||||
|
||||
return str1;
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_ISBLANK
|
||||
/* This function is equivalent to isblank(). */
|
||||
bool nisblank(int c)
|
||||
|
Loading…
Reference in New Issue
Block a user