From 2f59bb576d63ef4e37bcb15525fec1d67a1b0e67 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Mon, 17 Sep 2001 21:59:15 +0000 Subject: whitespace --- ext/ncurses/config.m4 | 10 +- ext/ncurses/ncurses.c | 80 +-- ext/ncurses/ncurses_fe.c | 228 ++++----- ext/ncurses/ncurses_functions.c | 1048 +++++++++++++++++++-------------------- ext/ncurses/php_ncurses.h | 10 +- ext/ncurses/php_ncurses_fe.h | 2 +- 6 files changed, 689 insertions(+), 689 deletions(-) diff --git a/ext/ncurses/config.m4 b/ext/ncurses/config.m4 index 7153888324..7ec5c2fe0d 100644 --- a/ext/ncurses/config.m4 +++ b/ext/ncurses/config.m4 @@ -6,7 +6,7 @@ PHP_ARG_WITH(ncurses, for ncurses support, if test "$PHP_NCURSES" != "no"; then # --with-ncurses -> check with-path - SEARCH_PATH="/usr/local /usr" + SEARCH_PATH="/usr/local /usr" SEARCH_FOR="/include/curses.h" if test -r $PHP_NCURSES/; then # path given as parameter NCURSES_DIR=$PHP_NCURSES @@ -34,15 +34,15 @@ if test "$PHP_NCURSES" != "no"; then old_LIBS=$LIBS LIBS="$LIBS -L$NCURSES_DIR/lib -lm -ldl" AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_NCURSESLIB,1,[ ])], - [AC_MSG_ERROR(wrong ncurses lib version or lib not found)]) + [AC_MSG_ERROR(wrong ncurses lib version or lib not found)]) LIBS=$old_LIBS PHP_SUBST(NCURSES_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $NCURSES_DIR/lib, SAPRFC_SHARED_LIBADD) - AC_CHECK_LIB(ncurses, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])]) - AC_CHECK_LIB(ncurses, slk_color, [AC_DEFINE(HAVE_NCURSES_SLK_COLOR, 1, [ ])]) - AC_CHECK_LIB(ncurses, use_extended_names, [AC_DEFINE(HAVE_NCURSES_USE_EXTENDED_NAMES, 1, [ ])]) + AC_CHECK_LIB(ncurses, color_set, [AC_DEFINE(HAVE_NCURSES_COLOR_SET, 1, [ ])]) + AC_CHECK_LIB(ncurses, slk_color, [AC_DEFINE(HAVE_NCURSES_SLK_COLOR, 1, [ ])]) + AC_CHECK_LIB(ncurses, use_extended_names, [AC_DEFINE(HAVE_NCURSES_USE_EXTENDED_NAMES, 1, [ ])]) PHP_EXTENSION(ncurses, $ext_shared) diff --git a/ext/ncurses/ncurses.c b/ext/ncurses/ncurses.c index f3f3089821..07573bdbf9 100644 --- a/ext/ncurses/ncurses.c +++ b/ext/ncurses/ncurses.c @@ -36,24 +36,24 @@ int le_ncurses; static void ncurses_destruct(zend_rsrc_list_entry *rsrc TSRMLS_DC) { - WINDOW **pwin = (WINDOW **)rsrc->ptr; + WINDOW **pwin = (WINDOW **)rsrc->ptr; - delwin(*pwin); - efree(pwin); + delwin(*pwin); + efree(pwin); } /* {{{ ncurses_module_entry */ zend_module_entry ncurses_module_entry = { - "ncurses", - ncurses_functions, - PHP_MINIT(ncurses), - PHP_MSHUTDOWN(ncurses), - PHP_RINIT(ncurses), /* Replace with NULL if there's nothing to do at request start */ - PHP_RSHUTDOWN(ncurses), /* Replace with NULL if there's nothing to do at request end */ - PHP_MINFO(ncurses), - STANDARD_MODULE_PROPERTIES + "ncurses", + ncurses_functions, + PHP_MINIT(ncurses), + PHP_MSHUTDOWN(ncurses), + PHP_RINIT(ncurses), /* Replace with NULL if there's nothing to do at request start */ + PHP_RSHUTDOWN(ncurses), /* Replace with NULL if there's nothing to do at request end */ + PHP_MINFO(ncurses), + STANDARD_MODULE_PROPERTIES }; /* }}} */ @@ -78,15 +78,15 @@ PHP_INI_END() 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); - + 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); @@ -94,9 +94,9 @@ PHP_MINIT_FUNCTION(ncurses) PHP_NCURSES_CONST(KEY_RIGHT); PHP_NCURSES_CONST(KEY_BACKSPACE); - le_ncurses = zend_register_list_destructors_ex(ncurses_destruct, NULL, "ncurses_handle", module_number); + le_ncurses = zend_register_list_destructors_ex(ncurses_destruct, NULL, "ncurses_handle", module_number); - return SUCCESS; + return SUCCESS; } /* }}} */ @@ -104,7 +104,7 @@ PHP_MINIT_FUNCTION(ncurses) */ PHP_MSHUTDOWN_FUNCTION(ncurses) { - return SUCCESS; + return SUCCESS; } /* }}} */ @@ -113,7 +113,7 @@ PHP_MSHUTDOWN_FUNCTION(ncurses) */ PHP_RINIT_FUNCTION(ncurses) { - return SUCCESS; + return SUCCESS; } /* }}} */ @@ -122,7 +122,7 @@ PHP_RINIT_FUNCTION(ncurses) */ PHP_RSHUTDOWN_FUNCTION(ncurses) { - return SUCCESS; + return SUCCESS; } /* }}} */ @@ -130,13 +130,13 @@ PHP_RSHUTDOWN_FUNCTION(ncurses) */ PHP_MINFO_FUNCTION(ncurses) { - php_info_print_table_start(); - php_info_print_table_header(2, "ncurses support", "enabled"); - php_info_print_table_end(); + php_info_print_table_start(); + php_info_print_table_header(2, "ncurses support", "enabled"); + php_info_print_table_end(); - /* Remove comments if you have entries in php.ini - DISPLAY_INI_ENTRIES(); - */ + /* Remove comments if you have entries in php.ini + DISPLAY_INI_ENTRIES(); + */ } /* }}} */ @@ -149,18 +149,18 @@ PHP_MINFO_FUNCTION(ncurses) Return a string to confirm that the module is compiled in */ PHP_FUNCTION(confirm_ncurses_compiled) { - zval **arg; - int len; - char string[256]; + zval **arg; + int len; + char string[256]; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { - WRONG_PARAM_COUNT; - } + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(arg); + convert_to_string_ex(arg); - len = sprintf(string, "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "ncurses", Z_STRVAL_PP(arg)); - RETURN_STRINGL(string, len, 1); + len = sprintf(string, "Congratulations! You have successfully modified ext/%.78s/config.m4. Module %.78s is now compiled into PHP.", "ncurses", Z_STRVAL_PP(arg)); + RETURN_STRINGL(string, len, 1); } /* }}} */ /* The previous line is meant for vim and emacs, so it can correctly fold and diff --git a/ext/ncurses/ncurses_fe.c b/ext/ncurses/ncurses_fe.c index 05c7830b3a..180d83f34e 100644 --- a/ext/ncurses/ncurses_fe.c +++ b/ext/ncurses/ncurses_fe.c @@ -30,118 +30,118 @@ * Every user visible function must have an entry in ncurses_functions[]. */ function_entry ncurses_functions[] = { - PHP_FE(confirm_ncurses_compiled, NULL) /* For testing, remove later. */ - PHP_FE(ncurses_addch, NULL) - PHP_FE(ncurses_color_set, NULL) - 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_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_def_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_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_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) - PHP_FE(ncurses_slk_color, NULL) - PHP_FE(ncurses_slk_init, NULL) - PHP_FE(ncurses_typeahead, NULL) - PHP_FE(ncurses_ungetch, NULL) - PHP_FE(ncurses_vidattr, NULL) - PHP_FE(ncurses_wrefresh, NULL) - PHP_FE(ncurses_use_extended_names, NULL) - 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, NULL) - PHP_FE(ncurses_mvhline, NULL) - PHP_FE(ncurses_mvcur, NULL) - PHP_FE(ncurses_init_color, NULL) - PHP_FE(ncurses_border, NULL) - PHP_FE(ncurses_assume_default_colors, NULL) - PHP_FE(ncurses_define_key, NULL) - PHP_FE(ncurses_hline, NULL) - PHP_FE(ncurses_vline, NULL) - PHP_FE(ncurses_keyok, NULL) - {NULL, NULL, NULL} /* Must be the last line in ncurses_functions[] */ + PHP_FE(confirm_ncurses_compiled, NULL) /* For testing, remove later. */ + PHP_FE(ncurses_addch, NULL) + PHP_FE(ncurses_color_set, NULL) + 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_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_def_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_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_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) + PHP_FE(ncurses_slk_color, NULL) + PHP_FE(ncurses_slk_init, NULL) + PHP_FE(ncurses_typeahead, NULL) + PHP_FE(ncurses_ungetch, NULL) + PHP_FE(ncurses_vidattr, NULL) + PHP_FE(ncurses_wrefresh, NULL) + PHP_FE(ncurses_use_extended_names, NULL) + 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, NULL) + PHP_FE(ncurses_mvhline, NULL) + PHP_FE(ncurses_mvcur, NULL) + PHP_FE(ncurses_init_color, NULL) + PHP_FE(ncurses_border, NULL) + PHP_FE(ncurses_assume_default_colors, NULL) + PHP_FE(ncurses_define_key, NULL) + PHP_FE(ncurses_hline, NULL) + PHP_FE(ncurses_vline, NULL) + PHP_FE(ncurses_keyok, NULL) + {NULL, NULL, NULL} /* Must be the last line in ncurses_functions[] */ }; diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c index 18380cb2f9..a014f049c8 100644 --- a/ext/ncurses/ncurses_functions.c +++ b/ext/ncurses/ncurses_functions.c @@ -33,14 +33,14 @@ */ PHP_FUNCTION(ncurses_addch) { - zval **ch; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &ch) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(ch); + zval **ch; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &ch) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(ch); - RETURN_LONG(addch(_INT(ch))); + RETURN_LONG(addch(_INT(ch))); } /* }}} */ @@ -49,18 +49,18 @@ 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; - } - - convert_to_long_ex(pair); + zval **pair; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &pair) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(pair); - RETURN_LONG(color_set(_INT(pair),NULL)); + RETURN_LONG(color_set(_INT(pair),NULL)); #else - php_error(E_WARNING,"%s not supported in this build"); - RETURN_FALSE; -#endif + php_error(E_WARNING,"%s not supported in this build"); + RETURN_FALSE; +#endif } /* }}} */ @@ -68,16 +68,16 @@ PHP_FUNCTION(ncurses_color_set) */ PHP_FUNCTION(ncurses_delwin) { - zval **handle; - WINDOW *w; + zval **handle; + WINDOW *w; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &handle) == FAILURE){ - WRONG_PARAM_COUNT; - } + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &handle) == FAILURE){ + WRONG_PARAM_COUNT; + } - FETCH_WINRES(w,handle); + FETCH_WINRES(w,handle); - zend_list_delete(_INT(handle)); + zend_list_delete(_INT(handle)); } /* }}} */ @@ -85,7 +85,7 @@ PHP_FUNCTION(ncurses_delwin) */ PHP_FUNCTION(ncurses_end) { - RETURN_LONG(endwin()); /* endialize the curses library */ + RETURN_LONG(endwin()); /* endialize the curses library */ } /* }}} */ @@ -93,7 +93,7 @@ PHP_FUNCTION(ncurses_end) */ PHP_FUNCTION(ncurses_getch) { - RETURN_LONG(getch()); + RETURN_LONG(getch()); } /* }}} */ @@ -101,7 +101,7 @@ PHP_FUNCTION(ncurses_getch) */ PHP_FUNCTION(ncurses_has_colors) { - RETURN_LONG(has_colors()); + RETURN_LONG(has_colors()); } /* }}} */ @@ -109,26 +109,26 @@ PHP_FUNCTION(ncurses_has_colors) */ 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 */} + 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 */} /* }}} */ /* {{{ proto int ncurses_init_pair(int pair, int fg, int bg) */ PHP_FUNCTION(ncurses_init_pair) { - zval **pair, **fg, **bg; - if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &pair, &fg, &bg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(pair); - convert_to_long_ex(fg); - convert_to_long_ex(bg); + zval **pair, **fg, **bg; + if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &pair, &fg, &bg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(pair); + convert_to_long_ex(fg); + convert_to_long_ex(bg); - RETURN_LONG(init_pair(_INT(pair),_INT(fg),_INT(bg))); + RETURN_LONG(init_pair(_INT(pair),_INT(fg),_INT(bg))); } /* }}} */ @@ -136,15 +136,15 @@ PHP_FUNCTION(ncurses_init_pair) */ PHP_FUNCTION(ncurses_move) { - zval **x, **y; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(x); - convert_to_long_ex(y); + zval **x, **y; + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(x); + convert_to_long_ex(y); - RETURN_LONG(move(_INT(x),_INT(y))); + RETURN_LONG(move(_INT(x),_INT(y))); } /* }}} */ @@ -152,26 +152,26 @@ PHP_FUNCTION(ncurses_move) */ PHP_FUNCTION(ncurses_newwin) { - zval **rows,**cols,**y,**x; - WINDOW **pwin = (WINDOW **)emalloc(sizeof(WINDOW *)); + zval **rows,**cols,**y,**x; + WINDOW **pwin = (WINDOW **)emalloc(sizeof(WINDOW *)); - if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &rows,&cols,&y,&x) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(rows); - convert_to_long_ex(cols); - convert_to_long_ex(y); - convert_to_long_ex(x); + if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &rows,&cols,&y,&x) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(rows); + convert_to_long_ex(cols); + convert_to_long_ex(y); + convert_to_long_ex(x); - *pwin=newwin(_INT(rows),_INT(cols),_INT(y),_INT(x)); - - if(!*pwin) { - efree(pwin); - RETURN_FALSE; - } + *pwin=newwin(_INT(rows),_INT(cols),_INT(y),_INT(x)); + + if(!*pwin) { + efree(pwin); + RETURN_FALSE; + } - ZEND_REGISTER_RESOURCE(return_value, pwin, le_ncurses); + ZEND_REGISTER_RESOURCE(return_value, pwin, le_ncurses); } /* }}} */ @@ -179,7 +179,7 @@ PHP_FUNCTION(ncurses_newwin) */ PHP_FUNCTION(ncurses_refresh) { - RETURN_LONG(refresh()); + RETURN_LONG(refresh()); } /* }}} */ @@ -187,7 +187,7 @@ PHP_FUNCTION(ncurses_refresh) */ PHP_FUNCTION(ncurses_start_color) { - RETURN_LONG(start_color()); + RETURN_LONG(start_color()); } /* }}} */ @@ -197,7 +197,7 @@ PHP_FUNCTION(ncurses_start_color) */ PHP_FUNCTION(ncurses_standout) { - RETURN_LONG(standout()); + RETURN_LONG(standout()); } /* }}} */ @@ -205,7 +205,7 @@ PHP_FUNCTION(ncurses_standout) */ PHP_FUNCTION(ncurses_standend) { - RETURN_LONG(standend()); + RETURN_LONG(standend()); } /* }}} */ @@ -213,7 +213,7 @@ PHP_FUNCTION(ncurses_standend) */ PHP_FUNCTION(ncurses_baudrate) { - RETURN_LONG(baudrate()); + RETURN_LONG(baudrate()); } /* }}} */ @@ -221,7 +221,7 @@ PHP_FUNCTION(ncurses_baudrate) */ PHP_FUNCTION(ncurses_beep) { - RETURN_LONG(beep()); + RETURN_LONG(beep()); } /* }}} */ @@ -229,7 +229,7 @@ PHP_FUNCTION(ncurses_beep) */ PHP_FUNCTION(ncurses_can_change_color) { - RETURN_LONG(can_change_color()); + RETURN_LONG(can_change_color()); } /* }}} */ @@ -237,7 +237,7 @@ PHP_FUNCTION(ncurses_can_change_color) */ PHP_FUNCTION(ncurses_cbreak) { - RETURN_LONG(cbreak()); + RETURN_LONG(cbreak()); } /* }}} */ @@ -245,7 +245,7 @@ PHP_FUNCTION(ncurses_cbreak) */ PHP_FUNCTION(ncurses_clear) { - RETURN_LONG(clear()); + RETURN_LONG(clear()); } /* }}} */ @@ -253,7 +253,7 @@ PHP_FUNCTION(ncurses_clear) */ PHP_FUNCTION(ncurses_clrtobot) { - RETURN_LONG(clrtobot()); + RETURN_LONG(clrtobot()); } /* }}} */ @@ -261,7 +261,7 @@ PHP_FUNCTION(ncurses_clrtobot) */ PHP_FUNCTION(ncurses_clrtoeol) { - RETURN_LONG(clrtoeol()); + RETURN_LONG(clrtoeol()); } /* }}} */ @@ -269,7 +269,7 @@ PHP_FUNCTION(ncurses_clrtoeol) */ PHP_FUNCTION(ncurses_def_prog_mode) { - RETURN_LONG(def_prog_mode()); + RETURN_LONG(def_prog_mode()); } /* }}} */ @@ -277,7 +277,7 @@ PHP_FUNCTION(ncurses_def_prog_mode) */ PHP_FUNCTION(ncurses_def_shell_mode) { - RETURN_LONG(def_shell_mode()); + RETURN_LONG(def_shell_mode()); } /* }}} */ @@ -285,7 +285,7 @@ PHP_FUNCTION(ncurses_def_shell_mode) */ PHP_FUNCTION(ncurses_delch) { - RETURN_LONG(delch()); + RETURN_LONG(delch()); } /* }}} */ @@ -293,7 +293,7 @@ PHP_FUNCTION(ncurses_delch) */ PHP_FUNCTION(ncurses_deleteln) { - RETURN_LONG(deleteln()); + RETURN_LONG(deleteln()); } /* }}} */ @@ -301,7 +301,7 @@ PHP_FUNCTION(ncurses_deleteln) */ PHP_FUNCTION(ncurses_doupdate) { - RETURN_LONG(doupdate()); + RETURN_LONG(doupdate()); } /* }}} */ @@ -309,7 +309,7 @@ PHP_FUNCTION(ncurses_doupdate) */ PHP_FUNCTION(ncurses_echo) { - RETURN_LONG(echo()); + RETURN_LONG(echo()); } /* }}} */ @@ -317,7 +317,7 @@ PHP_FUNCTION(ncurses_echo) */ PHP_FUNCTION(ncurses_erase) { - RETURN_LONG(erase()); + RETURN_LONG(erase()); } /* }}} */ @@ -325,7 +325,7 @@ PHP_FUNCTION(ncurses_erase) */ PHP_FUNCTION(ncurses_erasechar) { - RETURN_LONG(erasechar()); + RETURN_LONG(erasechar()); } /* }}} */ @@ -333,7 +333,7 @@ PHP_FUNCTION(ncurses_erasechar) */ PHP_FUNCTION(ncurses_flash) { - RETURN_LONG(flash()); + RETURN_LONG(flash()); } /* }}} */ @@ -341,7 +341,7 @@ PHP_FUNCTION(ncurses_flash) */ PHP_FUNCTION(ncurses_flushinp) { - RETURN_LONG(flushinp()); + RETURN_LONG(flushinp()); } /* }}} */ @@ -349,7 +349,7 @@ PHP_FUNCTION(ncurses_flushinp) */ PHP_FUNCTION(ncurses_has_ic) { - RETURN_LONG(has_ic()); + RETURN_LONG(has_ic()); } /* }}} */ @@ -358,7 +358,7 @@ PHP_FUNCTION(ncurses_has_ic) */ PHP_FUNCTION(ncurses_has_il) { - RETURN_LONG(has_il()); + RETURN_LONG(has_il()); } /* }}} */ @@ -366,7 +366,7 @@ PHP_FUNCTION(ncurses_has_il) */ PHP_FUNCTION(ncurses_inch) { - RETURN_LONG(inch()); + RETURN_LONG(inch()); } /* }}} */ @@ -374,7 +374,7 @@ PHP_FUNCTION(ncurses_inch) */ PHP_FUNCTION(ncurses_insertln) { - RETURN_LONG(insertln()); + RETURN_LONG(insertln()); } /* }}} */ @@ -382,7 +382,7 @@ PHP_FUNCTION(ncurses_insertln) */ PHP_FUNCTION(ncurses_isendwin) { - RETURN_LONG(isendwin()); + RETURN_LONG(isendwin()); } /* }}} */ @@ -390,7 +390,7 @@ PHP_FUNCTION(ncurses_isendwin) */ PHP_FUNCTION(ncurses_killchar) { - RETURN_LONG(killchar()); + RETURN_LONG(killchar()); } /* }}} */ @@ -398,7 +398,7 @@ PHP_FUNCTION(ncurses_killchar) */ PHP_FUNCTION(ncurses_nl) { - RETURN_LONG(nl()); + RETURN_LONG(nl()); } /* }}} */ @@ -406,7 +406,7 @@ PHP_FUNCTION(ncurses_nl) */ PHP_FUNCTION(ncurses_nocbreak) { - RETURN_LONG(nocbreak()); + RETURN_LONG(nocbreak()); } /* }}} */ @@ -414,7 +414,7 @@ PHP_FUNCTION(ncurses_nocbreak) */ PHP_FUNCTION(ncurses_noecho) { - RETURN_LONG(noecho()); + RETURN_LONG(noecho()); } /* }}} */ @@ -422,7 +422,7 @@ PHP_FUNCTION(ncurses_noecho) */ PHP_FUNCTION(ncurses_nonl) { - RETURN_LONG(nonl()); + RETURN_LONG(nonl()); } /* }}} */ @@ -430,7 +430,7 @@ PHP_FUNCTION(ncurses_nonl) */ PHP_FUNCTION(ncurses_noraw) { - RETURN_LONG(noraw()); + RETURN_LONG(noraw()); } /* }}} */ @@ -438,7 +438,7 @@ PHP_FUNCTION(ncurses_noraw) */ PHP_FUNCTION(ncurses_raw) { - RETURN_LONG(raw()); + RETURN_LONG(raw()); } /* }}} */ @@ -446,7 +446,7 @@ PHP_FUNCTION(ncurses_raw) */ PHP_FUNCTION(ncurses_resetty) { - RETURN_LONG(resetty()); + RETURN_LONG(resetty()); } /* }}} */ @@ -454,7 +454,7 @@ PHP_FUNCTION(ncurses_resetty) */ PHP_FUNCTION(ncurses_savetty) { - RETURN_LONG(savetty()); + RETURN_LONG(savetty()); } /* }}} */ @@ -462,7 +462,7 @@ PHP_FUNCTION(ncurses_savetty) */ PHP_FUNCTION(ncurses_termattrs) { - RETURN_LONG(termattrs()); + RETURN_LONG(termattrs()); } /* }}} */ @@ -470,7 +470,7 @@ PHP_FUNCTION(ncurses_termattrs) */ PHP_FUNCTION(ncurses_use_default_colors) { - RETURN_LONG(use_default_colors()); + RETURN_LONG(use_default_colors()); } /* }}} */ @@ -478,7 +478,7 @@ PHP_FUNCTION(ncurses_use_default_colors) */ PHP_FUNCTION(ncurses_slk_attr) { - RETURN_LONG(slk_attr()); + RETURN_LONG(slk_attr()); } /* }}} */ @@ -486,7 +486,7 @@ PHP_FUNCTION(ncurses_slk_attr) */ PHP_FUNCTION(ncurses_slk_clear) { - RETURN_LONG(slk_clear()); + RETURN_LONG(slk_clear()); } /* }}} */ @@ -494,7 +494,7 @@ PHP_FUNCTION(ncurses_slk_clear) */ PHP_FUNCTION(ncurses_slk_noutrefresh) { - RETURN_LONG(slk_noutrefresh()); + RETURN_LONG(slk_noutrefresh()); } /* }}} */ @@ -502,7 +502,7 @@ PHP_FUNCTION(ncurses_slk_noutrefresh) */ PHP_FUNCTION(ncurses_slk_refresh) { - RETURN_LONG(slk_refresh()); + RETURN_LONG(slk_refresh()); } /* }}} */ @@ -510,7 +510,7 @@ PHP_FUNCTION(ncurses_slk_refresh) */ PHP_FUNCTION(ncurses_slk_restore) { - RETURN_LONG(slk_restore()); + RETURN_LONG(slk_restore()); } /* }}} */ @@ -518,7 +518,7 @@ PHP_FUNCTION(ncurses_slk_restore) */ PHP_FUNCTION(ncurses_slk_touch) { - RETURN_LONG(slk_touch()); + RETURN_LONG(slk_touch()); } /* }}} */ @@ -526,14 +526,14 @@ PHP_FUNCTION(ncurses_slk_touch) */ PHP_FUNCTION(ncurses_attroff) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(attroff(_INT(intarg))); + RETURN_LONG(attroff(_INT(intarg))); } /* }}} */ @@ -541,14 +541,14 @@ PHP_FUNCTION(ncurses_attroff) */ PHP_FUNCTION(ncurses_attron) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(attron(_INT(intarg))); + RETURN_LONG(attron(_INT(intarg))); } /* }}} */ @@ -556,14 +556,14 @@ PHP_FUNCTION(ncurses_attron) */ PHP_FUNCTION(ncurses_attrset) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(attrset(_INT(intarg))); + RETURN_LONG(attrset(_INT(intarg))); } /* }}} */ @@ -571,14 +571,14 @@ PHP_FUNCTION(ncurses_attrset) */ PHP_FUNCTION(ncurses_bkgd) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(bkgd(_INT(intarg))); + RETURN_LONG(bkgd(_INT(intarg))); } /* }}} */ @@ -586,14 +586,14 @@ PHP_FUNCTION(ncurses_bkgd) */ PHP_FUNCTION(ncurses_curs_set) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(curs_set(_INT(intarg))); + RETURN_LONG(curs_set(_INT(intarg))); } /* }}} */ @@ -601,14 +601,14 @@ PHP_FUNCTION(ncurses_curs_set) */ PHP_FUNCTION(ncurses_delay_output) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(delay_output(_INT(intarg))); + RETURN_LONG(delay_output(_INT(intarg))); } /* }}} */ @@ -616,14 +616,14 @@ PHP_FUNCTION(ncurses_delay_output) */ PHP_FUNCTION(ncurses_echochar) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(echochar(_INT(intarg))); + RETURN_LONG(echochar(_INT(intarg))); } /* }}} */ @@ -631,14 +631,14 @@ PHP_FUNCTION(ncurses_echochar) */ PHP_FUNCTION(ncurses_halfdelay) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(halfdelay(_INT(intarg))); + RETURN_LONG(halfdelay(_INT(intarg))); } /* }}} */ @@ -646,14 +646,14 @@ PHP_FUNCTION(ncurses_halfdelay) */ PHP_FUNCTION(ncurses_has_key) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(has_key(_INT(intarg))); + RETURN_LONG(has_key(_INT(intarg))); } /* }}} */ @@ -661,14 +661,14 @@ PHP_FUNCTION(ncurses_has_key) */ PHP_FUNCTION(ncurses_insch) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(insch(_INT(intarg))); + RETURN_LONG(insch(_INT(intarg))); } /* }}} */ @@ -676,14 +676,14 @@ PHP_FUNCTION(ncurses_insch) */ PHP_FUNCTION(ncurses_insdelln) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(insdelln(_INT(intarg))); + RETURN_LONG(insdelln(_INT(intarg))); } /* }}} */ @@ -691,14 +691,14 @@ PHP_FUNCTION(ncurses_insdelln) */ PHP_FUNCTION(ncurses_mouseinterval) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(mouseinterval(_INT(intarg))); + RETURN_LONG(mouseinterval(_INT(intarg))); } /* }}} */ @@ -706,14 +706,14 @@ PHP_FUNCTION(ncurses_mouseinterval) */ PHP_FUNCTION(ncurses_napms) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(napms(_INT(intarg))); + RETURN_LONG(napms(_INT(intarg))); } /* }}} */ @@ -721,14 +721,14 @@ PHP_FUNCTION(ncurses_napms) */ PHP_FUNCTION(ncurses_scrl) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(scrl(_INT(intarg))); + RETURN_LONG(scrl(_INT(intarg))); } /* }}} */ @@ -736,14 +736,14 @@ PHP_FUNCTION(ncurses_scrl) */ PHP_FUNCTION(ncurses_slk_attroff) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(slk_attroff(_INT(intarg))); + RETURN_LONG(slk_attroff(_INT(intarg))); } /* }}} */ @@ -751,14 +751,14 @@ PHP_FUNCTION(ncurses_slk_attroff) */ PHP_FUNCTION(ncurses_slk_attron) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(slk_attron(_INT(intarg))); + RETURN_LONG(slk_attron(_INT(intarg))); } /* }}} */ @@ -766,14 +766,14 @@ PHP_FUNCTION(ncurses_slk_attron) */ PHP_FUNCTION(ncurses_slk_attrset) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(slk_attrset(_INT(intarg))); + RETURN_LONG(slk_attrset(_INT(intarg))); } /* }}} */ @@ -782,18 +782,18 @@ 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; - } - - convert_to_long_ex(intarg); - - RETURN_LONG(slk_color(_INT(intarg))); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + 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 + php_error(E_WARNING,"%s not supported in this build"); + RETURN_FALSE; +#endif } /* }}} */ @@ -801,14 +801,14 @@ PHP_FUNCTION(ncurses_slk_color) */ PHP_FUNCTION(ncurses_slk_init) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(slk_init(_INT(intarg))); + RETURN_LONG(slk_init(_INT(intarg))); } /* }}} */ @@ -816,14 +816,14 @@ PHP_FUNCTION(ncurses_slk_init) */ PHP_FUNCTION(ncurses_typeahead) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(typeahead(_INT(intarg))); + RETURN_LONG(typeahead(_INT(intarg))); } /* }}} */ @@ -831,14 +831,14 @@ PHP_FUNCTION(ncurses_typeahead) */ PHP_FUNCTION(ncurses_ungetch) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(ungetch(_INT(intarg))); + RETURN_LONG(ungetch(_INT(intarg))); } /* }}} */ @@ -846,14 +846,14 @@ PHP_FUNCTION(ncurses_ungetch) */ PHP_FUNCTION(ncurses_vidattr) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - RETURN_LONG(vidattr(_INT(intarg))); + RETURN_LONG(vidattr(_INT(intarg))); } /* }}} */ @@ -862,18 +862,18 @@ 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; - } - - convert_to_long_ex(intarg); - - RETURN_LONG(use_extended_names(_INT(intarg))); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + 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 + php_error(E_WARNING,"%s not supported in this build"); + RETURN_FALSE; +#endif } /* }}} */ @@ -881,14 +881,14 @@ PHP_FUNCTION(ncurses_use_extended_names) */ PHP_FUNCTION(ncurses_bkgdset) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - bkgdset(_INT(intarg)); + bkgdset(_INT(intarg)); } /* }}} */ @@ -896,7 +896,7 @@ PHP_FUNCTION(ncurses_bkgdset) */ PHP_FUNCTION(ncurses_filter) { - filter(); + filter(); } /* }}} */ @@ -904,7 +904,7 @@ PHP_FUNCTION(ncurses_filter) */ PHP_FUNCTION(ncurses_noqiflush) { - noqiflush(); + noqiflush(); } /* }}} */ @@ -912,7 +912,7 @@ PHP_FUNCTION(ncurses_noqiflush) */ PHP_FUNCTION(ncurses_qiflush) { - qiflush(); + qiflush(); } /* }}} */ @@ -920,14 +920,14 @@ PHP_FUNCTION(ncurses_qiflush) */ PHP_FUNCTION(ncurses_timeout) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - timeout(_INT(intarg)); + timeout(_INT(intarg)); } /* }}} */ @@ -935,14 +935,14 @@ PHP_FUNCTION(ncurses_timeout) */ PHP_FUNCTION(ncurses_use_env) { - zval **intarg; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ - WRONG_PARAM_COUNT; - } - - convert_to_long_ex(intarg); + zval **intarg; + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &intarg) == FAILURE){ + WRONG_PARAM_COUNT; + } + + convert_to_long_ex(intarg); - use_env(_INT(intarg)); + use_env(_INT(intarg)); } /* }}} */ @@ -950,15 +950,15 @@ PHP_FUNCTION(ncurses_use_env) */ PHP_FUNCTION(ncurses_addstr) { - zval **data; + zval **data; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(data); + convert_to_string_ex(data); - RETURN_LONG(addstr(_STRING(data))); + RETURN_LONG(addstr(_STRING(data))); } /* }}} */ @@ -974,15 +974,15 @@ PHP_FUNCTION(ncurses_addstr) */ PHP_FUNCTION(ncurses_putp) { - zval **data; + zval **data; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(data); + convert_to_string_ex(data); - RETURN_LONG(putp(_STRING(data))); + RETURN_LONG(putp(_STRING(data))); } /* }}} */ @@ -990,15 +990,15 @@ PHP_FUNCTION(ncurses_putp) */ PHP_FUNCTION(ncurses_scr_dump) { - zval **data; + zval **data; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(data); + convert_to_string_ex(data); - RETURN_LONG(scr_dump(_STRING(data))); + RETURN_LONG(scr_dump(_STRING(data))); } /* }}} */ @@ -1006,15 +1006,15 @@ PHP_FUNCTION(ncurses_scr_dump) */ PHP_FUNCTION(ncurses_scr_init) { - zval **data; + zval **data; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(data); + convert_to_string_ex(data); - RETURN_LONG(scr_init(_STRING(data))); + RETURN_LONG(scr_init(_STRING(data))); } /* }}} */ @@ -1022,15 +1022,15 @@ PHP_FUNCTION(ncurses_scr_init) */ PHP_FUNCTION(ncurses_scr_restore) { - zval **data; + zval **data; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(data); + convert_to_string_ex(data); - RETURN_LONG(scr_restore(_STRING(data))); + RETURN_LONG(scr_restore(_STRING(data))); } /* }}} */ @@ -1038,15 +1038,15 @@ PHP_FUNCTION(ncurses_scr_restore) */ PHP_FUNCTION(ncurses_scr_set) { - zval **data; + zval **data; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &data) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(data); + convert_to_string_ex(data); - RETURN_LONG(scr_set(_STRING(data))); + RETURN_LONG(scr_set(_STRING(data))); } /* }}} */ @@ -1054,17 +1054,17 @@ PHP_FUNCTION(ncurses_scr_set) */ PHP_FUNCTION(ncurses_mvaddch) { - zval **x,**y,**c; + zval **x,**y,**c; - if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &x, &y, &c) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &x, &y, &c) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); - convert_to_long_ex(c); + convert_to_long_ex(x); + convert_to_long_ex(y); + convert_to_long_ex(c); - RETURN_LONG(mvaddch(_INT(x),_INT(y),_INT(c))); + RETURN_LONG(mvaddch(_INT(x),_INT(y),_INT(c))); } /* }}} */ @@ -1072,18 +1072,18 @@ PHP_FUNCTION(ncurses_mvaddch) */ PHP_FUNCTION(ncurses_mvaddchnstr) { - zval **x,**y,**s,**n; + zval **x,**y,**s,**n; - if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &x, &y, &s, &n) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &x, &y, &s, &n) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); - convert_to_string_ex(s); - convert_to_long_ex(n); + convert_to_long_ex(x); + convert_to_long_ex(y); + convert_to_string_ex(s); + convert_to_long_ex(n); - RETURN_LONG(mvaddchnstr(_INT(x),_INT(y),(chtype *)_STRING(s),_INT(n))); + RETURN_LONG(mvaddchnstr(_INT(x),_INT(y),(chtype *)_STRING(s),_INT(n))); } /* }}} */ @@ -1091,16 +1091,16 @@ PHP_FUNCTION(ncurses_mvaddchnstr) */ PHP_FUNCTION(ncurses_addchnstr) { - zval **s,**n; + zval **s,**n; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s, &n) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s, &n) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(s); - convert_to_long_ex(n); + convert_to_string_ex(s); + convert_to_long_ex(n); - RETURN_LONG(addchnstr((chtype *)_STRING(s),_INT(n))); + RETURN_LONG(addchnstr((chtype *)_STRING(s),_INT(n))); } /* }}} */ @@ -1108,17 +1108,17 @@ PHP_FUNCTION(ncurses_addchnstr) */ PHP_FUNCTION(ncurses_mvaddchstr) { - zval **x,**y,**s; + zval **x,**y,**s; - if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &x, &y, &s) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &x, &y, &s) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); - convert_to_string_ex(s); + convert_to_long_ex(x); + convert_to_long_ex(y); + convert_to_string_ex(s); - RETURN_LONG(mvaddchstr(_INT(x),_INT(y),(chtype *)_STRING(s))); + RETURN_LONG(mvaddchstr(_INT(x),_INT(y),(chtype *)_STRING(s))); } /* }}} */ @@ -1126,15 +1126,15 @@ PHP_FUNCTION(ncurses_mvaddchstr) */ PHP_FUNCTION(ncurses_addchstr) { - zval **s; + zval **s; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &s) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &s) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(s); + convert_to_string_ex(s); - RETURN_LONG(addchstr((chtype *)_STRING(s))); + RETURN_LONG(addchstr((chtype *)_STRING(s))); } /* }}} */ @@ -1142,18 +1142,18 @@ PHP_FUNCTION(ncurses_addchstr) */ PHP_FUNCTION(ncurses_mvaddnstr) { - zval **x,**y,**s,**n; + zval **x,**y,**s,**n; - if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &x, &y, &s, &n) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &x, &y, &s, &n) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); - convert_to_string_ex(s); - convert_to_long_ex(n); + convert_to_long_ex(x); + convert_to_long_ex(y); + convert_to_string_ex(s); + convert_to_long_ex(n); - RETURN_LONG(mvaddnstr(_INT(x),_INT(y),_STRING(s),_INT(n))); + RETURN_LONG(mvaddnstr(_INT(x),_INT(y),_STRING(s),_INT(n))); } /* }}} */ @@ -1161,16 +1161,16 @@ PHP_FUNCTION(ncurses_mvaddnstr) */ PHP_FUNCTION(ncurses_addnstr) { - zval **s,**n; + zval **s,**n; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s, &n) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s, &n) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(s); - convert_to_long_ex(n); + convert_to_string_ex(s); + convert_to_long_ex(n); - RETURN_LONG(addnstr(_STRING(s),_INT(n))); + RETURN_LONG(addnstr(_STRING(s),_INT(n))); } /* }}} */ @@ -1178,17 +1178,17 @@ PHP_FUNCTION(ncurses_addnstr) */ PHP_FUNCTION(ncurses_mvaddstr) { - zval **x,**y,**s; + zval **x,**y,**s; - if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &x, &y, &s) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &x, &y, &s) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); - convert_to_string_ex(s); + convert_to_long_ex(x); + convert_to_long_ex(y); + convert_to_string_ex(s); - RETURN_LONG(mvaddstr(_INT(x),_INT(y),_STRING(s))); + RETURN_LONG(mvaddstr(_INT(x),_INT(y),_STRING(s))); } /* }}} */ @@ -1196,16 +1196,16 @@ PHP_FUNCTION(ncurses_mvaddstr) */ PHP_FUNCTION(ncurses_mvdelch) { - zval **x,**y,**c; + zval **x,**y,**c; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); + convert_to_long_ex(x); + convert_to_long_ex(y); - RETURN_LONG(mvdelch(_INT(x),_INT(y))); + RETURN_LONG(mvdelch(_INT(x),_INT(y))); } /* }}} */ @@ -1214,16 +1214,16 @@ PHP_FUNCTION(ncurses_mvdelch) */ PHP_FUNCTION(ncurses_mvgetch) { - zval **x,**y; + zval **x,**y; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); + convert_to_long_ex(x); + convert_to_long_ex(y); - RETURN_LONG(mvgetch(_INT(x),_INT(y))); + RETURN_LONG(mvgetch(_INT(x),_INT(y))); } /* }}} */ @@ -1231,16 +1231,16 @@ PHP_FUNCTION(ncurses_mvgetch) */ PHP_FUNCTION(ncurses_mvinch) { - zval **x,**y; + zval **x,**y; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &x, &y) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(x); - convert_to_long_ex(y); + convert_to_long_ex(x); + convert_to_long_ex(y); - RETURN_LONG(mvinch(_INT(x),_INT(y))); + RETURN_LONG(mvinch(_INT(x),_INT(y))); } /* }}} */ @@ -1248,15 +1248,15 @@ PHP_FUNCTION(ncurses_mvinch) */ PHP_FUNCTION(ncurses_insstr) { - zval **str; + zval **str; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(str); + convert_to_string_ex(str); - RETURN_LONG(insstr(_STRING(str))); + RETURN_LONG(insstr(_STRING(str))); } /* }}} */ @@ -1264,15 +1264,15 @@ PHP_FUNCTION(ncurses_insstr) */ PHP_FUNCTION(ncurses_instr) { - zval **str; + zval **str; - if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(str); + convert_to_string_ex(str); - RETURN_LONG(instr(_STRING(str))); + RETURN_LONG(instr(_STRING(str))); } /* }}} */ @@ -1280,18 +1280,18 @@ PHP_FUNCTION(ncurses_instr) */ PHP_FUNCTION(ncurses_mvhline) { - zval **i1,**i2,**i3,**i4; + zval **i1,**i2,**i3,**i4; - if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &i1, &i2, &i3, &i4) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &i1, &i2, &i3, &i4) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); - convert_to_long_ex(i3); - convert_to_long_ex(i4); + convert_to_long_ex(i1); + convert_to_long_ex(i2); + convert_to_long_ex(i3); + convert_to_long_ex(i4); - RETURN_LONG(mvhline(_INT(i1),_INT(i2),_INT(i3),_INT(i4))); + RETURN_LONG(mvhline(_INT(i1),_INT(i2),_INT(i3),_INT(i4))); } /* }}} */ @@ -1299,18 +1299,18 @@ PHP_FUNCTION(ncurses_mvhline) */ PHP_FUNCTION(ncurses_mvcur) { - zval **i1,**i2,**i3,**i4; + zval **i1,**i2,**i3,**i4; - if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &i1, &i2, &i3, &i4) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &i1, &i2, &i3, &i4) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); - convert_to_long_ex(i3); - convert_to_long_ex(i4); + convert_to_long_ex(i1); + convert_to_long_ex(i2); + convert_to_long_ex(i3); + convert_to_long_ex(i4); - RETURN_LONG(mvcur(_INT(i1),_INT(i2),_INT(i3),_INT(i4))); + RETURN_LONG(mvcur(_INT(i1),_INT(i2),_INT(i3),_INT(i4))); } /* }}} */ @@ -1318,18 +1318,18 @@ PHP_FUNCTION(ncurses_mvcur) */ PHP_FUNCTION(ncurses_init_color) { - zval **i1,**i2,**i3,**i4; + zval **i1,**i2,**i3,**i4; - if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &i1, &i2, &i3, &i4) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &i1, &i2, &i3, &i4) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); - convert_to_long_ex(i3); - convert_to_long_ex(i4); + convert_to_long_ex(i1); + convert_to_long_ex(i2); + convert_to_long_ex(i3); + convert_to_long_ex(i4); - RETURN_LONG(init_color(_INT(i1),_INT(i2),_INT(i3),_INT(i4))); + RETURN_LONG(init_color(_INT(i1),_INT(i2),_INT(i3),_INT(i4))); } /* }}} */ @@ -1337,22 +1337,22 @@ PHP_FUNCTION(ncurses_init_color) */ PHP_FUNCTION(ncurses_border) { - zval **i1,**i2,**i3,**i4,**i5,**i6,**i7,**i8; + zval **i1,**i2,**i3,**i4,**i5,**i6,**i7,**i8; - if(ZEND_NUM_ARGS() != 8 || zend_get_parameters_ex(8, &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 8 || zend_get_parameters_ex(8, &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); - convert_to_long_ex(i3); - convert_to_long_ex(i4); - convert_to_long_ex(i5); - convert_to_long_ex(i6); - convert_to_long_ex(i7); - convert_to_long_ex(i8); + convert_to_long_ex(i1); + convert_to_long_ex(i2); + convert_to_long_ex(i3); + convert_to_long_ex(i4); + convert_to_long_ex(i5); + convert_to_long_ex(i6); + convert_to_long_ex(i7); + convert_to_long_ex(i8); - RETURN_LONG(border(_INT(i1),_INT(i2),_INT(i3),_INT(i4),_INT(i5),_INT(i6),_INT(i7),_INT(i8))); + RETURN_LONG(border(_INT(i1),_INT(i2),_INT(i3),_INT(i4),_INT(i5),_INT(i6),_INT(i7),_INT(i8))); } /* }}} */ @@ -1360,16 +1360,16 @@ PHP_FUNCTION(ncurses_border) */ PHP_FUNCTION(ncurses_assume_default_colors) { - zval **i1,**i2; + zval **i1,**i2; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &i2) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &i2) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); + convert_to_long_ex(i1); + convert_to_long_ex(i2); - RETURN_LONG(assume_default_colors(_INT(i1),_INT(i2))); + RETURN_LONG(assume_default_colors(_INT(i1),_INT(i2))); } /* }}} */ @@ -1377,16 +1377,16 @@ PHP_FUNCTION(ncurses_assume_default_colors) */ PHP_FUNCTION(ncurses_define_key) { - zval **s1,**i2; + zval **s1,**i2; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &i2) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &s1, &i2) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_string_ex(s1); - convert_to_long_ex(i2); + convert_to_string_ex(s1); + convert_to_long_ex(i2); - RETURN_LONG(define_key(_STRING(s1),_INT(i2))); + RETURN_LONG(define_key(_STRING(s1),_INT(i2))); } /* }}} */ @@ -1394,16 +1394,16 @@ PHP_FUNCTION(ncurses_define_key) */ PHP_FUNCTION(ncurses_hline) { - zval **i1,**i2; + zval **i1,**i2; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &i2) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &i2) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); + convert_to_long_ex(i1); + convert_to_long_ex(i2); - RETURN_LONG(hline(_INT(i1),_INT(i2))); + RETURN_LONG(hline(_INT(i1),_INT(i2))); } /* }}} */ @@ -1411,16 +1411,16 @@ PHP_FUNCTION(ncurses_hline) */ PHP_FUNCTION(ncurses_vline) { - zval **i1,**i2; + zval **i1,**i2; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &i2) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &i2) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(i2); + convert_to_long_ex(i1); + convert_to_long_ex(i2); - RETURN_LONG(vline(_INT(i1),_INT(i2))); + RETURN_LONG(vline(_INT(i1),_INT(i2))); } /* }}} */ @@ -1428,16 +1428,16 @@ PHP_FUNCTION(ncurses_vline) */ PHP_FUNCTION(ncurses_keyok) { - zval **i1,**b2; + zval **i1,**b2; - if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &b2) == FAILURE) { - WRONG_PARAM_COUNT; - } + if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &i1, &b2) == FAILURE) { + WRONG_PARAM_COUNT; + } - convert_to_long_ex(i1); - convert_to_long_ex(b2); + convert_to_long_ex(i1); + convert_to_long_ex(b2); - RETURN_LONG(hline(_INT(i1),_INT(b2))); + RETURN_LONG(hline(_INT(i1),_INT(b2))); } /* }}} */ @@ -1445,20 +1445,20 @@ PHP_FUNCTION(ncurses_keyok) */ PHP_FUNCTION(ncurses_mvwaddstr) { - zval **handle, **x, **y, **text; - WINDOW **w; + zval **handle, **x, **y, **text; + WINDOW **w; - if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &handle, &y, &x, &text) == FAILURE){ - WRONG_PARAM_COUNT; - } + if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &handle, &y, &x, &text) == FAILURE){ + WRONG_PARAM_COUNT; + } - FETCH_WINRES(w,handle); + FETCH_WINRES(w,handle); - convert_to_long_ex(y); - convert_to_long_ex(x); - convert_to_string_ex(text); + convert_to_long_ex(y); + convert_to_long_ex(x); + convert_to_string_ex(text); - RETURN_LONG(mvwaddstr(*w,_INT(y),_INT(x),_STRING(text))); + RETURN_LONG(mvwaddstr(*w,_INT(y),_INT(x),_STRING(text))); } /* }}} */ @@ -1466,16 +1466,16 @@ PHP_FUNCTION(ncurses_mvwaddstr) */ PHP_FUNCTION(ncurses_wrefresh) { - zval **handle; - WINDOW **w; + zval **handle; + WINDOW **w; - if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &handle) == FAILURE){ - WRONG_PARAM_COUNT; - } + if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &handle) == FAILURE){ + WRONG_PARAM_COUNT; + } - FETCH_WINRES(w,handle); + FETCH_WINRES(w,handle); - RETURN_LONG(wrefresh(*w)); + RETURN_LONG(wrefresh(*w)); } /* }}} */ diff --git a/ext/ncurses/php_ncurses.h b/ext/ncurses/php_ncurses.h index 84cac5a7e8..0be63a7a71 100644 --- a/ext/ncurses/php_ncurses.h +++ b/ext/ncurses/php_ncurses.h @@ -47,12 +47,12 @@ PHP_RSHUTDOWN_FUNCTION(ncurses); PHP_MINFO_FUNCTION(ncurses); /* - Declare any global variables you may need between the BEGIN - and END macros here: + Declare any global variables you may need between the BEGIN + and END macros here: ZEND_BEGIN_MODULE_GLOBALS(ncurses) - int global_value; - char *global_string; + int global_value; + char *global_string; ZEND_END_MODULE_GLOBALS(ncurses) */ @@ -71,7 +71,7 @@ ZEND_END_MODULE_GLOBALS(ncurses) #define NCURSES_LS_FETCH() #endif -#endif /* PHP_NCURSES_H */ +#endif /* PHP_NCURSES_H */ /* diff --git a/ext/ncurses/php_ncurses_fe.h b/ext/ncurses/php_ncurses_fe.h index f7e8338379..e9bbbaa370 100644 --- a/ext/ncurses/php_ncurses_fe.h +++ b/ext/ncurses/php_ncurses_fe.h @@ -20,7 +20,7 @@ #ifndef PHP_NCURSES_FE_H #define PHP_NCURSES_FE_H -PHP_FUNCTION(confirm_ncurses_compiled); /* For testing, remove later. */ +PHP_FUNCTION(confirm_ncurses_compiled); /* For testing, remove later. */ PHP_FUNCTION(ncurses_addch); PHP_FUNCTION(ncurses_color_set); PHP_FUNCTION(ncurses_delwin); -- cgit v1.2.1