diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-26 13:25:59 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-26 13:25:59 +0800 |
commit | f3ddacc0d79fa08051c4c8a715d971696edfc3b8 (patch) | |
tree | 9357ce0bd3f23fd6da006d6411255bbd4c1bf707 | |
parent | ef72c801c2d2166a64a02cc76abe76ec3da260f9 (diff) | |
download | pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.tar pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.tar.gz pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.tar.bz2 pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.tar.lz pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.tar.xz pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.tar.zst pttbbs-f3ddacc0d79fa08051c4c8a715d971696edfc3b8.zip |
- bbslua: add iolimit() api
- board: remove the const name "MyFavFolder"
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3869 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbslua.c | 8 | ||||
-rw-r--r-- | mbbsd/board.c | 22 |
2 files changed, 24 insertions, 6 deletions
diff --git a/mbbsd/bbslua.c b/mbbsd/bbslua.c index 66f08928..50eb69bc 100644 --- a/mbbsd/bbslua.c +++ b/mbbsd/bbslua.c @@ -761,6 +761,13 @@ bls_setfn(char *fn, size_t sz, const char *p) } BLAPI_PROTO +bls_iolimit(lua_State *L) +{ + lua_pushinteger(L, BLSCONF_MAXIO); + return 1; +} + +BLAPI_PROTO bls_limit(lua_State *L) { int n = lua_gettop(L); @@ -913,6 +920,7 @@ static const struct luaL_reg lib_store [] = { { "load", bls_load }, { "save", bls_save }, { "limit", bls_limit }, + { "iolimit", bls_iolimit }, { NULL, NULL}, }; diff --git a/mbbsd/board.c b/mbbsd/board.c index 0faef5f6..f2d9ac81 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1125,7 +1125,9 @@ show_brdlist(int head, int clsflag, int newflag) if (!(ptr->myattr & NBRD_FAV)) outs(ANSI_COLOR(1;30)); - outs("------------ ------------------------------------------" + outs("------------" // " " + "------" + "------------------------------------------" ANSI_RESET "\n"); continue; } @@ -1136,9 +1138,17 @@ show_brdlist(int head, int clsflag, int newflag) get_data_number(get_fav_folder(getfolder(ptr->bid))) : head, ptr->myattr & NBRD_TAG ? 'D' : ' '); - prints("%sMyFavFolder" ANSI_RESET " 目錄 □%-34s" ANSI_RESET, - !(cuser.uflag2 & FAVNOHILIGHT) ? HILIGHT_COLOR : "", - title); + // prints(" 目錄 □%-34s", title); + /* + if (!(cuser.uflag2 & FAVNOHILIGHT)) + outs(HILIGHT_COLOR); + prints("%-12s", "[Folder]"); + outs(ANSI_RESET); + prints(" 目錄 Σ%-34s", title); + */ + outs(ANSI_COLOR(0;36)); + prints("Σ%-70.70s", title); + outs(ANSI_RESET); continue; } @@ -1262,7 +1272,7 @@ choose_board(int newflag) static int num = 0; boardstat_t *ptr; int head = -1, ch = 0, currmodetmp, tmp, tmp1, bidtmp; - char keyword[13] = "", buf[64]; + char keyword[13] = "", buf[PATHLEN]; setutmpmode(newflag ? READNEW : READBRD); if( get_fav_root() == NULL ) @@ -1705,7 +1715,7 @@ choose_board(int newflag) if (HasFavEditPerm() && nbrd[num].myattr & NBRD_FOLDER) { fav_type_t *ft = getfolder(nbrd[num].bid); strlcpy(buf, get_item_title(ft), sizeof(buf)); - getdata_buf(b_lines - 1, 0, "請輸入板名:", buf, 65, DOECHO); + getdata_buf(b_lines-1, 0, "請修改名稱: ", buf, BTLEN+1, DOECHO); fav_set_folder_title(ft, buf); brdnum = -1; } |