summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-12 13:46:21 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-12 13:46:21 +0800
commit0118e623c97c9c61b34820a38feabeab34408e43 (patch)
tree912c7034e7bee684623efae33d6c4c415c059538 /include
parenta707b3cd704001f58dad2682f1e699f8dbab5bbc (diff)
downloadpttbbs-0118e623c97c9c61b34820a38feabeab34408e43.tar
pttbbs-0118e623c97c9c61b34820a38feabeab34408e43.tar.gz
pttbbs-0118e623c97c9c61b34820a38feabeab34408e43.tar.bz2
pttbbs-0118e623c97c9c61b34820a38feabeab34408e43.tar.lz
pttbbs-0118e623c97c9c61b34820a38feabeab34408e43.tar.xz
pttbbs-0118e623c97c9c61b34820a38feabeab34408e43.tar.zst
pttbbs-0118e623c97c9c61b34820a38feabeab34408e43.zip
- change show_file parameter to assign striping options in a better way.
- also prevents ESC* style escapes in user_play_query, for security reason. (Thanks to Kinra's report on PttSuggest) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3996 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r--include/libbbsutil.h7
-rw-r--r--include/modes.h7
2 files changed, 13 insertions, 1 deletions
diff --git a/include/libbbsutil.h b/include/libbbsutil.h
index a825ff28..3acebdfc 100644
--- a/include/libbbsutil.h
+++ b/include/libbbsutil.h
@@ -11,8 +11,13 @@
#else
#define GCC_CHECK_FORMAT(a,b)
#endif
+
+
+// flags used by strip_ansi
enum STRIP_FLAG {
- STRIP_ALL = 0, ONLY_COLOR, NO_RELOAD
+ STRIP_ALL = 0,
+ ONLY_COLOR, // allow only colors (ESC [ .. m)
+ NO_RELOAD // allow all known (color+move)
};
enum LOG_FLAG {
LOG_CREAT = 1,
diff --git a/include/modes.h b/include/modes.h
index 0c79bb3c..689a2853 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -207,4 +207,11 @@ enum _DBCS_STATUS {
#define PAGER_MODES (5)
+/* stuff.c: show_file */
+#define SHOWFILE_RAW (0x00)
+#define SHOWFILE_ALLOW_COLOR (0x01) // ESC [ ... m
+#define SHOWFILE_ALLOW_MOVE (0x02) // ESC [ ... H
+#define SHOWFILE_ALLOW_STAR (0x04) // ESC * ...
+#define SHOWFILE_ALLOW_ALL (SHOWFILE_ALLOW_COLOR | SHOWFILE_ALLOW_MOVE | SHOWFILE_ALLOW_STAR)
+
#endif