diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-11-03 09:59:00 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-11-03 09:59:00 +0800 |
commit | dcc6fa723d1a38380313788235540c20bc3a8853 (patch) | |
tree | c7cb6ccd373783d3bc3eba1747e40c345ca36905 | |
parent | 261c4d1675ef6f1713bed08b72bebc2cb5936386 (diff) | |
download | pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.tar pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.tar.gz pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.tar.bz2 pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.tar.lz pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.tar.xz pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.tar.zst pttbbs-dcc6fa723d1a38380313788235540c20bc3a8853.zip |
* move I_* virtual key constant to vtkbd.h and change value definition
* since it's an INT now, no need to care about what 'conflict with XXX' issue
* add sec->milliseconds constant
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5017 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/include/common.h | 8 | ||||
-rw-r--r-- | pttbbs/include/vtkbd.h | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/pttbbs/include/common.h b/pttbbs/include/common.h index 87c72bbc..3d18c0ee 100644 --- a/pttbbs/include/common.h +++ b/pttbbs/include/common.h @@ -191,9 +191,6 @@ #define LOCK_THIS 1 // lock這線不能重複玩 #define LOCK_MULTI 2 // lock所有線不能重複玩 -#define I_TIMEOUT (-2) /* Used for the getchar routine select call */ -#define I_OTHERDATA (-333) /* interface, (-3) will conflict with chinese */ - #define MAX_MODES (127) #define MAX_RECOMMENDS (100) @@ -242,8 +239,9 @@ /* ----------------------------------------------------- */ /* Constants */ /* ----------------------------------------------------- */ -#define DAY_SECONDS (86400) -#define MONTH_SECONDS (DAY_SECONDS*30) +#define DAY_SECONDS (86400) +#define MONTH_SECONDS (DAY_SECONDS*30) +#define MILLISECONDS (1000) // milliseconds of one second /* ----------------------------------------------------- */ /* Macros */ diff --git a/pttbbs/include/vtkbd.h b/pttbbs/include/vtkbd.h index 609787d4..df458758 100644 --- a/pttbbs/include/vtkbd.h +++ b/pttbbs/include/vtkbd.h @@ -80,9 +80,15 @@ ssize_t vtkbd_ignore_dbcs_evil_repeats(const unsigned char *buf, ssize_t len); #define KEY_F11 0x030B #define KEY_F12 0x030C +// XXX TODO use 0x0?00 as 'META(alt)', for example 0x0?41 = META-A instead of esc_arg + /* vtkbd meta keys */ #define KEY_INCOMPLETE 0x0420 /* 0x?20 to prevent accident usage */ -#define KEY_UNKNOWN 0x0FFF /* unknown sequence */ +#define KEY_UNKNOWN 0x0F20 /* unknown sequence */ + +/* vkey special data for additional fd to listen (ref: vkey_attach) */ +#define I_TIMEOUT 0x05fd /* additional fd timeout for select (replaced by vkey_poll */ +#define I_OTHERDATA 0x05fe /* data arrived in additional fd */ #endif // _VTKBD_H |