// TODO // move this function to vtuikit.c void cursor_clear(int row, int column) { move(row, column); if (HasUserFlag(UF_CURSOR_ASCII)) outs(STR_UNCUR); else outs(STR_UNCUR2); if (HasUserFlag(UF_MENU_LIGHTBAR)) { grayout(row, row + 1, GRAYOUT_COLORNORM); } }
// TODO // move this function to vtuikit.c void cursor_show(int row, int column) { if (HasUserFlag(UF_MENU_LIGHTBAR)) { grayout(row, row + 1, GRAYOUT_COLORBOLD); } move(row, column); if (HasUserFlag(UF_CURSOR_ASCII)) { outs(STR_CURSOR); move(row, column); } else { outs(STR_CURSOR2); move(row, column + 1); } }
static int _iter_paste_tag(void *item, void *optarg) { char buf[PATHLEN]; char title[TTLEN + 1] = "◇ "; fileheader_t *fhdr = (fileheader_t*) item; _iter_paste_tag_param *param = (_iter_paste_tag_param*) optarg; param->item ++; // XXX many process crashed here as fhdr.filename[0] == 0 // let's workaround it? or trace? if (!fhdr->filename[0]) { grayout(0, b_lines-2, GRAYOUT_DARK); move(b_lines-1, 0); clrtobot(); prints("處理 #%d 項發生錯誤。 請把你剛剛進行的完整步驟貼到 " BN_BUGREPORT " 板。\n", param->item); vmsg("忽略錯誤並繼續進行。"); return 0; } if (!FindTaggedItem(fhdr)) return 0; if (TagBoard == 0) sethomefile(buf, cuser.userid, fhdr->filename); else { setbfile(buf, param->bh->brdname, fhdr->filename); } if (!dashf(buf)) return 0; strlcpy(title + 3, fhdr->title, sizeof(title) - 3); a_copyitem(buf, title, 0, 0); if (param->mode) { param->mode--; a_pasteitem(param->pm, 0); } else a_appenditem(param->pm, 0); param->copied++; RemoveTagItem(fhdr); return IsEmptyTagList(); }
void bbslua_logo(lua_State *L) { int y, by = b_lines -1; // print - back from bottom int i = 0; double tocinterface = 0; int tocs = 0; char msg[STRLEN]; // get toc information lua_getglobal(L, "toc"); lua_getfield(L, -1, bbsluaTocTags[0]); tocinterface = lua_tonumber(L, -1); lua_pop(L, 1); // query print-able toc tags for (i = BLCONF_PRINT_TOC_INDEX; bbsluaTocTags[i]; i++) { lua_getfield(L, -1, bbsluaTocTags[i]); if (lua_tostring(L, -1)) tocs++; lua_pop(L, 1); } // prepare logo window grayout(0, b_lines, GRAYOUT_DARK); // print compatibility test // now (by) is the base of new information if (tocinterface == 0) { by -= 4; y = by+2; move(y-1, 0); outs(ANSI_COLOR(0; 31; 47)); fullmsg(""); fullmsg(" ▲ 此程式缺少相容性資訊,您可能無法正常執行"); fullmsg(" 若執行出現錯誤,請向原作者取得新版"); fullmsg(""); }