/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2016 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 <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_tracedmp.c,v 1.31 2008/08/16 19:30:56 tom Exp $")
+MODULE_ID("$Id: lib_tracedmp.c,v 1.35 2016/05/28 23:30:01 tom Exp $")
#ifdef TRACE
if (width < win->_maxx)
++width;
if (++width + 1 > (int) my_length) {
- my_length = 2 * (width + 1);
+ my_length = (unsigned) (2 * (width + 1));
my_buffer = typeRealloc(char, my_length, my_buffer);
+ if (my_buffer == 0)
+ return;
}
for (n = 0; n <= win->_maxy; ++n) {
char *ep = my_buffer;
- bool haveattrs, havecolors;
+ bool havecolors;
/*
* Dump A_CHARTEXT part. It is more important to make the grid line up
* we map those to '.' and '?' respectively.
*/
for (j = 0; j < width; ++j) {
- chtype test = CharOf(win->_line[n].text[j]);
+ chtype test = (chtype) CharOf(win->_line[n].text[j]);
ep[j] = (char) ((UChar(test) == test
#if USE_WIDEC_SUPPORT
&& (win->_line[n].text[j].chars[1] == 0)
for (i = 0; i < 4; ++i) {
const char *hex = " 123456789ABCDEF";
- attr_t mask = (0xf << ((i + 4) * 4));
+ attr_t mask = (attr_t) (0xf << ((i + 4) * 4));
+ bool haveattrs = FALSE;
- haveattrs = FALSE;
for (j = 0; j < width; ++j)
if (AttrOf(win->_line[n].text[j]) & mask) {
haveattrs = TRUE;