Mercurial > ~mikael > mcabber > hg
view mcabber/mcabber/utf8.h @ 2190:ee3a40ffcd8b
New option: 'clear_unread_on_carbon'
If the new 'clear_unread_on_carbon' option is set to 1, clear the unread
message flag for a contact whenever an outgoing carbon copy of a message
sent to that contact is received from another client.
---
mcabber/mcabber/commands.c | 2 +-
mcabber/mcabber/hbuf.h | 1 +
mcabber/mcabber/hooks.c | 17 ++++++++++++-----
mcabber/mcabber/hooks.h | 2 +-
mcabber/mcabber/screen.c | 18 ++++++++++++++----
mcabber/mcabber/xmpp.c | 2 +-
mcabber/mcabberrc.example | 5 +++++
7 files changed, 35 insertions(+), 12 deletions(-)
author | Holger Weiß <holger@zedat.fu-berlin.de> |
---|---|
date | Thu, 23 Jul 2015 23:44:45 +0200 |
parents | e6d355e50d7a |
children |
line wrap: on
line source
#ifndef __MCABBER_UTF8_H__ #define __MCABBER_UTF8_H__ 1 #include <mcabber/config.h> #if defined HAVE_UNICODE && defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H # define UNICODE #endif #ifdef HAVE_WCHAR_H # include <wchar.h> # define get_char_width(c) (utf8_mode ? wcwidth(get_char(c)) : 1) #else # define wcwidth(c) 1 # define get_char_width(c) 1 #endif #ifdef HAVE_WCTYPE_H # include <wctype.h> /* The following bit is a hack for Solaris 8&9 systems that don't have * iswblank(). * For now i made sure it comes after wctype.h so it doesn't create * problems (wctype.h has calls to iswblank() before wctype() is declared). * (Sebastian Kayser) */ # ifndef HAVE_ISWBLANK # define iswblank(wc) iswctype(wc, wctype("blank")) # endif #else # define iswblank(c) (c == ' ') # define iswalnum(c) isalnum(c) # define iswprint(c) isprint(c) # define towupper(c) toupper(c) # define towlower(c) tolower(c) # define iswalpha(c) isalpha(c) #endif extern int utf8_mode; char *prev_char(char *str, const char *limit); char *next_char(char *str); unsigned get_char(const char *str); char *put_char(char *str, unsigned c); #endif /* __MCABBER_UTF8_H__ */ /* vim: set et cindent cinoptions=>2\:2(0 ts=2 sw=2: For Vim users... */