/****************************************************************************
- * Copyright (c) 2001-2017,2019 Free Software Foundation, Inc. *
+ * Copyright 2019-2020,2021 Thomas E. Dickey *
+ * Copyright 2001-2016,2017 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 *
#include <tic.h>
#include <ctype.h>
-MODULE_ID("$Id: visbuf.c,v 1.50 2019/02/16 21:18:42 tom Exp $")
+MODULE_ID("$Id: visbuf.c,v 1.53 2021/02/27 20:07:57 tom Exp $")
#define NUM_VISBUFS 4
/* use these functions for displaying parts of a line within a window */
NCURSES_EXPORT(const char *)
-_nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len)
+_nc_viscbuf2(int bufnum, const NCURSES_CH_T *buf, int len)
{
char *result = _nc_trace_buf(bufnum, (size_t) BUFSIZ);
if (PUTC_n <= 0 || buf[j].chars[PUTC_i] > 255) {
_nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
"{%d:\\u%lx}",
- wcwidth(buf[j].chars[PUTC_i]),
+ _nc_wacs_width(buf[j].chars[PUTC_i]),
(unsigned long) buf[j].chars[PUTC_i]);
(void) _nc_trace_bufcat(bufnum, temp);
break;
}
NCURSES_EXPORT(const char *)
-_nc_viscbuf(const NCURSES_CH_T * buf, int len)
+_nc_viscbuf(const NCURSES_CH_T *buf, int len)
{
return _nc_viscbuf2(0, buf, len);
}