diff options
author | okan | 2011-06-27 12:46:54 +0000 |
---|---|---|
committer | okan | 2011-06-27 12:46:54 +0000 |
commit | 5da15f4cdec08345db8271d94648ce7cb1166c8d (patch) | |
tree | c5f05049eacb2bcf7fa7ec313db37dd5ffa86c57 /menu.c | |
parent | 5d5f633410d9d7955ef1191e698425a45bcf6ec3 (diff) | |
download | cwm-5da15f4cdec08345db8271d94648ce7cb1166c8d.tar.gz |
UTF8-ify, from Alexander Polakov, but without setlocale(), after
feedback from stsp@ - thanks!
'go for it' oga@
Diffstat (limited to '')
-rw-r--r-- | menu.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: menu.c,v 1.28 2011/06/24 06:52:23 okan Exp $ + * $OpenBSD: menu.c,v 1.29 2011/06/27 12:46:54 okan Exp $ */ #include <sys/param.h> @@ -31,8 +31,8 @@ #include "calmwm.h" -#define PROMPT_SCHAR '»' -#define PROMPT_ECHAR '«' +#define PROMPT_SCHAR "\xc2\xbb" +#define PROMPT_ECHAR "\xc2\xab" enum ctltype { CTL_NONE = -1, @@ -118,9 +118,9 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt, mc.list = 1; } else { evmask = MenuMask | KeyMask; /* only accept keys if prompt */ - snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%c", prompt, + snprintf(mc.promptstr, sizeof(mc.promptstr), "%s%s", prompt, PROMPT_SCHAR); - snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%c", mc.promptstr, + snprintf(mc.dispstr, sizeof(mc.dispstr), "%s%s%s", mc.promptstr, mc.searchstr, PROMPT_ECHAR); mc.width = font_width(sc, mc.dispstr, strlen(mc.dispstr)); mc.hasprompt = 1; @@ -312,7 +312,7 @@ menu_draw(struct screen_ctx *sc, struct menu_ctx *mc, struct menu_q *menuq, mc->width = 0; dy = 0; if (mc->hasprompt) { - snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%c", + snprintf(mc->dispstr, sizeof(mc->dispstr), "%s%s%s", mc->promptstr, mc->searchstr, PROMPT_ECHAR); mc->width = font_width(sc, mc->dispstr, strlen(mc->dispstr)); dy = font_height(sc); |