From 6dda73a2fe9b365bfd979859b924b463976a0ca6 Mon Sep 17 00:00:00 2001 From: kcwu Date: Sun, 28 Aug 2005 05:00:05 +0000 Subject: pass arguments only if they really need. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3099 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/read.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mbbsd/read.c') diff --git a/mbbsd/read.c b/mbbsd/read.c index 75e144e8..14cf4e8c 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -845,7 +845,9 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, if (func != NULL){ num = locmem->crs_ln - bottom_line; - if( num > 0 ){ + if(!rcmdlist[ch - 1].needitem) + mode = (*func)(); + else if( num > 0 ){ sprintf(direct,"%s.bottom", currdirect); mode= (*func)(num, &headers[locmem->crs_ln-locmem->top_ln], direct); -- cgit v1.2.3