diff options
-rw-r--r-- | include/proto.h | 2 | ||||
-rw-r--r-- | mbbsd/admin.c | 18 | ||||
-rw-r--r-- | mbbsd/announce.c | 4 | ||||
-rw-r--r-- | mbbsd/bbs.c | 10 | ||||
-rw-r--r-- | mbbsd/board.c | 12 | ||||
-rw-r--r-- | mbbsd/brc.c | 4 | ||||
-rw-r--r-- | mbbsd/cal.c | 12 | ||||
-rw-r--r-- | mbbsd/calendar.c | 2 | ||||
-rw-r--r-- | mbbsd/card.c | 12 | ||||
-rw-r--r-- | mbbsd/chat.c | 10 | ||||
-rw-r--r-- | mbbsd/chicken.c | 32 | ||||
-rw-r--r-- | mbbsd/dark.c | 6 | ||||
-rw-r--r-- | mbbsd/edit.c | 30 | ||||
-rw-r--r-- | mbbsd/friend.c | 4 | ||||
-rw-r--r-- | mbbsd/gamble.c | 2 | ||||
-rw-r--r-- | mbbsd/go.c | 2 | ||||
-rw-r--r-- | mbbsd/indict.c | 2 | ||||
-rw-r--r-- | mbbsd/io.c | 10 | ||||
-rw-r--r-- | mbbsd/lovepaper.c | 2 | ||||
-rw-r--r-- | mbbsd/mail.c | 30 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 21 | ||||
-rw-r--r-- | mbbsd/menu.c | 23 | ||||
-rw-r--r-- | mbbsd/merge.c | 2 | ||||
-rw-r--r-- | mbbsd/name.c | 4 | ||||
-rw-r--r-- | mbbsd/othello.c | 22 | ||||
-rw-r--r-- | mbbsd/page.c | 2 | ||||
-rw-r--r-- | mbbsd/passwd.c | 6 | ||||
-rw-r--r-- | mbbsd/random.c | 2 | ||||
-rw-r--r-- | mbbsd/register.c | 6 | ||||
-rw-r--r-- | mbbsd/screen.c | 23 | ||||
-rw-r--r-- | mbbsd/stuff.c | 4 | ||||
-rw-r--r-- | mbbsd/talk.c | 4 | ||||
-rw-r--r-- | mbbsd/term.c | 10 | ||||
-rw-r--r-- | mbbsd/topsong.c | 4 | ||||
-rw-r--r-- | mbbsd/user.c | 18 | ||||
-rw-r--r-- | mbbsd/vice.c | 2 | ||||
-rw-r--r-- | mbbsd/vote.c | 8 | ||||
-rw-r--r-- | mbbsd/xyz.c | 62 |
38 files changed, 217 insertions, 212 deletions
diff --git a/include/proto.h b/include/proto.h index 76a24cac..f654206c 100644 --- a/include/proto.h +++ b/include/proto.h @@ -344,7 +344,7 @@ int mail_all(void); int invalidaddr(char *addr); int do_send(char *userid, char *title); void my_send(char *uident); -void setupmailusage(); +void setupmailusage(void); /* mbbsd */ void show_call_in(int save, int which); diff --git a/mbbsd/admin.c b/mbbsd/admin.c index 40768fef..e2549d9c 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -3,7 +3,7 @@ /* ¶i¯¸¤ô²y«Å¶Ç */ int -m_loginmsg() +m_loginmsg(void) { char msg[100]; move(21,0); @@ -30,7 +30,7 @@ m_loginmsg() /* ¨Ï¥ÎªÌºÞ²z */ int -m_user() +m_user(void) { userec_t muser; int id; char genbuf[200]; @@ -170,7 +170,7 @@ search_key_user(char *passwdfile, int mode) /* ¥H¥ô·N key ´M§ä¨Ï¥ÎªÌ */ int -search_user_bypwd() +search_user_bypwd(void) { search_key_user(FN_PASSWD, 1); return 0; @@ -178,7 +178,7 @@ search_user_bypwd() /* ´M§ä³Æ¥÷ªº¨Ï¥ÎªÌ¸ê®Æ */ int -search_user_bybakpwd() +search_user_bybakpwd(void) { char *choice[] = { "PASSWDS.NEW1", "PASSWDS.NEW2", "PASSWDS.NEW3", @@ -625,7 +625,7 @@ m_mod_board(char *bname) /* ³]©w¬ÝªO */ int -m_board() +m_board(void) { char bname[32]; @@ -639,7 +639,7 @@ m_board() /* ³]©w¨t²ÎÀÉ®× */ int -x_file() +x_file(void) { int aborted; char ans[4], *fpath; @@ -1292,7 +1292,7 @@ scan_register_form(char *regfile, int automode, int neednum) } int -m_register() +m_register(void) { FILE *fn; int x, y, wid, len; @@ -1331,7 +1331,7 @@ m_register() } int -cat_register() +cat_register(void) { if (system("cat register.new.tmp >> register.new") == 0 && system("rm -f register.new.tmp") == 0) @@ -1359,7 +1359,7 @@ give_id_money(char *user_id, int money, FILE * log_fp, char *mail_title, time4_t } int -give_money() +give_money(void) { FILE *fp, *fp2; char *ptr, *id, *mn; diff --git a/mbbsd/announce.c b/mbbsd/announce.c index faa4eea0..ead713a9 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -696,7 +696,7 @@ a_showname(menu_t * pm) static char *a_title; static void -atitle() +atitle(void) { showtitle("ºëµØ¤å³¹", a_title); outs("[¡ö]Â÷¶} [¡÷]¾\\Ū [^P]µoªí¤å³¹ [b]³Æ§Ñ¿ý [d]§R°£ [q]ºëµØ°Ï " @@ -1070,7 +1070,7 @@ a_menu(char *maintitle, char *path, int lastlevel) static char *mytitle = BBSNAME "§G§iÄæ"; int -Announce() +Announce(void) { setutmpmode(ANNOUNCE); a_menu(mytitle, "man", diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index e4062050..af2b2fd9 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1300,7 +1300,7 @@ b_man(void) #ifndef NO_GAMBLE static int -stop_gamble() +stop_gamble(void) { boardheader_t *bp = getbcache(currbid); char fn_ticket[128], fn_ticket_end[128]; @@ -2196,7 +2196,7 @@ b_note_edit_bname(int bid) } static int -b_notes_edit() +b_notes_edit(void) { if (currmode & MODE_BOARD) { b_note_edit_bname(currbid); @@ -2206,7 +2206,7 @@ b_notes_edit() } static int -b_water_edit() +b_water_edit(void) { if (currmode & MODE_BOARD) { friend_edit(BOARD_WATER); @@ -2216,7 +2216,7 @@ b_water_edit() } static int -visable_list_edit() +visable_list_edit(void) { if (currmode & MODE_BOARD) { friend_edit(BOARD_VISABLE); @@ -2227,7 +2227,7 @@ visable_list_edit() } static int -b_post_note() +b_post_note(void) { char buf[200], yn[3]; if (currmode & MODE_BOARD) { diff --git a/mbbsd/board.c b/mbbsd/board.c index ff3fb610..1364eaf6 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -63,7 +63,7 @@ void imovefav(int old) } void -init_brdbuf() +init_brdbuf(void) { if (brc_initialize()) return; @@ -350,7 +350,7 @@ load_boards(char *key) } static int -search_board() +search_board(void) { int num; char genbuf[IDLEN + 2]; @@ -425,7 +425,7 @@ get_fav_type(boardstat_t *ptr) } static void -brdlist_foot() +brdlist_foot(void) { prints("\033[34;46m ¿ï¾Ü¬ÝªO \033[31;47m (c)\033[30m·s¤å³¹¼Ò¦¡ " "\033[31m(v/V)\033[30m¼Ð°O¤wŪ/¥¼Åª \033[31m(y)\033[30m¿z¿ï%s" @@ -1198,7 +1198,7 @@ choose_board(int newflag) } int -root_board() +root_board(void) { init_brdbuf(); class_bid = 1; @@ -1208,7 +1208,7 @@ root_board() } int -Boards() +Boards(void) { init_brdbuf(); class_bid = 0; @@ -1219,7 +1219,7 @@ Boards() int -New() +New(void) { int mode0 = currutmp->mode; int stat0 = currstat; diff --git a/mbbsd/brc.c b/mbbsd/brc.c index b1c6ee76..151501d7 100644 --- a/mbbsd/brc.c +++ b/mbbsd/brc.c @@ -135,7 +135,7 @@ brc_putrecord(char *ptr, char *endp, brcbid_t bid, } static inline int -brc_enlarge_buf() +brc_enlarge_buf(void) { char *buffer; if (brc_alloc >= BRC_MAXSIZE) @@ -287,7 +287,7 @@ read_old_brc(int fd) } inline static void -read_brc_buf() +read_brc_buf(void) { if (brc_buf == NULL) { char brcfile[STRLEN]; diff --git a/mbbsd/cal.c b/mbbsd/cal.c index a556c30b..48123958 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -49,7 +49,7 @@ lockutmpmode(int unmode, int state) } int -unlockutmpmode() +unlockutmpmode(void) { currutmp->lockmode = 0; return 0; @@ -241,7 +241,7 @@ osong(char *defaultid) } int -ordersong() +ordersong(void) { osong(NULL); return 0; @@ -260,7 +260,7 @@ inmailbox(int m) #if !HAVE_FREECLOAK /* ªá¿ú¿ï³æ */ int -p_cloak() +p_cloak(void) { if (getans(currutmp->invisible ? "½T©wn²{¨?[y/N]" : "½T©wnÁô¨?[y/N]") != 'y') return 0; @@ -274,7 +274,7 @@ p_cloak() #endif int -p_from() +p_from(void) { if (getans("½T©wn§ï¬G¶m?[y/N]") != 'y') return 0; @@ -290,7 +290,7 @@ p_from() } int -p_exmail() +p_exmail(void) { char ans[4], buf[200]; int n; @@ -361,7 +361,7 @@ give_tax(int money) } int -p_give() +p_give(void) { int money, tax; char id[IDLEN + 1], money_buf[20]; diff --git a/mbbsd/calendar.c b/mbbsd/calendar.c index 372dcc9a..385b9f82 100644 --- a/mbbsd/calendar.c +++ b/mbbsd/calendar.c @@ -260,7 +260,7 @@ GenerateCalendar(char **buf, int y, int m, int today, event_t * e) } int -calendar() +calendar(void) { char **buf; struct tm snow; diff --git a/mbbsd/card.c b/mbbsd/card.c index 6353e425..63567ddd 100644 --- a/mbbsd/card.c +++ b/mbbsd/card.c @@ -273,7 +273,7 @@ card_99_cpu(int cpu[], int *count) } int -card_99() +card_99(void) { int i, j, turn; int cpu[5], c[5], me[5], m[5]; @@ -385,7 +385,7 @@ game_log(int type, int money) } static int -card_double_ask() +card_double_ask(void) { char buf[100], buf2[3]; @@ -402,7 +402,7 @@ card_double_ask() } static int -card_ask() +card_ask(void) { char buf[100], buf2[3]; @@ -544,7 +544,7 @@ card_jack(int *db) } int -g_card_jack() +g_card_jack(void) { int db; char buf[3]; @@ -585,7 +585,7 @@ card_all(int all[]) } static int -ten_helf() +ten_helf(void) { int i, j; int cpu[5], c[5], me[5], m[5]; @@ -638,7 +638,7 @@ ten_helf() } int -g_ten_helf() +g_ten_helf(void) { char buf[3]; diff --git a/mbbsd/chat.c b/mbbsd/chat.c index 36763341..cad6a09b 100644 --- a/mbbsd/chat.c +++ b/mbbsd/chat.c @@ -25,7 +25,7 @@ printchatline(char *str) } static void -chat_clear() +chat_clear(void) { for (chatline = 2; chatline < STOP_LINE; chatline++) { move(chatline, 0); @@ -185,7 +185,7 @@ chat_help(char *arg) } static void -chat_date() +chat_date(void) { char genbuf[200]; @@ -195,7 +195,7 @@ chat_date() } static void -chat_pager() +chat_pager(void) { char genbuf[200]; @@ -242,7 +242,7 @@ chat_query(char *arg) } static void -chat_users() +chat_users(void) { printchatline(""); printchatline("¡i " BBSNAME "ªº¹C«È¦Cªí ¡j"); @@ -298,7 +298,7 @@ chat_cmd(char *buf, int fd) static int chatid_len = 10; int -t_chat() +t_chat(void) { char chatroom[IDLEN];/* Chat-Room Name */ char inbuf[80], chatid[20], lastcmd[MAXLASTCMD][80], *ptr = ""; diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index df354f38..7de5c848 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -83,7 +83,7 @@ static const short time_change[NUM_KINDS][14] = }; int -reload_chicken() +reload_chicken(void) { chicken_t *mychicken = &cuser.mychicken; @@ -99,7 +99,7 @@ reload_chicken() #define CHICKENLOG "etc/chicken" static int -new_chicken() +new_chicken(void) { chicken_t *mychicken = &cuser.mychicken; int price, i; @@ -260,7 +260,7 @@ show_chicken_data(chicken_t * thechicken, chicken_t * pkchicken) } static void -ch_eat() +ch_eat(void) { chicken_t *mychicken = &cuser.mychicken; if (mychicken->food) { @@ -280,7 +280,7 @@ ch_eat() } static void -ch_clean() +ch_clean(void) { chicken_t *mychicken = &cuser.mychicken; mychicken->clean = 0; @@ -291,7 +291,7 @@ ch_clean() } static void -ch_guess() +ch_guess(void) { char *guess[3] = {"°Å¤M", "¥ÛÀY", "¥¬"}, me, ch, win; @@ -317,7 +317,7 @@ ch_guess() } static void -ch_book() +ch_book(void) { chicken_t *mychicken = &cuser.mychicken; mychicken->book += time_change[(int)mychicken->type][BOOK]; @@ -327,7 +327,7 @@ ch_book() } static void -ch_kiss() +ch_kiss(void) { chicken_t *mychicken = &cuser.mychicken; mychicken->happy += time_change[(int)mychicken->type][HAPPY]; @@ -339,7 +339,7 @@ ch_kiss() } static void -ch_hit() +ch_hit(void) { chicken_t *mychicken = &cuser.mychicken; mychicken->attack += time_change[(int)mychicken->type][ATTACK]; @@ -387,7 +387,7 @@ ch_buyitem(int money, char *picture, int *item, int haveticket) } static void -ch_eatoo() +ch_eatoo(void) { chicken_t *mychicken = &cuser.mychicken; if (mychicken->oo > 0) { @@ -401,7 +401,7 @@ ch_eatoo() } static void -ch_eatmedicine() +ch_eatmedicine(void) { chicken_t *mychicken = &cuser.mychicken; if (mychicken->medicine > 0) { @@ -418,7 +418,7 @@ ch_eatmedicine() } static void -ch_kill() +ch_kill(void) { chicken_t *mychicken = &cuser.mychicken; int ans; @@ -437,7 +437,7 @@ ch_kill() } static int -ch_sell() +ch_sell(void) { chicken_t *mychicken = &cuser.mychicken; /* @@ -604,7 +604,7 @@ time_diff(chicken_t * thechicken) } static void -check_sick() +check_sick(void) { chicken_t *mychicken = &cuser.mychicken; /* ż¯fªº */ @@ -689,7 +689,7 @@ isdeadth(chicken_t * thechicken) } static void -ch_changename() +ch_changename(void) { chicken_t *mychicken = &cuser.mychicken; char newname[20] = ""; @@ -708,7 +708,7 @@ ch_changename() } static int -select_menu() +select_menu(void) { chicken_t *mychicken = &cuser.mychicken; char ch; @@ -851,7 +851,7 @@ recover_chicken(chicken_t * thechicken) #define lockreturn0(unmode, state) if(lockutmpmode(unmode, state)) return 0 int -chicken_main() +chicken_main(void) { chicken_t *mychicken = &cuser.mychicken; lockreturn0(CHICKEN, LOCK_MULTI); diff --git a/mbbsd/dark.c b/mbbsd/dark.c index 4aa36349..95337a53 100644 --- a/mbbsd/dark.c +++ b/mbbsd/dark.c @@ -95,7 +95,7 @@ Is_move(sint y, sint x, sint ly, sint lx) } static void -brd_rand() +brd_rand(void) { sint y, x, index; sint tem[32]; @@ -119,7 +119,7 @@ brd_rand() } static void -brd_prints() +brd_prints(void) { clear(); move(1, 0); @@ -166,7 +166,7 @@ draw_line(sint y, sint f) } static void -redraw() +redraw(void) { sint i = 0; for (; i < 4; i++) diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 368dab1d..29d5a91d 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -351,7 +351,7 @@ show_phone_mode_panel(void) * Show the bottom status/help bar, and BIG5/table in phone_mode. */ static void -edit_msg() +edit_msg(void) { int n = curr_buf->currpnt; @@ -507,7 +507,7 @@ window_scroll_up(void) * Get the current line number in the window now. */ static int -get_lineno_in_window() +get_lineno_in_window(void) { int cnt = 0; textline_t *p = curr_buf->currline; @@ -645,7 +645,7 @@ ask(char *prompt) * return 0 if non or not in indent mode. */ static int -indent_space() +indent_space(void) { textline_t *p; int spcs; @@ -930,7 +930,7 @@ join(textline_t * line) } static void -delete_char() +delete_char(void) { register int len; @@ -1003,7 +1003,7 @@ read_tmpbuf(int n) } static void -write_tmpbuf() +write_tmpbuf(void) { FILE *fp; char fp_tmpbuf[80], ans[4]; @@ -1028,7 +1028,7 @@ write_tmpbuf() } static void -erase_tmpbuf() +erase_tmpbuf(void) { char fp_tmpbuf[80]; char ans[4] = "n"; @@ -1046,7 +1046,7 @@ erase_tmpbuf() *(³Ì¦h³Æ¥÷ 512 ¦æ (?)) */ void -auto_backup() +auto_backup(void) { if (curr_buf == NULL) return; @@ -1074,7 +1074,7 @@ auto_backup() * ¨ú¦^½s¿è¾¹³Æ¥÷ */ void -restore_backup() +restore_backup(void) { char bakfile[80], buf[80]; @@ -1115,7 +1115,7 @@ garbage_line(char *str) } static void -do_quote() +do_quote(void) { int op; char buf[256]; @@ -1192,7 +1192,7 @@ do_quote() * ¼f¬d user ¤Þ¨¥ªº¨Ï¥Î */ static int -check_quote() +check_quote(void) { register textline_t *p = curr_buf->firstline; register char *str; @@ -1765,7 +1765,7 @@ block_select(void) } static void -block_shift_left() +block_shift_left(void) { textline_t *p, *end; @@ -1791,7 +1791,7 @@ block_shift_left() * new place, otherwise, put insert_c instead. */ static void -block_shift_right() +block_shift_right(void) { textline_t *p, *end; @@ -1930,7 +1930,7 @@ goto_line(int lino) } static void -prompt_goto_line() +prompt_goto_line(void) { char buf[10]; @@ -2015,7 +2015,7 @@ search_str(int mode) * move the cursor from bracket to corresponding bracket. */ static void -match_paren() +match_paren(void) { char *parens = "()[]{}"; int type; @@ -2233,7 +2233,7 @@ transform_to_color(char *line) } static void -block_color() +block_color(void) { textline_t *begin, *end, *p; diff --git a/mbbsd/friend.c b/mbbsd/friend.c index bbb84983..1c419fb6 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -457,14 +457,14 @@ friend_edit(int type) } int -t_override() +t_override(void) { friend_edit(FRIEND_OVERRIDE); return 0; } int -t_reject() +t_reject(void) { friend_edit(FRIEND_REJECT); return 0; diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index f10e026d..235cdf42 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -365,7 +365,7 @@ openticket(int bid) } int -ticket_main() +ticket_main(void) { ticket(0); return 0; @@ -629,7 +629,7 @@ GO_result(struct GOData *gd) } void -GO_cleantable() +GO_cleantable(void) { move(1, 0); outs( diff --git a/mbbsd/indict.c b/mbbsd/indict.c index ba1d84e8..deb9ba09 100644 --- a/mbbsd/indict.c +++ b/mbbsd/indict.c @@ -162,7 +162,7 @@ use_dict(char *dict,char *database) } int -x_dict() +x_dict(void) { char dict[41], database[41]; if (choose_dict(dict,sizeof(dict),database,sizeof(database))) @@ -35,7 +35,7 @@ inline static int write_wrapper(int fd, void *buf, size_t count) { /* output routines */ /* ----------------------------------------------------- */ void -oflush() +oflush(void) { if (obufsize) { #ifdef CONVERT @@ -48,7 +48,7 @@ oflush() } void -init_buf() +init_buf(void) { memset(inbuf, 0, IBUFSIZE); @@ -105,7 +105,7 @@ add_io(int fd, int timeout) } int -num_in_buf() +num_in_buf(void) { return icurrchar - ibufsize; } @@ -117,7 +117,7 @@ num_in_buf() */ static int -dogetch() +dogetch(void) { int len; static time4_t lastact; @@ -209,7 +209,7 @@ dogetch() static int water_which_flag = 0; int -igetch() +igetch(void) { register int ch, mode = 0, last = 0; while ((ch = dogetch())) { diff --git a/mbbsd/lovepaper.c b/mbbsd/lovepaper.c index b7d4c143..5d0eb59c 100644 --- a/mbbsd/lovepaper.c +++ b/mbbsd/lovepaper.c @@ -3,7 +3,7 @@ #define DATA "etc/lovepaper.dat" int -x_love() +x_love(void) { char buf1[200], save_title[TTLEN + 1]; char receiver[61], path[STRLEN] = "home/"; diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 1a195b75..dd336f6a 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -7,7 +7,7 @@ static int mailkeep = 0, mailsum = 0; static int mailsumlimit = 0, mailmaxkeep = 0; int -setforward() +setforward(void) { char buf[80], ip[50] = "", yn[4]; FILE *fp; @@ -36,7 +36,7 @@ setforward() } int -built_mail_index() +built_mail_index(void) { char genbuf[128]; @@ -115,7 +115,7 @@ invalidaddr(char *addr) } int -m_internet() +m_internet(void) { char receiver[60]; @@ -130,13 +130,13 @@ m_internet() } void -m_init() +m_init(void) { sethomedir(currmaildir, cuser.userid); } void -setupmailusage() +setupmailusage(void) { // Ptt: get_sum_records is a bad function int max_keepmail = MAX_KEEPMAIL; if( HAS_PERM(PERM_SYSSUBOP | PERM_ACCTREG | PERM_PRG | @@ -157,7 +157,7 @@ setupmailusage() } int -chkmailbox() +chkmailbox(void) { if (!HAVE_PERM(PERM_SYSOP) && !HAVE_PERM(PERM_MAILLIMIT)) { if(!mailkeep) setupmailusage(); @@ -318,7 +318,7 @@ my_send(char *uident) } int -m_send() +m_send(void) { char uident[40]; @@ -538,7 +538,7 @@ multi_reply(int ent, fileheader_t * fhdr, char *direct) } int -mail_list() +mail_list(void) { stand_title("¸s²Õ§@·~"); multi_send(NULL); @@ -546,7 +546,7 @@ mail_list() } int -mail_all() +mail_all(void) { FILE *fp; fileheader_t mymail; @@ -624,7 +624,7 @@ mail_all() } int -mail_mbox() +mail_mbox(void) { char cmd[100]; fileheader_t fhdr; @@ -763,7 +763,7 @@ read_new_mail(void * voidfptr, void *optarg) } int -m_new() +m_new(void) { struct ReadNewMailArg arg; clear(); @@ -789,7 +789,7 @@ m_new() } static void -mailtitle() +mailtitle(void) { char buf[256]; @@ -1032,7 +1032,7 @@ static char * const mail_help[] = { }; static int -m_help() +m_help(void) { show_help(mail_help); return FULLUPDATE; @@ -1150,7 +1150,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, char *direct) } int -mail_man() +mail_man(void) { char buf[64], buf1[64]; int mode0 = currutmp->mode; @@ -1390,7 +1390,7 @@ static const onekey_t mail_comms[] = { }; int -m_read() +m_read(void) { int back_bid; if (get_num_records(currmaildir, sizeof(fileheader_t))) { diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 6ead76d6..2bfe7173 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -12,8 +12,6 @@ #define SOCKET_QLEN 4 -#define TH_LOW 100 -#define TH_HIGH 120 static void do_aloha(char *hello); static void getremotename(struct sockaddr_in * from, char *rhost, char *rname); @@ -52,7 +50,7 @@ signal_restart(int signum, void (*handler) (int)) } static void -start_daemon() +start_daemon(void) { int n, fd; @@ -225,7 +223,7 @@ abort_bbs_debug(int sig) /* µn¿ý BBS µ{¦¡ */ static void -mysrand() +mysrand(void) { srandom(time(NULL) + getpid()); /* ®É¶¡¸ò pid ·í rand ªº seed */ } @@ -462,7 +460,7 @@ write_request(int sig) } static void -multi_user_check() +multi_user_check(void) { register userinfo_t *ui; register pid_t pid; @@ -538,7 +536,7 @@ inline static void mkuserdir(char *userid) } static void -login_query() +login_query(void) { #ifdef CONVERT /* uid ¥[¤@¦ì, for gb login */ @@ -896,7 +894,7 @@ inline static void foreign_warning(void){ static void -user_login() +user_login(void) { char i; struct tm *ptime, *tmp; @@ -947,7 +945,7 @@ user_login() inet_pton(AF_INET, strrchr(frombuf, ':') + 1, &xsin.sin_addr); else inet_pton(AF_INET, frombuf, &xsin.sin_addr); - getremotename(&xsin, fromhost, remoteusername); /* FC931 */ + getremotename(&xsin, fromhost, remoteusername); /* RFC931 */ } /* ªì©l¤Æ uinfo¡Bflag¡Bmode */ @@ -1037,7 +1035,7 @@ do_aloha(char *hello) } static void -do_term_init() +do_term_init(void) { term_init(); initscr(); @@ -1046,7 +1044,7 @@ do_term_init() } inline static void -start_client() +start_client(void) { #ifdef CPULIMIT struct rlimit rml; @@ -1097,7 +1095,7 @@ start_client() /* FSA (finite state automata) for telnet protocol */ static void -telnet_init() +telnet_init(void) { const static char svr[] = { IAC, DO, TELOPT_TTYPE, @@ -1135,7 +1133,6 @@ telnet_init() * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ -#define STRN_CPY(d,s,l) { strncpy((d),(s),(l)); (d)[(l)-1] = 0; } #define RFC931_TIMEOUT 10 #define RFC931_PORT 113 /* Semi-well-known port */ #define ANY_PORT 0 /* Any old port will do */ diff --git a/mbbsd/menu.c b/mbbsd/menu.c index f4a2b8d8..8e196afc 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -97,7 +97,7 @@ show_status(void) } static int -u_movie() +u_movie(void) { cuser.uflag ^= MOVIE_FLAG; return 0; @@ -547,43 +547,50 @@ static int forsearch() { /* main menu */ -int admin() +int +admin(void) { domenu(ADMIN, "¨t²ÎºûÅ@", 'X', adminlist); return 0; } -int Mail() +int +Mail(void) { domenu(MAIL, "¹q¤l¶l¥ó", 'R', maillist); return 0; } -int Talk() +int +Talk(void) { domenu(TMENU, "²á¤Ñ»¡¸Ü", 'U', talklist); return 0; } -int User() +int +User(void) { domenu(UMENU, "Ó¤H³]©w", 'I', userlist); return 0; } -int Xyz() +int +Xyz(void) { domenu(XMENU, "¤u¨ãµ{¦¡", 'M', xyzlist); return 0; } -int Play_Play() +int +Play_Play(void) { domenu(PMENU, "ºô¸ô¹C¼Ö³õ", 'A', playlist); return 0; } -int Name_Menu() +int +Name_Menu(void) { domenu(NMENU, "¥Õ¦â®£©Æ", 'O', namelist); return 0; diff --git a/mbbsd/merge.c b/mbbsd/merge.c index 678e5fe6..720bb506 100644 --- a/mbbsd/merge.c +++ b/mbbsd/merge.c @@ -6,7 +6,7 @@ #include "fpg.h" int -m_sob() +m_sob(void) { char genbuf[256], buf[256], userid[25], passbuf[24], msg[2048]=""; int count=0, i, isimported=0, corrected; diff --git a/mbbsd/name.c b/mbbsd/name.c index 60afab03..40c3d39e 100644 --- a/mbbsd/name.c +++ b/mbbsd/name.c @@ -43,7 +43,7 @@ UserSubArray(char cwbuf[][IDLEN + 1], char cwlist[][IDLEN + 1], } void -FreeNameList() +FreeNameList(void) { word_t *p, *temp; @@ -55,7 +55,7 @@ FreeNameList() } void -CreateNameList() +CreateNameList(void) { if (toplev) FreeNameList(); diff --git a/mbbsd/othello.c b/mbbsd/othello.c index 38f9175d..6a96e0da 100644 --- a/mbbsd/othello.c +++ b/mbbsd/othello.c @@ -61,7 +61,7 @@ static const char init_table[NR_TABLE + 1][5][5] = { {0, 2, 1, 1, 1}} }; -static char table[NR_TABLE + 1][10][10]; +static char evaltable[NR_TABLE + 1][10][10]; static void print_chess(int x, int y, char chess) { @@ -74,7 +74,7 @@ print_chess(int x, int y, char chess) } static void -printboard() +printboard(void) { int i; @@ -278,7 +278,7 @@ end_of_game(int quit) } static void -othello_redraw() +othello_redraw(void) { int i, j; @@ -360,7 +360,7 @@ player(char color) } static void -init() +init(void) { int i, j, i1, j1; @@ -371,8 +371,8 @@ init() for (j = 1; j <= 8; j++) { i1 = 4.5 - abs(4.5 - i); j1 = 4.5 - abs(4.5 - j); - table[0][i][j] = init_table[0][i1][j1]; - table[1][i][j] = init_table[1][i1][j1]; + evaltable[0][i][j] = init_table[0][i1][j1]; + evaltable[1][i][j] = init_table[1][i1][j1]; } for (i = 1; i <= 8; i++) for (j = 1; j <= 8; j++) @@ -382,7 +382,7 @@ init() } static void -report() +report(void) { int i, j; @@ -409,9 +409,9 @@ EVL(char chessboard[][10], int color, int table_number) for (b = 1; b <= 8; b++) if (chessboard[a][b] > HINT) { if (chessboard[a][b] == BLACK) - points += table[table_number][a][b]; + points += evaltable[table_number][a][b]; else - points -= table[table_number][a][b]; + points -= evaltable[table_number][a][b]; } return ((color == BLACK) ? points : -points); } @@ -493,7 +493,7 @@ Computer(int thinkstep, int table) } static int -choose() +choose(void) { char thinkstep[2]; @@ -525,7 +525,7 @@ choose() #define lockreturn0(unmode, state) if(lockutmpmode(unmode, state)) return 0 int -othello_main() +othello_main(void) { lockreturn0(OTHELLO, LOCK_MULTI); clear(); diff --git a/mbbsd/page.c b/mbbsd/page.c index dff54689..25cdfd81 100644 --- a/mbbsd/page.c +++ b/mbbsd/page.c @@ -22,7 +22,7 @@ print_station(const char * const addr[6][100], int path, int *line, int *num) } int -main_railway() +main_railway(void) { fileheader_t mhdr; char genbuf[200]; diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c index f7df438c..5f6100be 100644 --- a/mbbsd/passwd.c +++ b/mbbsd/passwd.c @@ -22,7 +22,7 @@ union semun { #endif int -passwd_init() +passwd_init(void) { semid = semget(PASSWDSEM_KEY, 1, SEM_R | SEM_A | IPC_CREAT | IPC_EXCL); if (semid == -1) { @@ -122,7 +122,7 @@ passwd_apply(int (*fptr) (int, userec_t *)) } void -passwd_lock() +passwd_lock(void) { struct sembuf buf = {0, -1, SEM_UNDO}; @@ -133,7 +133,7 @@ passwd_lock() } void -passwd_unlock() +passwd_unlock(void) { struct sembuf buf = {0, 1, SEM_UNDO}; diff --git a/mbbsd/random.c b/mbbsd/random.c index 2405ea92..dd369c41 100644 --- a/mbbsd/random.c +++ b/mbbsd/random.c @@ -693,7 +693,7 @@ __setstate (arg_state) pointer if the front one has wrapped. Returns a 31-bit random number. */ long int -__random () +__random (void) { int32_t retval; diff --git a/mbbsd/register.c b/mbbsd/register.c index 2230e339..f2413f39 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -135,7 +135,7 @@ check_and_expire_account(int uid, userec_t * urec) int -getnewuserid() +getnewuserid(void) { char genbuf[50]; char *fn_fresh = ".fresh"; @@ -184,7 +184,7 @@ getnewuserid() } void -new_register() +new_register(void) { userec_t newuser; char passbuf[STRLEN]; @@ -280,7 +280,7 @@ new_register() void -check_register() +check_register(void) { char *ptr = NULL; diff --git a/mbbsd/screen.c b/mbbsd/screen.c index 49ff84a2..43f1b7e1 100644 --- a/mbbsd/screen.c +++ b/mbbsd/screen.c @@ -17,7 +17,7 @@ static int scrollcnt, tc_col, tc_line; void -initscr() +initscr(void) { if (!big_picture) { big_picture = (screenline_t *) calloc(scr_lns, sizeof(screenline_t)); @@ -100,7 +100,7 @@ standoutput(char *buf, int ds, int de, int sso, int eso) } void -redoscr() +redoscr(void) { register screenline_t *bp; register int i, j, len; @@ -138,7 +138,8 @@ redoscr() oflush(); } -void redoln() +void +redoln(void) { screenline_t *slp = GetCurrentLine(); int len, mode; @@ -163,7 +164,7 @@ void redoln() } void -refresh() +refresh(void) { /* TODO remove unnecessary refresh() call, to save CPU time */ register screenline_t *bp = big_picture; @@ -235,7 +236,7 @@ refresh() } void -clear() +clear(void) { register screenline_t *slp; @@ -250,7 +251,7 @@ clear() } void -clrtoeol() +clrtoeol(void) { register screenline_t *slp = GetCurrentLine(); register int ln; @@ -293,7 +294,7 @@ clrtoline(int line) * ±q¥Ø«eªº¦æ¼Æ(scr_ln) clear ¨ì©³ */ inline void -clrtobot() +clrtobot(void) { clrtoline(scr_lns); } @@ -434,7 +435,7 @@ mouts(int y, int x, char *str) } void -scroll() +scroll(void) { scrollcnt++; if (++roll >= scr_lns) @@ -444,7 +445,7 @@ scroll() } void -rscroll() +rscroll(void) { scrollcnt--; if (--roll < 0) @@ -480,7 +481,7 @@ region_scroll_up(int top, int bottom) } void -standout() +standout(void) { if (!standing && strtstandoutlen) { register screenline_t *slp; @@ -493,7 +494,7 @@ standout() } void -standend() +standend(void) { if (standing && strtstandoutlen) { register screenline_t *slp; diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 1bcfb60a..48c29c26 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -525,7 +525,7 @@ Cdatedate(time4_t * clock) #ifndef _BBS_UTIL_C_ /* ³o¤@°Ï³£¬O¦³Ãö©óµe±³B²zªº, ¬G _BBS_UTIL_C_ ¤£¶·n */ static void -capture_screen() +capture_screen(void) { char fname[200]; FILE *fp; @@ -667,7 +667,7 @@ show_file(char *filename, int y, int lines, int mode) } void -bell() +bell(void) { char c; diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 0604f444..0c8004fe 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -1567,7 +1567,7 @@ my_talk(userinfo_t * uin, int fri_stat, char defact) #define US_REDRAW 1231 static void -t_showhelp() +t_showhelp(void) { clear(); @@ -2777,7 +2777,7 @@ t_query(void) } int -t_talk() +t_talk(void) { char uident[16]; int tuid, unum, ucount; diff --git a/mbbsd/term.c b/mbbsd/term.c index 2b674340..3162844e 100644 --- a/mbbsd/term.c +++ b/mbbsd/term.c @@ -13,7 +13,7 @@ char *tgoto(const char *cap, int col, int row); /* basic tty control */ /* ----------------------------------------------------- */ void -init_tty() +init_tty(void) { struct termios tty_state, tty_new; @@ -86,7 +86,7 @@ term_resize(int sig) } int -term_init() +term_init(void) { Signal(SIGWINCH, term_resize); return YEA; @@ -103,14 +103,14 @@ do_move(int destcol, int destline) } void -save_cursor() +save_cursor(void) { ochar('\33'); ochar('7'); } void -restore_cursor() +restore_cursor(void) { ochar('\33'); ochar('8'); @@ -127,7 +127,7 @@ change_scroll_range(int top, int bottom) } void -scroll_forward() +scroll_forward(void) { ochar('\33'); ochar('D'); diff --git a/mbbsd/topsong.c b/mbbsd/topsong.c index 07931aa0..41adc53f 100644 --- a/mbbsd/topsong.c +++ b/mbbsd/topsong.c @@ -19,7 +19,7 @@ count_cmp(songcmp_t * b, songcmp_t * a) } int -topsong() +topsong(void) { more(FN_TOPSONG, YEA); return 0; @@ -36,7 +36,7 @@ strip_blank(char *cbuf, char *buf) } void -sortsong() +sortsong(void) { FILE *fo, *fp = fopen(BBSHOME "/" FN_USSONG, "r"); songcmp_t songs[MAX_SONGS + 1]; diff --git a/mbbsd/user.c b/mbbsd/user.c index 3200777e..a0a136ff 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -27,7 +27,7 @@ kill_user(int num) return 0; } int -u_loginview() +u_loginview(void) { int i; unsigned int pbits = cuser.loginview; @@ -763,7 +763,7 @@ uinfo_query(userec_t * u, int real, int unum) } int -u_info() +u_info(void) { move(2, 0); user_display(&cuser, 0); @@ -773,14 +773,14 @@ u_info() } int -u_cloak() +u_cloak(void) { outs((currutmp->invisible ^= 1) ? MSG_CLOAKED : MSG_UNCLOAK); return XEASY; } int -u_switchproverb() +u_switchproverb(void) { /* char *state[4]={"¥Î¥\\«¬","¦w¶h«¬","¦Û©w«¬","SHUTUP"}; */ char buf[100]; @@ -799,7 +799,7 @@ u_switchproverb() } int -u_editproverb() +u_editproverb(void) { char buf[100]; @@ -899,7 +899,7 @@ showsignature(char *fname, int *j) } int -u_editsig() +u_editsig(void) { int aborted; char ans[4]; @@ -938,7 +938,7 @@ u_editsig() } int -u_editplan() +u_editplan(void) { char genbuf[200]; @@ -964,7 +964,7 @@ u_editplan() } int -u_editcalendar() +u_editcalendar(void) { char genbuf[200]; @@ -1630,7 +1630,7 @@ u_list_CB(int num, userec_t * uentp) } int -u_list() +u_list(void) { char genbuf[3]; diff --git a/mbbsd/vice.c b/mbbsd/vice.c index ef527b72..460a1c5a 100644 --- a/mbbsd/vice.c +++ b/mbbsd/vice.c @@ -80,7 +80,7 @@ ran_showmfile(char *filename, int maxnum) int -vice_main() +vice_main(void) { FILE *fd; char tbingo[6][15]; diff --git a/mbbsd/vote.c b/mbbsd/vote.c index bc470232..8906b4e8 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -384,7 +384,7 @@ b_close(boardheader_t * fh, vote_buffer_t *vbuf) } static int -b_closepolls() +b_closepolls(void) { boardheader_t *fhp; int pos, dirty; @@ -1087,19 +1087,19 @@ vote_results(char *bname) } int -b_vote_maintain() +b_vote_maintain(void) { return vote_maintain(currboard); } int -b_vote() +b_vote(void) { return user_vote(currboard); } int -b_results() +b_results(void) { return vote_results(currboard); } diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c index 003f5a51..1837c508 100644 --- a/mbbsd/xyz.c +++ b/mbbsd/xyz.c @@ -5,7 +5,7 @@ /* ¦UºØ²Îp¤Î¬ÛÃö¸ê°T¦Cªí */ /* Ptt90¦~«×¤j¾ÇÁp©Û¬dº]¨t²Î */ int -x_90() +x_90(void) { use_dict("(90)ã¦ÒÃÒ¸¹/©m¦W/¾Ç®Õ/¬ì¨t/Ãþ²Õ", "etc/90"); return 0; @@ -13,21 +13,21 @@ x_90() /* Ptt89¦~«×¤j¾ÇÁp©Û¬dº]¨t²Î */ int -x_89() +x_89(void) { use_dict("(89)ã¦ÒÃÒ¸¹/©m¦W/¾Ç®Õ/¬ì¨t/Ãþ²Õ", "etc/89"); return 0; } /* Ptt88¦~«×¤j¾ÇÁp©Û¬dº]¨t²Î */ int -x_88() +x_88(void) { use_dict("(88)ã¦ÒÃÒ¸¹/©m¦W/¾Ç®Õ/¬ì¨t/Ãþ²Õ", "etc/88"); return 0; } /* Ptt87¦~«×¤j¾ÇÁp©Û¬dº]¨t²Î */ int -x_87() +x_87(void) { use_dict("(87)ã¦ÒÃÒ¸¹/©m¦W/¾Ç®Õ/¬ì¨t", "etc/87"); return 0; @@ -35,7 +35,7 @@ x_87() /* Ptt86¦~«×¤j¾ÇÁp©Û¬dº]¨t²Î */ int -x_86() +x_86(void) { use_dict("(86)ã¦ÒÃÒ¸¹/©m¦W/¾Ç®Õ/¬ì¨t", "etc/86"); return 0; @@ -43,21 +43,21 @@ x_86() #endif int -x_boardman() +x_boardman(void) { more("etc/topboardman", YEA); return 0; } int -x_user100() +x_user100(void) { more("etc/topusr100", YEA); return 0; } int -x_history() +x_history(void) { more("etc/history", YEA); return 0; @@ -65,7 +65,7 @@ x_history() #ifdef HAVE_X_BOARDS static int -x_boards() +x_boards(void) { more("etc/topboard.tmp", YEA); return 0; @@ -73,70 +73,70 @@ x_boards() #endif int -x_birth() +x_birth(void) { more("etc/birth.today", YEA); return 0; } int -x_weather() +x_weather(void) { more("etc/weather.tmp", YEA); return 0; } int -x_mrtmap() +x_mrtmap(void) { more("etc/MRT.map", YEA); return 0; } int -x_stock() +x_stock(void) { more("etc/stock.tmp", YEA); return 0; } int -x_note() +x_note(void) { more(fn_note_ans, YEA); return 0; } int -x_issue() +x_issue(void) { more("etc/day", YEA); return 0; } int -x_week() +x_week(void) { more("etc/week", YEA); return 0; } int -x_today() +x_today(void) { more("etc/today", YEA); return 0; } int -x_yesterday() +x_yesterday(void) { more("etc/yesterday", YEA); return 0; } int -x_login() +x_login(void) { more("etc/Welcome_login.0", YEA); return 0; @@ -144,7 +144,7 @@ x_login() #ifdef HAVE_INFO static int -x_program() +x_program(void) { more("etc/version", YEA); return 0; @@ -153,7 +153,7 @@ x_program() #ifdef HAVE_LICENSE static int -x_gpl() +x_gpl(void) { more("etc/GPL", YEA); return 0; @@ -161,7 +161,7 @@ x_gpl() #endif int -note() +note(void) { char *fn_note_tmp = "note.tmp"; char *fn_note_dat = "note.dat"; @@ -232,13 +232,13 @@ note() collect = 1; while (total) { - snprintf(buf, sizeof(buf), "\033[1;31mùú¢t\033[32m %s \033[37m(%s)", + snprintf(buf, sizeof(buf), "\033[1;31mùÝ¢t\033[32m %s \033[37m(%s)", myitem.userid, myitem.username); len = strlen(buf); for (i = len; i < 71; i++) strcat(buf, " "); - snprintf(buf2, sizeof(buf2), " \033[1;36m%.16s\033[31m ¢uùû\033[m\n", + snprintf(buf2, sizeof(buf2), " \033[1;36m%.16s\033[31m ¢uùß\033[m\n", Cdate(&(myitem.date))); strcat(buf, buf2); fputs(buf, fp); @@ -251,12 +251,12 @@ note() fprintf(foo, "\033[1;31m¢x\033[m%-74.74s\033[1;31m¢x\033[m\n", myitem.buf[i]); } - fputs("\033[1;31mùü¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" - "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢sùý\033[m\n", fp); + fputs("\033[1;31mùã¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" + "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢sùå\033[m\n", fp); if (collect) { - fputs("\033[1;31mùü¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" - "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢sùý\033[m\n", foo); + fputs("\033[1;31mùã¢s¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w" + "¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢w¢sùå\033[m\n", foo); fclose(foo); collect = 0; } @@ -276,7 +276,7 @@ note() } static void -mail_sysop() +mail_sysop(void) { FILE *fp; char genbuf[200]; @@ -328,7 +328,7 @@ mail_sysop() } int -m_sysop() +m_sysop(void) { setutmpmode(MSYSOP); mail_sysop(); @@ -336,7 +336,7 @@ m_sysop() } int -Goodbye() +Goodbye(void) { char genbuf[100]; |