cvs: php4 /ext/ncurses ncurses_functions.c

From: Date: Tue, 25 Dec 2001 13:34:06 +0000
Subject: cvs: php4 /ext/ncurses ncurses_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8808@lists.php.net to get a copy of this message
georg Tue Dec 25 08:34:06 2001 EDT Modified files: /php4/ext/ncurses ncurses_functions.c Log: functions ncurses_erasechar, ncurses_inch, mcurses_killchar: changed return values from bool to string (char) Index: php4/ext/ncurses/ncurses_functions.c diff -u php4/ext/ncurses/ncurses_functions.c:1.10 php4/ext/ncurses/ncurses_functions.c:1.11 --- php4/ext/ncurses/ncurses_functions.c:1.10 Thu Dec 13 09:40:40 2001 +++ php4/ext/ncurses/ncurses_functions.c Tue Dec 25 08:34:06 2001 @@ -304,11 +304,16 @@ } /* }}} */ -/* {{{ proto bool ncurses_erasechar() +/* {{{ proto string ncurses_erasechar() Return current erase character */ PHP_FUNCTION(ncurses_erasechar) { - RETURN_LONG(erasechar()); + char temp[2]; + + temp[0] = erasechar(); + temp[1] = '\0'; + + RETURN_STRINGL (temp, 1, 1); } /* }}} */ @@ -345,15 +350,19 @@ } /* }}} */ -/* {{{ proto bool ncurses_inch() +/* {{{ proto string ncurses_inch() Get character and attribute at current position */ PHP_FUNCTION(ncurses_inch) { - RETURN_LONG(inch()); + char temp[2]; + + temp[0] = inch(); + temp[1] = '\0'; + + RETURN_STRINGL (temp, 1, 1); } -/* }}} */ -/* {{{ proto bool ncurses_insertln() + /* {{{ proto bool ncurses_insertln() Insert a line, move rest of screen down */ PHP_FUNCTION(ncurses_insertln) { @@ -369,11 +378,16 @@ } /* }}} */ -/* {{{ proto bool ncurses_killchar() +/* {{{ proto string ncurses_killchar() Return current line kill character */ PHP_FUNCTION(ncurses_killchar) { - RETURN_LONG(killchar()); + char temp[2]; + + temp[0] = killchar(); + temp[1] = '\0'; + + RETURN_STRINGL (temp, 1, 1); } /* }}} */

« previous php.cvs (#8808) next »