diff options
Diffstat (limited to 'pith')
-rw-r--r-- | pith/charconv/utf8.c | 11 | ||||
-rw-r--r-- | pith/charconv/utf8.h | 1 | ||||
-rw-r--r-- | pith/detach.c | 4 | ||||
-rw-r--r-- | pith/pine.hlp | 14 |
4 files changed, 27 insertions, 3 deletions
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 <system.h> @@ -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 ================= <HTML> <HEAD> @@ -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. + + <LI> If the charset of a message can not be determined, use the value set + in the <A HREF="h_config_unk_char_set"><!--#echo var="VAR_unknown-character-set"--></A> for its value. + + <LI> Resizing setup screen will redraw screen. + + <LI> 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. </UL> <P> @@ -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. <P> 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". <P> In the Setup/Config screen you may choose from a list of all the |