summaryrefslogtreecommitdiffstats
path: root/include/ansi.h
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-16 09:47:40 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-16 09:47:40 +0800
commit1e09228b6566d733f75b150078149b0046b46e45 (patch)
treeccb32380ad1659104b7ef00a24a585520d5518e3 /include/ansi.h
parentabc6c1897ac5c424942693652750d08266b0fd2f (diff)
downloadpttbbs-1e09228b6566d733f75b150078149b0046b46e45.tar
pttbbs-1e09228b6566d733f75b150078149b0046b46e45.tar.gz
pttbbs-1e09228b6566d733f75b150078149b0046b46e45.tar.bz2
pttbbs-1e09228b6566d733f75b150078149b0046b46e45.tar.lz
pttbbs-1e09228b6566d733f75b150078149b0046b46e45.tar.xz
pttbbs-1e09228b6566d733f75b150078149b0046b46e45.tar.zst
pttbbs-1e09228b6566d733f75b150078149b0046b46e45.zip
make getdata support prompt with ANSI escapes.
old code makes correct positioning but wrong attributes git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2933 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include/ansi.h')
-rw-r--r--include/ansi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ansi.h b/include/ansi.h
index d75df914..faa3b0f8 100644
--- a/include/ansi.h
+++ b/include/ansi.h
@@ -19,6 +19,9 @@
#define ANSI_MOVETO(y,x) ESC_STR "[" #y ";" #x "H"
#define ANSI_CLRTOEND ESC_STR "[K"
+#define ANSI_SAVEPOS ESC_STR "[s"
+#define ANSI_RESTOREPOS ESC_STR "[u"
+
#define ANSI_IN_ESCAPE(x) (((x) >= '0' && (x) <= '9') || \
(x) == ';' || (x) == ',' || (x) == '[')