/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2014 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.138 2012/02/29 10:38:46 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.142 2014/03/08 20:32:59 tom Exp $")
#include <tic.h>
#undef buttons /* symbol conflict in consio.h */
#undef mouse_info /* symbol conflict in consio.h */
#include <osreldate.h>
-#if (__FreeBSD_version >= 400017)
+#if defined(__DragonFly_version) || (defined(__FreeBSD__) && (__FreeBSD_version >= 400017))
#include <sys/consio.h>
#include <sys/fbio.h>
#else
char buf[6];
unsigned long ignore;
- strncpy(buf, key_mouse, 3); /* should be "\033[M" */
+ strcpy(buf, "\033[M"); /* should be the same as key_mouse */
buf[3] = ' ' + (button - 1) + (down ? 0 : 0x40);
buf[4] = ' ' + x - LEFT_COL + 1;
buf[5] = ' ' + y - TOP_ROW + 1;
#if USE_EMX_MOUSE
sp->_emxmouse_activated = enable;
#else
- NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
- "xterm-mouse",
- TPARM_1(sp->_mouse_xtermcap, enable));
+ NCURSES_PUTP2("xterm-mouse", TPARM_1(sp->_mouse_xtermcap, enable));
#endif
sp->_mouse_active = enable;
}
#endif /* USE_SYSMOUSE */
#ifdef USE_TERM_DRIVER
- CallDriver(sp, initmouse);
+ CallDriver(sp, td_initmouse);
#else
/* we know how to recognize mouse events under "xterm" */
if (key_mouse != 0) {