summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 20:42:33 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-01 20:42:33 +0800
commit3a014d927e393b889f074113c0a398ddb04807b2 (patch)
treef439934fd5b732020126453d88ba3648070ff778 /mbbsd/io.c
parent4c256182f70ad244e0ec40af45c0c0857abb0a01 (diff)
downloadpttbbs-3a014d927e393b889f074113c0a398ddb04807b2.tar
pttbbs-3a014d927e393b889f074113c0a398ddb04807b2.tar.gz
pttbbs-3a014d927e393b889f074113c0a398ddb04807b2.tar.bz2
pttbbs-3a014d927e393b889f074113c0a398ddb04807b2.tar.lz
pttbbs-3a014d927e393b889f074113c0a398ddb04807b2.tar.xz
pttbbs-3a014d927e393b889f074113c0a398ddb04807b2.tar.zst
pttbbs-3a014d927e393b889f074113c0a398ddb04807b2.zip
- sync ptt2 local modification
- refine post/vote restriction magic code - color in making recommend git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3603 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r--mbbsd/io.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 30c03712..38b2c273 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -642,9 +642,9 @@ wait_input(float f, int flDoRefresh)
* @param buf
* @param str
* @param mode enum {STRIP_ALL = 0, ONLY_COLOR, NO_RELOAD};
- * STRIP_ALL: ??
- * ONLY_COLOR: ??
- * NO_RELOAD: 不 strip (?)
+ * STRIP_ALL: 全部吃掉
+ * ONLY_COLOR: 只吃掉跟顏色有關的 (ESC[*m)
+ * NO_RELOAD: 不 strip (?)
*/
static const char EscapeFlag[] = {
/* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -664,7 +664,7 @@ static const char EscapeFlag[] = {
/* E0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
-#define isEscapeParam(X) (EscapeFlag[(int)(X)] & 1)
+#define isEscapeParam(X) (EscapeFlag[(int)(X)] & 1)
#define isEscapeCommand(X) (EscapeFlag[(int)(X)] & 2)
int
@@ -705,6 +705,8 @@ strip_ansi(char *buf, const char *str, int mode)
int
strlen_noansi(const char *s)
{
+ // XXX this is almost identical to
+ // strip_ansi(NULL, s, STRIP_ALL)
register int count = 0, mode = 0;
if (!s || !*s)