From 3a9d4c01e5135f6d5b2aecdaf698d1d960387df9 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Wed, 25 Mar 2015 20:27:02 -0600 Subject: * new version 2.20.4 * If the charset of a message can not be determined, use the value set in the "Unknown Character Set" option. * Resizing setup screen will redraw screen. * Unix Alpine only. Experimental: If Alpine/Pico finds a UCS4 code in the width ambiguous zone, it will use other means to determine the width, such as call wcwidth. --- pith/charconv/utf8.c | 11 +++++++++++ pith/charconv/utf8.h | 1 + pith/detach.c | 4 +++- pith/pine.hlp | 14 ++++++++++++-- 4 files changed, 27 insertions(+), 3 deletions(-) (limited to 'pith') diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c index d2f34e61..29341f71 100644 --- a/pith/charconv/utf8.c +++ b/pith/charconv/utf8.c @@ -24,6 +24,8 @@ static char rcsid[] = "$Id: utf8.c 1184 2008-12-16 23:52:15Z hubert@u.washington #ifdef _WINDOWS /* wingdi.h uses ERROR (!) and we aren't using the c-client ERROR so... */ #undef ERROR +#else +#define _XOPEN_SOURCE #endif #include @@ -98,6 +100,15 @@ wcellwidth(UCS ucs) #endif } +int +pith_ucs4width(UCS ucs) +{ +#ifndef _WINDOWS + return wcwidth((wchar_t) ucs); +#else + return 0; +#endif /* _WINDOWS */ +} /* * Argument is a UCS-4 wide character. diff --git a/pith/charconv/utf8.h b/pith/charconv/utf8.h index 5a974636..9db7c0fc 100644 --- a/pith/charconv/utf8.h +++ b/pith/charconv/utf8.h @@ -97,6 +97,7 @@ char *utf8_to_charset(char *, char *, int); char *comatose(long); char *tose(long); void line_paint(int, struct display_line *, int *); +int pith_ucs4width(UCS); #if !defined(_WINDOWS) && HAVE_LANGINFO_H && defined(CODESET) char *nl_langinfo_codeset_wrapper(void); diff --git a/pith/detach.c b/pith/detach.c index 2b61dfd6..0e0a07be 100644 --- a/pith/detach.c +++ b/pith/detach.c @@ -209,7 +209,9 @@ detach(MAILSTREAM *stream, /* c-client stream to use */ * If the charset is unlabeled or unknown replace it * with the user's configured unknown charset. */ - if(!charset || !strucmp(charset, UNKNOWN_CHARSET) || !strucmp(charset, "us-ascii")){ + if(!charset || !strucmp(charset, UNKNOWN_CHARSET) + || !strucmp(charset, "MISSING_PARAMETER_VALUE") + || !strucmp(charset, "us-ascii")){ if(charset) fs_give((void **) &charset); diff --git a/pith/pine.hlp b/pith/pine.hlp index 31e20a0a..630c301d 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 70 2015-03-15 22:39:47 +Alpine Commit 71 2015-03-25 20:26:58 ============= h_news ================= @@ -202,6 +202,15 @@ Additions include: Ctrl-^ toggles the prompt to search for a string at the end of a line, and pressing Ctrl-^ one more time searches for the string anywhere in the text. + +
  • If the charset of a message can not be determined, use the value set + in the for its value. + +
  • Resizing setup screen will redraw screen. + +
  • Unix Alpine only. Experimental: If Alpine/Pico finds a UCS4 code + in the width ambiguous zone, it will use other means to determine + the width, such as call wcwidth.

    @@ -22976,7 +22985,8 @@ Of course, if the unlabeled message is actually in some other character set, then you may see garbage on your screen.

    Instead of just unlabeled text, this option also affects text which is labeled -with the charsets "X-Unknown" or "US-ASCII". +with the charsets "X-Unknown", "MISSING_PARAMETER_VALUE" +or "US-ASCII".

    In the Setup/Config screen you may choose from a list of all the -- cgit v1.2.3-70-g09d2