note 27662 added to ref.ncurses
| From: | joeldegan at rack1 dot php dot net | Date: | Sat, 14 Dec 2002 21:10:46 +0000 |
| Subject: | note 27662 added to ref.ncurses | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40911@lists.php.net to get a copy of this message | ||
I noticed a lack of a getxy() function so I wrote one.
You may need to change the path for your resize cmd.
<?
function getxy(){
$rez =
/usr/X11R6/bin/resize;
$rez = explode("\n",$rez);
while(list($key,$val)=each($rez)){
$a=explode("=",$val);
if(trim($a[0])=="COLUMNS"){ $COLUMNS = $a[1]; }
if(trim($a[0])=="LINES"){ $LINES = $a[1]; }
}//
$retval[0]=$COLUMNS;
$retval[1]=$LINES;
return $retval;
}
print_r(getxy());
?>
--
http://www.php.net/manual/en/ref.ncurses.php
http://master.php.net/manage/user-notes.php?action=edit+27662
http://master.php.net/manage/user-notes.php?action=delete+27662
http://master.php.net/manage/user-notes.php?action=reject+27662