Add unit test for the FTermFreeBSD class
This commit is contained in:
parent
2b9c64a445
commit
f78aba0395
|
@ -1,3 +1,9 @@
|
||||||
|
2019-07-28 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* FreeBSD can now change the frequency and duration
|
||||||
|
of the pc speaker signal
|
||||||
|
* Added a unit test for the FTermFreeBSD class to test
|
||||||
|
the FreeBSD console
|
||||||
|
|
||||||
2019-07-21 Markus Gans <guru.mail@muenster.de>
|
2019-07-21 Markus Gans <guru.mail@muenster.de>
|
||||||
* Reduce include entries in the header files
|
* Reduce include entries in the header files
|
||||||
|
|
||||||
|
|
|
@ -918,13 +918,13 @@ char* FTerm::enableCursor()
|
||||||
|
|
||||||
enable_str[SIZE - 1] = '\0';
|
enable_str[SIZE - 1] = '\0';
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
if ( isFreeBSDTerm() )
|
if ( isFreeBSDTerm() )
|
||||||
{
|
{
|
||||||
// Restore the last used FreeBSD console cursor style
|
// Restore the last used FreeBSD console cursor style
|
||||||
freebsd->restoreCursorStyle();
|
freebsd->restoreCursorStyle();
|
||||||
}
|
}
|
||||||
#endif // defined(__FreeBSD__) || defined(__DragonFly__)
|
#endif // defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
|
||||||
return enable_str;
|
return enable_str;
|
||||||
}
|
}
|
||||||
|
@ -1093,6 +1093,11 @@ void FTerm::setBeep (int Hz, int ms)
|
||||||
{
|
{
|
||||||
linux->setBeep (Hz, ms);
|
linux->setBeep (Hz, ms);
|
||||||
}
|
}
|
||||||
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
void FTerm::setBeep (int Hz, int ms)
|
||||||
|
{
|
||||||
|
freebsd->setBeep (Hz, ms);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
void FTerm::setBeep (int, int)
|
void FTerm::setBeep (int, int)
|
||||||
{ }
|
{ }
|
||||||
|
@ -1103,6 +1108,8 @@ void FTerm::resetBeep()
|
||||||
{
|
{
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
linux->resetBeep();
|
linux->resetBeep();
|
||||||
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
freebsd->resetBeep();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1353,7 +1360,7 @@ void FTerm::initScreenSettings()
|
||||||
// Important: Do not use setNewFont() or setVGAFont() after
|
// Important: Do not use setNewFont() or setVGAFont() after
|
||||||
// the console character mapping has been initialized
|
// the console character mapping has been initialized
|
||||||
linux->initCharMap (fc::character);
|
linux->initCharMap (fc::character);
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
freebsd->initCharMap (fc::character);
|
freebsd->initCharMap (fc::character);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2005,7 +2012,7 @@ void FTerm::setInsertCursorStyle()
|
||||||
, data->isCursorHidden() );
|
, data->isCursorHidden() );
|
||||||
putstring (cstyle);
|
putstring (cstyle);
|
||||||
std::fflush(stdout);
|
std::fflush(stdout);
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
freebsd->setCursorStyle ( fc::destructive_cursor
|
freebsd->setCursorStyle ( fc::destructive_cursor
|
||||||
, data->isCursorHidden() );
|
, data->isCursorHidden() );
|
||||||
#endif
|
#endif
|
||||||
|
@ -2025,7 +2032,7 @@ void FTerm::setOverwriteCursorStyle()
|
||||||
, data->isCursorHidden() );
|
, data->isCursorHidden() );
|
||||||
putstring (cstyle);
|
putstring (cstyle);
|
||||||
std::fflush(stdout);
|
std::fflush(stdout);
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
freebsd->setCursorStyle ( fc::normal_cursor
|
freebsd->setCursorStyle ( fc::normal_cursor
|
||||||
, data->isCursorHidden() );
|
, data->isCursorHidden() );
|
||||||
#endif
|
#endif
|
||||||
|
@ -2193,7 +2200,7 @@ inline void FTerm::allocationValues()
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
linux = new FTermLinux();
|
linux = new FTermLinux();
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
freebsd = new FTermFreeBSD();
|
freebsd = new FTermFreeBSD();
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
||||||
openbsd = new FTermOpenBSD();
|
openbsd = new FTermOpenBSD();
|
||||||
|
@ -2221,7 +2228,7 @@ inline void FTerm::deallocationValues()
|
||||||
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
||||||
if ( openbsd )
|
if ( openbsd )
|
||||||
delete openbsd;
|
delete openbsd;
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
if ( freebsd )
|
if ( freebsd )
|
||||||
delete freebsd;
|
delete freebsd;
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
|
@ -2376,7 +2383,7 @@ void FTerm::initOSspecifics()
|
||||||
|
|
||||||
#endif // defined(__linux__)
|
#endif // defined(__linux__)
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
if ( init_values.meta_sends_escape )
|
if ( init_values.meta_sends_escape )
|
||||||
freebsd->enableMetaSendsEscape();
|
freebsd->enableMetaSendsEscape();
|
||||||
else
|
else
|
||||||
|
@ -2497,7 +2504,7 @@ void FTerm::finishOSspecifics1()
|
||||||
{
|
{
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
linux->finish();
|
linux->finish();
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
freebsd->finish();
|
freebsd->finish();
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
||||||
openbsd->finish();
|
openbsd->finish();
|
||||||
|
|
|
@ -92,12 +92,12 @@ void FTermcapQuirks::terminalFixup()
|
||||||
{
|
{
|
||||||
screen();
|
screen();
|
||||||
}
|
}
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
else if ( td->isFreeBSDTerm() )
|
else if ( td->isFreeBSDTerm() )
|
||||||
{
|
{
|
||||||
freebsd();
|
freebsd();
|
||||||
}
|
}
|
||||||
#endif // defined(__FreeBSD__) || defined(__DragonFly__)
|
#endif // defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
|
||||||
// xterm and compatible terminals
|
// xterm and compatible terminals
|
||||||
if ( td->isXTerminal() && ! td->isPuttyTerminal() )
|
if ( td->isXTerminal() && ! td->isPuttyTerminal() )
|
||||||
|
@ -112,7 +112,7 @@ void FTermcapQuirks::terminalFixup()
|
||||||
|
|
||||||
// private methods of FTermcapQuirks
|
// private methods of FTermcapQuirks
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
void FTermcapQuirks::freebsd()
|
void FTermcapQuirks::freebsd()
|
||||||
{
|
{
|
||||||
// FreeBSD console fixes
|
// FreeBSD console fixes
|
||||||
|
@ -136,7 +136,7 @@ void FTermcapQuirks::freebsd()
|
||||||
|
|
||||||
FTermcap::attr_without_color = 18;
|
FTermcap::attr_without_color = 18;
|
||||||
}
|
}
|
||||||
#endif // defined(__FreeBSD__) || defined(__DragonFly__)
|
#endif // defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FTermcapQuirks::cygwin()
|
void FTermcapQuirks::cygwin()
|
||||||
|
|
|
@ -30,6 +30,10 @@
|
||||||
#include "final/ftermios.h"
|
#include "final/ftermios.h"
|
||||||
#include "final/ftypes.h"
|
#include "final/ftypes.h"
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
#include "final/ftermfreebsd.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
|
||||||
#include "final/ftermopenbsd.h"
|
#include "final/ftermopenbsd.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -846,7 +850,7 @@ inline char* FTermDetection::secDA_Analysis_0 (char current_termtype[])
|
||||||
else if ( secondary_da.terminal_id_version == 136 )
|
else if ( secondary_da.terminal_id_version == 136 )
|
||||||
terminal_type.putty = true; // PuTTY
|
terminal_type.putty = true; // PuTTY
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
if ( FTermFreeBSD::isFreeBSDConsole() )
|
if ( FTermFreeBSD::isFreeBSDConsole() )
|
||||||
terminal_type.freebsd_con = true;
|
terminal_type.freebsd_con = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
uInt FTermFreeBSD::bsd_alt_keymap = 0;
|
uInt FTermFreeBSD::bsd_alt_keymap = 0;
|
||||||
FTermFreeBSD::CursorStyle FTermFreeBSD::cursor_style = fc::normal_cursor;
|
FTermFreeBSD::CursorStyle FTermFreeBSD::cursor_style = fc::normal_cursor;
|
||||||
bool FTermFreeBSD::change_cursorstyle = true;
|
bool FTermFreeBSD::change_cursorstyle = true;
|
||||||
|
@ -45,7 +45,7 @@ namespace finalcut
|
||||||
|
|
||||||
// public methods of FTermFreeBSD
|
// public methods of FTermFreeBSD
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
FTermFreeBSD::CursorStyle FTermFreeBSD::getCursorStyle()
|
FTermFreeBSD::CursorStyle FTermFreeBSD::getCursorStyle()
|
||||||
{
|
{
|
||||||
return cursor_style;
|
return cursor_style;
|
||||||
|
@ -72,7 +72,7 @@ bool FTermFreeBSD::isFreeBSDConsole()
|
||||||
{
|
{
|
||||||
// Check if it's a FreeBSD console
|
// Check if it's a FreeBSD console
|
||||||
|
|
||||||
keymap_t keymap;
|
keymap_t keymap{};
|
||||||
|
|
||||||
if ( fsystem && fsystem->ioctl(0, GIO_KEYMAP, &keymap) == 0 )
|
if ( fsystem && fsystem->ioctl(0, GIO_KEYMAP, &keymap) == 0 )
|
||||||
return true;
|
return true;
|
||||||
|
@ -80,16 +80,49 @@ bool FTermFreeBSD::isFreeBSDConsole()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FTermFreeBSD::setBeep (int Hz, int ms)
|
||||||
|
{
|
||||||
|
if ( ! FTerm::isFreeBSDTerm() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// range for frequency: 21-32766
|
||||||
|
if ( Hz < 21 || Hz > 32766 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// range for duration: 0-1999
|
||||||
|
if ( ms < 0 || ms > 1999 )
|
||||||
|
return;
|
||||||
|
|
||||||
|
constexpr int timer_frequency = 1193182;
|
||||||
|
int period = timer_frequency / Hz;
|
||||||
|
ms /= 10;
|
||||||
|
FTerm::putstringf ( CSI "=%d;%dB", period, ms );
|
||||||
|
std::fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FTermFreeBSD::resetBeep()
|
||||||
|
{
|
||||||
|
if ( ! FTerm::isFreeBSDTerm() )
|
||||||
|
return;
|
||||||
|
|
||||||
|
// default frequency: 1491 Hz
|
||||||
|
// default duration: 50 ms
|
||||||
|
FTerm::putstring ( CSI "=800;5B" );
|
||||||
|
std::fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FTermFreeBSD::init()
|
void FTermFreeBSD::init()
|
||||||
{
|
{
|
||||||
// initialize BSD console
|
// initialize BSD console
|
||||||
|
|
||||||
|
fsystem = FTerm::getFSystem();
|
||||||
|
|
||||||
if ( ! isFreeBSDConsole() )
|
if ( ! isFreeBSDConsole() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fsystem = FTerm::getFSystem();
|
|
||||||
|
|
||||||
if ( meta_sends_escape )
|
if ( meta_sends_escape )
|
||||||
{
|
{
|
||||||
// save current left alt key mapping
|
// save current left alt key mapping
|
||||||
|
@ -149,7 +182,7 @@ bool FTermFreeBSD::saveFreeBSDAltKey()
|
||||||
|
|
||||||
static constexpr int left_alt = 0x38;
|
static constexpr int left_alt = 0x38;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
keymap_t keymap;
|
keymap_t keymap{};
|
||||||
|
|
||||||
if ( fsystem )
|
if ( fsystem )
|
||||||
ret = fsystem->ioctl (0, GIO_KEYMAP, &keymap);
|
ret = fsystem->ioctl (0, GIO_KEYMAP, &keymap);
|
||||||
|
@ -169,7 +202,7 @@ bool FTermFreeBSD::setFreeBSDAltKey (uInt key)
|
||||||
|
|
||||||
static constexpr int left_alt = 0x38;
|
static constexpr int left_alt = 0x38;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
keymap_t keymap;
|
keymap_t keymap{};
|
||||||
|
|
||||||
if ( fsystem )
|
if ( fsystem )
|
||||||
ret = fsystem->ioctl (0, GIO_KEYMAP, &keymap);
|
ret = fsystem->ioctl (0, GIO_KEYMAP, &keymap);
|
||||||
|
@ -177,7 +210,7 @@ bool FTermFreeBSD::setFreeBSDAltKey (uInt key)
|
||||||
if ( ret < 0 )
|
if ( ret < 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// map to meta key
|
// Mapping "key" on the left alt key
|
||||||
keymap.key[left_alt].map[0] = key;
|
keymap.key[left_alt].map[0] = key;
|
||||||
|
|
||||||
if ( (keymap.n_keys > 0)
|
if ( (keymap.n_keys > 0)
|
||||||
|
@ -202,6 +235,6 @@ bool FTermFreeBSD::resetFreeBSDAlt2Meta()
|
||||||
|
|
||||||
return setFreeBSDAltKey (bsd_alt_keymap);
|
return setFreeBSDAltKey (bsd_alt_keymap);
|
||||||
}
|
}
|
||||||
#endif // defined(__FreeBSD__) || defined(__DragonFly__)
|
#endif // defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
|
||||||
} // namespace finalcut
|
} // namespace finalcut
|
||||||
|
|
|
@ -46,7 +46,7 @@ bool FTermOpenBSD::isBSDConsole()
|
||||||
{
|
{
|
||||||
// Check if it's a NetBSD/OpenBSD workstation console
|
// Check if it's a NetBSD/OpenBSD workstation console
|
||||||
|
|
||||||
static kbd_t kbdencoding;
|
static kbd_t kbdencoding{};
|
||||||
|
|
||||||
if ( fsystem
|
if ( fsystem
|
||||||
&& fsystem->ioctl(0, WSKBDIO_GETENCODING, &kbdencoding) == 0 )
|
&& fsystem->ioctl(0, WSKBDIO_GETENCODING, &kbdencoding) == 0 )
|
||||||
|
@ -90,7 +90,7 @@ void FTermOpenBSD::finish()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool FTermOpenBSD::saveBSDConsoleEncoding()
|
bool FTermOpenBSD::saveBSDConsoleEncoding()
|
||||||
{
|
{
|
||||||
static kbd_t k_encoding;
|
static kbd_t k_encoding{};
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if ( fsystem )
|
if ( fsystem )
|
||||||
|
|
|
@ -384,7 +384,7 @@ void FTermXTerminal::setXTermCursorStyle()
|
||||||
{
|
{
|
||||||
// Set the xterm cursor style
|
// Set the xterm cursor style
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
if ( FTermFreeBSD::isFreeBSDConsole() )
|
if ( FTermFreeBSD::isFreeBSDConsole() )
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,7 +50,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if GPM mouse is enabled */
|
/* Define to 1 if GPM mouse is enabled */
|
||||||
/* #undef HAVE_LIBGPM */
|
#ifndef F_HAVE_LIBGPM
|
||||||
|
#define F_HAVE_LIBGPM 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <linux/fb.h> header file. */
|
/* Define to 1 if you have the <linux/fb.h> header file. */
|
||||||
#ifndef F_HAVE_LINUX_FB_H
|
#ifndef F_HAVE_LINUX_FB_H
|
||||||
|
|
|
@ -204,7 +204,7 @@ class FTerm final
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
FTermDebugData& getFTermDebugData();
|
static FTermDebugData& getFTermDebugData();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
|
|
|
@ -66,7 +66,7 @@ class FTermcapQuirks final
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
static void freebsd();
|
static void freebsd();
|
||||||
#endif
|
#endif
|
||||||
static void cygwin();
|
static void cygwin();
|
||||||
|
|
|
@ -37,7 +37,27 @@
|
||||||
|
|
||||||
#include "final/fc.h"
|
#include "final/fc.h"
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(UNIT_TEST)
|
||||||
|
#define CONS_CURSORTYPE 0x80046307
|
||||||
|
#define GIO_KEYMAP 0x20006b06
|
||||||
|
#define PIO_KEYMAP 0x20006b07
|
||||||
|
#define META 0x84 // Meta key
|
||||||
|
#define NUM_KEYS 256 // Number of keys in table
|
||||||
|
#define NUM_STATES 8 // States per key
|
||||||
|
|
||||||
|
struct keyent_t
|
||||||
|
{
|
||||||
|
int map[NUM_STATES];
|
||||||
|
int spcl;
|
||||||
|
int flgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct keymap_t
|
||||||
|
{
|
||||||
|
int n_keys;
|
||||||
|
struct keyent_t key[NUM_KEYS];
|
||||||
|
};
|
||||||
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
#undef mouse_info // consio.h
|
#undef mouse_info // consio.h
|
||||||
#undef buttons // consio.h
|
#undef buttons // consio.h
|
||||||
|
|
||||||
|
@ -89,6 +109,8 @@ class FTermFreeBSD final
|
||||||
static void disableChangeCursorStyle();
|
static void disableChangeCursorStyle();
|
||||||
static void enableMetaSendsEscape();
|
static void enableMetaSendsEscape();
|
||||||
static void disableMetaSendsEscape();
|
static void disableMetaSendsEscape();
|
||||||
|
static void setBeep (int, int);
|
||||||
|
static void resetBeep();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
static void init();
|
static void init();
|
||||||
|
@ -118,7 +140,7 @@ inline const char* FTermFreeBSD::getClassName() const
|
||||||
{ return "FTermFreeBSD"; }
|
{ return "FTermFreeBSD"; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
inline void FTermFreeBSD::enableChangeCursorStyle()
|
inline void FTermFreeBSD::enableChangeCursorStyle()
|
||||||
{ change_cursorstyle = true; }
|
{ change_cursorstyle = true; }
|
||||||
|
|
||||||
|
@ -133,7 +155,7 @@ inline void FTermFreeBSD::enableMetaSendsEscape()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FTermFreeBSD::disableMetaSendsEscape()
|
inline void FTermFreeBSD::disableMetaSendsEscape()
|
||||||
{ meta_sends_escape = false; }
|
{ meta_sends_escape = false; }
|
||||||
#endif // defined(__FreeBSD__) || defined(__DragonFly__)
|
#endif // defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
|
|
||||||
} // namespace finalcut
|
} // namespace finalcut
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ noinst_PROGRAMS = \
|
||||||
ftermcapquirks_test \
|
ftermcapquirks_test \
|
||||||
ftermlinux_test \
|
ftermlinux_test \
|
||||||
ftermopenbsd_test \
|
ftermopenbsd_test \
|
||||||
|
ftermfreebsd_test \
|
||||||
foptimove_test \
|
foptimove_test \
|
||||||
foptiattr_test \
|
foptiattr_test \
|
||||||
fcolorpair_test \
|
fcolorpair_test \
|
||||||
|
@ -31,6 +32,7 @@ ftermdetection_test_SOURCES = ftermdetection-test.cpp
|
||||||
ftermcapquirks_test_SOURCES = ftermcapquirks-test.cpp
|
ftermcapquirks_test_SOURCES = ftermcapquirks-test.cpp
|
||||||
ftermlinux_test_SOURCES = ftermlinux-test.cpp
|
ftermlinux_test_SOURCES = ftermlinux-test.cpp
|
||||||
ftermopenbsd_test_SOURCES = ftermopenbsd-test.cpp
|
ftermopenbsd_test_SOURCES = ftermopenbsd-test.cpp
|
||||||
|
ftermfreebsd_test_SOURCES = ftermfreebsd-test.cpp
|
||||||
foptimove_test_SOURCES = foptimove-test.cpp
|
foptimove_test_SOURCES = foptimove-test.cpp
|
||||||
foptiattr_test_SOURCES = foptiattr-test.cpp
|
foptiattr_test_SOURCES = foptiattr-test.cpp
|
||||||
fcolorpair_test_SOURCES = fcolorpair-test.cpp
|
fcolorpair_test_SOURCES = fcolorpair-test.cpp
|
||||||
|
@ -47,6 +49,7 @@ TESTS = fobject_test \
|
||||||
ftermcapquirks_test \
|
ftermcapquirks_test \
|
||||||
ftermlinux_test \
|
ftermlinux_test \
|
||||||
ftermopenbsd_test \
|
ftermopenbsd_test \
|
||||||
|
ftermfreebsd_test \
|
||||||
foptimove_test \
|
foptimove_test \
|
||||||
foptiattr_test \
|
foptiattr_test \
|
||||||
fcolorpair_test \
|
fcolorpair_test \
|
||||||
|
|
|
@ -787,7 +787,7 @@ inline char* ConEmu::getSEC_DA (console con)
|
||||||
C_STR("\033[>67;200502;0c"), // Cygwin
|
C_STR("\033[>67;200502;0c"), // Cygwin
|
||||||
C_STR("\033[>77;20402;0c"), // Mintty
|
C_STR("\033[>77;20402;0c"), // Mintty
|
||||||
0, // Linux console
|
0, // Linux console
|
||||||
0, // FreeBSD console
|
C_STR("\033[>0;10;0c"), // FreeBSD console
|
||||||
C_STR("\033[>24;20;0c"), // NetBSD console
|
C_STR("\033[>24;20;0c"), // NetBSD console
|
||||||
C_STR("\033[>24;20;0c"), // OpenBSD console
|
C_STR("\033[>24;20;0c"), // OpenBSD console
|
||||||
0, // Sun console
|
0, // Sun console
|
||||||
|
|
|
@ -0,0 +1,726 @@
|
||||||
|
/***********************************************************************
|
||||||
|
* ftermfreebsd-test.cpp - FTermFreeBSD unit tests *
|
||||||
|
* *
|
||||||
|
* This file is part of the Final Cut widget toolkit *
|
||||||
|
* *
|
||||||
|
* Copyright 2019 Markus Gans *
|
||||||
|
* *
|
||||||
|
* The Final Cut is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 3 of *
|
||||||
|
* the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* The Final Cut is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU Lesser General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU Lesser General Public *
|
||||||
|
* License along with this program. If not, see *
|
||||||
|
* <http://www.gnu.org/licenses/>. *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
|
#include <cppunit/BriefTestProgressListener.h>
|
||||||
|
#include <cppunit/CompilerOutputter.h>
|
||||||
|
#include <cppunit/extensions/HelperMacros.h>
|
||||||
|
#include <cppunit/TestFixture.h>
|
||||||
|
#include <cppunit/TestResult.h>
|
||||||
|
#include <cppunit/TestResultCollector.h>
|
||||||
|
#include <cppunit/TestRunner.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <conemu.h>
|
||||||
|
#include <final/final.h>
|
||||||
|
|
||||||
|
namespace test
|
||||||
|
{
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// class FSystemTest
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
#pragma pack(push)
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
class FSystemTest : public finalcut::FSystem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Constructor
|
||||||
|
FSystemTest();
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
virtual ~FSystemTest();
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
virtual uChar inPortByte (uShort) override;
|
||||||
|
virtual void outPortByte (uChar, uShort) override;
|
||||||
|
virtual int isTTY (int) override;
|
||||||
|
virtual int ioctl (int, uLong, ...) override;
|
||||||
|
virtual int open (const char*, int, ...) override;
|
||||||
|
virtual int close (int) override;
|
||||||
|
virtual FILE* fopen (const char*, const char*) override;
|
||||||
|
virtual int fclose (FILE*) override;
|
||||||
|
virtual int putchar (int) override;
|
||||||
|
virtual int tputs (const char*, int, int (*)(int)) override;
|
||||||
|
virtual uid_t getuid() override;
|
||||||
|
std::string& getCharacters();
|
||||||
|
int& getCursorType();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Data Members
|
||||||
|
std::string characters;
|
||||||
|
int cursor_type = 0;
|
||||||
|
static struct keymap_t keymap;
|
||||||
|
static struct keymap_t terminal_keymap;
|
||||||
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
// private Data Member of FSystemTest
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
struct keymap_t FSystemTest::keymap =
|
||||||
|
{
|
||||||
|
109, // Number of keys
|
||||||
|
{
|
||||||
|
// map spcl flag
|
||||||
|
//------------------------------------------------ ---- ----
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0xff, 0x00 },
|
||||||
|
{ {0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x86, 0x1b}, 0x02, 0x00 },
|
||||||
|
{ {0x31, 0x21, 0x00, 0x00, 0x31, 0x21, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x32, 0x22, 0x00, 0x00, 0xb2, 0xb2, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x33, 0xa7, 0x00, 0x00, 0xb3, 0xb3, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x34, 0x24, 0x00, 0x00, 0x34, 0x24, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x35, 0x25, 0x00, 0x00, 0x35, 0x25, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x36, 0x26, 0x00, 0x00, 0x36, 0x26, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x37, 0x2f, 0x00, 0x00, 0x7b, 0x7b, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x38, 0x28, 0x1b, 0x1b, 0x5b, 0x5b, 0x1b, 0x1b}, 0x00, 0x00 },
|
||||||
|
{ {0x39, 0x29, 0x1d, 0x1d, 0x5d, 0x5d, 0x1d, 0x1d}, 0x00, 0x00 },
|
||||||
|
{ {0x30, 0x3d, 0x00, 0x00, 0x7d, 0x7d, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0xdf, 0x3f, 0x1c, 0x1c, 0x5c, 0x5c, 0x1c, 0x1c}, 0x00, 0x00 },
|
||||||
|
{ {0x27, 0x60, 0x00, 0x00, 0xb3, 0xb4, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x08, 0x08, 0x7f, 0x7f, 0x08, 0x08, 0x7f, 0x7f}, 0x00, 0x00 },
|
||||||
|
{ {0x09, 0x08, 0x00, 0x00, 0x09, 0x08, 0x00, 0x00}, 0x77, 0x00 },
|
||||||
|
{ {0x71, 0x51, 0x11, 0x11, 0x40, 0x40, 0x00, 0x00}, 0x00, 0x01 },
|
||||||
|
{ {0x77, 0x57, 0x17, 0x17, 0x77, 0x57, 0x17, 0x17}, 0x00, 0x01 },
|
||||||
|
{ {0x65, 0x45, 0x05, 0x05, 0x20ac, 0x45, 0x05, 0x05}, 0x00, 0x01 },
|
||||||
|
{ {0x72, 0x52, 0x12, 0x12, 0x72, 0x52, 0x12, 0x12}, 0x00, 0x01 },
|
||||||
|
{ {0x74, 0x54, 0x14, 0x14, 0x74, 0x54, 0x14, 0x14}, 0x00, 0x01 },
|
||||||
|
{ {0x7a, 0x5a, 0x1a, 0x1a, 0x7a, 0x5a, 0x1a, 0x1a}, 0x00, 0x01 },
|
||||||
|
{ {0x75, 0x55, 0x15, 0x15, 0x75, 0x55, 0x15, 0x15}, 0x00, 0x01 },
|
||||||
|
{ {0x69, 0x49, 0x09, 0x09, 0x69, 0x49, 0x09, 0x09}, 0x00, 0x01 },
|
||||||
|
{ {0x6f, 0x4f, 0x0f, 0x0f, 0x6f, 0x4f, 0x0f, 0x0f}, 0x00, 0x01 },
|
||||||
|
{ {0x70, 0x50, 0x10, 0x10, 0x70, 0x50, 0x10, 0x10}, 0x00, 0x01 },
|
||||||
|
{ {0xfc, 0xdc, 0x00, 0x00, 0xfc, 0xdc, 0x1b, 0x00}, 0x31, 0x01 },
|
||||||
|
{ {0x2b, 0x2a, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x0d, 0x0d, 0x0a, 0x0a, 0x0d, 0x0d, 0x0a, 0x0a}, 0x00, 0x00 },
|
||||||
|
{ {0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09}, 0xff, 0x00 },
|
||||||
|
{ {0x61, 0x41, 0x01, 0x01, 0x61, 0x41, 0x01, 0x01}, 0x00, 0x01 },
|
||||||
|
{ {0x73, 0x53, 0x13, 0x13, 0x73, 0x53, 0x13, 0x13}, 0x00, 0x01 },
|
||||||
|
{ {0x64, 0x44, 0x04, 0x04, 0x64, 0x44, 0x04, 0x04}, 0x00, 0x01 },
|
||||||
|
{ {0x66, 0x46, 0x06, 0x06, 0x66, 0x46, 0x06, 0x06}, 0x00, 0x01 },
|
||||||
|
{ {0x67, 0x47, 0x07, 0x07, 0x67, 0x47, 0x07, 0x07}, 0x00, 0x01 },
|
||||||
|
{ {0x68, 0x48, 0x08, 0x08, 0x68, 0x48, 0x08, 0x08}, 0x00, 0x01 },
|
||||||
|
{ {0x6a, 0x4a, 0x0a, 0x0a, 0x6a, 0x4a, 0x0a, 0x0a}, 0x00, 0x01 },
|
||||||
|
{ {0x6b, 0x4b, 0x0b, 0x0b, 0x6b, 0x4b, 0x0b, 0x0b}, 0x00, 0x01 },
|
||||||
|
{ {0x6c, 0x4c, 0x0c, 0x0c, 0x6c, 0x4c, 0x0c, 0x0c}, 0x00, 0x01 },
|
||||||
|
{ {0xf6, 0xd6, 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x00}, 0x33, 0x01 },
|
||||||
|
{ {0xe4, 0xc4, 0x00, 0x00, 0xe4, 0xc4, 0x00, 0x00}, 0x33, 0x01 },
|
||||||
|
{ {0x5e, 0xb0, 0x1e, 0x1e, 0x5e, 0xb0, 0x1e, 0x1e}, 0x00, 0x00 },
|
||||||
|
{ {0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02}, 0xff, 0x00 },
|
||||||
|
{ {0x23, 0x27, 0x00, 0x00, 0x23, 0x27, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x79, 0x59, 0x19, 0x19, 0x79, 0x59, 0x19, 0x19}, 0x00, 0x01 },
|
||||||
|
{ {0x78, 0x58, 0x18, 0x18, 0x78, 0x58, 0x18, 0x18}, 0x00, 0x01 },
|
||||||
|
{ {0x63, 0x43, 0x03, 0x03, 0xa2, 0x43, 0x03, 0x03}, 0x00, 0x01 },
|
||||||
|
{ {0x76, 0x56, 0x16, 0x16, 0x76, 0x56, 0x16, 0x16}, 0x00, 0x01 },
|
||||||
|
{ {0x62, 0x42, 0x02, 0x02, 0x62, 0x42, 0x02, 0x02}, 0x00, 0x01 },
|
||||||
|
{ {0x6e, 0x4e, 0x0e, 0x0e, 0x6e, 0x4e, 0x0e, 0x0e}, 0x00, 0x01 },
|
||||||
|
{ {0x6d, 0x4d, 0x0d, 0x0d, 0xb5, 0xb5, 0x0d, 0x0d}, 0x00, 0x01 },
|
||||||
|
{ {0x2c, 0x3b, 0x00, 0x00, 0x2c, 0x3b, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x2e, 0x3a, 0x00, 0x00, 0x2e, 0x3a, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x2d, 0x5f, 0x1f, 0x1f, 0x2d, 0x5f, 0x1f, 0x1f}, 0x00, 0x00 },
|
||||||
|
{ {0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03}, 0xff, 0x00 },
|
||||||
|
{ {0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a}, 0x00, 0x00 },
|
||||||
|
{ {0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07}, 0xff, 0x00 },
|
||||||
|
{ {0x20, 0x20, 0x00, 0x20, 0x20, 0x20, 0x87, 0x20}, 0x02, 0x00 },
|
||||||
|
{ {0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, 0xff, 0x00 },
|
||||||
|
{ {0x1b, 0x27, 0x33, 0x3f, 0x0b, 0x15, 0x0b, 0x15}, 0xff, 0x00 },
|
||||||
|
{ {0x1c, 0x28, 0x34, 0x40, 0x0c, 0x16, 0x0c, 0x16}, 0xff, 0x00 },
|
||||||
|
{ {0x1d, 0x29, 0x35, 0x41, 0x0d, 0x17, 0x0d, 0x17}, 0xff, 0x00 },
|
||||||
|
{ {0x1e, 0x2a, 0x36, 0x42, 0x0e, 0x18, 0x0e, 0x18}, 0xff, 0x00 },
|
||||||
|
{ {0x1f, 0x2b, 0x37, 0x43, 0x0f, 0x19, 0x0f, 0x19}, 0xff, 0x00 },
|
||||||
|
{ {0x20, 0x2c, 0x38, 0x44, 0x10, 0x1a, 0x10, 0x1a}, 0xff, 0x00 },
|
||||||
|
{ {0x21, 0x2d, 0x39, 0x45, 0x11, 0x11, 0x11, 0x11}, 0xff, 0x00 },
|
||||||
|
{ {0x22, 0x2e, 0x3a, 0x46, 0x12, 0x12, 0x12, 0x12}, 0xff, 0x00 },
|
||||||
|
{ {0x23, 0x2f, 0x3b, 0x47, 0x13, 0x13, 0x13, 0x13}, 0xff, 0x00 },
|
||||||
|
{ {0x24, 0x30, 0x3c, 0x48, 0x14, 0x14, 0x14, 0x14}, 0xff, 0x00 },
|
||||||
|
{ {0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05}, 0xff, 0x00 },
|
||||||
|
{ {0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06}, 0xff, 0x00 },
|
||||||
|
{ {0x4b, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37}, 0x80, 0x02 },
|
||||||
|
{ {0x4c, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38}, 0x80, 0x02 },
|
||||||
|
{ {0x4d, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39}, 0x80, 0x02 },
|
||||||
|
{ {0x4e, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d}, 0x80, 0x02 },
|
||||||
|
{ {0x4f, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34}, 0x80, 0x02 },
|
||||||
|
{ {0x50, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35}, 0x80, 0x02 },
|
||||||
|
{ {0x51, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36}, 0x80, 0x02 },
|
||||||
|
{ {0x52, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b}, 0x80, 0x02 },
|
||||||
|
{ {0x53, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31}, 0x80, 0x02 },
|
||||||
|
{ {0x54, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32}, 0x80, 0x02 },
|
||||||
|
{ {0x55, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33}, 0x80, 0x02 },
|
||||||
|
{ {0x56, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30}, 0x80, 0x02 },
|
||||||
|
{ {0x7f, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x85, 0x85}, 0x03, 0x02 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0xff, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0xff, 0x00 },
|
||||||
|
{ {0x3c, 0x3e, 0x00, 0x00, 0x7c, 0xa6, 0x00, 0x00}, 0x33, 0x00 },
|
||||||
|
{ {0x25, 0x31, 0x3d, 0x49, 0x15, 0x15, 0x15, 0x15}, 0xff, 0x00 },
|
||||||
|
{ {0x26, 0x32, 0x3e, 0x4a, 0x16, 0x16, 0x16, 0x16}, 0xff, 0x00 },
|
||||||
|
{ {0x0d, 0x0d, 0x0a, 0x0a, 0x0d, 0x0d, 0x0a, 0x0a}, 0x00, 0x00 },
|
||||||
|
{ {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80}, 0xff, 0x00 },
|
||||||
|
{ {0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f}, 0x00, 0x02 },
|
||||||
|
{ {0x0a, 0x99, 0x86, 0x86, 0x00, 0x00, 0x00, 0x00}, 0xff, 0x00 },
|
||||||
|
{ {0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81}, 0xff, 0x00 },
|
||||||
|
{ {0x4b, 0x4b, 0x4b, 0x4b, 0x4b, 0x4b, 0x4b, 0x4b}, 0xff, 0x00 },
|
||||||
|
{ {0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c}, 0xff, 0x00 },
|
||||||
|
{ {0x4d, 0x4d, 0x4d, 0x4d, 0x4d, 0x4d, 0x4d, 0x4d}, 0xff, 0x00 },
|
||||||
|
{ {0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f}, 0xff, 0x00 },
|
||||||
|
{ {0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51}, 0xff, 0x00 },
|
||||||
|
{ {0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53}, 0xff, 0x00 },
|
||||||
|
{ {0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54, 0x54}, 0xff, 0x00 },
|
||||||
|
{ {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}, 0xff, 0x00 },
|
||||||
|
{ {0x56, 0xa3, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56}, 0xff, 0x00 },
|
||||||
|
{ {0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x85, 0x57}, 0xff, 0x00 },
|
||||||
|
{ {0x06, 0x88, 0x06, 0x88, 0x87, 0x00, 0x87, 0x00}, 0xff, 0x00 },
|
||||||
|
{ {0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58}, 0xff, 0x00 },
|
||||||
|
{ {0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59}, 0xff, 0x00 },
|
||||||
|
{ {0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a}, 0xff, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0xff, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 },
|
||||||
|
{ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, 0x00, 0x00 }
|
||||||
|
// | | | | | | | |
|
||||||
|
// | | | | | | | `--- 0: Shift-Ctrl-Alt
|
||||||
|
// | | | | | | `--------- 1: Ctrl-Alt
|
||||||
|
// | | | | | `--------------- 2: Shift-Alt
|
||||||
|
// | | | | `--------------------- 3: Alt
|
||||||
|
// | | | `--------------------------- 4: Shift-Ctrl
|
||||||
|
// | | `--------------------------------- 5: Ctrl
|
||||||
|
// | `--------------------------------------- 6: Shift
|
||||||
|
// `--------------------------------------------- 7: Base
|
||||||
|
// |
|
||||||
|
// `- spcl bit
|
||||||
|
//
|
||||||
|
// spcl = A special treatment key (bits correspond to the map field)
|
||||||
|
// flag = 0 -> 'O' = Caps lock + num lock are ignored
|
||||||
|
// flag = 1 -> 'C' = Caps lock affects the key
|
||||||
|
// flag = 2 -> 'N' = Num lock affects the key
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// static class attributes
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
struct keymap_t FSystemTest::terminal_keymap{};
|
||||||
|
|
||||||
|
// constructors and destructor
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
FSystemTest::FSystemTest() // constructor
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
FSystemTest::~FSystemTest() // destructor
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// public methods of FSystemTest
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
uChar FSystemTest::inPortByte (uShort)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FSystemTest::outPortByte (uChar, uShort)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::isTTY (int fd)
|
||||||
|
{
|
||||||
|
std::cerr << "Call: isatty (fd=" << fd << ")\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::ioctl (int fd, uLong request, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
void* argp;
|
||||||
|
std::string req_string;
|
||||||
|
int ret_val = -1;
|
||||||
|
|
||||||
|
va_start (args, request);
|
||||||
|
argp = va_arg (args, void*);
|
||||||
|
|
||||||
|
switch ( request )
|
||||||
|
{
|
||||||
|
case CONS_CURSORTYPE:
|
||||||
|
{
|
||||||
|
req_string = "CONS_CURSORTYPE";
|
||||||
|
constexpr int blink_cursor = int(1 << 0);
|
||||||
|
constexpr int char_cursor = int(1 << 1);
|
||||||
|
constexpr int hidden_cursor = int(1 << 2);
|
||||||
|
constexpr int reset_cursor = int(1 << 30);
|
||||||
|
constexpr int cursor_attrs = int( blink_cursor \
|
||||||
|
| char_cursor \
|
||||||
|
| hidden_cursor );
|
||||||
|
int* cur_flags = static_cast<int*>(argp);
|
||||||
|
*cur_flags = *cur_flags & cursor_attrs;
|
||||||
|
|
||||||
|
if ( *cur_flags & reset_cursor )
|
||||||
|
cursor_type = 0;
|
||||||
|
else
|
||||||
|
cursor_type = *cur_flags;
|
||||||
|
|
||||||
|
ret_val = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case GIO_KEYMAP:
|
||||||
|
{
|
||||||
|
req_string = "GIO_KEYMAP";
|
||||||
|
keymap_t* kmap = static_cast<keymap_t*>(argp);
|
||||||
|
|
||||||
|
// Sets the default keymap of the terminal on the first call
|
||||||
|
if ( terminal_keymap.n_keys == 0 )
|
||||||
|
{
|
||||||
|
terminal_keymap.n_keys = keymap.n_keys;
|
||||||
|
std::memcpy (terminal_keymap.key, &keymap.key, sizeof(keymap.key));
|
||||||
|
}
|
||||||
|
|
||||||
|
kmap->n_keys = terminal_keymap.n_keys;
|
||||||
|
std::memcpy (kmap->key, terminal_keymap.key, sizeof(keymap.key));
|
||||||
|
ret_val = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case PIO_KEYMAP:
|
||||||
|
{
|
||||||
|
req_string = "PIO_KEYMAP";
|
||||||
|
keymap_t* kmap = static_cast<keymap_t*>(argp);
|
||||||
|
std::memcpy (terminal_keymap.key, kmap->key, sizeof(keymap.key));
|
||||||
|
ret_val = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case TIOCGWINSZ:
|
||||||
|
req_string = "TIOCGWINSZ";
|
||||||
|
struct winsize* win_size = static_cast<winsize*>(argp);
|
||||||
|
win_size->ws_col = 80;
|
||||||
|
win_size->ws_row = 25;
|
||||||
|
ret_val = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
std::cerr << "Call: ioctl (fd=" << fd
|
||||||
|
<< ", request=" << req_string
|
||||||
|
<< "(0x" << std::hex << request << ")"
|
||||||
|
<< ", argp=" << argp << std::dec << ")\n";
|
||||||
|
return ret_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::open (const char* pathname, int flags, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start (args, flags);
|
||||||
|
mode_t mode = static_cast<mode_t>(va_arg (args, int));
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
std::cerr << "Call: open (pathname=\"" << pathname
|
||||||
|
<< "\", flags=" << flags
|
||||||
|
<< ", mode=" << mode << ")\n";
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::close (int fildes)
|
||||||
|
{
|
||||||
|
std::cerr << "Call: close (fildes=" << fildes << ")\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
FILE* FSystemTest::fopen (const char* path, const char* mode)
|
||||||
|
{
|
||||||
|
std::cerr << "Call: fopen (path=" << path
|
||||||
|
<< ", mode=" << mode << ")\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::fclose (FILE* fp)
|
||||||
|
{
|
||||||
|
std::cerr << "Call: fclose (fp=" << fp << ")\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::putchar (int c)
|
||||||
|
{
|
||||||
|
std::cerr << "Call: putchar (" << c << ")\n";
|
||||||
|
characters.push_back(c);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int FSystemTest::tputs (const char* str, int affcnt, int (*putc)(int))
|
||||||
|
{
|
||||||
|
return ::tputs (str, affcnt, putc);
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
uid_t FSystemTest::getuid()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
std::string& FSystemTest::getCharacters()
|
||||||
|
{
|
||||||
|
return characters;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
int& FSystemTest::getCursorType()
|
||||||
|
{
|
||||||
|
return cursor_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace test
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// class ftermfreebsdTest
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
#pragma pack(push)
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
class ftermfreebsdTest : public CPPUNIT_NS::TestFixture, test::ConEmu
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ftermfreebsdTest();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void classNameTest();
|
||||||
|
void netbsdConsoleTest();
|
||||||
|
void freebsdConsoleTest();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Adds code needed to register the test suite
|
||||||
|
CPPUNIT_TEST_SUITE (ftermfreebsdTest);
|
||||||
|
|
||||||
|
// Add a methods to the test suite
|
||||||
|
CPPUNIT_TEST (classNameTest);
|
||||||
|
CPPUNIT_TEST (freebsdConsoleTest);
|
||||||
|
|
||||||
|
// End of test suite definition
|
||||||
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
ftermfreebsdTest::ftermfreebsdTest()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void ftermfreebsdTest::classNameTest()
|
||||||
|
{
|
||||||
|
const finalcut::FTermFreeBSD p;
|
||||||
|
const char* const classname = p.getClassName();
|
||||||
|
CPPUNIT_ASSERT ( std::strcmp(classname, "FTermFreeBSD") == 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void ftermfreebsdTest::freebsdConsoleTest()
|
||||||
|
{
|
||||||
|
setenv ("TERM", "xterm", 1);
|
||||||
|
setenv ("COLUMNS", "80", 1);
|
||||||
|
setenv ("LINES", "25", 1);
|
||||||
|
|
||||||
|
finalcut::FTermData* data;
|
||||||
|
finalcut::FSystem* fsys = new test::FSystemTest();
|
||||||
|
finalcut::FTermDetection* term_detection;
|
||||||
|
finalcut::FTerm::setFSystem(fsys);
|
||||||
|
std::cout << "\n";
|
||||||
|
data = finalcut::FTerm::getFTermData();
|
||||||
|
|
||||||
|
auto& encoding_list = data->getEncodingList();
|
||||||
|
encoding_list["UTF-8"] = finalcut::fc::UTF8;
|
||||||
|
encoding_list["UTF8"] = finalcut::fc::UTF8;
|
||||||
|
encoding_list["VT100"] = finalcut::fc::VT100;
|
||||||
|
encoding_list["PC"] = finalcut::fc::PC;
|
||||||
|
encoding_list["ASCII"] = finalcut::fc::ASCII;
|
||||||
|
|
||||||
|
data->setTermEncoding(finalcut::fc::VT100);
|
||||||
|
data->setBaudrate(9600);
|
||||||
|
data->setTermType("xterm");
|
||||||
|
data->setTermFileName("/dev/ttyv0");
|
||||||
|
data->setTTYFileDescriptor(0);
|
||||||
|
data->supportShadowCharacter (false);
|
||||||
|
data->supportHalfBlockCharacter (false);
|
||||||
|
data->supportCursorOptimisation (true);
|
||||||
|
data->setCursorHidden (true);
|
||||||
|
data->useAlternateScreen (false);
|
||||||
|
data->setASCIIConsole (true);
|
||||||
|
data->setVT100Console (false);
|
||||||
|
data->setUTF8Console (false);
|
||||||
|
data->setUTF8 (false);
|
||||||
|
data->setNewFont (false);
|
||||||
|
data->setVGAFont (false);
|
||||||
|
data->setMonochron (false);
|
||||||
|
data->setTermResized (false);
|
||||||
|
|
||||||
|
term_detection = finalcut::FTerm::getFTermDetection();
|
||||||
|
term_detection->setTerminalDetection(true);
|
||||||
|
pid_t pid = forkConEmu();
|
||||||
|
|
||||||
|
if ( isConEmuChildProcess(pid) )
|
||||||
|
{
|
||||||
|
finalcut::FTermFreeBSD freebsd;
|
||||||
|
|
||||||
|
setenv ("TERM", "xterm", 1);
|
||||||
|
setenv ("COLUMNS", "80", 1);
|
||||||
|
setenv ("LINES", "25", 1);
|
||||||
|
unsetenv("TERMCAP");
|
||||||
|
unsetenv("COLORTERM");
|
||||||
|
unsetenv("COLORFGBG");
|
||||||
|
unsetenv("VTE_VERSION");
|
||||||
|
unsetenv("XTERM_VERSION");
|
||||||
|
unsetenv("ROXTERM_ID");
|
||||||
|
unsetenv("KONSOLE_DBUS_SESSION");
|
||||||
|
unsetenv("KONSOLE_DCOP");
|
||||||
|
unsetenv("TMUX");
|
||||||
|
|
||||||
|
finalcut::FTerm::detectTermSize();
|
||||||
|
freebsd.enableMetaSendsEscape();
|
||||||
|
freebsd.enableChangeCursorStyle();
|
||||||
|
freebsd.init();
|
||||||
|
term_detection->detect();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
const finalcut::FString& sec_da = \
|
||||||
|
finalcut::FTerm::getFTermDebugData().getSecDAString();
|
||||||
|
CPPUNIT_ASSERT ( sec_da == "\033[>0;10;0c" );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT ( isatty(0) == 1 );
|
||||||
|
CPPUNIT_ASSERT ( term_detection->isFreeBSDTerm() );
|
||||||
|
CPPUNIT_ASSERT ( data->getTermGeometry().getWidth() == 80 );
|
||||||
|
CPPUNIT_ASSERT ( data->getTermGeometry().getHeight() == 25 );
|
||||||
|
CPPUNIT_ASSERT ( ! data->hasShadowCharacter() );
|
||||||
|
CPPUNIT_ASSERT ( ! data->hasHalfBlockCharacter() );
|
||||||
|
|
||||||
|
test::FSystemTest* fsystest = static_cast<test::FSystemTest*>(fsys);
|
||||||
|
freebsd.setCursorStyle (finalcut::fc::normal_cursor, false);
|
||||||
|
CPPUNIT_ASSERT ( fsystest->getCursorType() == finalcut::fc::normal_cursor );
|
||||||
|
|
||||||
|
freebsd.setCursorStyle (finalcut::fc::blink_cursor, false);
|
||||||
|
CPPUNIT_ASSERT ( fsystest->getCursorType() == finalcut::fc::blink_cursor );
|
||||||
|
|
||||||
|
freebsd.setCursorStyle (finalcut::fc::destructive_cursor, false);
|
||||||
|
CPPUNIT_ASSERT ( fsystest->getCursorType() == finalcut::fc::destructive_cursor );
|
||||||
|
|
||||||
|
std::string& characters = fsystest->getCharacters();
|
||||||
|
characters.clear();
|
||||||
|
freebsd.setBeep (20, 100); // Hz < 21
|
||||||
|
CPPUNIT_ASSERT ( characters.empty() );
|
||||||
|
freebsd.setBeep (32767, 100); // Hz > 32766
|
||||||
|
CPPUNIT_ASSERT ( characters.empty() );
|
||||||
|
freebsd.setBeep (200, -1); // ms < 0
|
||||||
|
CPPUNIT_ASSERT ( characters.empty() );
|
||||||
|
freebsd.setBeep (200, 2000); // ms > 1999
|
||||||
|
CPPUNIT_ASSERT ( characters.empty() );
|
||||||
|
freebsd.setBeep (200, 100); // 200 Hz - 100 ms
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT ( characters == CSI "=5965;10B" );
|
||||||
|
characters.clear();
|
||||||
|
freebsd.resetBeep();
|
||||||
|
CPPUNIT_ASSERT ( characters == CSI "=800;5B" );
|
||||||
|
characters.clear();
|
||||||
|
|
||||||
|
freebsd.finish();
|
||||||
|
|
||||||
|
closeConEmuStdStreams();
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
else // Parent
|
||||||
|
{
|
||||||
|
// Start the terminal emulation
|
||||||
|
startConEmuTerminal (ConEmu::freebsd_con);
|
||||||
|
|
||||||
|
if ( waitpid(pid, 0, WUNTRACED) != pid )
|
||||||
|
std::cerr << "waitpid error" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Put the test suite in the registry
|
||||||
|
CPPUNIT_TEST_SUITE_REGISTRATION (ftermfreebsdTest);
|
||||||
|
|
||||||
|
// The general unit test main part
|
||||||
|
#include <main-test.inc>
|
|
@ -2083,8 +2083,6 @@ void FTermLinuxTest::linuxFontTest()
|
||||||
term_detection = finalcut::FTerm::getFTermDetection();
|
term_detection = finalcut::FTerm::getFTermDetection();
|
||||||
finalcut::FTermLinux linux;
|
finalcut::FTermLinux linux;
|
||||||
|
|
||||||
term_detection->setLinuxTerm(true);
|
|
||||||
|
|
||||||
pid_t pid = forkConEmu();
|
pid_t pid = forkConEmu();
|
||||||
|
|
||||||
if ( isConEmuChildProcess(pid) )
|
if ( isConEmuChildProcess(pid) )
|
||||||
|
|
|
@ -153,14 +153,12 @@ int FSystemTest::ioctl (int fd, uLong request, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
case TIOCGWINSZ:
|
case TIOCGWINSZ:
|
||||||
{
|
|
||||||
req_string = "TIOCGWINSZ";
|
req_string = "TIOCGWINSZ";
|
||||||
struct winsize* win_size = static_cast<winsize*>(argp);
|
struct winsize* win_size = static_cast<winsize*>(argp);
|
||||||
win_size->ws_col = 80;
|
win_size->ws_col = 80;
|
||||||
win_size->ws_row = 25;
|
win_size->ws_row = 25;
|
||||||
ret_val = 0;
|
ret_val = 0;
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
@ -342,6 +340,12 @@ void ftermopenbsdTest::netbsdConsoleTest()
|
||||||
term_detection->detect();
|
term_detection->detect();
|
||||||
finalcut::FTerm::detectTermSize();
|
finalcut::FTerm::detectTermSize();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
const finalcut::FString& sec_da = \
|
||||||
|
finalcut::FTerm::getFTermDebugData().getSecDAString();
|
||||||
|
CPPUNIT_ASSERT ( sec_da == "\033[>24;20;0c" );
|
||||||
|
#endif
|
||||||
|
|
||||||
CPPUNIT_ASSERT ( isatty(0) == 1 );
|
CPPUNIT_ASSERT ( isatty(0) == 1 );
|
||||||
CPPUNIT_ASSERT ( ! term_detection->isOpenBSDTerm() );
|
CPPUNIT_ASSERT ( ! term_detection->isOpenBSDTerm() );
|
||||||
CPPUNIT_ASSERT ( term_detection->isNetBSDTerm() );
|
CPPUNIT_ASSERT ( term_detection->isNetBSDTerm() );
|
||||||
|
@ -441,6 +445,12 @@ void ftermopenbsdTest::openbsdConsoleTest()
|
||||||
term_detection->detect();
|
term_detection->detect();
|
||||||
finalcut::FTerm::detectTermSize();
|
finalcut::FTerm::detectTermSize();
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
const finalcut::FString& sec_da = \
|
||||||
|
finalcut::FTerm::getFTermDebugData().getSecDAString();
|
||||||
|
CPPUNIT_ASSERT ( sec_da == "\033[>24;20;0c" );
|
||||||
|
#endif
|
||||||
|
|
||||||
CPPUNIT_ASSERT ( isatty(0) == 1 );
|
CPPUNIT_ASSERT ( isatty(0) == 1 );
|
||||||
CPPUNIT_ASSERT ( term_detection->isOpenBSDTerm() );
|
CPPUNIT_ASSERT ( term_detection->isOpenBSDTerm() );
|
||||||
CPPUNIT_ASSERT ( ! term_detection->isNetBSDTerm() );
|
CPPUNIT_ASSERT ( ! term_detection->isNetBSDTerm() );
|
||||||
|
|
Loading…
Reference in New Issue