diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/announce.c | 4 | ||||
-rw-r--r-- | mbbsd/bbs.c | 8 | ||||
-rw-r--r-- | mbbsd/board.c | 4 | ||||
-rw-r--r-- | mbbsd/cal.c | 81 | ||||
-rw-r--r-- | mbbsd/menu.c | 5 | ||||
-rw-r--r-- | mbbsd/more.c | 6 | ||||
-rw-r--r-- | mbbsd/read.c | 3 |
7 files changed, 3 insertions, 108 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index f63c5730..8b3a710a 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -818,10 +818,6 @@ a_menu(char *maintitle, char *path, int lastlevel) a_showhelp(me.level); me.page = 9999; break; - case Ctrl('C'): - cal(); - me.page = 9999; - break; case Ctrl('I'): t_idle(); diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index a50a69f3..7da699e0 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1130,7 +1130,7 @@ read_post(int ent, fileheader_t * fhdr, char *direct) setdirpath(genbuf, direct, fhdr->filename); if ((more_result = more(genbuf, YEA)) == -1) - return DONOTHING; + return FULLUPDATE; brc_addlist(fhdr->filename); strncpy(currtitle, subject(fhdr->title), TTLEN); @@ -1210,10 +1210,6 @@ read_post(int ent, fileheader_t * fhdr, char *direct) case '<': return THREAD_PREV; - case Ctrl('C'): - cal(); - return FULLUPDATE; - case Ctrl('I'): t_idle(); return FULLUPDATE; @@ -1484,6 +1480,8 @@ do_add_recommend(char *direct, fileheader_t *fhdr, int ent, char *buf) return -1; } + get_record(path, fhdr, sizeof(fhdr), ent); + if( fhdr->recommend < 100 ){ fileheader_t t; if( (fd = open(direct, O_WRONLY)) < 0 ) diff --git a/mbbsd/board.c b/mbbsd/board.c index 65bc7a19..0c50ede1 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -989,10 +989,6 @@ choose_board(int newflag) else num += p_lines; break; - case Ctrl('C'): - cal(); - show_brdlist(head, 1, newflag); - break; case Ctrl('I'): t_idle(); show_brdlist(head, 1, newflag); diff --git a/mbbsd/cal.c b/mbbsd/cal.c index 4d5bfe13..5c2b7cdc 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -467,84 +467,3 @@ ccount(float *a, float b, int cmode) } } -int -cal() -{ - float a = 0; - char flo = 0, ch = 0; - char mode[6] = {' ', '=', '+', '-', '*', '/'}, cmode = 0; - char b[20] = "0"; - - move(b_lines - 1, 0); - clrtoeol(); - outs("[ 0] [ ] "); - move(b_lines, 0); - clrtoeol(); - outs("\033[44m 小計算機 \033[31;47m (0123456789+-*/=) " - "\033[30m輸入 \033[31m " - "(Q)\033[30m 離開 \033[m"); - while (1) { - ch = igetch(); - switch (ch) { - case '\r': - ch = '='; - case '=': - case '+': - case '-': - case '*': - case '/': - ccount(&a, atof(b), cmode); - flo = 0; - b[0] = '0'; - b[1] = 0; - move(b_lines - 1, 0); - prints("[%13.2f] [%c] ", a, ch); - break; - case '.': - if (!flo) - flo = 1; - else - break; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '0': - if (strlen(b) > 13) - break; - if (flo || b[0] != '0') - snprintf(b, sizeof(b), "%s%c", b, ch); - else - b[0] = ch; - move(b_lines - 1, 0); - prints("[%13s] [%c]", b, mode[(int)cmode]); - break; - case 'q': - return 0; - } - - switch (ch) { - case '=': - a = 0; - cmode = 0; - break; - case '+': - cmode = 2; - break; - case '-': - cmode = 3; - break; - case '*': - cmode = 4; - break; - case '/': - cmode = 5; - break; - } - } -} diff --git a/mbbsd/menu.c b/mbbsd/menu.c index cbfcdc47..f3b43aa9 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -207,11 +207,6 @@ domenu(int cmdmode, char *cmdtitle, int cmd, commands_t cmdtable[]) do { i = -1; switch (cmd) { - case Ctrl('C'): - cal(); - i = lastcmdptr; - refscreen = YEA; - break; case Ctrl('I'): t_idle(); refscreen = YEA; diff --git a/mbbsd/more.c b/mbbsd/more.c index 2a476632..0bdb361c 100644 --- a/mbbsd/more.c +++ b/mbbsd/more.c @@ -471,12 +471,6 @@ more(char *fpath, int promptend) return 0; } break; - case Ctrl('C'): - cal(); - if (pageno) - pageno--; - lino = line = 0; - break; case Ctrl('T'): getdata(b_lines - 2, 0, "把這篇文章收入到暫存檔?[y/N] ", diff --git a/mbbsd/read.c b/mbbsd/read.c index 254678a8..537a1921 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -608,9 +608,6 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int ch, int bid) case Ctrl('L'): redoscr(); break; - /* - * case Ctrl('C'): cal(); return FULLUPDATE; break; - */ case KEY_ESC: if (KEY_ESC_arg == 'i') { t_idle(); |