diff options
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r-- | mbbsd/mail.c | 67 |
1 files changed, 16 insertions, 51 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index 04c54c97..6198004b 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -24,20 +24,14 @@ setforward() getdata(b_lines, 0, "�T�w�}�Ҧ۰���H�\\��?(Y/n)", yn, sizeof(yn), LCECHO); if (yn[0] != 'n' && (fp = fopen(buf, "w"))) { - move(b_lines, 0); - clrtoeol(); fprintf(fp, "%s", ip); fclose(fp); - outs("�]�w����!"); - refresh(); + vmsg("�]�w����!"); return 0; } } - move(b_lines, 0); - clrtoeol(); - outs("�����۰���H!"); unlink(buf); - refresh(); + vmsg("�����۰���H!"); return 0; } @@ -163,27 +157,13 @@ chkmailbox() mailmaxkeep = max_keepmail + cuser.exmailbox; m_init(); if ((mailkeep = get_num_records(currmaildir, sizeof(fileheader_t))) > - mailmaxkeep) { - move(b_lines, 0); - clrtoeol(); - bell(); - prints("�z�O�s�H��ƥ� %d �W�X�W�� %d, �о�z", - mailkeep, mailmaxkeep); + mailmaxkeep || + (mailsum = get_sum_records(currmaildir, sizeof(fileheader_t))) > + mailsumlimit) { bell(); - refresh(); - igetch(); - return mailkeep; - } - if ((mailsum = get_sum_records(currmaildir, sizeof(fileheader_t))) > - mailsumlimit) { - move(b_lines, 0); - clrtoeol(); bell(); - prints("�z�O�s�H��e�q %d(k)�W�X�W�� %d(k), �о�z", - mailsum, mailsumlimit); - bell(); - refresh(); - igetch(); + vmsg("�z�O�s�H��ƥةήe�q %d �W�X�W�� %d, �о�z", + mailkeep, mailmaxkeep); return mailkeep; } } @@ -498,13 +478,9 @@ multi_send(char *title) if (vedit(fpath, YEA, NULL) == -1) { unlink(fpath); curredit = 0; - outs(msg_cancel); - pressanykey(); + vmsg(msg_cancel); return; } - stand_title("�H�H��..."); - refresh(); - listing = 80; for (p = toplev; p; p = p->next) { @@ -530,15 +506,14 @@ multi_send(char *title) mymail.filemode |= FILE_MULTI; /* multi-send flag */ sethomedir(genbuf, p->word); if (append_record_forward(genbuf, &mymail, sizeof(mymail)) == -1) - outs(err_uid); + vmsg(err_uid); mailalert(p->word); } hold_mail(fpath, NULL); unlink(fpath); curredit = 0; } else - outs(msg_cancel); - pressanykey(); + vmsg(msg_cancel); } static int @@ -636,8 +611,7 @@ mail_all() outs(err_uid); snprintf(genbuf, sizeof(genbuf), "%*s %5d / %5d", IDLEN + 1, userid, i + 1, unum); - outmsg(genbuf); - refresh(); + vmsg(genbuf); } } return 0; @@ -746,10 +720,7 @@ read_new_mail(fileheader_t * fptr) multi_reply(idc, fptr, currmaildir); return FULLUPDATE; } - move(b_lines, 0); - clrtoeol(); - outs(msg_mailer); - refresh(); + outmsg(msg_mailer); switch (igetch()) { case 'r': @@ -923,10 +894,7 @@ mail_read(int ent, fileheader_t * fhdr, char *direct) multi_reply(ent, fhdr, direct); return FULLUPDATE; } - move(b_lines, 0); - clrtoeol(); - refresh(); - outs(msg_mailer); + outmsg(msg_mailer); switch (igetch()) { case 'r': @@ -1606,8 +1574,7 @@ doforward(char *direct, fileheader_t * fh, int mode) strlcpy(address, cuser.email, sizeof(address)); if( mode == 'U' ){ - move(b_lines, 0); - prints("�N�i�� uuencode �C�Y�z���M������O uuencode �Ч�� F��H�C"); + vmsg("�N�i�� uuencode �C�Y�z���M������O uuencode �Ч�� F��H�C"); } if (address[0]) { @@ -1632,7 +1599,7 @@ doforward(char *direct, fileheader_t * fh, int mode) snprintf(address, sizeof(address), "%s.bbs@%s", fname, MYHOSTNAME); } else { - outmsg("������H"); + vmsg("������H"); return 1; } } while (mode == 'Z' && strstr(address, MYHOSTNAME)); @@ -1640,9 +1607,7 @@ doforward(char *direct, fileheader_t * fh, int mode) if (invalidaddr(address)) return -2; - snprintf(fname, sizeof(fname), "����H�� %s, �еy��...", address); - outmsg(fname); - move(b_lines, 0); + outmsg("����H�еy��..."); refresh(); /* �l�ܨϥΪ� */ |