summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-10 00:45:25 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-10 00:45:25 +0800
commit084b0114a3e74ffddf1b1d71f5396317a2bbc90f (patch)
tree46d45942162600f7ed59e5b32c4ef0364a67fad7
parent603d2ded05450918e5cd857a4379c4715a76ba43 (diff)
downloadpttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.tar
pttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.tar.gz
pttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.tar.bz2
pttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.tar.lz
pttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.tar.xz
pttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.tar.zst
pttbbs-084b0114a3e74ffddf1b1d71f5396317a2bbc90f.zip
- pmore: disable massive scroll for smooth output in pfterm
- mbbsd: "dbg_myrev is not required", told by kcwu. just "gdb pid" will work. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3811 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/mbbsd.c29
-rw-r--r--mbbsd/pmore.c11
2 files changed, 12 insertions, 28 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 23fa1e73..7e6b52ab 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -217,10 +217,6 @@ abort_bbs(int sig)
exit(0);
}
-#ifdef DEBUGSLEEP
-static unsigned int dbg_myrev = 0;
-#endif // DEBUGSLEEP
-
#ifdef GCC_NORETURN
static void abort_bbs_debug(int sig) GCC_NORETURN;
#endif
@@ -297,8 +293,7 @@ abort_bbs_debug(int sig)
#ifdef DEBUGSLEEP
#ifndef VALGRIND
- setproctitle("debug me!(%d)(%s,%d)[%08u]", sig,
- cuser.userid, currstat, dbg_myrev);
+ setproctitle("debug me!(%d)(%s,%d)", sig, cuser.userid, currstat);
#endif
/* do this manually to prevent broken stuff */
/* will broken currutmp cause problems here? hope not... */
@@ -1511,24 +1506,6 @@ static int daemon_login(int argc, char *argv[], char *envp[]);
static int check_ban_and_load(int fd);
static int check_banip(char *host);
-#ifdef DEBUGSLEEP
-
-static void
-solve_symlink(const char *path)
-{
- char buf[PATHLEN];
- char *pdot = NULL;
- if (readlink(path, buf, sizeof(buf)-1) < 1)
- return;
- buf[PATHLEN-1] = 0;
- pdot = strrchr(buf, '.');
- if (!pdot)
- return;
- dbg_myrev = (unsigned int)atoi(pdot+1);
-}
-
-#endif // DEBUGSLEEP
-
int
main(int argc, char *argv[], char *envp[])
{
@@ -1541,10 +1518,6 @@ main(int argc, char *argv[], char *envp[])
Signal(SIGUSR1, SIG_IGN);
Signal(SIGUSR2, SIG_IGN);
-#ifdef DEBUGSLEEP
- solve_symlink(argv[0]);
-#endif // DEBUGSLEEP
-
#if defined(__GLIBC__) && defined(CRITICAL_MEMORY)
#define MY__MMAP_THRESHOLD (1024 * 8)
#define MY__MMAP_MAX (0)
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index f4e6b285..98b6b2f8 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -1094,6 +1094,17 @@ mf_display()
scrll = MFDISP_PAGE;
i = scrll;
+
+#if defined(USE_PFTERM)
+ // In fact, pfterm will flash black screen when scrolling pages...
+ // So it may work better if we refresh whole screen.
+ if (i >= b_lines / 2)
+ {
+ clear(); move(0, 0);
+ scrll = MFDISP_PAGE;
+ } else
+#endif // defined(USE_PFTERM)
+
while(i-- > 0)
if (reverse)
rscroll(); // v