diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-29 03:35:29 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-29 03:35:29 +0800 |
commit | 747db9b7bed623d2d957aa14dbc6a505cf763be8 (patch) | |
tree | 479cf6940e240c6e6e2f8435e13d97f9269788c5 /mbbsd/bbcall.c | |
parent | 980b8d2d2504b7299ceee845aff46c1f593e498f (diff) | |
download | pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.gz pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.bz2 pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.lz pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.xz pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.tar.zst pttbbs-747db9b7bed623d2d957aa14dbc6a505cf763be8.zip |
change getdata() constant to sizeof()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@131 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbcall.c')
-rw-r--r-- | mbbsd/bbcall.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mbbsd/bbcall.c b/mbbsd/bbcall.c index d7b2d33b..8fdc56d2 100644 --- a/mbbsd/bbcall.c +++ b/mbbsd/bbcall.c @@ -1,4 +1,4 @@ -/* $Id: bbcall.c,v 1.1 2002/03/07 15:13:48 in2 Exp $ */ +/* $Id: bbcall.c,v 1.2 2002/04/28 19:35:28 in2 Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -150,14 +150,14 @@ static void halpha0943(char* CoId) { int Year = 99, Month = 1, Day = 15, Hour = 13, Minute = 8; sprintf(tmpbuf, "\033[1;37m請輸入您要傳呼的號碼\033[m : %s-", CoId); - if(!getdata(7,0, tmpbuf, ID, 7, LCECHO) || + if(!getdata(7,0, tmpbuf, ID, sizeof(ID), LCECHO) || !getdata(8,0, "\033[1;37m請輸入傳呼訊息\033[m:", tmpbuf, 63, LCECHO)) { hpressanykey("放棄傳呼"); return; } pager_msg_encode(Msg,tmpbuf); getdata(9, 0, "\033[1;37m如果你要馬上送請按 '1' " - "如果要定時送請按 '2': \033[m", ans, 2, LCECHO); + "如果要定時送請按 '2': \033[m", ans, sizeof(ans), LCECHO); if(ans[0] != '1') gettime(0, &Year, &Month, &Day, &Hour, &Minute); @@ -179,14 +179,14 @@ static void hcall0941() { int year = 98, month = 12, day = 4, hour = 13, min = 8; if(!getdata(7, 0, "\033[1;37 請您輸入您要傳呼的號碼 : 0941- \033[m", - PAGER_NO, 7, LCECHO) || + PAGER_NO, sizeof(PAGER_NO), LCECHO) || !getdata(8, 0, "\033[1;37m請輸入傳呼訊息\033[m:", trn, 17, LCECHO)) { hpressanykey("放棄傳呼"); return; } pager_msg_encode(TRAN_MSG,trn); getdata(9,0, "\033[1;37m如果你要馬上送請按 '1' " - "如果要定時送請按 '2': \033[m", ans, 2, LCECHO); + "如果要定時送請按 '2': \033[m", ans, sizeof(ans), LCECHO); if(ans[0] != '1') { strcpy(TIME,"DELAY"); gettime(0, &year, &month, &day, &hour, &min); @@ -212,14 +212,14 @@ static void hcall0948() { clrtoeol(); if(!getdata(7, 0, "\033[1;37m請輸入您要傳呼的號碼\033[m:0948-", - svc_no, 7, LCECHO) || + svc_no, sizeof(svc_no), LCECHO) || !getdata(8, 0, "\033[1;37m請輸入傳呼訊息\033[m:", trn, 61, LCECHO)) { hpressanykey("放棄傳呼"); return; } pager_msg_encode(message, trn); getdata(9, 0, "\033[1;37m如果你要馬上送請按 '1' " - "如果要定時送請按 '2'\033[m: ", ans, 2, LCECHO); + "如果要定時送請按 '2'\033[m: ", ans, sizeof(ans), LCECHO); if(ans[0] != '1') { gettime(1, &year, &month, &day, &hour, &min); ya = 1; @@ -248,7 +248,7 @@ int main_bbcall() { " (4)0948 \033[m\n"); prints("\033[1;31m └────────────────────" "─────────┘\033[m\n"); - getdata(7, 8, "\033[1;37m你的選擇? [1-4]\033[m", ch, 2, LCECHO); + getdata(7, 8, "\033[1;37m你的選擇? [1-4]\033[m", ch, sizeof(ch), LCECHO); switch(ch[0]) { case '1': |