]> granicus.if.org Git - php/commitdiff
ncurses goes sibiria^Wpecl
authorHartmut Holzgraefe <hholzgra@php.net>
Thu, 5 Jan 2006 20:10:10 +0000 (20:10 +0000)
committerHartmut Holzgraefe <hholzgra@php.net>
Thu, 5 Jan 2006 20:10:10 +0000 (20:10 +0000)
13 files changed:
ext/ncurses/CREDITS [deleted file]
ext/ncurses/EXPERIMENTAL [deleted file]
ext/ncurses/c-prototypes [deleted file]
ext/ncurses/config.m4 [deleted file]
ext/ncurses/example1.php [deleted file]
ext/ncurses/ncurses.c [deleted file]
ext/ncurses/ncurses.php [deleted file]
ext/ncurses/ncurses_fe.c [deleted file]
ext/ncurses/ncurses_functions.c [deleted file]
ext/ncurses/package.xml [deleted file]
ext/ncurses/php_ncurses.h [deleted file]
ext/ncurses/php_ncurses_fe.h [deleted file]
ext/ncurses/tests/001.phpt [deleted file]

diff --git a/ext/ncurses/CREDITS b/ext/ncurses/CREDITS
deleted file mode 100644 (file)
index 312b522..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ncurses
-Ilia Alshanetsky, Wez Furlong, Hartmut Holzgraefe, Georg Richter
diff --git a/ext/ncurses/EXPERIMENTAL b/ext/ncurses/EXPERIMENTAL
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/ext/ncurses/c-prototypes b/ext/ncurses/c-prototypes
deleted file mode 100644 (file)
index c98bd29..0000000
+++ /dev/null
@@ -1,263 +0,0 @@
-+ int addch(int);                              
-+ int addchnstr(int *,int);            
-+ int addchstr(int *);                 
-+ int addnstr(string,int);                     
-+ int addstr(string);                  
-+ int assume_default_colors (int,int);
-- int attr_get(int *,int *,void *);            
-- int attr_off(int,void *);                    
-- int attr_on(int,void *);                     
-- int attr_set(int,int,void *);                
-+ int attroff(int);                    
-+ int attron(int);                     
-+ int attrset(int);                    
-+ int baudrate(void);                          
-+ int beep(void);                                      
-+ int bkgd(int);                               
-+ void bkgdset(int);                           
-+ int border(int,int,int,int,int,int,int,int); 
-- int box(resource,int,int);           
-+ bool can_change_color(void);                 
-+ int cbreak(void);                            
-- int chgat(int,int,int,void *);       
-+ int clear(void);                                     
-- int clearok(resource,bool);                  
-+ int clrtobot(void);                          
-+ int clrtoeol(void);                          
-- int color_content(int,int*,int*,int*);       
-+ int color_set(int,void*);                    
-- int copywin(resource,resource,int,int,int,int,int,int,int);  
-+ int curs_set(int);                           
-+ int def_prog_mode(void);                             
-+ int def_shell_mode(void);                    
-+ int define_key (string,int);
-+ int delay_output(int);                               
-+ int delch(void);                                     
-+ int deleteln(void);                          
-- void delscreen(SCREEN *);                    
-+ int delwin(resource);                                
-+ int doupdate(void);                          
-+ int echo(void);                                                      
-+ int echochar(int);                   
-+ int endwin(void);                            
-+ int erase(void);                                     
-+ char erasechar(void);                                
-+ void filter(void);                           
-+ int flash(void);                                     
-+ int flushinp(void);                          
-- int getbkgd(resource);                       
-+ int getch(void);                                     
-- int getmouse(MEVENT *);
-- int getnstr(string,int);                     
-- int getstr(string);                          
-+ int halfdelay(int);                          
-+ bool has_colors(void);                               
-+ bool has_ic(void);                           
-+ bool has_il(void);                           
-+ int has_key(int);            /* do we have given key? */
-+ int hline(int,int);                          
-- void idcok(resource,bool);                   
-- int idlok(resource,bool);                    
-- void immedok(resource,bool);                 
-+ int inch(void);                              
--ma int inchnstr(int *,int);                   
-- int inchstr(int *);                          
-+ int init_color(int,int,int,int);             
-+ int init_pair(int,int,int);          
-- int innstr(string,int);                              
-+ int insch(int);                              
-+ int insdelln(int);                           
-+ int insertln(void);                          
-- int insnstr(string,int);                     
-+ int insstr(string);                  
-+ int instr(string);                           
-- int intrflush(resource,bool);                        
-- bool is_linetouched(resource,int);           
-- bool is_wintouched(resource);                        
-+ bool isendwin(void);                         
-- int keyok (int,bool);
-- int keypad(resource,bool);                   
-+ char killchar(void);                         
-- int leaveok(resource,bool);                  
-- int mcprint(string,int);     /* direct data to printer */
-- int meta(resource,bool);                             
-+ int mouseinterval(int);
-- mmask_t mousemask(mmask_t,mmask_t *);
-+ int move(int,int);                           
-+ int mvaddch(int,int,int);            
-+ int mvaddchnstr(int,int,int *,int);  
-+ int mvaddchstr(int,int,int *);       
-+ int mvaddnstr(int,int,string,int);   
-+ int mvaddstr(int,int,string);                
-- int mvchgat(int,int,int,int,int,void *);     
-+ int mvcur(int,int,int,int);                  
-+ int mvdelch(int,int);                                
-- int mvderwin(resource,int,int);              
-+ int mvgetch(int,int);                                
-- int mvgetnstr(int,int,string,int);           
-- int mvgetstr(int,int,string);                        
-+ int mvhline(int,int,int,int);                
-+ int mvinch(int,int);                         
-- int mvinchnstr(int,int,int *,int);           
-- int mvinchstr(int,int,int *);                
-- int mvinnstr(int,int,string,int);            
-- int mvinsch(int,int,int);                    
-- int mvinsnstr(int,int,string,int);   
-- int mvinsstr(int,int,string);                
-- int mvinstr(int,int,string);                 
-- int mvprintw(int,int, string,...);
-- int mvscanw(int,int, string,...);
-- int mvwaddch(resource,int,int,int);  
-- int mvwaddchnstr(resource,int,int,int *,int);
-- int mvwaddchstr(resource,int,int,int *);     
-- int mvwaddnstr(resource,int,int,string,int); 
-- int mvwaddstr(resource,int,int,string);      
-- int mvwchgat(resource,int,int,int,int,int,void *);
-- int mvwdelch(resource,int,int);              
-- int mvwgetch(resource,int,int);              
-- int mvwgetnstr(resource,int,int,string,int); 
-- int mvwgetstr(resource,int,int,string);      
-- int mvwhline(resource,int,int,int,int);      
-- int mvwin(resource,int,int);                 
-- int mvwinch(resource,int,int);                       
-- int mvwinchstr(resource,int,int,int *);              
-- int mvwinnstr(resource,int,int,string,int);          
-- int mvwinsch(resource,int,int,int);          
-- int mvwinsnstr(resource,int,int,string,int); 
-- int mvwinsstr(resource,int,int,string);              
-- int mvwinstr(resource,int,int,string);               
-- int mvwinchnstr(resource,int,int,int *,int); 
-- int mvwprintw(resource,int,int, string,...); 
-- int mvwscanw(resource,int,int, string,...);
-- int mvwvline(resource,int,int,int,int);      
-+ int napms(int);                                      
-+ int nl(void);                                        
-+ int nocbreak(void);                          
-- int nodelay(resource,bool);                  
-+ int noecho(void);                            
-+ int nonl(void);                                      
-+ void noqiflush(void);                                
-+ int noraw(void);                                     
-- int notimeout(resource,bool);                        
-- int overlay(resource,resource);              
-- int overwrite(resource,resource);            
-- int pair_content(int,int*,int*);             
-- int pechochar(resource,int);         
-- int pnoutrefresh(resource,int,int,int,int,int,int);
-- int prefresh(resource,int,int,int,int,int,int);      
-- int printw( string,...);             
-+ int putp(string);                            
-- int putwin(resource,FILE *);                 
-+ void qiflush(void);                          
-+ int raw(void);                                       
-- int redrawwin(resource);                             
-+ int refresh(void);                           
-- int reset_prog_mode(void);                   
-- int reset_shell_mode(void);                  
-+ int resetty(void);                           
-- int resizeterm (int,int);
-- int ripoffline(int,int (*init)(resource,int));       
-+ int savetty(void);                           
-- int scanw( string,...);              
-+ int scr_dump(string);                        
-+ int scr_init(string);                        
-+ int scr_restore(string);                     
-+ int scr_set(string);                 
-+ int scrl(int);                                       
-- int scroll(resource);                                
-- int scrollok(resource,bool);                 
-- int setscrreg(int,int);                              
-+ int slk_attroff(int);                        
-- int slk_attr_off(int,void *);                /* generated:WIDEC */
-+ int slk_attron(int);                 
-- int slk_attr_on(int,void*);                  /* generated:WIDEC */
-+ int slk_attrset(int);                        
-+ int slk_attr(void);                          
-- int slk_attr_set(int,int,void*);     
-+ int slk_clear(void);                         
-+ int slk_color(int);                          
-+ int slk_init(int);                           
-+ int slk_noutrefresh(void);                   
-- int slk_refresh(void);                               
-- int slk_restore(void);                               
-- int slk_set(int,string,int);         
-- int slk_touch(void);                         
-+ int standend(void);                          
-+ int standout(void);                          
-+ int start_color(void);                               
-- int syncok(resource,bool);                   
-+ int termattrs(void);                         
-- int tigetflag( string);              
-- int tigetnum( string);               
-+ void timeout(int);                           
-+ int typeahead(int);                          
-+ int ungetch(int);                            
-- int ungetmouse(MEVENT *);
-- int untouchwin(resource);                    
-+ int use_default_colors (void);
-+ void use_env(bool);                          
-+ int use_extended_names (bool);
-+ int vidattr(int);                            
-- int vidputs(int,int (*)(int));               
-- int vline(int,int);                          
-- int vw_printw(resource, string,va_list);     
-- int vw_scanw(resource, string,va_list);      
-- int vwprintw(resource, string,va_list);      
-- int vwscanw(resource, string,va_list);       
-- int waddch(resource,int);            
-- int waddchnstr(resource,int *const,int); 
-- int waddchstr(resource,int *);               
-- int waddnstr(resource,stringconst,int);      
-- int waddstr(resource,string);                
-- int wattr_get(resource,int *,int *,void *);  
-- int wattr_off(resource, int,void *); 
-- int wattr_on(resource, int,void *);  
-- int wattr_set(resource,int,int,void *);              
-- int wattroff(resource,int);                  
-- int wattron(resource,int);                   
-- int wattrset(resource,int);                  
-- int wbkgd(resource,int);             
-- void wbkgdset(resource,int);                 
-- int wborder(resource,int,int,int,int,int,int,int,int);       
-- int wchgat(resource,int,int,int,void *);
-- int wclear(resource);                                
-- int wclrtobot(resource);                             
-- int wclrtoeol(resource);                             
-- int wcolor_set(resource,int,void*);          
-- void wcursyncup(resource);                   
-- int wdelch(resource);                                
-- int wdeleteln(resource);                             
-- int wechochar(resource,int);         
-- bool wenclose(resource,int,int);
-- int werase(resource);                                
-- int wgetch(resource);                                
-- int wgetnstr(resource,string,int);           
-- int wgetstr(resource,string);                        
-- int whline(resource,int,int);                
-- int winch(resource);                         
-- int winchnstr(resource,int *,int);           
-- int winchstr(resource,int *);                
-- int winnstr(resource,string,int);            
-- int winsch(resource,int);                    
-- int winsdelln(resource,int);                 
-- int winsertln(resource);                             
-- int winsnstr(resource,string,int);   
-- int winsstr(resource,string);                
-- int winstr(resource,string);                 
-- bool wmouse_trafo(resource win,int* y,int* x,bool to_screen);
-- int wmove(resource,int,int);                 
-- int wnoutrefresh(resource);                  
-- int wprintw(resource, string,...);   
-- int wredrawln(resource,int,int);                     
-- int wrefresh(resource);                              
-- int wresize (resource,int,int);
-- int wscanw(resource,string,...);     
-- int wscrl(resource,int);                             
-- int wsetscrreg(resource,int,int);            
-- int wstandend(resource);                             
-- int wstandout(resource);                             
-- void wsyncdown(resource);                    
-- void wsyncup(resource);                              
-- void wtimeout(resource,int);                 
-- int wtouchln(resource,int,int,int);          
-- int wvline(resource,int,int);                        
diff --git a/ext/ncurses/config.m4 b/ext/ncurses/config.m4
deleted file mode 100644 (file)
index 6024103..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-dnl
-dnl $Id$
-dnl
-
-PHP_ARG_WITH(ncurses, for ncurses support,
-[  --with-ncurses[=DIR]    Include ncurses support (CLI/CGI only)])
-
-if test "$PHP_NCURSES" != "no"; then
-
-   SEARCH_PATH="$PHP_NCURSES /usr/local /usr"     
-
-   for dir in $SEARCH_PATH; do
-    for subdir in include/ncurses include; do
-     if test -d $dir/$subdir; then
-       if test -r $dir/$subdir/ncurses.h; then
-         NCURSES_DIR=$dir
-         NCURSES_INCDIR=$dir/$subdir
-         AC_DEFINE(HAVE_NCURSES_H,1,[ ])
-         break 2
-       elif test -r $dir/$subdir/curses.h; then
-         NCURSES_DIR=$dir
-         NCURSES_INCDIR=$dir/$subdir
-         break 2
-       fi
-     fi
-    done
-   done
-  
-   if test -z "$NCURSES_DIR"; then
-     AC_MSG_RESULT(not found)
-     AC_MSG_ERROR(Please reinstall the ncurses distribution)
-   fi
-
-   # --with-ncurses -> add include path
-   PHP_ADD_INCLUDE($NCURSES_INCDIR)
-
-   # --with-ncurses -> chech for lib and symbol presence
-   LIBNAME=ncurses 
-   LIBSYMBOL=initscr 
-
-   PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, [
-     AC_DEFINE(HAVE_NCURSESLIB,1,[ ])
-     PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/$PHP_LIBDIR, NCURSES_SHARED_LIBADD)
-
-     PHP_CHECK_LIBRARY(panel, new_panel, [
-       AC_DEFINE(HAVE_NCURSES_PANEL,1,[ ])
-       PHP_ADD_LIBRARY_WITH_PATH(panel, $NCURSES_DIR/$PHP_LIBDIR, NCURSES_SHARED_LIBADD)
-     ], [], [ 
-       -L$NCURSES_DIR/$PHP_LIBDIR -l$LIBNAME -lm
-     ])
-   ], [
-     AC_MSG_ERROR(Wrong ncurses lib version or lib not found)
-   ], [
-     -L$NCURSES_DIR/$PHP_LIBDIR -lm
-   ])
-   AC_CHECK_LIB($LIBNAME, color_set,   [AC_DEFINE(HAVE_NCURSES_COLOR_SET,  1, [ ])])
-   AC_CHECK_LIB($LIBNAME, slk_color,   [AC_DEFINE(HAVE_NCURSES_SLK_COLOR,  1, [ ])])
-   AC_CHECK_LIB($LIBNAME, assume_default_colors,   [AC_DEFINE(HAVE_NCURSES_ASSUME_DEFAULT_COLORS,  1, [ ])])
-   AC_CHECK_LIB($LIBNAME, use_extended_names,   [AC_DEFINE(HAVE_NCURSES_USE_EXTENDED_NAMES,  1, [ ])])
-
-   PHP_NEW_EXTENSION(ncurses, ncurses.c ncurses_fe.c ncurses_functions.c, $ext_shared, cli)
-   PHP_SUBST(NCURSES_SHARED_LIBADD)
-
-fi
diff --git a/ext/ncurses/example1.php b/ext/ncurses/example1.php
deleted file mode 100644 (file)
index ca6977d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-$n=0;
-ncurses_init();
-if(ncurses_has_colors()){
-ncurses_start_color();
-        ncurses_init_pair(1,NCURSES_COLOR_RED,NCURSES_COLOR_BLACK);
-        ncurses_init_pair(2,NCURSES_COLOR_GREEN,NCURSES_COLOR_BLACK);
-        ncurses_init_pair(3,NCURSES_COLOR_YELLOW,NCURSES_COLOR_BLACK);
-        ncurses_init_pair(4,NCURSES_COLOR_BLUE,NCURSES_COLOR_BLACK);
-        ncurses_init_pair(5,NCURSES_COLOR_MAGENTA,NCURSES_COLOR_BLACK);
-        ncurses_init_pair(6,NCURSES_COLOR_CYAN,NCURSES_COLOR_BLACK);
-        ncurses_init_pair(7,NCURSES_COLOR_WHITE,NCURSES_COLOR_BLACK);
-}
-while(1){
-for ($x=0; $x<80; $x++) {
-for ($y=0; $y<24; $y++) {
-  $n++;
-  ncurses_move($y,$x);
-  ncurses_addch($n+64);
-  ncurses_color_set($n%8);
-  ncurses_refresh();
-  if($n>26)$n=0;
-}
-}
-ncurses_getch();
-}
-?>
-
diff --git a/ext/ncurses/ncurses.c b/ext/ncurses/ncurses.c
deleted file mode 100644 (file)
index 2216ec4..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP Version 5                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2006 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.01 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available through the world-wide-web at the following url:           |
-   | http://www.php.net/license/3_01.txt                                  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Author: Hartmut Holzgraefe <hholzgra@php.net>                        |
-   +----------------------------------------------------------------------+
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "php_ncurses.h"
-#include "ext/standard/info.h"
-
-ZEND_DECLARE_MODULE_GLOBALS(ncurses)
-
-/* True global resources - no need for thread safety here */
-int le_ncurses_windows;
-#if HAVE_NCURSES_PANEL
-int le_ncurses_panels;
-#endif
-
-static void ncurses_destruct_window(zend_rsrc_list_entry *rsrc TSRMLS_DC)
-{
-       WINDOW **pwin = (WINDOW **)rsrc->ptr;
-
-       delwin(*pwin);
-       efree(pwin);
-}
-
-#if HAVE_NCURSES_PANEL
-static void ncurses_destruct_panel(zend_rsrc_list_entry *rsrc TSRMLS_DC)
-{
-       PANEL **ppanel = (PANEL **)rsrc->ptr;
-
-       del_panel(*ppanel);
-       efree(ppanel);
-}
-#endif
-
-/* {{{ ncurses_module_entry
- */
-zend_module_entry ncurses_module_entry = {
-       STANDARD_MODULE_HEADER,
-       "ncurses",
-       ncurses_functions,
-       PHP_MINIT(ncurses),
-       PHP_MSHUTDOWN(ncurses),
-       NULL,
-       NULL,
-       PHP_MINFO(ncurses),
-       NO_VERSION_YET,
-       STANDARD_MODULE_PROPERTIES
-};
-/* }}} */
-
-#ifdef COMPILE_DL_NCURSES
-ZEND_GET_MODULE(ncurses)
-#endif
-
-#define PHP_NCURSES_CONST(x)  REGISTER_LONG_CONSTANT("NCURSES_"#x, x, CONST_CS | CONST_PERSISTENT)
-#define PHP_NCURSES_FKEY_CONST(x)  REGISTER_LONG_CONSTANT("NCURSES_KEY_F"#x, KEY_F0 + x, CONST_CS | CONST_PERSISTENT)
-
-static void php_ncurses_init_globals(zend_ncurses_globals *ncurses_globals)
-{
-       memset(ncurses_globals, 0, sizeof(*ncurses_globals));
-}
-
-/* {{{ PHP_MINIT_FUNCTION
- */
-PHP_MINIT_FUNCTION(ncurses)
-{
-       /* color constants */
-       PHP_NCURSES_CONST(COLOR_BLACK);
-       PHP_NCURSES_CONST(COLOR_RED);
-       PHP_NCURSES_CONST(COLOR_GREEN);
-       PHP_NCURSES_CONST(COLOR_YELLOW);
-       PHP_NCURSES_CONST(COLOR_BLUE);
-       PHP_NCURSES_CONST(COLOR_MAGENTA);
-       PHP_NCURSES_CONST(COLOR_CYAN);
-       PHP_NCURSES_CONST(COLOR_WHITE);
-
-       /* keyboard constants */
-       PHP_NCURSES_CONST(KEY_DOWN);
-       PHP_NCURSES_CONST(KEY_UP);
-       PHP_NCURSES_CONST(KEY_LEFT);
-       PHP_NCURSES_CONST(KEY_RIGHT);
-       PHP_NCURSES_CONST(KEY_BACKSPACE);
-       PHP_NCURSES_CONST(KEY_MOUSE);
-       PHP_NCURSES_CONST(KEY_F0);
-
-
-       /* TODO:this macro sux, we have 65 function key,
-          so we need a little loop */
-       PHP_NCURSES_FKEY_CONST(1);
-       PHP_NCURSES_FKEY_CONST(2);
-       PHP_NCURSES_FKEY_CONST(3);
-       PHP_NCURSES_FKEY_CONST(4);
-       PHP_NCURSES_FKEY_CONST(5);
-       PHP_NCURSES_FKEY_CONST(6);
-       PHP_NCURSES_FKEY_CONST(7);
-       PHP_NCURSES_FKEY_CONST(8);
-       PHP_NCURSES_FKEY_CONST(9);
-       PHP_NCURSES_FKEY_CONST(10);
-       PHP_NCURSES_FKEY_CONST(11);
-       PHP_NCURSES_FKEY_CONST(12);
-
-       PHP_NCURSES_CONST(KEY_DL);
-       PHP_NCURSES_CONST(KEY_IL);
-       PHP_NCURSES_CONST(KEY_DC);
-       PHP_NCURSES_CONST(KEY_IC);
-       PHP_NCURSES_CONST(KEY_EIC);
-       PHP_NCURSES_CONST(KEY_CLEAR);
-       PHP_NCURSES_CONST(KEY_EOS);
-       PHP_NCURSES_CONST(KEY_EOL);
-       PHP_NCURSES_CONST(KEY_SF);
-       PHP_NCURSES_CONST(KEY_SR);
-       PHP_NCURSES_CONST(KEY_NPAGE);
-       PHP_NCURSES_CONST(KEY_PPAGE);
-       PHP_NCURSES_CONST(KEY_STAB);
-       PHP_NCURSES_CONST(KEY_CTAB);
-       PHP_NCURSES_CONST(KEY_CATAB);
-       PHP_NCURSES_CONST(KEY_ENTER);
-       PHP_NCURSES_CONST(KEY_SRESET);
-       PHP_NCURSES_CONST(KEY_RESET);
-       PHP_NCURSES_CONST(KEY_PRINT);
-       PHP_NCURSES_CONST(KEY_LL);
-       PHP_NCURSES_CONST(KEY_A1);
-       PHP_NCURSES_CONST(KEY_A3);
-       PHP_NCURSES_CONST(KEY_B2);
-       PHP_NCURSES_CONST(KEY_C1);
-       PHP_NCURSES_CONST(KEY_C3);
-       PHP_NCURSES_CONST(KEY_BTAB);
-       PHP_NCURSES_CONST(KEY_BEG);
-       PHP_NCURSES_CONST(KEY_CANCEL);
-       PHP_NCURSES_CONST(KEY_CLOSE);
-       PHP_NCURSES_CONST(KEY_COMMAND);
-       PHP_NCURSES_CONST(KEY_COPY);
-       PHP_NCURSES_CONST(KEY_CREATE);
-       PHP_NCURSES_CONST(KEY_END);
-       PHP_NCURSES_CONST(KEY_EXIT);
-       PHP_NCURSES_CONST(KEY_FIND);
-       PHP_NCURSES_CONST(KEY_HELP);
-       PHP_NCURSES_CONST(KEY_MARK);
-       PHP_NCURSES_CONST(KEY_MESSAGE);
-       PHP_NCURSES_CONST(KEY_MOVE);
-       PHP_NCURSES_CONST(KEY_NEXT);
-       PHP_NCURSES_CONST(KEY_OPEN);
-       PHP_NCURSES_CONST(KEY_OPTIONS);
-       PHP_NCURSES_CONST(KEY_PREVIOUS);
-       PHP_NCURSES_CONST(KEY_REDO);
-       PHP_NCURSES_CONST(KEY_REFERENCE);
-       PHP_NCURSES_CONST(KEY_REFRESH);
-       PHP_NCURSES_CONST(KEY_REPLACE);
-       PHP_NCURSES_CONST(KEY_RESTART);
-       PHP_NCURSES_CONST(KEY_RESUME);
-       PHP_NCURSES_CONST(KEY_SAVE);
-       PHP_NCURSES_CONST(KEY_SBEG);
-       PHP_NCURSES_CONST(KEY_SCANCEL);
-       PHP_NCURSES_CONST(KEY_SCOMMAND);
-       PHP_NCURSES_CONST(KEY_SCOPY);
-       PHP_NCURSES_CONST(KEY_SCREATE);
-       PHP_NCURSES_CONST(KEY_SDC);
-       PHP_NCURSES_CONST(KEY_SDL);
-       PHP_NCURSES_CONST(KEY_SELECT);
-       PHP_NCURSES_CONST(KEY_SEND);
-       PHP_NCURSES_CONST(KEY_SEOL);
-       PHP_NCURSES_CONST(KEY_SEXIT);
-       PHP_NCURSES_CONST(KEY_SFIND);
-       PHP_NCURSES_CONST(KEY_SHELP);
-       PHP_NCURSES_CONST(KEY_SHOME);
-       PHP_NCURSES_CONST(KEY_SIC);
-       PHP_NCURSES_CONST(KEY_SLEFT);
-       PHP_NCURSES_CONST(KEY_SMESSAGE);
-       PHP_NCURSES_CONST(KEY_SMOVE);
-       PHP_NCURSES_CONST(KEY_SNEXT);
-       PHP_NCURSES_CONST(KEY_SOPTIONS);
-       PHP_NCURSES_CONST(KEY_SPREVIOUS);
-       PHP_NCURSES_CONST(KEY_SPRINT);
-       PHP_NCURSES_CONST(KEY_SREDO);
-       PHP_NCURSES_CONST(KEY_SREPLACE);
-       PHP_NCURSES_CONST(KEY_SRIGHT);
-       PHP_NCURSES_CONST(KEY_SRSUME);
-       PHP_NCURSES_CONST(KEY_SSAVE);
-       PHP_NCURSES_CONST(KEY_SSUSPEND);
-       PHP_NCURSES_CONST(KEY_SUNDO);
-       PHP_NCURSES_CONST(KEY_SUSPEND);
-       PHP_NCURSES_CONST(KEY_UNDO);
-       PHP_NCURSES_CONST(KEY_RESIZE);
-
-       /* screen attribute constants */
-       PHP_NCURSES_CONST(A_NORMAL);
-       PHP_NCURSES_CONST(A_STANDOUT);
-       PHP_NCURSES_CONST(A_UNDERLINE);
-       PHP_NCURSES_CONST(A_REVERSE);
-       PHP_NCURSES_CONST(A_BLINK);
-       PHP_NCURSES_CONST(A_DIM);
-       PHP_NCURSES_CONST(A_BOLD);
-       PHP_NCURSES_CONST(A_PROTECT);
-       PHP_NCURSES_CONST(A_INVIS);
-       PHP_NCURSES_CONST(A_ALTCHARSET);
-       PHP_NCURSES_CONST(A_CHARTEXT);
-
-       /* mouse constants */
-       PHP_NCURSES_CONST(BUTTON1_PRESSED);
-       PHP_NCURSES_CONST(BUTTON1_RELEASED);
-       PHP_NCURSES_CONST(BUTTON1_CLICKED);
-       PHP_NCURSES_CONST(BUTTON1_DOUBLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON1_TRIPLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON2_PRESSED);
-       PHP_NCURSES_CONST(BUTTON2_RELEASED);
-       PHP_NCURSES_CONST(BUTTON2_CLICKED);
-       PHP_NCURSES_CONST(BUTTON2_DOUBLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON2_TRIPLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON3_PRESSED);
-       PHP_NCURSES_CONST(BUTTON3_RELEASED);
-       PHP_NCURSES_CONST(BUTTON3_CLICKED);
-       PHP_NCURSES_CONST(BUTTON3_DOUBLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON3_TRIPLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON4_PRESSED);
-       PHP_NCURSES_CONST(BUTTON4_RELEASED);
-       PHP_NCURSES_CONST(BUTTON4_CLICKED);
-       PHP_NCURSES_CONST(BUTTON4_DOUBLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON4_TRIPLE_CLICKED);
-       PHP_NCURSES_CONST(BUTTON_SHIFT);
-       PHP_NCURSES_CONST(BUTTON_CTRL);
-       PHP_NCURSES_CONST(BUTTON_ALT);
-       PHP_NCURSES_CONST(ALL_MOUSE_EVENTS);
-       PHP_NCURSES_CONST(REPORT_MOUSE_POSITION);
-
-       ZEND_INIT_MODULE_GLOBALS(ncurses, php_ncurses_init_globals, NULL);
-
-       le_ncurses_windows = zend_register_list_destructors_ex(ncurses_destruct_window, NULL, "ncurses_window", module_number);
-#if HAVE_NCURSES_PANEL
-       le_ncurses_panels = zend_register_list_destructors_ex(ncurses_destruct_panel, NULL, "ncurses_panel", module_number);
-#endif
-
-       return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(ncurses)
-{
-       if (NCURSES_G(registered_constants)) {
-               endwin();
-       }
-
-       return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_MINFO_FUNCTION
- */
-PHP_MINFO_FUNCTION(ncurses)
-{
-       php_info_print_table_start();
-       php_info_print_table_header(2, "ncurses support", "enabled");
-       php_info_print_table_row(2, "ncurses library version", NCURSES_VERSION);
-#ifdef HAVE_NCURSES_COLOR_SET
-               php_info_print_table_row(2, "color support", "yes");
-#else
-               php_info_print_table_row(2, "color support", "no");
-#endif
-       php_info_print_table_end();
-
-       /* Remove comments if you have entries in php.ini
-       DISPLAY_INI_ENTRIES();
-       */
-}
-/* }}} */
-
-/* Remove the following function when you have succesfully modified config.m4
-   so that your module can be compiled into PHP, it exists only for testing
-   purposes. */
-
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/ncurses/ncurses.php b/ext/ncurses/ncurses.php
deleted file mode 100644 (file)
index 416b108..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?
-$module = 'ncurses';
-$function = 'confirm_' . $module . '_compiled';
-if (extension_loaded($module)) {
-       $str = $function($module);
-} else {
-       $str = "Module $module is not compiled into PHP";
-}
-echo "$str\n";
-?>
diff --git a/ext/ncurses/ncurses_fe.c b/ext/ncurses/ncurses_fe.c
deleted file mode 100644 (file)
index db5aaee..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP Version 5                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2006 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.01 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available through the world-wide-web at the following url:           |
-   | http://www.php.net/license/3_01.txt                                  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Authors: Hartmut Holzgraefe <hholzgra@php.net>                       |
-   |          Georg Richter <georg.richter@php-ev.de>                     |
-   +----------------------------------------------------------------------+
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "php_ncurses.h"
-
-static 
-       ZEND_BEGIN_ARG_INFO(firstandsecond_args_force_ref, 0)
-               ZEND_ARG_PASS_INFO(1)
-               ZEND_ARG_PASS_INFO(1)
-       ZEND_END_ARG_INFO();
-
-static
-       ZEND_BEGIN_ARG_INFO(secondandthird_args_force_ref, 0)
-               ZEND_ARG_PASS_INFO(0)
-               ZEND_ARG_PASS_INFO(1)
-               ZEND_ARG_PASS_INFO(1)
-       ZEND_END_ARG_INFO();
-
-static 
-       ZEND_BEGIN_ARG_INFO(second_thru_fourth_args_force_ref, 0)
-               ZEND_ARG_PASS_INFO(0)
-               ZEND_ARG_PASS_INFO(1)
-               ZEND_ARG_PASS_INFO(1)
-               ZEND_ARG_PASS_INFO(1)
-       ZEND_END_ARG_INFO();
-
-/* ncurses_functions[]
- *
- * Every user visible function must have an entry in ncurses_functions[].
- */
-zend_function_entry ncurses_functions[] = {
-       PHP_FE(ncurses_addch,                   NULL)
-#ifdef HAVE_NCURSES_COLOR_SET
-       PHP_FE(ncurses_color_set,               NULL)
-#endif
-       PHP_FE(ncurses_delwin,                  NULL)
-       PHP_FE(ncurses_end,                     NULL)
-       PHP_FE(ncurses_getch,                   NULL)
-       PHP_FE(ncurses_has_colors,              NULL)
-       PHP_FE(ncurses_init,                    NULL)
-       PHP_FE(ncurses_init_pair,               NULL)
-       PHP_FE(ncurses_color_content,           second_thru_fourth_args_force_ref)
-       PHP_FE(ncurses_pair_content,            secondandthird_args_force_ref)
-       PHP_FE(ncurses_move,                    NULL)
-       PHP_FE(ncurses_newwin,                  NULL)
-       PHP_FE(ncurses_refresh,                 NULL)
-       PHP_FE(ncurses_start_color,             NULL)
-       PHP_FE(ncurses_standout,                NULL)
-       PHP_FE(ncurses_standend,                NULL)
-       PHP_FE(ncurses_baudrate,                NULL)
-       PHP_FE(ncurses_beep,                    NULL)
-       PHP_FE(ncurses_can_change_color,        NULL)
-       PHP_FE(ncurses_cbreak,                  NULL)
-       PHP_FE(ncurses_clear,                   NULL)
-       PHP_FE(ncurses_clrtobot,                NULL)
-       PHP_FE(ncurses_clrtoeol,                NULL)
-       PHP_FE(ncurses_def_prog_mode,           NULL)
-       PHP_FE(ncurses_reset_prog_mode,         NULL)
-       PHP_FE(ncurses_def_shell_mode,          NULL)
-       PHP_FE(ncurses_reset_shell_mode,        NULL)
-       PHP_FE(ncurses_delch,                   NULL)
-       PHP_FE(ncurses_deleteln,                NULL)
-       PHP_FE(ncurses_doupdate,                NULL)
-       PHP_FE(ncurses_echo,                    NULL)
-       PHP_FE(ncurses_erase,                   NULL)
-       PHP_FE(ncurses_werase,                  NULL)
-       PHP_FE(ncurses_erasechar,               NULL)
-       PHP_FE(ncurses_flash,                   NULL)
-       PHP_FE(ncurses_flushinp,                NULL)
-       PHP_FE(ncurses_has_ic,                  NULL)
-       PHP_FE(ncurses_has_il,                  NULL)
-       PHP_FE(ncurses_inch,                    NULL)
-       PHP_FE(ncurses_insertln,                NULL)
-       PHP_FE(ncurses_isendwin,                NULL)
-       PHP_FE(ncurses_killchar,                NULL)
-       PHP_FE(ncurses_nl,                      NULL)
-       PHP_FE(ncurses_nocbreak,                NULL)
-       PHP_FE(ncurses_noecho,                  NULL)
-       PHP_FE(ncurses_nonl,                    NULL)
-       PHP_FE(ncurses_noraw,                   NULL)
-       PHP_FE(ncurses_raw,                     NULL)
-       PHP_FE(ncurses_meta,                    NULL)
-       PHP_FE(ncurses_resetty,                 NULL)
-       PHP_FE(ncurses_savetty,                 NULL)
-       PHP_FE(ncurses_termattrs,               NULL)
-       PHP_FE(ncurses_use_default_colors,      NULL)
-       PHP_FE(ncurses_slk_attr,                NULL)
-       PHP_FE(ncurses_slk_clear,               NULL)
-       PHP_FE(ncurses_slk_noutrefresh,         NULL)
-       PHP_FE(ncurses_slk_refresh,             NULL)
-       PHP_FE(ncurses_slk_restore,             NULL)
-       PHP_FE(ncurses_slk_touch,               NULL)
-       PHP_FE(ncurses_attroff,                 NULL)
-       PHP_FE(ncurses_attron,                  NULL)
-       PHP_FE(ncurses_attrset,                 NULL)
-       PHP_FE(ncurses_bkgd,                    NULL)
-       PHP_FE(ncurses_curs_set,                NULL)
-       PHP_FE(ncurses_delay_output,            NULL)
-       PHP_FE(ncurses_echochar,                NULL)
-       PHP_FE(ncurses_halfdelay,               NULL)
-       PHP_FE(ncurses_has_key,                 NULL)
-       PHP_FE(ncurses_insch,                   NULL)
-       PHP_FE(ncurses_insdelln,                NULL)
-       PHP_FE(ncurses_mouseinterval,           NULL)
-       PHP_FE(ncurses_napms,                   NULL)
-       PHP_FE(ncurses_scrl,                    NULL)
-       PHP_FE(ncurses_slk_attroff,             NULL)
-       PHP_FE(ncurses_slk_attron,              NULL)
-       PHP_FE(ncurses_slk_attrset,             NULL)
-#ifdef HAVE_NCURSES_SLK_COLOR
-       PHP_FE(ncurses_slk_color,               NULL)
-#endif
-       PHP_FE(ncurses_slk_init,                NULL)
-       PHP_FE(ncurses_slk_set,                 NULL)
-       PHP_FE(ncurses_typeahead,               NULL)
-       PHP_FE(ncurses_ungetch,                 NULL)
-       PHP_FE(ncurses_vidattr,                 NULL)
-       PHP_FE(ncurses_wrefresh,                NULL)
-#ifdef HAVE_NCURSES_USE_EXTENDED_NAMES
-       PHP_FE(ncurses_use_extended_names,      NULL)
-#endif
-       PHP_FE(ncurses_bkgdset,                 NULL)
-       PHP_FE(ncurses_filter,                  NULL)
-       PHP_FE(ncurses_noqiflush,               NULL)
-       PHP_FE(ncurses_qiflush,                 NULL)
-       PHP_FE(ncurses_timeout,                 NULL)
-       PHP_FE(ncurses_use_env,                 NULL)
-       PHP_FE(ncurses_addstr,                  NULL)
-       PHP_FE(ncurses_putp,                    NULL)
-       PHP_FE(ncurses_scr_dump,                NULL)
-       PHP_FE(ncurses_scr_init,                NULL)
-       PHP_FE(ncurses_scr_restore,             NULL)
-       PHP_FE(ncurses_scr_set,                 NULL)
-       PHP_FE(ncurses_mvaddch,                 NULL)
-       PHP_FE(ncurses_mvaddchnstr,             NULL)
-       PHP_FE(ncurses_addchnstr,               NULL)
-       PHP_FE(ncurses_mvaddchstr,              NULL)
-       PHP_FE(ncurses_addchstr,                NULL)
-       PHP_FE(ncurses_mvaddnstr,               NULL)
-       PHP_FE(ncurses_addnstr,                 NULL)
-       PHP_FE(ncurses_mvaddstr,                NULL)
-       PHP_FE(ncurses_mvdelch,                 NULL)
-       PHP_FE(ncurses_mvgetch,                 NULL)
-       PHP_FE(ncurses_mvinch,                  NULL)
-       PHP_FE(ncurses_mvwaddstr,               NULL)
-       PHP_FE(ncurses_insstr,                  NULL)
-       PHP_FE(ncurses_instr,                   first_arg_force_ref)
-       PHP_FE(ncurses_mvhline,                 NULL)
-       PHP_FE(ncurses_mvcur,                   NULL)
-       PHP_FE(ncurses_init_color,              NULL)
-       PHP_FE(ncurses_border,                  NULL)
-#ifdef HAVE_NCURSES_ASSUME_DEFAULT_COLORS
-       PHP_FE(ncurses_assume_default_colors,   NULL)
-#endif
-       PHP_FE(ncurses_define_key,      NULL)
-       PHP_FE(ncurses_hline,           NULL)
-       PHP_FE(ncurses_vline,           NULL)
-       PHP_FE(ncurses_keyok,           NULL)
-       PHP_FE(ncurses_termname,        NULL)
-       PHP_FE(ncurses_longname,        NULL)
-       PHP_FE(ncurses_mousemask,       second_arg_force_ref)
-       PHP_FE(ncurses_getmouse,        first_arg_force_ref)
-       PHP_FE(ncurses_ungetmouse,      NULL)
-       PHP_FE(ncurses_mouse_trafo,     firstandsecond_args_force_ref)
-       PHP_FE(ncurses_wmouse_trafo,    secondandthird_args_force_ref)
-       PHP_FE(ncurses_waddstr,         NULL)
-       PHP_FE(ncurses_wnoutrefresh,    NULL)
-       PHP_FE(ncurses_wclear,          NULL)
-#ifdef HAVE_NCURSES_COLOR_SET
-       PHP_FE(ncurses_wcolor_set,      NULL)
-#endif
-       PHP_FE(ncurses_wgetch,          NULL)
-       PHP_FE(ncurses_keypad,          NULL)
-       PHP_FE(ncurses_wmove,           NULL)
-
-       PHP_FE(ncurses_newpad,          NULL)
-       PHP_FE(ncurses_prefresh,        NULL)
-       PHP_FE(ncurses_pnoutrefresh,    NULL)
-       PHP_FE(ncurses_wstandout,       NULL)
-       PHP_FE(ncurses_wstandend,       NULL)
-       PHP_FE(ncurses_wattrset,        NULL)
-       PHP_FE(ncurses_wattron,         NULL)
-       PHP_FE(ncurses_wattroff,        NULL)
-       PHP_FE(ncurses_waddch,          NULL)
-       PHP_FE(ncurses_wborder,         NULL)
-       PHP_FE(ncurses_whline,          NULL)
-       PHP_FE(ncurses_wvline,          NULL)
-       PHP_FE(ncurses_getyx,           secondandthird_args_force_ref)
-       PHP_FE(ncurses_getmaxyx,        secondandthird_args_force_ref)
-       
-#if HAVE_NCURSES_PANEL
-       PHP_FE(ncurses_update_panels,   NULL)
-       PHP_FE(ncurses_panel_window,    NULL)
-       PHP_FE(ncurses_panel_below,     NULL)
-       PHP_FE(ncurses_panel_above,     NULL)
-       PHP_FE(ncurses_replace_panel,   NULL)
-       PHP_FE(ncurses_move_panel,      NULL)
-       PHP_FE(ncurses_bottom_panel,    NULL)
-       PHP_FE(ncurses_top_panel,       NULL)
-       PHP_FE(ncurses_show_panel,      NULL)
-       PHP_FE(ncurses_hide_panel,      NULL)
-       PHP_FE(ncurses_del_panel,       NULL)
-       PHP_FE(ncurses_new_panel,       NULL)
-#endif
-
-  {NULL, NULL, NULL}  /* Must be the last line in ncurses_functions[] */
-};
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c
deleted file mode 100644 (file)
index fd3e0e8..0000000
+++ /dev/null
@@ -1,2459 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP Version 5                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2006 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.01 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available through the world-wide-web at the following url:           |
-   | http://www.php.net/license/3_01.txt                                  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Authors: Hartmut Holzgraefe <hholzgra@php.net>                       |
-   |          Georg Richter <georg.richter@php-ev.de>                     |
-   +----------------------------------------------------------------------+
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "php_ini.h"
-#include "php_ncurses.h"
-
-#define FETCH_WINRES(r, z)  ZEND_FETCH_RESOURCE(r, WINDOW **, z, -1, "ncurses_window", le_ncurses_windows)
-#if HAVE_NCURSES_PANEL
-# define FETCH_PANEL(r, z)  ZEND_FETCH_RESOURCE(r, PANEL **, z, -1, "ncurses_panel", le_ncurses_panels)
-#endif
-
-#define IS_NCURSES_INITIALIZED() \
-               if (!NCURSES_G(registered_constants)) { \
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "You must initialize ncruses via ncurses_init(), before calling any ncurses functions."); \
-                       RETURN_FALSE; \
-               }
-
-/* {{{ proto int ncurses_addch(int ch)
-   Adds character at current position and advance cursor */
-PHP_FUNCTION(ncurses_addch)
-{
-       long ch;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ch) == FAILURE) {
-               return;
-       }
-
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(addch(ch));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_waddch(resource window, int ch)
-   Adds character at current position in a window and advance cursor */
-PHP_FUNCTION(ncurses_waddch)
-{
-       long ch;
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &ch) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(waddch(*win, ch));
-}
-/* }}} */
-
-#ifdef HAVE_NCURSES_COLOR_SET
-/* {{{ proto int ncurses_color_set(int pair)
-   Sets fore- and background color */
-PHP_FUNCTION(ncurses_color_set)
-{
-       long pair;
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &pair) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(color_set(pair,NULL));
-}
-/* }}} */
-#endif
-
-/* {{{ proto bool ncurses_delwin(resource window)
-   Deletes a ncurses window */
-PHP_FUNCTION(ncurses_delwin)
-{
-       zval *handle;
-       WINDOW **w;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(w, &handle);
-
-       zend_list_delete(Z_LVAL_P(handle));
-       RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto int ncurses_end(void)
-   Stops using ncurses, clean up the screen */
-PHP_FUNCTION(ncurses_end)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(endwin());             /* endialize the curses library */
-}
-/* }}} */
-
-/* {{{ proto int ncurses_getch(void)
-   Reads a character from keyboard */
-PHP_FUNCTION(ncurses_getch)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(getch());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_has_colors(void)
-   Checks if terminal has colors */
-PHP_FUNCTION(ncurses_has_colors)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_BOOL(has_colors());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_init(void)
-   Initializes ncurses */
-PHP_FUNCTION(ncurses_init)
-{
-       initscr();             /* initialize the curses library */
-       keypad(stdscr, TRUE);  /* enable keyboard mapping */
-       (void) nonl();         /* tell curses not to do NL->CR/NL on output */
-       (void) cbreak();       /* take input chars one at a time, no wait for \n */
-
-       if (!NCURSES_G(registered_constants)) {
-               zend_constant c;
-               
-               WINDOW **pscr = (WINDOW**)emalloc(sizeof(WINDOW *));
-               zval *zscr;
-
-               *pscr = stdscr;
-               MAKE_STD_ZVAL(zscr);
-               ZEND_REGISTER_RESOURCE(zscr, pscr, le_ncurses_windows);
-               c.value = *zscr;
-               zval_copy_ctor(&c.value);
-               c.flags = CONST_CS;
-               c.name = zend_strndup(ZEND_STRL("STDSCR"));
-               c.name_len = sizeof("STDSCR");
-               zend_register_constant(&c TSRMLS_CC);
-
-               /* we need this "interesting" arrangement because the
-                * underlying values of the ACS_XXX defines are not
-                * initialized until after ncurses has been initialized */
-               
-#define PHP_NCURSES_DEF_CONST(x)    \
-               ZVAL_LONG(zscr, x);         \
-               c.value = *zscr;            \
-               zval_copy_ctor(&c.value);   \
-               c.flags = CONST_CS;         \
-               c.name = zend_strndup(ZEND_STRL("NCURSES_" #x)); \
-               c.name_len = sizeof("NCURSES_" #x);                           \
-               zend_register_constant(&c TSRMLS_CC)
-               
-               PHP_NCURSES_DEF_CONST(ACS_ULCORNER);
-               PHP_NCURSES_DEF_CONST(ACS_LLCORNER);
-               PHP_NCURSES_DEF_CONST(ACS_URCORNER);
-               PHP_NCURSES_DEF_CONST(ACS_LRCORNER);
-               PHP_NCURSES_DEF_CONST(ACS_LTEE);
-               PHP_NCURSES_DEF_CONST(ACS_RTEE);
-               PHP_NCURSES_DEF_CONST(ACS_BTEE);
-               PHP_NCURSES_DEF_CONST(ACS_TTEE);
-               PHP_NCURSES_DEF_CONST(ACS_HLINE);
-               PHP_NCURSES_DEF_CONST(ACS_VLINE);
-               PHP_NCURSES_DEF_CONST(ACS_PLUS);
-               PHP_NCURSES_DEF_CONST(ACS_S1);
-               PHP_NCURSES_DEF_CONST(ACS_S9);
-               PHP_NCURSES_DEF_CONST(ACS_DIAMOND);
-               PHP_NCURSES_DEF_CONST(ACS_CKBOARD);
-               PHP_NCURSES_DEF_CONST(ACS_DEGREE);
-               PHP_NCURSES_DEF_CONST(ACS_PLMINUS);
-               PHP_NCURSES_DEF_CONST(ACS_BULLET);
-               PHP_NCURSES_DEF_CONST(ACS_LARROW);
-               PHP_NCURSES_DEF_CONST(ACS_RARROW);
-               PHP_NCURSES_DEF_CONST(ACS_DARROW);
-               PHP_NCURSES_DEF_CONST(ACS_UARROW);
-               PHP_NCURSES_DEF_CONST(ACS_BOARD);
-               PHP_NCURSES_DEF_CONST(ACS_LANTERN);
-               PHP_NCURSES_DEF_CONST(ACS_BLOCK);
-               
-               FREE_ZVAL(zscr);
-               NCURSES_G(registered_constants) = 1;
-       }
-}
-/* }}} */
-
-/* {{{ proto int ncurses_init_pair(int pair, int fg, int bg)
-   Allocates a color pair */
-PHP_FUNCTION(ncurses_init_pair)
-{
-       long pair, fg, bg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &pair, &fg, &bg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(init_pair(pair,fg,bg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_move(int y, int x)
-   Moves output position */
-PHP_FUNCTION(ncurses_move)
-{
-       long x, y;
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &y, &x) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(move(y,x));
-}
-/* }}} */
-
-/* {{{ proto resource ncurses_newpad(int rows, int cols)
-   Creates a new pad (window) */
-PHP_FUNCTION(ncurses_newpad)
-{
-       long rows,cols;
-       WINDOW **pwin;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &rows, &cols) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       
-       pwin = (WINDOW **)emalloc(sizeof(WINDOW *));
-       *pwin = newpad(rows,cols);
-
-       if(!*pwin) {
-               efree(pwin);
-               RETURN_FALSE;
-       }
-
-       ZEND_REGISTER_RESOURCE(return_value, pwin, le_ncurses_windows);
-
-}
-/* }}} */
-
-/* {{{ proto int ncurses_prefresh(resource pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
-   Copys a region from a pad into the virtual screen */
-PHP_FUNCTION(ncurses_prefresh)
-{
-       WINDOW **pwin;
-       zval *phandle;
-       long pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllllll", &phandle, &pminrow,
-                               &pmincol, &sminrow, &smincol, &smaxrow, &smaxcol) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(pwin, &phandle);
-
-       RETURN_LONG(prefresh(*pwin, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_pnoutrefresh(resource pad, int pminrow, int pmincol, int sminrow, int smincol, int smaxrow, int smaxcol)
-   Copys a region from a pad into the virtual screen */
-PHP_FUNCTION(ncurses_pnoutrefresh)
-{
-       WINDOW **pwin;
-       zval *phandle;
-       long pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllllll", &phandle, &pminrow,
-                               &pmincol, &sminrow, &smincol, &smaxrow, &smaxcol) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(pwin, &phandle);
-
-       RETURN_LONG(pnoutrefresh(*pwin, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
-}
-/* }}} */
-
-
-
-/* {{{ proto int ncurses_newwin(int rows, int cols, int y, int x)
-   Creates a new window */
-PHP_FUNCTION(ncurses_newwin)
-{
-       long rows,cols,y,x;
-       WINDOW **pwin; 
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &rows, &cols, &y, &x) == FAILURE) {
-               return;
-       }
-
-       IS_NCURSES_INITIALIZED();
-       pwin = (WINDOW **)emalloc(sizeof(WINDOW *));
-       *pwin=newwin(rows,cols,y,x);
-
-       if(!*pwin) {
-               efree(pwin);
-               RETURN_FALSE;
-       }
-
-       ZEND_REGISTER_RESOURCE(return_value, pwin, le_ncurses_windows);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_refresh(int ch)
-   Refresh screen */
-PHP_FUNCTION(ncurses_refresh)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(refresh());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_start_color(void)
-   Starts using colors */
-PHP_FUNCTION(ncurses_start_color)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(start_color());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_standout(void)
-   Starts using 'standout' attribute */
-PHP_FUNCTION(ncurses_standout)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(standout());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_standend(void)
-   Stops using 'standout' attribute */
-PHP_FUNCTION(ncurses_standend)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(standend());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_baudrate(void)
-   Returns baudrate of terminal */
-PHP_FUNCTION(ncurses_baudrate)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(baudrate());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_beep(void)
-   Let the terminal beep */
-PHP_FUNCTION(ncurses_beep)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(beep());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_can_change_color(void)
-   Checks if we can change terminals colors */
-PHP_FUNCTION(ncurses_can_change_color)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(can_change_color());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_cbreak(void)
-   Switches of input buffering */
-PHP_FUNCTION(ncurses_cbreak)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(cbreak());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_clear(void)
-   Clears screen */
-PHP_FUNCTION(ncurses_clear)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(clear());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_clrtobot(void)
-   Clears screen from current position to bottom */
-PHP_FUNCTION(ncurses_clrtobot)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(clrtobot());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_clrtoeol(void)
-   Clears screen from current position to end of line */
-PHP_FUNCTION(ncurses_clrtoeol)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(clrtoeol());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_reset_prog_mode(void)
-   Resets the prog mode saved by def_prog_mode */
-PHP_FUNCTION(ncurses_reset_prog_mode)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(reset_prog_mode());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_reset_shell_mode(void)
-   Resets the shell mode saved by def_shell_mode */
-PHP_FUNCTION(ncurses_reset_shell_mode)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(reset_shell_mode());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_def_prog_mode(void)
-   Saves terminals (program) mode */
-PHP_FUNCTION(ncurses_def_prog_mode)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(def_prog_mode());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_def_shell_mode(void)
-   Saves terminal (shell) mode*/
-PHP_FUNCTION(ncurses_def_shell_mode)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(def_shell_mode());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_delch(void)
-   Deletes character at current position, move rest of line left */
-PHP_FUNCTION(ncurses_delch)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(delch());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_deleteln(void)
-   Deletes line at current position, move rest of screen up */
-PHP_FUNCTION(ncurses_deleteln)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(deleteln());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_doupdate(void)
-   Writes all prepared refreshes to terminal */
-PHP_FUNCTION(ncurses_doupdate)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(doupdate());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_echo(void)
-   Activates keyboard input echo */
-PHP_FUNCTION(ncurses_echo)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(echo());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_erase(void)
-   Erases terminal screen */
-PHP_FUNCTION(ncurses_erase)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(erase());
-}
-/* }}} */
-
-/* {{{ proto string ncurses_erasechar(void)
-   Returns current erase character */
-PHP_FUNCTION(ncurses_erasechar)
-{
-       char temp[2];
-
-       IS_NCURSES_INITIALIZED();
-       temp[0] = erasechar();
-       temp[1] = '\0';
-
-       RETURN_STRINGL (temp, 1, 1);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_flash(void)
-   Flashes terminal screen (visual bell) */
-PHP_FUNCTION(ncurses_flash)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(flash());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_flushinp(void)
-   Flushes keyboard input buffer */
-PHP_FUNCTION(ncurses_flushinp)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(flushinp());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_has_ic(void)
-   Checks for insert- and delete-capabilities */
-PHP_FUNCTION(ncurses_has_ic)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(has_ic());
-}
-/* }}} */
-
-
-/* {{{ proto int ncurses_has_il(void)
-   Checks for line insert- and delete-capabilities */
-PHP_FUNCTION(ncurses_has_il)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(has_il());
-}
-/* }}} */
-
-/* {{{ proto string ncurses_inch(void)
-   Gets character and attribute at current position */
-PHP_FUNCTION(ncurses_inch)
-{
-       char temp[2];
-
-       IS_NCURSES_INITIALIZED();
-       temp[0] = inch();
-       temp[1] = '\0';
-
-       RETURN_STRINGL (temp, 1, 1);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_insertln(void)
-   Inserts a line, move rest of screen down */
-PHP_FUNCTION(ncurses_insertln)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(insertln());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_isendwin(void)
-   Ncurses is in endwin mode, normal screen output may be performed */
-PHP_FUNCTION(ncurses_isendwin)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(isendwin());
-}
-/* }}} */
-
-/* {{{ proto string ncurses_killchar(void)
-   Returns current line kill character */
-PHP_FUNCTION(ncurses_killchar)
-{
-       char temp[2];
-
-       IS_NCURSES_INITIALIZED();
-       temp[0] = killchar();
-       temp[1] = '\0';
-
-       RETURN_STRINGL (temp, 1, 1);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_nl(void)
-   Translates newline and carriage return / line feed */
-PHP_FUNCTION(ncurses_nl)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(nl());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_nocbreak(void)
-   Switches terminal to cooked mode */
-PHP_FUNCTION(ncurses_nocbreak)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(nocbreak());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_noecho(void)
-   Switches off keyboard input echo */
-PHP_FUNCTION(ncurses_noecho)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(noecho());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_nonl(void)
-   Do not ranslate newline and carriage return / line feed */
-PHP_FUNCTION(ncurses_nonl)
-{
-       RETURN_LONG(nonl());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_noraw(void)
-   Switches terminal out of raw mode */
-PHP_FUNCTION(ncurses_noraw)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(noraw());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_raw(void)
-   Switches terminal into raw mode */
-PHP_FUNCTION(ncurses_raw)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(raw());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_meta(resource window, bool 8bit)
-   Enables/Disable 8-bit meta key information */
-PHP_FUNCTION(ncurses_meta)
-{
-       zend_bool enable;
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &handle, &enable) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(meta(*win, enable));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_werase(resource window)
-   Erase window contents */
-PHP_FUNCTION(ncurses_werase)
-{
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(werase(*win));
-}
-/* }}} */
-
-
-/* {{{ proto int ncurses_resetty(void)
-   Restores saved terminal state */
-PHP_FUNCTION(ncurses_resetty)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(resetty());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_savetty(void)
-   Saves terminal state */
-PHP_FUNCTION(ncurses_savetty)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(savetty());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_termattrs(void)
-   Returns a logical OR of all attribute flags supported by terminal */
-PHP_FUNCTION(ncurses_termattrs)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(termattrs());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_use_default_colors(void)
-   Assigns terminal default colors to color id -1 */
-PHP_FUNCTION(ncurses_use_default_colors)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(use_default_colors());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_attr(void)
-   Returns current soft label keys attribute */
-PHP_FUNCTION(ncurses_slk_attr)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_attr());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_clear(void)
-   Clears soft label keys from screen */
-PHP_FUNCTION(ncurses_slk_clear)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_clear());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_noutrefresh(void)
-   Copies soft label keys to virtual screen */
-PHP_FUNCTION(ncurses_slk_noutrefresh)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_noutrefresh());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_refresh(void)
-   Copies soft label keys to screen */
-PHP_FUNCTION(ncurses_slk_refresh)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_refresh());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_restore(void)
-   Restores soft label keys */
-PHP_FUNCTION(ncurses_slk_restore)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_restore());
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_touch(void)
-   Forces output when ncurses_slk_noutrefresh is performed */
-PHP_FUNCTION(ncurses_slk_touch)
-{
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_touch());
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_slk_set(int labelnr, string label, int format)
-   Sets function key labels */
-PHP_FUNCTION(ncurses_slk_set)
-{
-       char *str;
-       int  len;
-       long labelnr;
-       long format;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsl", &labelnr, &str, &len, &format) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_BOOL(slk_set(labelnr, str, format));
-}
-/* }}} */
-
-
-/* {{{ proto int ncurses_attroff(int attributes)
-   Turns off the given attributes */
-PHP_FUNCTION(ncurses_attroff)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(attroff(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_attron(int attributes)
-   Turns on the given attributes */
-PHP_FUNCTION(ncurses_attron)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(attron(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_attrset(int attributes)
-   Sets given attributes */
-PHP_FUNCTION(ncurses_attrset)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(attrset(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_bkgd(int attrchar)
-   Sets background property for terminal screen */
-PHP_FUNCTION(ncurses_bkgd)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(bkgd(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_curs_set(int visibility)
-   Sets cursor state */
-PHP_FUNCTION(ncurses_curs_set)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(curs_set(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_delay_output(int milliseconds)
-   Delays output on terminal using padding characters */
-PHP_FUNCTION(ncurses_delay_output)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(delay_output(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_echochar(int character)
-   Single character output including refresh */
-PHP_FUNCTION(ncurses_echochar)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(echochar(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_halfdelay(int tenth)
-   Puts terminal into halfdelay mode */
-PHP_FUNCTION(ncurses_halfdelay)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(halfdelay(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_has_key(int keycode)
-   Checks for presence of a function key on terminal keyboard */
-PHP_FUNCTION(ncurses_has_key)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(has_key(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_insch(int character)
-   Inserts character moving rest of line including character at current position */
-PHP_FUNCTION(ncurses_insch)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(insch(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_insdelln(int count)
-   Inserts lines before current line scrolling down (negative numbers delete and scroll up) */
-PHP_FUNCTION(ncurses_insdelln)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(insdelln(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mouseinterval(int milliseconds)
-   Sets timeout for mouse button clicks */
-PHP_FUNCTION(ncurses_mouseinterval)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(mouseinterval(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_napms(int milliseconds)
-   Sleep */
-PHP_FUNCTION(ncurses_napms)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(napms(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_scrl(int count)
-   Scrolls window content up or down without changing current position */
-PHP_FUNCTION(ncurses_scrl)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(scrl(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_attroff(int intarg)
-   ??? */
-PHP_FUNCTION(ncurses_slk_attroff)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(slk_attroff(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_attron(int intarg)
-   ??? */
-PHP_FUNCTION(ncurses_slk_attron)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_attron(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_slk_attrset(int intarg)
-   ??? */
-PHP_FUNCTION(ncurses_slk_attrset)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_attrset(intarg));
-}
-/* }}} */
-
-#ifdef HAVE_NCURSES_SLK_COLOR
-/* {{{ proto int ncurses_slk_color(int intarg)
-   Sets color for soft label keys*/
-PHP_FUNCTION(ncurses_slk_color)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_color(intarg));
-}
-/* }}} */
-#endif
-
-/* {{{ proto int ncurses_slk_init(int intarg)
-   Inits soft label keys */
-PHP_FUNCTION(ncurses_slk_init)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(slk_init(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_typeahead(int fd)
-   Specifys different filedescriptor for typeahead checking */
-PHP_FUNCTION(ncurses_typeahead)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(typeahead(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_ungetch(int keycode)
-   Puts a character back into the input stream */
-PHP_FUNCTION(ncurses_ungetch)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(ungetch(intarg));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_vidattr(int intarg)
-   ??? */
-PHP_FUNCTION(ncurses_vidattr)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(vidattr(intarg));
-}
-/* }}} */
-
-#ifdef HAVE_NCURSES_USE_EXTENDED_NAMES
-/* {{{ proto int ncurses_use_extended_names(bool flag)
-   Controls use of extended names in terminfo descriptions */
-PHP_FUNCTION(ncurses_use_extended_names)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(use_extended_names(intarg));
-}
-/* }}} */
-#endif  
-
-/* {{{ proto void ncurses_bkgdset(int attrchar)
-   Controls screen background */
-PHP_FUNCTION(ncurses_bkgdset)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       bkgdset(intarg);
-}
-/* }}} */
-
-/* {{{ proto void ncurses_filter(void)
- */
-PHP_FUNCTION(ncurses_filter)
-{
-       IS_NCURSES_INITIALIZED();
-       filter();
-}
-/* }}} */
-
-/* {{{ proto int ncurses_noqiflush(void)
-   Do not flush on signal characters*/
-PHP_FUNCTION(ncurses_noqiflush)
-{
-       IS_NCURSES_INITIALIZED();
-       noqiflush();
-}
-/* }}} */
-
-/* {{{ proto void ncurses_qiflush(void)
-   Flushes on signal characters */
-PHP_FUNCTION(ncurses_qiflush)
-{
-       IS_NCURSES_INITIALIZED();
-       qiflush();
-}
-/* }}} */
-
-/* {{{ proto void ncurses_timeout(int millisec)
-   Sets timeout for special key sequences */
-PHP_FUNCTION(ncurses_timeout)
-{
-       long intarg;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       timeout(intarg);
-}
-/* }}} */
-
-/* {{{ proto void ncurses_use_env(int flag)
-   Controls use of environment information about terminal size */
-PHP_FUNCTION(ncurses_use_env)
-{
-       long intarg;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       use_env(intarg);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_addstr(string text)
-   Outputs text at current position */
-PHP_FUNCTION(ncurses_addstr)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(addstr(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_putp(string text)
-   ??? */
-PHP_FUNCTION(ncurses_putp)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(putp(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_scr_dump(string filename)
-   Dumps screen content to file */
-PHP_FUNCTION(ncurses_scr_dump)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(scr_dump(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_scr_init(string filename)
-   Initializes screen from file dump */
-PHP_FUNCTION(ncurses_scr_init)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(scr_init(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_scr_restore(string filename)
-   Restores screen from file dump */
-PHP_FUNCTION(ncurses_scr_restore)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(scr_restore(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_scr_set(string filename)
-   Inherits screen from file dump */
-PHP_FUNCTION(ncurses_scr_set)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(scr_set(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvaddch(int y, int x, int c)
-   Moves current position and add character */
-PHP_FUNCTION(ncurses_mvaddch)
-{
-       long y,x,c;
-       
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &y, &x, &c) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvaddch(y,x,c));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvaddchnstr(int y, int x, string s, int n)
-   Moves position and add attrributed string with specified length */
-PHP_FUNCTION(ncurses_mvaddchnstr)
-{
-       long y,x,n;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llsl", &y, &x, &str, &str_len, &n) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvaddchnstr(y,x,(chtype *)str,n));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_addchnstr(string s, int n)
-   Adds attributed string with specified length at current position */
-PHP_FUNCTION(ncurses_addchnstr)
-{
-       long n;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &str, &str_len, &n) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(addchnstr((chtype *)str,n));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvaddchstr(int y, int x, string s)
-   Moves position and add attributed string */
-PHP_FUNCTION(ncurses_mvaddchstr)
-{
-       long y,x;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lls", &y, &x, &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvaddchstr(y,x,(chtype *)str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_addchstr(string s)
-   Adds attributed string at current position */
-PHP_FUNCTION(ncurses_addchstr)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(addchstr((chtype *)str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvaddnstr(int y, int x, string s, int n)
-   Moves position and add string with specified length */
-PHP_FUNCTION(ncurses_mvaddnstr)
-{
-       long y,x,n;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llsl", &y, &x, &str, &str_len, &n) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvaddnstr(y,x,str,n));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_addnstr(string s, int n)
-   Adds string with specified length at current position */
-PHP_FUNCTION(ncurses_addnstr)
-{
-       long n;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &str, &str_len, &n) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(addnstr(str,n));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvaddstr(int y, int x, string s)
-   Moves position and add string */
-PHP_FUNCTION(ncurses_mvaddstr)
-{
-       long y,x;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lls", &y, &x, &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(mvaddstr(y,x,str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvdelch(int y, int x)
-   Moves position and delete character, shift rest of line left */
-PHP_FUNCTION(ncurses_mvdelch)
-{
-       long y,x;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &y, &x) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvdelch(y,x));
-}
-/* }}} */
-
-
-/* {{{ proto int ncurses_mvgetch(int y, int x)
-   Moves position and get character at new position */
-PHP_FUNCTION(ncurses_mvgetch)
-{
-       long y,x;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &y, &x) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvgetch(y,x));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvinch(int y, int x)
-   Moves position and get attributed character at new position */
-PHP_FUNCTION(ncurses_mvinch)
-{
-       long y,x;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &y, &x) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(mvinch(y,x));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_insstr(string text)
-   Inserts string at current position, moving rest of line right */
-PHP_FUNCTION(ncurses_insstr)
-{
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(insstr(str));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_instr(string &buffer)
-   Reads string from terminal screen */
-PHP_FUNCTION(ncurses_instr)
-{
-       ulong retval;
-       zval *param;
-       char *str;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &param) == FAILURE ) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-
-       str = (char *)emalloc(COLS + 1);
-       retval = instr(str);
-
-       ZVAL_STRING(param, str, strlen(str));
-       efree(str);
-
-       RETURN_LONG(retval);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvhline(int y, int x, int attrchar, int n)
-   Sets new position and draw a horizontal line using an attributed character and max. n characters long */
-PHP_FUNCTION(ncurses_mvhline)
-{
-       long i1,i2,i3,i4;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &i1, &i2, &i3, &i4) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(mvhline(i1,i2,i3,i4));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvvline(int y, int x, int attrchar, int n)
-   Sets new position and draw a vertical line using an attributed character and max. n characters long */
-PHP_FUNCTION(ncurses_mvvline)
-{
-       long i1,i2,i3,i4;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &i1, &i2, &i3, &i4) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvvline(i1,i2,i3,i4));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvcur(int old_y,int old_x, int new_y, int new_x)
-   Moves cursor immediately */
-PHP_FUNCTION(ncurses_mvcur)
-{
-       long i1,i2,i3,i4;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &i1, &i2, &i3, &i4) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(mvcur(i1,i2,i3,i4));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_init_color(int color, int r, int g, int b)
-   Sets new RGB value for color */
-PHP_FUNCTION(ncurses_init_color)
-{
-       long i1,i2,i3,i4;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", &i1, &i2, &i3, &i4) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(init_color(i1,i2,i3,i4));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_color_content(int color, int &r, int &g, int &b)
-   Gets the RGB value for color */
-PHP_FUNCTION(ncurses_color_content)
-{
-       zval *r, *g, *b;
-       short rv, gv, bv;
-       int retval;
-       long c;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lzzz", &c, &r, &g, &b) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       
-       retval = color_content(c, &rv, &gv, &bv);
-
-       ZVAL_LONG(r, rv);
-       ZVAL_LONG(g, gv);
-       ZVAL_LONG(b, bv);
-
-       RETURN_LONG(retval);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_pair_content(int pair, int &f, int &b)
-   Gets the RGB value for color */
-PHP_FUNCTION(ncurses_pair_content)
-{
-       zval *f, *b;
-       short fv, bv;
-       int retval;
-       long p;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lzz", &p, &f, &b) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-
-       retval = pair_content(p, &fv, &bv);
-
-       ZVAL_LONG(f, fv);
-       ZVAL_LONG(b, bv);
-
-       RETURN_LONG(retval);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_border(int left, int right, int top, int bottom, int tl_corner, int tr_corner, int bl_corner, int br_corner)
-   Draws a border around the screen using attributed characters */
-PHP_FUNCTION(ncurses_border)
-{
-       long i1,i2,i3,i4,i5,i6,i7,i8;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llllllll", &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(border(i1,i2,i3,i4,i5,i6,i7,i8));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wborder(resource window, int left, int right, int top, int bottom, int tl_corner, int tr_corner, int bl_corner, int br_corner)
-   Draws a border around the window using attributed characters */
-PHP_FUNCTION(ncurses_wborder)
-{
-       long i1,i2,i3,i4,i5,i6,i7,i8;
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllllllll", &handle, &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-       
-       RETURN_LONG(wborder(*win,i1,i2,i3,i4,i5,i6,i7,i8));
-}
-/* }}} */
-
-#ifdef HAVE_NCURSES_ASSUME_DEFAULT_COLORS
-/* {{{ proto int ncurses_assume_default_colors(int fg, int bg)
-   Defines default colors for color 0 */
-PHP_FUNCTION(ncurses_assume_default_colors)
-{
-       long i1,i2;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &i1, &i2) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(assume_default_colors(i1,i2));
-}
-/* }}} */
-#endif  
-
-/* {{{ proto int ncurses_define_key(string definition, int keycode)
-   Defines a keycode */
-PHP_FUNCTION(ncurses_define_key)
-{
-       long n;
-       char *str;
-       int str_len;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &str, &str_len, &n) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(define_key(str,n));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_hline(int charattr, int n)
-   Draws a horizontal line at current position using an attributed character and max. n characters long */
-PHP_FUNCTION(ncurses_hline)
-{
-       long i1,i2;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &i1, &i2) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(hline(i1,i2));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_vline(int charattr, int n)
-   Draws a vertical line at current position using an attributed character and max. n characters long */
-PHP_FUNCTION(ncurses_vline)
-{
-       long i1,i2;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &i1, &i2) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-       RETURN_LONG(vline(i1,i2));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_whline(resource window, int charattr, int n)
-   Draws a horizontal line in a window at current position using an attributed character and max. n characters long */
-PHP_FUNCTION(ncurses_whline)
-{
-       long i1,i2;
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &handle, &i1, &i2) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-       
-       RETURN_LONG(whline(*win,i1,i2));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wvline(resource window, int charattr, int n)
-   Draws a vertical line in a window at current position using an attributed character and max. n characters long */
-PHP_FUNCTION(ncurses_wvline)
-{
-       long i1,i2;
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &handle, &i1, &i2) == FAILURE) {
-               return;
-       }
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wvline(*win,i1,i2));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_keyok(int keycode, int enable)
-   Enables or disable a keycode */
-PHP_FUNCTION(ncurses_keyok)
-{
-       long i,b;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &i, &b) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();       
-       RETURN_LONG(hline(i,b));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mvwaddstr(resource window, int y, int x, string text)
-   Adds string at new position in window */
-PHP_FUNCTION(ncurses_mvwaddstr)
-{
-       zval *handle;
-       long y, x;
-       int text_len;
-       char *text;
-       WINDOW **w;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlls", &handle, &y, &x, &text, &text_len) == FAILURE) {
-               return;
-       }
-       
-       FETCH_WINRES(w, &handle);
-
-       RETURN_LONG(mvwaddstr(*w,y,x,text));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wrefresh(resource window)
-   Refreshes window on terminal screen */
-PHP_FUNCTION(ncurses_wrefresh)
-{
-       zval *handle;
-       WINDOW **w;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(w, &handle);
-
-       RETURN_LONG(wrefresh(*w));
-}
-/* }}} */
-
-/* {{{ proto string ncurses_termname(void)
-   Returns terminal name */
-PHP_FUNCTION(ncurses_termname)
-{
-       char temp[15];
-       
-       IS_NCURSES_INITIALIZED();
-
-       strlcpy(temp, termname(), sizeof(temp));
-
-       RETURN_STRINGL (temp, strlen(temp), 1);
-}
-/* }}} */
-
-/* {{{ proto string ncurses_longname(void)
-   Returns terminal description */
-PHP_FUNCTION(ncurses_longname)
-{
-       char temp[128];
-
-       IS_NCURSES_INITIALIZED();
-
-       strlcpy(temp, longname(), sizeof(temp));
-
-       RETURN_STRINGL (temp, strlen(temp), 1);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_mousemask(int newmask, int &oldmask)
-   Returns and sets mouse options */
-PHP_FUNCTION(ncurses_mousemask)
-{
-       ulong oldmask;
-       ulong retval;
-       zval *param;
-       long newmask;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", &newmask, &param) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-
-       retval = mousemask(newmask, &oldmask);
-
-       ZVAL_LONG(param, oldmask);
-
-       RETURN_LONG(retval);
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_getmouse(array &mevent)
-   Reads mouse event from queue. The content of mevent is cleared before new data is added. */
-PHP_FUNCTION(ncurses_getmouse)
-{
-       zval *arg;
-       MEVENT mevent;
-       ulong retval;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-
-       zval_dtor(arg);
-       array_init(arg);
-
-       retval = getmouse(&mevent);
-
-       add_assoc_long(arg, "id", mevent.id);
-       add_assoc_long(arg, "x", mevent.x);
-       add_assoc_long(arg, "y", mevent.y);
-       add_assoc_long(arg, "z", mevent.z);
-       add_assoc_long(arg, "mmask", mevent.bstate);
-
-       RETURN_BOOL(retval == 0);
-}
-/* }}} */
-
-/* {{{ proto int ncurses_ungetmouse(array mevent)
-   Pushes mouse event to queue */
-PHP_FUNCTION(ncurses_ungetmouse)
-{
-       zval *arg, **zvalue;
-       MEVENT mevent;
-       ulong retval;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &arg) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-
-       if (zend_hash_find(Z_ARRVAL_P(arg), "id", sizeof("id"), (void **) &zvalue) == SUCCESS) {
-               convert_to_long_ex(zvalue);
-               mevent.id = Z_LVAL_PP(zvalue);
-       }
-
-       if (zend_hash_find(Z_ARRVAL_P(arg), "x", sizeof("x"), (void **) &zvalue) == SUCCESS) {
-               convert_to_long_ex(zvalue);
-               mevent.x = Z_LVAL_PP(zvalue);
-       }
-
-       if (zend_hash_find(Z_ARRVAL_P(arg), "y", sizeof("y"), (void **) &zvalue) == SUCCESS) {
-               convert_to_long_ex(zvalue);
-               mevent.y = Z_LVAL_PP(zvalue);
-       }
-
-       if (zend_hash_find(Z_ARRVAL_P(arg), "z", sizeof("z"), (void **) &zvalue) == SUCCESS) {
-               convert_to_long_ex(zvalue);
-               mevent.z = Z_LVAL_PP(zvalue);
-       }
-
-       if (zend_hash_find(Z_ARRVAL_P(arg), "mmask", sizeof("mmask"), (void **) &zvalue) == SUCCESS) {
-               convert_to_long_ex(zvalue);
-               mevent.bstate = Z_LVAL_PP(zvalue);
-       }
-
-       retval = ungetmouse(&mevent);
-
-       RETURN_LONG(retval);
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_mouse_trafo(int &y, int &x, bool toscreen)
-   Transforms coordinates */
-PHP_FUNCTION(ncurses_mouse_trafo)
-{
-       zval *x, *y;
-       zend_bool toscreen;
-       int nx, ny, retval;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zzb", &y, &x, &toscreen) == FAILURE) {
-               return;
-       }
-       IS_NCURSES_INITIALIZED();
-
-       convert_to_long(y);
-       convert_to_long(x);
-
-       nx = Z_LVAL_P(x);
-       ny = Z_LVAL_P(y);
-
-       retval = mouse_trafo(&ny, &nx, toscreen);
-
-       ZVAL_LONG(x, nx);
-       ZVAL_LONG(y, ny);
-
-       RETURN_BOOL(retval);
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_wmouse_trafo(resource window, int &y, int &x, bool toscreen)
-   Transforms window/stdscr coordinates */
-PHP_FUNCTION(ncurses_wmouse_trafo)
-{
-       zval *handle, *x, *y;
-       int nx, ny, retval;
-       WINDOW **win;
-       zend_bool toscreen;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzzb", &handle, &y, &x, &toscreen) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       convert_to_long(x);
-       convert_to_long(y);
-
-       nx = Z_LVAL_P(x);
-       ny = Z_LVAL_P(y);
-
-       retval = wmouse_trafo (*win, &ny, &nx, toscreen);
-
-       ZVAL_LONG(x, nx);
-       ZVAL_LONG(y, ny);
-
-       RETURN_BOOL(retval);
-}
-/* }}} */
-
-/* {{{ proto void ncurses_getyx(resource window, int &y, int &x)
-   Returns the current cursor position for a window */
-PHP_FUNCTION(ncurses_getyx)
-{
-       zval *handle, *x, *y;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzz", &handle, &y, &x) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       convert_to_long(x);
-       convert_to_long(y);
-
-       getyx(*win, Z_LVAL_P(y), Z_LVAL_P(x));
-}
-/* }}} */
-
-/* {{{ proto void ncurses_getmaxyx(resource window, int &y, int &x)
-   Returns the size of a window */
-PHP_FUNCTION(ncurses_getmaxyx)
-{
-       zval *handle, *x, *y;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzz", &handle, &y, &x) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       convert_to_long(x);
-       convert_to_long(y);
-
-       getmaxyx(*win, Z_LVAL_P(y), Z_LVAL_P(x));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wmove(resource window, int y, int x)
-   Moves windows output position */
-PHP_FUNCTION(ncurses_wmove)
-{
-       zval *handle, *x, *y;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzz", &handle, &y, &x) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       convert_to_long(x);
-       convert_to_long(y);
-
-       RETURN_LONG(wmove(*win, Z_LVAL_P(y), Z_LVAL_P(x)));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_keypad(resource window, bool bf)
-   Turns keypad on or off */
-PHP_FUNCTION(ncurses_keypad)
-{
-       zval *handle;
-       zend_bool bf;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &handle, &bf) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(keypad(*win, bf));
-
-}
-/* }}} */
-
-#ifdef HAVE_NCURSES_COLOR_SET
-/* {{{ proto int ncurses_wcolor_set(resource window, int color_pair)
-   Sets windows color pairings */
-PHP_FUNCTION(ncurses_wcolor_set)
-{
-       zval *handle;
-       long color_pair;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &color_pair) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wcolor_set(*win, color_pair, 0));
-}
-/* }}} */
-#endif
-
-/* {{{ proto int ncurses_wclear(resource window)
-   Clears window */
-PHP_FUNCTION(ncurses_wclear)
-{
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }       
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wclear(*win));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wnoutrefresh(resource window)
-   Copies window to virtual screen */
-PHP_FUNCTION(ncurses_wnoutrefresh)
-{
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wnoutrefresh(*win));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_waddstr(resource window, string str [, int n])
-   Outputs text at current postion in window */
-PHP_FUNCTION(ncurses_waddstr)
-{
-       zval *handle;
-       char *str;
-       int str_len;
-       long n = 0;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &handle, &str, &str_len, &n) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-       if (!n) {
-               RETURN_LONG(waddstr(*win, str));
-       } else {
-               RETURN_LONG(waddnstr(*win, str, n));
-       }
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wgetch(resource window)
-   Reads a character from keyboard (window) */
-PHP_FUNCTION(ncurses_wgetch)
-{
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wgetch(*win));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wattroff(resource window, int attrs)
-   Turns off attributes for a window */
-PHP_FUNCTION(ncurses_wattroff)
-{
-       zval *handle;
-       WINDOW **win;
-       long attrs;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &attrs) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wattroff(*win, attrs));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wattron(resource window, int attrs)
-   Turns on attributes for a window */
-PHP_FUNCTION(ncurses_wattron)
-{
-       zval *handle;
-       WINDOW **win;
-       long attrs;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &attrs) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wattron(*win, attrs));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wattrset(resource window, int attrs)
-   Set the attributes for a window */
-PHP_FUNCTION(ncurses_wattrset)
-{
-       zval *handle;
-       WINDOW **win;
-       long attrs;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &handle, &attrs) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wattrset(*win, attrs));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wstandend(resource window)
-   End standout mode for a window */
-PHP_FUNCTION(ncurses_wstandend)
-{
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wstandend(*win));
-}
-/* }}} */
-
-/* {{{ proto int ncurses_wstandout(resource window)
-   Enter standout mode for a window */
-PHP_FUNCTION(ncurses_wstandout)
-{
-       zval *handle;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       RETURN_LONG(wstandout(*win));
-}
-/* }}} */
-
-#if HAVE_NCURSES_PANEL
-/* {{{ proto resource ncurses_new_panel(resource window)
-   Create a new panel and associate it with window */
-PHP_FUNCTION(ncurses_new_panel)
-{
-       zval *handle;
-       WINDOW **win;
-       PANEL **panel;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_WINRES(win, &handle);
-
-       panel = (PANEL **)emalloc(sizeof(PANEL *));
-       *panel = new_panel(*win);
-
-       if (*panel == NULL) {
-               efree(panel);
-               RETURN_FALSE;
-       } else {
-               long id = ZEND_REGISTER_RESOURCE(return_value, panel, le_ncurses_panels);
-               set_panel_userptr(*panel, (void*)id);
-       }
-
-}
-/* }}} */
-
-/* {{{ proto bool ncurses_del_panel(resource panel)
-   Remove panel from the stack and delete it (but not the associated window) */
-PHP_FUNCTION(ncurses_del_panel)
-{
-       zval *handle;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-       zend_list_delete(Z_RESVAL_P(handle));
-
-       RETURN_TRUE;
-}
-/* }}} */
-
-/* {{{ proto int ncurses_hide_panel(resource panel)
-   Remove panel from the stack, making it invisible */
-PHP_FUNCTION(ncurses_hide_panel)
-{
-       zval *handle;
-       PANEL **panel;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-       
-       FETCH_PANEL(panel, &handle);
-
-       RETURN_LONG(hide_panel(*panel));
-
-}
-/* }}} */
-
-/* {{{ proto int ncurses_show_panel(resource panel)
-   Places an invisible panel on top of the stack, making it visible */
-PHP_FUNCTION(ncurses_show_panel)
-{
-       zval *handle;
-       PANEL **panel;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_PANEL(panel, &handle);
-
-       RETURN_LONG(show_panel(*panel));
-
-}
-/* }}} */
-
-/* {{{ proto int ncurses_top_panel(resource panel)
-   Moves a visible panel to the top of the stack */
-PHP_FUNCTION(ncurses_top_panel)
-{
-       zval *handle;
-       PANEL **panel;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_PANEL(panel, &handle);
-
-       RETURN_LONG(top_panel(*panel));
-
-}
-/* }}} */
-
-/* {{{ proto int ncurses_bottom_panel(resource panel)
-   Moves a visible panel to the bottom of the stack */
-PHP_FUNCTION(ncurses_bottom_panel)
-{
-       zval *handle;
-       PANEL **panel;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &handle) == FAILURE) {
-               return;
-       }
-
-       FETCH_PANEL(panel, &handle);
-
-       RETURN_LONG(bottom_panel(*panel));
-
-}
-/* }}} */
-
-/* {{{ proto int ncurses_move_panel(resource panel, int startx, int starty)
-   Moves a panel so that it's upper-left corner is at [startx, starty] */
-PHP_FUNCTION(ncurses_move_panel)
-{
-       zval *handle;
-       PANEL **panel;
-       long startx, starty;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &handle, &startx, &starty) == FAILURE) {
-               return;
-       }
-
-       FETCH_PANEL(panel, &handle);
-
-       RETURN_LONG(move_panel(*panel, startx, starty));
-
-}
-/* }}} */
-
-/* {{{ proto int ncurses_replace_panel(resource panel, resource window)
-   Replaces the window associated with panel */
-PHP_FUNCTION(ncurses_replace_panel)
-{
-       zval *phandle, *whandle;
-       PANEL **panel;
-       WINDOW **window;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &phandle, &whandle) == FAILURE) {
-               return;
-       }
-
-       FETCH_PANEL(panel, &phandle);
-       FETCH_WINRES(window, &whandle);
-
-       RETURN_LONG(replace_panel(*panel, *window));
-
-}
-/* }}} */
-
-/* {{{ proto resource ncurses_panel_above(resource panel)
-   Returns the panel above panel. If panel is null, returns the bottom panel in the stack */
-PHP_FUNCTION(ncurses_panel_above)
-{
-       zval *phandle = NULL;
-       PANEL **panel;
-       PANEL *above;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r!", &phandle) == FAILURE) {
-               return;
-       }
-
-       if (phandle) {
-               FETCH_PANEL(panel, &phandle);
-               above = panel_above(*panel);
-       } else {
-               above = panel_above((PANEL *)0);
-       }
-
-       if (above) {
-               long id = (long)panel_userptr(above);
-               zend_list_addref(id);
-               RETURN_RESOURCE(id);
-       } else {
-               RETURN_FALSE;
-       }
-}
-/* }}} */
-
-/* {{{ proto resource ncurses_panel_below(resource panel)
-   Returns the panel below panel. If panel is null, returns the top panel in the stack */
-PHP_FUNCTION(ncurses_panel_below)
-{
-       zval *phandle = NULL;
-       PANEL **panel;
-       PANEL *below;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r!", &phandle) == FAILURE) {
-               return;
-       }
-
-       if (phandle) {
-               FETCH_PANEL(panel, &phandle);
-               below = panel_below(*panel);
-       } else {
-               below = panel_below((PANEL *)0);
-       }
-       if (below) {
-               long id = (long)panel_userptr(below);
-               zend_list_addref(id);
-               RETURN_RESOURCE(id);
-       } else {
-               RETURN_FALSE;
-       }
-}
-/* }}} */
-
-/* {{{ proto resource ncurses_panel_window(resource panel)
-   Returns the window associated with panel */
-PHP_FUNCTION(ncurses_panel_window)
-{
-       zval *phandle = NULL;
-       PANEL **panel;
-       WINDOW **win;
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &phandle) == FAILURE) {
-               return;
-       }
-
-       FETCH_PANEL(panel, &phandle);
-
-       win = (WINDOW **)emalloc(sizeof(WINDOW *));
-       *win = panel_window(*panel);
-
-       if (*win == NULL) {
-               efree(win);
-               RETURN_FALSE;
-       }
-       ZEND_REGISTER_RESOURCE(return_value, win, le_ncurses_windows);
-}
-/* }}} */
-
-/* {{{ proto void ncurses_update_panels(void)
-   Refreshes the virtual screen to reflect the relations between panels in the stack. */
-PHP_FUNCTION(ncurses_update_panels)
-{
-       IS_NCURSES_INITIALIZED();
-       update_panels();
-}
-/* }}} */
-#endif /* HAVE_NCURSES_PANEL */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/ncurses/package.xml b/ext/ncurses/package.xml
deleted file mode 100644 (file)
index a5c3af3..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE package SYSTEM "../pear/package.dtd">
-<package>
- <name>ncurses</name>
- <summary>Terminal screen handling and optimization package</summary>
- <maintainers>
-  <maintainer>
-   <user>hholzgra</user>
-   <name>Hartmut Holzgraefe</name>
-   <email>hartmut@php.net</email>
-   <role>lead</role>
-  </maintainer>
-  <maintainer>
-   <user>georg</user>
-   <name>Georg Richter</name>
-   <role>developer</role>
-   <email>georg@php.net</email>
-  </maintainer>
-  <maintainer>
-   <user>iliaa</user>
-   <name>Ilia Alshanetsky</name>
-   <role>developer</role>
-   <email>iliaa@php.net</email>
-  </maintainer>
-  <maintainer>
-   <user>wez</user>
-   <name>Wez Furlong</name>
-   <role>developer</role>
-   <email>wez@php.net</email>
-  </maintainer>
- </maintainers>
- <description>
-ncurses (new curses) is a free software emulation of curses in 
-System V Rel 4.0 (and above). It uses terminfo format, supports 
-pads, colors, multiple highlights, form characters and function 
-key mapping. Because of the interactive nature of this library, 
-it will be of little use for writing Web applications, but may 
-be useful when writing scripts meant using PHP from the command 
-line.
- </description>
- <license>PHP</license>
- <release>
-  <state>beta</state>
-  <version>5.0rc1</version>
-  <date>2004-03-19</date>
-  <notes>
-package.xml added to support intallation using pear installer
-  </notes>
-  <configureoptions>
-   <configureoption name="with-ncurses" default="autodetect" prompt="path to ncurses installation?"/>
-  </configureoptions>
-  <filelist>
-   <file role="doc" name="CREDITS"/>
-   <file role="doc" name="EXPERIMENTAL"/>
-   <file role="doc" name="example1.php"/>
-   <file role="src" name="config.m4"/>
-   <file role="src" name="ncurses.c"/>
-   <file role="src" name="ncurses.php"/>
-   <file role="src" name="ncurses_fe.c"/>
-   <file role="src" name="ncurses_functions.c"/>
-   <file role="src" name="php_ncurses.h"/>
-   <file role="src" name="php_ncurses_fe.h"/>
-   <file role="test" name="tests/001.phpt"/>
-  </filelist>
-  <deps>
-   <dep type="php" rel="ge" version="5" />
-   <!-- doesn't work yet <dep type="os"  rel="has" name="unix"/> -->
-  </deps>
- </release>
-</package>
-<!--
-vim:et:ts=1:sw=1
--->
diff --git a/ext/ncurses/php_ncurses.h b/ext/ncurses/php_ncurses.h
deleted file mode 100644 (file)
index a9910f1..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP Version 5                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2006 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.01 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available through the world-wide-web at the following url:           |
-   | http://www.php.net/license/3_01.txt                                  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Author: Hartmut Holzgraefe <hholzgra@php.net>                        |
-   +----------------------------------------------------------------------+
- */
-
-#ifndef PHP_NCURSES_H
-#define PHP_NCURSES_H
-
-#ifdef HAVE_NCURSES_H
-# include <ncurses.h>
-#else
-# include <curses.h>
-#endif
-
-extern int le_ncurses_windows;
-
-#if HAVE_NCURSES_PANEL
-# include <panel.h>
-extern int le_ncurses_panels;
-#endif
-
-
-extern zend_module_entry ncurses_module_entry;
-#define phpext_ncurses_ptr &ncurses_module_entry
-
-extern zend_function_entry ncurses_functions[];
-#include "php_ncurses_fe.h"
-
-#ifdef PHP_WIN32
-#define PHP_NCURSES_API __declspec(dllexport)
-#else
-#define PHP_NCURSES_API
-#endif
-
-PHP_MINIT_FUNCTION(ncurses);
-PHP_MSHUTDOWN_FUNCTION(ncurses);
-PHP_MINFO_FUNCTION(ncurses);
-
-ZEND_BEGIN_MODULE_GLOBALS(ncurses)
-       int       registered_constants;
-ZEND_END_MODULE_GLOBALS(ncurses)
-
-/* In every function that needs to use variables in php_ncurses_globals,
-   do call NCURSES_LS_FETCH(); after declaring other variables used by
-   that function, and always refer to them as NCURSES_G(variable).
-   You are encouraged to rename these macros something shorter, see
-   examples in any other php module directory.
-*/
-
-#ifdef ZTS
-#define NCURSES_G(v) TSRMG(ncurses_globals_id, zend_ncurses_globals *, v)
-#define NCURSES_LS_FETCH() zend_ncurses_globals *ncurses_globals = ts_resource(ncurses_globals_id)
-#else
-#define NCURSES_G(v) (ncurses_globals.v)
-#define NCURSES_LS_FETCH()
-#endif
-
-ZEND_EXTERN_MODULE_GLOBALS(ncurses)
-       
-#endif  /* PHP_NCURSES_H */
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- */
diff --git a/ext/ncurses/php_ncurses_fe.h b/ext/ncurses/php_ncurses_fe.h
deleted file mode 100644 (file)
index 42eb203..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-   +----------------------------------------------------------------------+
-   | PHP Version 5                                                        |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 1997-2006 The PHP Group                                |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.01 of the PHP license,      |
-   | that is bundled with this package in the file LICENSE, and is        |
-   | available through the world-wide-web at the following url:           |
-   | http://www.php.net/license/3_01.txt                                  |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Authors: Hartmut Holzgraefe <hholzgra@php.net>                       |
-   |          Georg Richter <georg.richter@php-ev.de>                     |
-   +----------------------------------------------------------------------+
- */
-
-#ifndef PHP_NCURSES_FE_H
-#define PHP_NCURSES_FE_H
-
-PHP_FUNCTION(ncurses_addch);
-PHP_FUNCTION(ncurses_color_set);
-PHP_FUNCTION(ncurses_delwin);
-PHP_FUNCTION(ncurses_end);
-PHP_FUNCTION(ncurses_getch);
-PHP_FUNCTION(ncurses_has_colors);
-PHP_FUNCTION(ncurses_init);
-PHP_FUNCTION(ncurses_init_pair);
-PHP_FUNCTION(ncurses_color_content);
-PHP_FUNCTION(ncurses_pair_content);
-PHP_FUNCTION(ncurses_move);
-PHP_FUNCTION(ncurses_newwin);
-PHP_FUNCTION(ncurses_refresh);
-PHP_FUNCTION(ncurses_start_color);
-PHP_FUNCTION(ncurses_standout);
-PHP_FUNCTION(ncurses_standend);
-PHP_FUNCTION(ncurses_baudrate);
-PHP_FUNCTION(ncurses_beep);
-PHP_FUNCTION(ncurses_can_change_color);
-PHP_FUNCTION(ncurses_cbreak);
-PHP_FUNCTION(ncurses_clear);
-PHP_FUNCTION(ncurses_clrtobot);
-PHP_FUNCTION(ncurses_clrtoeol);
-PHP_FUNCTION(ncurses_def_prog_mode);
-PHP_FUNCTION(ncurses_reset_prog_mode);
-PHP_FUNCTION(ncurses_def_shell_mode);
-PHP_FUNCTION(ncurses_reset_shell_mode);
-PHP_FUNCTION(ncurses_delch);
-PHP_FUNCTION(ncurses_deleteln);
-PHP_FUNCTION(ncurses_doupdate);
-PHP_FUNCTION(ncurses_echo);
-PHP_FUNCTION(ncurses_erase);
-PHP_FUNCTION(ncurses_werase);
-PHP_FUNCTION(ncurses_erasechar);
-PHP_FUNCTION(ncurses_flash);
-PHP_FUNCTION(ncurses_flushinp);
-PHP_FUNCTION(ncurses_has_ic);
-PHP_FUNCTION(ncurses_has_il);
-PHP_FUNCTION(ncurses_inch);
-PHP_FUNCTION(ncurses_insertln);
-PHP_FUNCTION(ncurses_isendwin);
-PHP_FUNCTION(ncurses_killchar);
-PHP_FUNCTION(ncurses_nl);
-PHP_FUNCTION(ncurses_nocbreak);
-PHP_FUNCTION(ncurses_noecho);
-PHP_FUNCTION(ncurses_nonl);
-PHP_FUNCTION(ncurses_noraw);
-PHP_FUNCTION(ncurses_raw);
-PHP_FUNCTION(ncurses_meta);
-PHP_FUNCTION(ncurses_resetty);
-PHP_FUNCTION(ncurses_savetty);
-PHP_FUNCTION(ncurses_termattrs);
-PHP_FUNCTION(ncurses_use_default_colors);
-PHP_FUNCTION(ncurses_slk_attr);
-PHP_FUNCTION(ncurses_slk_clear);
-PHP_FUNCTION(ncurses_slk_noutrefresh);
-PHP_FUNCTION(ncurses_slk_refresh);
-PHP_FUNCTION(ncurses_slk_restore);
-PHP_FUNCTION(ncurses_slk_touch);
-PHP_FUNCTION(ncurses_attroff);
-PHP_FUNCTION(ncurses_attron);
-PHP_FUNCTION(ncurses_attrset);
-PHP_FUNCTION(ncurses_bkgd);
-PHP_FUNCTION(ncurses_curs_set);
-PHP_FUNCTION(ncurses_delay_output);
-PHP_FUNCTION(ncurses_echochar);
-PHP_FUNCTION(ncurses_halfdelay);
-PHP_FUNCTION(ncurses_has_key);
-PHP_FUNCTION(ncurses_insch);
-PHP_FUNCTION(ncurses_insdelln);
-PHP_FUNCTION(ncurses_mouseinterval);
-PHP_FUNCTION(ncurses_napms);
-PHP_FUNCTION(ncurses_scrl);
-PHP_FUNCTION(ncurses_slk_attroff);
-PHP_FUNCTION(ncurses_slk_attron);
-PHP_FUNCTION(ncurses_slk_attrset);
-PHP_FUNCTION(ncurses_slk_color);
-PHP_FUNCTION(ncurses_slk_init);
-PHP_FUNCTION(ncurses_slk_set);
-PHP_FUNCTION(ncurses_typeahead);
-PHP_FUNCTION(ncurses_ungetch);
-PHP_FUNCTION(ncurses_vidattr);
-PHP_FUNCTION(ncurses_wrefresh);
-PHP_FUNCTION(ncurses_use_extended_names);
-PHP_FUNCTION(ncurses_bkgdset);
-PHP_FUNCTION(ncurses_filter);
-PHP_FUNCTION(ncurses_noqiflush);
-PHP_FUNCTION(ncurses_qiflush);
-PHP_FUNCTION(ncurses_timeout);
-PHP_FUNCTION(ncurses_use_env);
-PHP_FUNCTION(ncurses_addstr);
-PHP_FUNCTION(ncurses_putp);
-PHP_FUNCTION(ncurses_scr_dump);
-PHP_FUNCTION(ncurses_scr_init);
-PHP_FUNCTION(ncurses_scr_restore);
-PHP_FUNCTION(ncurses_scr_set);
-PHP_FUNCTION(ncurses_mvaddch);
-PHP_FUNCTION(ncurses_mvaddchnstr);
-PHP_FUNCTION(ncurses_addchnstr);
-PHP_FUNCTION(ncurses_mvaddchstr);
-PHP_FUNCTION(ncurses_addchstr);
-PHP_FUNCTION(ncurses_mvaddnstr);
-PHP_FUNCTION(ncurses_addnstr);
-PHP_FUNCTION(ncurses_mvaddstr);
-PHP_FUNCTION(ncurses_mvdelch);
-PHP_FUNCTION(ncurses_mvgetch);
-PHP_FUNCTION(ncurses_mvinch);
-PHP_FUNCTION(ncurses_mvwaddstr);
-PHP_FUNCTION(ncurses_insstr);
-PHP_FUNCTION(ncurses_instr);
-PHP_FUNCTION(ncurses_mvhline);
-PHP_FUNCTION(ncurses_mvcur);
-PHP_FUNCTION(ncurses_init_color);
-PHP_FUNCTION(ncurses_border);
-PHP_FUNCTION(ncurses_assume_default_colors);
-PHP_FUNCTION(ncurses_define_key);
-PHP_FUNCTION(ncurses_hline);
-PHP_FUNCTION(ncurses_vline);
-PHP_FUNCTION(ncurses_keyok);
-PHP_FUNCTION(ncurses_termname);
-PHP_FUNCTION(ncurses_longname);
-PHP_FUNCTION(ncurses_mousemask);
-PHP_FUNCTION(ncurses_getmouse);
-PHP_FUNCTION(ncurses_ungetmouse);
-PHP_FUNCTION(ncurses_mouse_trafo);
-PHP_FUNCTION(ncurses_wmouse_trafo);
-PHP_FUNCTION(ncurses_waddstr);
-PHP_FUNCTION(ncurses_wnoutrefresh);
-PHP_FUNCTION(ncurses_wclear);
-PHP_FUNCTION(ncurses_wcolor_set);
-PHP_FUNCTION(ncurses_wgetch);
-PHP_FUNCTION(ncurses_keypad);
-PHP_FUNCTION(ncurses_wmove);
-
-PHP_FUNCTION(ncurses_newpad);
-PHP_FUNCTION(ncurses_prefresh);
-PHP_FUNCTION(ncurses_pnoutrefresh);
-
-PHP_FUNCTION(ncurses_wstandout);
-PHP_FUNCTION(ncurses_wstandend);
-PHP_FUNCTION(ncurses_wattrset);
-PHP_FUNCTION(ncurses_wattron);
-PHP_FUNCTION(ncurses_wattroff);
-PHP_FUNCTION(ncurses_waddch);
-PHP_FUNCTION(ncurses_wborder);
-PHP_FUNCTION(ncurses_whline);
-PHP_FUNCTION(ncurses_wvline);
-PHP_FUNCTION(ncurses_getyx);
-PHP_FUNCTION(ncurses_getmaxyx);
-#if HAVE_NCURSES_PANEL
-PHP_FUNCTION(ncurses_update_panels);
-PHP_FUNCTION(ncurses_panel_window);
-PHP_FUNCTION(ncurses_panel_below);
-PHP_FUNCTION(ncurses_panel_above);
-PHP_FUNCTION(ncurses_replace_panel);
-PHP_FUNCTION(ncurses_move_panel);
-PHP_FUNCTION(ncurses_bottom_panel);
-PHP_FUNCTION(ncurses_top_panel);
-PHP_FUNCTION(ncurses_show_panel);
-PHP_FUNCTION(ncurses_hide_panel);
-PHP_FUNCTION(ncurses_del_panel);
-PHP_FUNCTION(ncurses_new_panel);
-#endif
-
-
-#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/ncurses/tests/001.phpt b/ext/ncurses/tests/001.phpt
deleted file mode 100644 (file)
index 2316ba1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-Check for ncurses presence
---SKIPIF--
-<?php if (!extension_loaded("ncurses")) print "skip"; ?>
---FILE--
-<?php 
-echo "ncurses extension is available";
-/*
-       you can add regression tests for your extension here
-
-  the output of your test code has to be equal to the
-  text in the --EXPECT-- section below for the tests
-  to pass, differences between the output and the
-  expected text are interpreted as failure
-
-       see php5/tests/README for further information on
-  writing regression tests
-*/
-?>
---EXPECT--
-ncurses extension is available
\ No newline at end of file