-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1484 2009/12/27 16:25:58 tom Exp $
+-- $Id: NEWS,v 1.1486 2010/01/02 22:56:01 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.
+20100102
+ + minor improvement to tic's checking of similar SGR's to allow for the
+ most common case of SGR 0.
+ + modify getmouse() to act as its documentation implied, returning on
+ each call the preceding event until none are left. When no more
+ events remain, it will return ERR.
+
20091227
+ change order of lookup in progs/tput.c, looking for terminfo data
first. This fixes a confusion between termcap "sg" and terminfo
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.738 2009/12/27 15:45:50 tom Exp $
+# $Id: dist.mk,v 1.739 2010/01/02 18:52:02 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 = 20091227
+NCURSES_PATCH = 20100102
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
'\" t
.\"***************************************************************************
-.\" 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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_mouse.3x,v 1.32 2009/08/29 18:11:58 tom Exp $
+.\" $Id: curs_mouse.3x,v 1.34 2010/01/02 21:45:42 tom Exp $
.TH curs_mouse 3X ""
.na
.hy 0
.br
\fBbool has_mouse(void);\fR
.br
--\fBint getmouse(MEVENT *event);\fR
+\fBint getmouse(MEVENT *event);\fR
.br
\fBint ungetmouse(MEVENT *event);\fR
.br
coordinates.
The returned state mask will have exactly one bit set to
indicate the event type.
+The corresponding data in the queue is marked invalid.
+A subsequent call to \fBgetmouse\fP will retrieve the next older
+item from the queue.
.PP
The \fBungetmouse\fR function behaves analogously to \fBungetch\fR.
It pushes
returns an error.
If no mouse driver was initialized, or
if the mask parameter is zero,
+It also returns an error if no more events remain in the queue.
.TP 5
\fBungetmouse\fP
returns an error if the FIFO is full.
/****************************************************************************
- * 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 *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.110 2009/10/24 23:21:31 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.111 2010/01/02 21:06:52 tom Exp $")
#include <tic.h>
NCURSES_EXPORT(int)
NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
{
+ int result = ERR;
+
T((T_CALLED("getmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
if ((aevent != 0) && (SP_PARM != 0) && (SP_PARM->_mouse_type != M_NONE)) {
/* compute the current-event pointer */
MEVENT *prev = PREV(eventp);
- /* copy the event we find there */
- *aevent = *prev;
+ if (prev->id != INVALID_EVENT) {
+ /* copy the event we find there */
+ *aevent = *prev;
- TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld",
- _nc_tracemouse(SP_PARM, prev),
- (long) IndexEV(SP_PARM, prev)));
+ TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld",
+ _nc_tracemouse(SP_PARM, prev),
+ (long) IndexEV(SP_PARM, prev)));
- prev->id = INVALID_EVENT; /* so the queue slot becomes free */
- returnCode(OK);
+ prev->id = INVALID_EVENT; /* so the queue slot becomes free */
+ SP_PARM->_mouse_eventp = PREV(prev);
+ result = OK;
+ }
}
- returnCode(ERR);
+ returnCode(result);
}
#if NCURSES_SP_FUNCS
/****************************************************************************
- * 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 *
#include <dump_entry.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.139 2009/12/12 17:30:12 Nicholas.Marriott Exp $")
+MODULE_ID("$Id: tic.c,v 1.140 2010/01/02 22:54:01 tom Exp $")
const char *_nc_progname = "tic";
} else if (delaying) {
a = skip_delay(a);
b = skip_delay(b);
+ } else if ((*b == '0' || (*b == ';')) && *a == 'm') {
+ b++;
} else {
a++;
}