作者uiLtreblA (啦人球地是的真我)
看板PttBug
標題Re: [問題] 【閱讀新進信件】 無法使用
時間Sun Sep 19 12:36:10 2004
※ 引述《uiLtreblA (啦人球地是的真我)》之銘言:
: in2長輩您好:
:
: 小弟收到新郵件後,有看到 郵差來按鈴囉
: 但是,進到 私人信件區 的 閱讀新進郵件,系統卻一直告訴我:
:
: ◆ 沒有新信件了 [按任意鍵繼續]
:
: 只能從 多功能讀信選單 去讀新進郵件。
:
: 謝謝您。
以下是小弟的解決方法,不知道是否正確,請長輩指示。
Index: mbbsd/recoard.c
================================================================
--- mbbsd/recoard.c (revision 2203)
+++ mbbsd/recoard.c (working copy)
@@ -429,7 +429,7 @@
char abuf[BUFSIZE];
int fp;
- if((fp=open(fpath, O_RDONLY, 0))) return -1;
+ if((fp=open(fpath, O_RDONLY, 0)) == -1) return -1;
while (read(fp, abuf, size) == (size_t)size)
if ((*fptr) (abuf) == QUIT) {
因為小弟 man 了一下 open() 發現:
RETURN VALUES
If successful, open() returns a non-negative integer, termed a file
descriptor. It returns -1 on failure, and sets errno to indicate the
error.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.163.9.138