X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftrace%2Flib_traceatr.c;h=e4b4a9eb2752ccbf14d5375e76e494e380fa65c4;hp=66d35f40b69b66fa85010d95c4a94be109f7836f;hb=d96f3e9b8a422f6daa2101d4d165801421312aa0;hpb=404cc3f5b0751dd219565139f825c5a4d445f651 diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c index 66d35f40..e4b4a9eb 100644 --- a/ncurses/trace/lib_traceatr.c +++ b/ncurses/trace/lib_traceatr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -40,10 +40,10 @@ #include #ifndef CUR -#define CUR SP_TERMTYPE +#define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_traceatr.c,v 1.66 2009/05/10 00:48:29 tom Exp $") +MODULE_ID("$Id: lib_traceatr.c,v 1.70 2010/05/01 19:33:19 tom Exp $") #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name)) @@ -132,11 +132,11 @@ _traceattr2(int bufnum, chtype newmode) for (n = 0; n < SIZEOF(names); n++) { if ((newmode & names[n].val) != 0) { if (result[1] != '\0') - result = _nc_trace_bufcat(bufnum, "|"); + (void) _nc_trace_bufcat(bufnum, "|"); result = _nc_trace_bufcat(bufnum, names[n].name); if (names[n].val == A_COLOR) { - short pairnum = PAIR_NUMBER(newmode); + short pairnum = PairNumber(newmode); #ifdef USE_TERMLIB /* pair_content lives in libncurses */ (void) sprintf(temp, "{%d}", pairnum); @@ -232,6 +232,9 @@ _nc_altcharset_name(attr_t attr, chtype ch) const char *result = 0; +#if NCURSES_SP_FUNCS + (void) sp; +#endif if ((attr & A_ALTCHARSET) && (acs_chars != 0)) { char *cp; char *found = 0; @@ -322,8 +325,11 @@ _tracecchar_t2(int bufnum, const cchar_t *ch) (void) _nc_trace_bufcat(bufnum, "{ "); for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) { PUTC_ch = ch->chars[PUTC_i]; - if (PUTC_ch == L'\0') + if (PUTC_ch == L'\0') { + if (PUTC_i == 0) + (void) _nc_trace_bufcat(bufnum, "\\000"); break; + } PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st); if (PUTC_n <= 0) { if (PUTC_ch != L'\0') {