diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2001-09-17 16:24:11 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2001-09-17 16:24:11 +0000 |
commit | 891443e15feb78b12b93f350cb235355731a1d88 (patch) | |
tree | aacbca3b567ae712141fc451238e7e20b1d5d8e3 /ext/ncurses/ncurses_functions.c | |
parent | b285fae0bc7724b7c66ab0859b527ed4f528b848 (diff) | |
download | php-git-891443e15feb78b12b93f350cb235355731a1d88.tar.gz |
will now configure out functions not available in ncurses 4.2
Diffstat (limited to 'ext/ncurses/ncurses_functions.c')
-rw-r--r-- | ext/ncurses/ncurses_functions.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c index dca635a74b..99cfc81b71 100644 --- a/ext/ncurses/ncurses_functions.c +++ b/ext/ncurses/ncurses_functions.c @@ -44,6 +44,7 @@ PHP_FUNCTION(ncurses_addch) */ PHP_FUNCTION(ncurses_color_set) { +#ifdef HAVE_NCURSES_COLOR_SET zval **pair; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pair) == FAILURE){ WRONG_PARAM_COUNT; @@ -52,6 +53,10 @@ PHP_FUNCTION(ncurses_color_set) convert_to_long_ex(pair); RETURN_LONG(color_set(_INT(pair),NULL)); +#else + php_error(E_WARNING,"%s not supported in this build"); + RETURN_FALSE; +#endif } /* }}} */ @@ -772,6 +777,7 @@ PHP_FUNCTION(ncurses_slk_attrset) */ PHP_FUNCTION(ncurses_slk_color) { +#ifdef HAVE_NCURSES_SLK_COLOR zval **intarg; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ WRONG_PARAM_COUNT; @@ -780,6 +786,10 @@ PHP_FUNCTION(ncurses_slk_color) convert_to_long_ex(intarg); RETURN_LONG(slk_color(_INT(intarg))); +#else + php_error(E_WARNING,"%s not supported in this build"); + RETURN_FALSE; +#endif } /* }}} */ @@ -847,6 +857,7 @@ PHP_FUNCTION(ncurses_vidattr) */ PHP_FUNCTION(ncurses_use_extended_names) { +#ifdef HAVE_NCURSES_USE_EXTENDED_NAMES zval **intarg; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ WRONG_PARAM_COUNT; @@ -855,6 +866,10 @@ PHP_FUNCTION(ncurses_use_extended_names) convert_to_long_ex(intarg); RETURN_LONG(use_extended_names(_INT(intarg))); +#else + php_error(E_WARNING,"%s not supported in this build"); + RETURN_FALSE; +#endif } /* }}} */ |