projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add the possibility to set an 'onchange' property to our members.
[apps/madmutt.git]
/
charset.cpkg
diff --git
a/charset.cpkg
b/charset.cpkg
index
6934987
..
f491e05
100644
(file)
--- a/
charset.cpkg
+++ b/
charset.cpkg
@@
-62,10
+62,13
@@
static char *charset_init(void)
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset(PACKAGE, res);
#endif
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset(PACKAGE, res);
#endif
+ return m_strdup(res);
+}
- Charset_is_utf8 = charset_is_utf8(res);
+static void charset_onchange(const char *cset)
+{
+ Charset_is_utf8 = charset_is_utf8(cset);
CharsetReplacement = Charset_is_utf8 ? 0xfffd : '?';
CharsetReplacement = Charset_is_utf8 ? 0xfffd : '?';
- return m_strdup(res);
}
@package MCharset {
}
@package MCharset {
@@
-91,7
+94,10
@@
static char *charset_init(void)
** .pp
** Character set your terminal uses to display and enter textual data.
*/
** .pp
** Character set your terminal uses to display and enter textual data.
*/
- string_t charset = charset_init();
+ string_t charset = {
+ .init = charset_init();
+ .onchange = charset_onchange($$);
+ };
/*
** .pp
/*
** .pp