]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/trace/lib_traceatr.c
ncurses 5.7 - patch 20101225
[ncurses.git] / ncurses / trace / lib_traceatr.c
index e4b4a9eb2752ccbf14d5375e76e494e380fa65c4..0f2c681e7b8f007e4a150f342223da99667183ce 100644 (file)
@@ -43,7 +43,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_traceatr.c,v 1.70 2010/05/01 19:33:19 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.72 2010/12/19 00:51:35 tom Exp $")
 
 #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
 
@@ -136,7 +136,7 @@ _traceattr2(int bufnum, chtype newmode)
                result = _nc_trace_bufcat(bufnum, names[n].name);
 
                if (names[n].val == A_COLOR) {
-                   short pairnum = PairNumber(newmode);
+                   short pairnum = (short) PairNumber(newmode);
 #ifdef USE_TERMLIB
                    /* pair_content lives in libncurses */
                    (void) sprintf(temp, "{%d}", pairnum);
@@ -241,14 +241,14 @@ _nc_altcharset_name(attr_t attr, chtype ch)
        const ALT_NAMES *strp;
 
        for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
-           if (ChCharOf(cp[1]) == ChCharOf(ch)) {
+           if (ChCharOf(UChar(cp[1])) == ChCharOf(ch)) {
                found = cp;
                /* don't exit from loop - there may be redefinitions */
            }
        }
 
        if (found != 0) {
-           ch = ChCharOf(*found);
+           ch = ChCharOf(UChar(*found));
            for (strp = names; strp->val; strp++)
                if (strp->val == ch) {
                    result = strp->name;
@@ -330,7 +330,7 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
                            (void) _nc_trace_bufcat(bufnum, "\\000");
                        break;
                    }
-                   PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
+                   PUTC_n = (int) wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
                    if (PUTC_n <= 0) {
                        if (PUTC_ch != L'\0') {
                            /* it could not be a multibyte sequence */