summaryrefslogtreecommitdiffstats
path: root/mbyte.c
AgeCommit message (Collapse)Author
2019-01-04Clean up code indentation.Kevin McCarthy
These are mostly automated changes corresponding to the emacs settings: (c-set-style "linux") (setq c-basic-offset 2) (c-set-offset 'case-label '+) Most of the code follows the convention: (add-to-list 'c-cleanup-list 'space-before-funcall) but this is not enforced by this indentation cleanup. Also, I personally dislike tabs, so I have: (setq-default indent-tabs-mode nil) in my own configuration. However I have no desire to change every line just for that effect. So this cleanup does nothing about the mix issue. Some of the secondary files (e.g. regex.c) have been skipped. I've also skipped crypt-gpgme.c, because I need to think about that file. Werner Koch and the GnuPG team contributed most it, and it follows the Gnu indentation settings. It should probably be made uniform with Mutt, but I don't want to discourage future GnuPG contribution to the file. I manually reverted a few unsightly cleanups, and added a few tweeks when I saw things that could be improved.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2018-05-21Remove mutt_buffer_new() NULL retval checks.Kevin McCarthy
It will fail, rather than return NULL. Further clean up imap_new_data() since it also had NULL checks for safe_calloc() that shouldn't happen.
2017-03-31Filter other directional markers that corrupt the screen.Vincent Lefevre
2016-08-23Filter out zero width no-break space (U+FEFF).Vincent Lefevre
2016-07-20Filter directional markers that corrupt the screen. (closes #3854)Kevin McCarthy
Thanks to Vincent Lefèvre for working on these utf-8 screen display issues.
2016-07-07Filter soft hypen from pager and headers. (closes #3848)Kevin McCarthy
Add U+00AD SOFT HYPHEN to the filtered characters in headers and the pager. In some terminals and situations it causes major display problems.
2016-05-03Skip bidi markers in the pager and index. (closes #3827)Kevin McCarthy
Curses and slang don't support them, so there's little point in showing them or attempting to somehow deal with them. This patch adds filtering in the pager, and changes the filtering added in 6e0aca94cdb0 for the index to completely skip the marker.
2016-03-30Filter out bidi marks in rfc2047 and rfc2231 encoding. (see #3827)Kevin McCarthy
Filter out U+200F RIGHT-TO-LEFT MARK and U+200E LEFT-TO-RIGHT MARK in rfc2047 and 2231 encoded fields. GNU Screen has a bug that corrupts the display, and can cause the wrong email to appear to be selected in the index. Until screen fixes the issue, filter it out in mutt.
2012-07-21Split mutt_buffer_new out of mutt_buffer_init.Brendan Cully
Currently, no callers were providing a non-NULL buffer to mutt_buffer_init, and splitting it will allow more sane semantics for buffer allocation, initialization, and destruction in a later patch.
2009-07-11Recognize charset extensions, see #3150.Rocco Rutte
With utf-8//TRANSLIT, we internally didn't recognize it as utf-8. This leads to badly broken behaviour if --without-wc-funcs is used for some reason. In that case, if we have utf-8 as charset, we implement our own wide char functions; for all other charsets, we use the system single-byte locale functions. And using these with utf-8 is broken.
2009-07-08Fix compiler warningRocco Rutte
2009-06-22Fix included iswupper(). Closes #3276.Rocco Rutte
2008-11-21Initialize mbstate in mutt_filter_unprintable. Closes #3134TAKAHASHI Tamotsu
2008-09-24Provide legacy implementations for iswalpha() and iswupper()Rocco Rutte
In mbyte.h and without using wc functions, only the prototypes were defined but implementations were missing resulting in build errors. These new functions are derived from the iswalnum() and towupper() routines which don't provide full unicode coverage.
2008-05-05Fix some compiler warnings if compiling without system wide character functionsRocco Rutte
2008-05-05Pass buffer size to mutt_wctoutf8() to prevent crashes if MB_LEN_MAX<6Rocco Rutte
as pointed out by exg on #mutt.
2007-11-20Alternate fix for not calling bind_textdomain_codeset() to fix Solaris build.Rocco Rutte
2007-03-06Remove buggy usage of M_ICONV_HOOK_TO flag in mutt_idna.c:mutt_idna_to_local().Alain Bench
Wipe unwanted code depending on M_ICONV_HOOK_TO in charset.c:mutt_iconv_open(). Totally wipe M_ICONV_HOOK_TO symbol. Remove misusages of M_ICONV_HOOK_FROM flag in: - crypt-gpgme.c:print_utf8(). - mutt_idna.c:mutt_idna_to_local() and mutt_local_to_idna(). - pgp.c:pgp_traditional_encryptsign(). Document usage policy of M_ICONV_HOOK_FROM flag. Cosmetic downcasing of some constant charset names (utf-8, euc-jp) for consistency. Correction of a typo in the "iso8859-5" charset name.
2007-03-06Allow iconv-hook to use virtual charsets as targets. (closes: #1269)Masayuki Moriyama
2006-07-11Fix #2173.TAKAHASHI Tamotsu
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2005-07-26There are some functions without ANSI prototypes left in mutt-owned sources.Ralf Wildenhues
2005-02-12Recognize euc-jp-ms. MORIYAMA Masayuki by way of TAKAHASHI Tamotsu.Thomas Roessler
2005-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2002-11-12cp932 should be treated like shift_jis.Yasuhiro Matsumoto
2002-03-26Fix iconv warnings; from Edmund Grimley Evans.Thomas Roessler
2001-11-26patch-1.3.23.2.tt.wcwidth_ja.1. Fix wcwidth_ja(), from TakizawaThomas Roessler
Takashi <taki@luna.email.ne.jp>.
2001-06-07Gettext update.Thomas Roessler
2001-03-20Fix a bug in mbrtowc_iconv(). From TAKIZAWA TakashiThomas Roessler
<taki@luna.email.ne.jp>.
2001-01-03More wide-char patches from EGE.Thomas Roessler
2000-12-10More enter.c updates. From E.G.E..Thomas Roessler
2000-12-04A little fix for the -HAVE_WC_FUNCS +LOCALES_HACK case. From EGE.Thomas Roessler
2000-09-11Fix some more character set glitches.Thomas Roessler
2000-08-28This is the patch TAKIZAWA Takashi and I came up with in the end.Edmund GRIMLEY EVANS
When the Charset is euc-jp or shift_jis, iconv is used for mbrtowc and wcrtomb. The worst part is mbrtowc_iconv(), where I attempted to make mbrtowc both restartable (it can process part of multibyte character) and fast in the case where there is nothing left over from a previous character. Also I try to make no assumptions about how those character sets work, which is easy, because I know very little about them ... People who don't use one of those two stateless Japanese display charsets shouldn't be affected. People whose systems provide the wchar_t functions should be even less affected, because they don't even get this code in their binary.
2000-08-15Another charset fix from EGE.Thomas Roessler
2000-07-24Replace wctomb and mbtowc with wcrtomb and mbrtowc. From TAKIZAWAThomas Roessler
Takashi <taki@luna.email.ne.jp>, with small changes from Edmund Grimley Evans.
2000-06-08Removing the built-in charset support.Thomas Roessler
2000-05-25Somewhat different sigsegv fix suggested by EGE.Thomas Roessler
2000-05-25wctomb(0,wc) is needed to work for bounds checking.Thomas Roessler
2000-05-15More iconv-related patches from EGE.Thomas Roessler
2000-05-12Make things compile. ;-)Thomas Roessler
2000-05-12Isprint-related changes. Suggested by Andrew Nosenko, adapted by EGE.Thomas Roessler
2000-05-12wide-character related patches. From Edmund Grimley Evans.Thomas Roessler
2000-05-09Edmund Grimley Evans' UTF-8 patch.Thomas Roessler