* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbufn(astr, n), n));
if (win && (str != 0)) {
T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbufn(astr, n), n));
if (win && (str != 0)) {
- TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(win->_attrs)));
+ TR(TRACE_VIRTPUT | TRACE_ATTRS,
+ ("... current %s", _traceattr(WINDOW_ATTRS(win))));
struct ldat *line;
T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n));
struct ldat *line;
T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n));
-#if USE_WIDEC_SUPPORT
- {
- int i;
- for (i = 0; i < n; ++i)
- SetChar(line->text[i + x], ChCharOf(astr[i]), ChAttrOf(astr[i]));
+ for (i = 0; i < n && ChCharOf(astr[i]) != '\0'; ++i) {
+ SetChar2(line->text[i + x], astr[i]);
int code = OK;
struct ldat *line;
int i, j, start, len, end;
int code = OK;
struct ldat *line;
int i, j, start, len, end;
T((T_CALLED("waddnwstr(%p,%s,%d)"), win, _nc_viswbufn(str, n), n));
if (win && (str != 0)) {
T((T_CALLED("waddnwstr(%p,%s,%d)"), win, _nc_viswbufn(str, n), n));
if (win && (str != 0)) {
- TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(win->_attrs)));
+ TR(TRACE_VIRTPUT | TRACE_ATTRS,
+ ("... current %s", _traceattr(WINDOW_ATTRS(win))));