Fixes compiler errors for latest Cygwin versions
This commit is contained in:
parent
d84132816f
commit
97f8d998a7
|
@ -1,3 +1,6 @@
|
||||||
|
2017-01-22 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* Fixes compiler errors for latest Cygwin versions
|
||||||
|
|
||||||
2017-01-21 Markus Gans <guru.mail@muenster.de>
|
2017-01-21 Markus Gans <guru.mail@muenster.de>
|
||||||
* The Final Cut can now also be compiled under Cygwin
|
* The Final Cut can now also be compiled under Cygwin
|
||||||
* Fixed bug in FScrollView::scrollTo
|
* Fixed bug in FScrollView::scrollTo
|
||||||
|
|
32
config.h.in
32
config.h.in
|
@ -130,5 +130,37 @@
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# undef _ALL_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable threading extensions on Solaris. */
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
# undef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
#endif
|
||||||
|
/* Enable extensions on HP NonStop. */
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
# undef _TANDEM_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on Solaris. */
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
# undef __EXTENSIONS__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if on MINIX. */
|
||||||
|
#undef _MINIX
|
||||||
|
|
||||||
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
|
this defined. */
|
||||||
|
#undef _POSIX_1_SOURCE
|
||||||
|
|
||||||
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||||
|
#undef _POSIX_SOURCE
|
||||||
|
|
|
@ -8,6 +8,7 @@ AC_INIT([finalcut], [0.4.0])
|
||||||
AC_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
AX_PREFIX_CONFIG_H([include/final/fconfig.h], [F])
|
AX_PREFIX_CONFIG_H([include/final/fconfig.h], [F])
|
||||||
AC_CONFIG_SRCDIR([src/fobject.cpp])
|
AC_CONFIG_SRCDIR([src/fobject.cpp])
|
||||||
|
AC_GNU_SOURCE
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
|
|
@ -207,10 +207,42 @@
|
||||||
#define F_STDC_HEADERS 1
|
#define F_STDC_HEADERS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# define _ALL_SOURCE 1
|
||||||
|
#endif
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# define _GNU_SOURCE 1
|
||||||
|
#endif
|
||||||
|
/* Enable threading extensions on Solaris. */
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||||
|
#endif
|
||||||
|
/* Enable extensions on HP NonStop. */
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
# define _TANDEM_SOURCE 1
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on Solaris. */
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
# define __EXTENSIONS__ 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#ifndef F_VERSION
|
#ifndef F_VERSION
|
||||||
#define F_VERSION "0.4.0"
|
#define F_VERSION "0.4.0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if on MINIX. */
|
||||||
|
/* #undef _MINIX */
|
||||||
|
|
||||||
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||||
|
this defined. */
|
||||||
|
/* #undef _POSIX_1_SOURCE */
|
||||||
|
|
||||||
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||||
|
/* #undef _POSIX_SOURCE */
|
||||||
|
|
||||||
/* once: INCLUDE_FINAL_FCONFIG_H */
|
/* once: INCLUDE_FINAL_FCONFIG_H */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -491,9 +491,7 @@ class FMouseControl
|
||||||
// Methods
|
// Methods
|
||||||
void enable();
|
void enable();
|
||||||
void disable();
|
void disable();
|
||||||
void xtermMouse (bool);
|
|
||||||
void enableXTermMouse();
|
|
||||||
void disableXTermMouse();
|
|
||||||
virtual void setRawData (FMouse::mouse_type, char[], int);
|
virtual void setRawData (FMouse::mouse_type, char[], int);
|
||||||
virtual void processEvent (struct timeval* time);
|
virtual void processEvent (struct timeval* time);
|
||||||
bool getGpmKeyPressed (bool);
|
bool getGpmKeyPressed (bool);
|
||||||
|
@ -503,6 +501,9 @@ class FMouseControl
|
||||||
// Accessor
|
// Accessor
|
||||||
FMouse* getMouseWithData();
|
FMouse* getMouseWithData();
|
||||||
FMouse* getMouseWithEvent();
|
FMouse* getMouseWithEvent();
|
||||||
|
void xtermMouse (bool);
|
||||||
|
void enableXTermMouse();
|
||||||
|
void disableXTermMouse();
|
||||||
void putstring (const char[], int = 1);
|
void putstring (const char[], int = 1);
|
||||||
|
|
||||||
// Data Member
|
// Data Member
|
||||||
|
|
|
@ -95,9 +95,9 @@
|
||||||
typedef unsigned long chtype;
|
typedef unsigned long chtype;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <term.h> // termcap
|
#include <term.h> // termcap
|
||||||
#else
|
#else
|
||||||
#include <term.h> // termcap
|
#include <term.h> // termcap
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef F_HAVE_LIBGPM
|
#ifdef F_HAVE_LIBGPM
|
||||||
|
|
|
@ -48,6 +48,10 @@
|
||||||
#error "Only <final/final.h> can be included directly."
|
#error "Only <final/final.h> can be included directly."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__CYGWIN__)
|
||||||
|
#include "final/fconfig.h" // includes _GNU_SOURCE for wcwidth()
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sstream> // std::stringstream
|
#include <sstream> // std::stringstream
|
||||||
|
|
||||||
#include "final/fterm.h"
|
#include "final/fterm.h"
|
||||||
|
|
|
@ -1524,29 +1524,6 @@ void FMouseControl::disable()
|
||||||
disableXTermMouse();
|
disableXTermMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
void FMouseControl::xtermMouse (bool on)
|
|
||||||
{
|
|
||||||
// activate/deactivate the xterm mouse support
|
|
||||||
if ( ! use_xterm_mouse )
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( on )
|
|
||||||
putstring (CSI "?1001s" // save old highlight mouse tracking
|
|
||||||
CSI "?1000h" // enable x11 mouse tracking
|
|
||||||
CSI "?1002h" // enable cell motion mouse tracking
|
|
||||||
CSI "?1015h" // enable urxvt mouse mode
|
|
||||||
CSI "?1006h"); // enable SGR mouse mode
|
|
||||||
else
|
|
||||||
putstring (CSI "?1006l" // disable SGR mouse mode
|
|
||||||
CSI "?1015l" // disable urxvt mouse mode
|
|
||||||
CSI "?1002l" // disable cell motion mouse tracking
|
|
||||||
CSI "?1000l" // disable x11 mouse tracking
|
|
||||||
CSI "?1001r"); // restore old highlight mouse tracking
|
|
||||||
|
|
||||||
std::fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FMouseControl::setRawData ( FMouse::mouse_type mt
|
void FMouseControl::setRawData ( FMouse::mouse_type mt
|
||||||
, char fifo_buf[]
|
, char fifo_buf[]
|
||||||
|
@ -1641,6 +1618,29 @@ FMouse* FMouseControl::getMouseWithEvent()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FMouseControl::xtermMouse (bool on)
|
||||||
|
{
|
||||||
|
// activate/deactivate the xterm mouse support
|
||||||
|
if ( ! use_xterm_mouse )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( on )
|
||||||
|
putstring (CSI "?1001s" // save old highlight mouse tracking
|
||||||
|
CSI "?1000h" // enable x11 mouse tracking
|
||||||
|
CSI "?1002h" // enable cell motion mouse tracking
|
||||||
|
CSI "?1015h" // enable urxvt mouse mode
|
||||||
|
CSI "?1006h"); // enable SGR mouse mode
|
||||||
|
else
|
||||||
|
putstring (CSI "?1006l" // disable SGR mouse mode
|
||||||
|
CSI "?1015l" // disable urxvt mouse mode
|
||||||
|
CSI "?1002l" // disable cell motion mouse tracking
|
||||||
|
CSI "?1000l" // disable x11 mouse tracking
|
||||||
|
CSI "?1001r"); // restore old highlight mouse tracking
|
||||||
|
|
||||||
|
std::fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FMouseControl::putstring (const char s[], int affcnt)
|
void FMouseControl::putstring (const char s[], int affcnt)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue