summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-29 01:59:20 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-29 01:59:20 +0800
commitc78d877d45496115e90c3584b063fd2bc72303b9 (patch)
tree2e855c83f3d3e4b3637644d0a60a2431e071b17e /include
parentc0dd6835cc9f376ad6f195bad2daacff12b5efd9 (diff)
downloadpttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.tar
pttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.tar.gz
pttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.tar.bz2
pttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.tar.lz
pttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.tar.xz
pttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.tar.zst
pttbbs-c78d877d45496115e90c3584b063fd2bc72303b9.zip
* refine kbd stack and move to common/bbs
* rename visio to vtuikit git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4888 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/bbs.h2
-rw-r--r--include/common.h1
-rw-r--r--include/vtkbd.h8
-rw-r--r--include/vtuikit.h (renamed from include/visio.h)7
4 files changed, 12 insertions, 6 deletions
diff --git a/include/bbs.h b/include/bbs.h
index d16d5b02..7892f646 100644
--- a/include/bbs.h
+++ b/include/bbs.h
@@ -44,7 +44,7 @@ extern "C" {
#include "ansi.h"
#include "vtkbd.h"
-#include "visio.h"
+#include "vtuikit.h"
#include "statistic.h"
#include "uflags.h"
#include "pttstruct.h"
diff --git a/include/common.h b/include/common.h
index a2829047..e584cd54 100644
--- a/include/common.h
+++ b/include/common.h
@@ -155,7 +155,6 @@
#define ST_REJECT (IRH | HRM)
#define QCAST int (*)(const void *, const void *)
-#define Ctrl(c) (c & 037)
#define chartoupper(c) ((c >= 'a' && c <= 'z') ? c+'A'-'a' : c)
#define LEN_AUTHOR1 5
diff --git a/include/vtkbd.h b/include/vtkbd.h
index f1e998c8..609787d4 100644
--- a/include/vtkbd.h
+++ b/include/vtkbd.h
@@ -25,6 +25,8 @@
#ifndef _VTKBD_H
#define _VTKBD_H
+#include <sys/types.h>
+
/* context definition */
typedef struct {
int state;
@@ -32,7 +34,11 @@ typedef struct {
} VtkbdCtx;
/* vtkbd API */
-int vtkbd_process(int c, VtkbdCtx *ctx);
+int vtkbd_process(int c, VtkbdCtx *ctx);
+ssize_t vtkbd_ignore_dbcs_evil_repeats(const unsigned char *buf, ssize_t len);
+
+/* key code macro */
+#define Ctrl(c) (c & 0x1F)
/* common ASCII compatible keys definition */
#define KEY_TAB 9
diff --git a/include/visio.h b/include/vtuikit.h
index f2879ce6..09257345 100644
--- a/include/visio.h
+++ b/include/vtuikit.h
@@ -3,14 +3,15 @@
#define _VISIO_H
/*
- * visio.h
- * piaip's new implementation of visio
+ * vtuikit.h
+ * piaip's new implementation of vtuikit
*
- * see visio.c for license, usage, and introduction.
+ * see vtuikit.c for license, usage, and introduction.
*/
#include "bbs.h"
#include "ansi.h" // we need it.
+#include "vtkbd.h" // we usually use it
#include <limits.h>
// THEME DEFINITION ----------------------------------------------------