summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-12 19:03:01 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-12 19:03:01 +0800
commit4821b33284388ea16eb213055828f1ba11bdb756 (patch)
treeedb227295f3ce51eade7597f0cecf380c15efcfc /mbbsd/board.c
parente1c531df28eea436f0c4094b91cea4b202ab2002 (diff)
downloadpttbbs-4821b33284388ea16eb213055828f1ba11bdb756.tar
pttbbs-4821b33284388ea16eb213055828f1ba11bdb756.tar.gz
pttbbs-4821b33284388ea16eb213055828f1ba11bdb756.tar.bz2
pttbbs-4821b33284388ea16eb213055828f1ba11bdb756.tar.lz
pttbbs-4821b33284388ea16eb213055828f1ba11bdb756.tar.xz
pttbbs-4821b33284388ea16eb213055828f1ba11bdb756.tar.zst
pttbbs-4821b33284388ea16eb213055828f1ba11bdb756.zip
newflag
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1956 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 1f5d066b..4c97e119 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -434,6 +434,7 @@ show_brdlist(int head, int clsflag, int newflag)
char *unread[2] = {"\33[37m \033[m", "\033[1;31m£¾\033[m"};
char priv, *mark, *favcolor, *brdname, *color, *class, *icon, *desc, *bm;
+ short number;
if (yank_flag == 0 && get_data_number(get_current_fav()) == 0){
// brdnum > 0 ???
@@ -489,6 +490,7 @@ show_brdlist(int head, int clsflag, int newflag)
if (yank_flag == 0) {
if (ptr->myattr & NBRD_LINE) {
+ number = -1;
mark = "";
priv = ptr->myattr & NBRD_TAG ? 'D' : ' ',
favcolor = "";
@@ -499,6 +501,7 @@ show_brdlist(int head, int clsflag, int newflag)
bm = "";
}
else if (ptr->myattr & NBRD_FOLDER) {
+ number = get_data_number(get_fav_folder(getfolder(ptr->bid)));
mark = "";
priv = ' ';
brdname = "MyFavFolder";
@@ -508,6 +511,7 @@ show_brdlist(int head, int clsflag, int newflag)
bm = "";
}
else if (!HasPerm(B_BH(ptr))) {
+ number = -1;
mark = "";
priv = ' ';
brdname = "Unknown??";
@@ -519,8 +523,10 @@ show_brdlist(int head, int clsflag, int newflag)
else {
goto ugly_normal_case;
}
+
}
else if (unlikely(B_BH(ptr)->brdattr & BRD_GROUPBOARD)) {
+ number = -1;
priv = ' ';
mark = "";
brdname = B_BH(ptr)->brdname;
@@ -538,10 +544,20 @@ ugly_normal_case:
icon = B_BH(ptr)->title + 5;
desc = B_BH(ptr)->title + 7;
bm = B_BH(ptr)->BM;
+ number = newflag ? (short)(B_TOTAL(ptr)) : head;
}
+ /* ugly */
+ if (!newflag)
+ prints("%5hd", head);
+ else {
+ if (number < 0)
+ outs(" ");
+ else
+ prints("%5hd", number);
+ }
- prints("%5d%c%2s" "%s%-13s\033[m" "%s%4.4s\033[0;37m " "%2.2s\033[m%-34.34s", head, priv, mark, favcolor, brdname, color, class, icon, desc);
+ prints("%c%2s" "%s%-13s\033[m" "%s%4.4s\033[0;37m " "%2.2s\033[m%-34.34s", priv, mark, favcolor, brdname, color, class, icon, desc);
if (unlikely(B_BH(ptr)->brdattr & BRD_BAD))
outs(" X ");