-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1624 2010/12/25 23:56:36 tom Exp $
+-- $Id: NEWS,v 1.1626 2011/01/01 23:11:55 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20110101
+ + fix remaining strict compiler warnings in ncurses library ABI=5,
+ except those dealing with function pointers, etc.
+
20101225
+ modify nc_tparm.h, adding guards against repeated inclusion, and
allowing TPARM_ARG to be overridden.
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.787 2010/12/25 23:56:22 tom Exp $
+# $Id: dist.mk,v 1.788 2011/01/01 16:29:59 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 7
-NCURSES_PATCH = 20101225
+NCURSES_PATCH = 20110101
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: curses.h.in,v 1.218 2010/12/25 23:39:07 tom Exp $ */
+/* $Id: curses.h.in,v 1.219 2011/01/01 21:52:45 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
(win)->_color = (p), \
OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
- (void)((p) != (void *)0 && (*(p) = (win)->_color)), \
+ (void)((p) != (void *)0 && (*(p) = (short)(win)->_color)), \
OK)
#else
-#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
+#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p)), OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
- (void)((p) != (void *)0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \
+ (void)((p) != (void *)0 && (*(p) = (short)PAIR_NUMBER((win)->_attrs))), \
OK)
#endif
#endif /* NCURSES_OPAQUE */
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.41 2010/12/19 00:39:24 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.42 2011/01/01 22:06:52 tom Exp $)
#
##############################################################################
# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
}
}
second = first + 1;
+ returnCast = "";
if ( $first == "chtype" ) {
returnType = "Chtype";
} else if ( $first == "SCREEN" ) {
} else if ( $first == "WINDOW" ) {
returnType = "Win";
} else if ( $first == "attr_t" || $second == "attrset" || $second == "standout" || $second == "standend" || $second == "wattrset" || $second == "wstandout" || $second == "wstandend" ) {
- returnType = "Attr";
+ returnType = "IntAttr";
+ returnCast = "(attr_t)";
} else if ( $first == "bool" || $first == "NCURSES_BOOL" ) {
returnType = "Bool";
} else if ( $second == "*" ) {
}
if ( ch == "," || ch == ")" ) {
+ argcast = "";
if (va_list) {
call = call "%s"
} else if (varargs) {
} else if ( argtype != "" ) {
call = call "%s"
comma = comma "_trace" argtype "2(" num ","
+ if (argtype == "attr") {
+ argcast = "(chtype)";
+ }
} else {
call = call "%#lx"
comma = comma "(long)"
} else if ( varargs ) {
args = args comma "\"...\""
} else {
- args = args comma "z"
+ args = args comma argcast "z"
}
}
call = call ch
if (dotrace)
printf "%s", call
- if (match($0, "^void"))
+ if (match($0, "^void")) {
call = ""
- else if (dotrace)
+ } else if (dotrace) {
call = sprintf("return%s( ", returnType);
- else
+ if (returnCast != "") {
+ call = call returnCast;
+ }
+ } else {
call = "@@return ";
+ }
call = call $myfunc "(";
for (i = 1; i < argcount; i++) {
}
if (!match($0, "^void"))
call = call ") ";
- if (dotrace)
+ if (dotrace) {
call = call ")";
+ }
print call ";"
if (match($0, "^void"))
#include <curses.priv.h>
-MODULE_ID("$Id: lib_bkgd.c,v 1.41 2010/05/01 22:16:21 tom Exp $")
+MODULE_ID("$Id: lib_bkgd.c,v 1.42 2011/01/01 17:18:52 tom Exp $")
/*
* Set the window's background information.
win->_bkgd = (((tmp == EOF) ? ' ' : (chtype) tmp)
| (AttrOf(wch) & ALL_BUT_COLOR)
- | ColorPair(GET_WINDOW_PAIR(win)));
+ | (chtype) ColorPair(GET_WINDOW_PAIR(win)));
}
#endif
}
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.119 2010/05/22 20:00:55 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.120 2011/01/01 22:25:49 tom Exp $")
#include <tic.h>
}
}
}
- returnBits(result);
+ returnMMask(result);
}
#if NCURSES_SP_FUNCS
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.470 2010/12/25 23:45:09 tom Exp $
+ * $Id: curses.priv.h,v 1.472 2011/01/01 23:01:40 tom Exp $
*
* curses.priv.h
*
#define TR(n, a) if (USE_TRACEF(n)) _nc_locked_tracef a
#define T(a) TR(TRACE_CALLS, a)
-#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
+#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
+#define TRACE_RETURN2(value,dst,src) return _nc_retrace_##dst##_##src(value)
+#define TRACE_RETURN_SP(value,type) return _nc_retrace_##type(SP_PARM, value)
#define NonNull(s) ((s) != 0 ? s : "<null>")
#define returnChar(code) TRACE_RETURN(code,char)
#define returnChtype(code) TRACE_RETURN(code,chtype)
#define returnCode(code) TRACE_RETURN(code,int)
+#define returnIntAttr(code) TRACE_RETURN2(code,int,attr_t)
+#define returnMMask(code) TRACE_RETURN_SP(code,mmask_t)
#define returnPtr(code) TRACE_RETURN(code,ptr)
#define returnSP(code) TRACE_RETURN(code,sp)
#define returnVoid T((T_RETURN(""))); return
extern NCURSES_EXPORT(const char *) _nc_retrace_cptr (const char *);
extern NCURSES_EXPORT(char) _nc_retrace_char (char);
extern NCURSES_EXPORT(int) _nc_retrace_int (int);
+extern NCURSES_EXPORT(int) _nc_retrace_int_attr_t (attr_t);
+extern NCURSES_EXPORT(mmask_t) _nc_retrace_mmask_t (SCREEN *, mmask_t);
extern NCURSES_EXPORT(unsigned) _nc_retrace_unsigned (unsigned);
extern NCURSES_EXPORT(void *) _nc_retrace_void_ptr (void *);
extern NCURSES_EXPORT(void) _nc_fifo_dump (SCREEN *);
#define returnChar(code) return ((char) code)
#define returnChtype(code) return code
#define returnCode(code) return code
+#define returnIntAttr(code) return code
+#define returnMMask(code) return code
#define returnPtr(code) return code
#define returnSP(code) return code
#define returnVoid return
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_traceatr.c,v 1.72 2010/12/19 00:51:35 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.73 2011/01/01 22:01:11 tom Exp $")
#define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
}
/* Trace 'int' return-values */
+NCURSES_EXPORT(int)
+_nc_retrace_int_attr_t(attr_t code)
+{
+ T((T_RETURN("%s"), _traceattr(code)));
+ return (int) code;
+}
+
+/* Trace 'attr_t' return-values */
NCURSES_EXPORT(attr_t)
_nc_retrace_attr_t(attr_t code)
{
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,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 *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_tracemse.c,v 1.16 2008/11/16 00:19:59 juergen Exp $")
+MODULE_ID("$Id: lib_tracemse.c,v 1.17 2011/01/01 22:31:53 tom Exp $")
#ifdef TRACE
#define my_buffer sp->tracemse_buf
-NCURSES_EXPORT(char *)
-_nc_tracemouse(SCREEN *sp, MEVENT const *ep)
+static char *
+_trace_mmask_t(SCREEN *sp, mmask_t code)
{
- (void) sprintf(my_buffer, TRACEMSE_FMT,
- ep->id,
- ep->x,
- ep->y,
- ep->z,
- (unsigned long) ep->bstate);
-
-#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(my_buffer, s), ", ")
+#define SHOW(m, s) if ((code & m) == m) strcat(strcat(my_buffer, s), ", ")
SHOW(BUTTON1_RELEASED, "release-1");
SHOW(BUTTON1_PRESSED, "press-1");
if (my_buffer[strlen(my_buffer) - 1] == ' ')
my_buffer[strlen(my_buffer) - 2] = '\0';
+
+ return (my_buffer);
+}
+
+NCURSES_EXPORT(char *)
+_nc_tracemouse(SCREEN *sp, MEVENT const *ep)
+{
+ (void) sprintf(my_buffer, TRACEMSE_FMT,
+ ep->id,
+ ep->x,
+ ep->y,
+ ep->z,
+ (unsigned long) ep->bstate);
+
+ (void) _trace_mmask_t(sp, ep->bstate);
(void) strcat(my_buffer, "}");
return (my_buffer);
}
+NCURSES_EXPORT(mmask_t)
+_nc_retrace_mmask_t(SCREEN *sp, mmask_t code)
+{
+ *my_buffer = '\0';
+ T((T_RETURN("{%s}"), _trace_mmask_t(sp, code)));
+ return code;
+}
+
NCURSES_EXPORT(char *)
_tracemouse(MEVENT const *ep)
{