* 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[] */
};
*/
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)));
}
/* }}} */
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
}
/* }}} */
*/
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));
}
/* }}} */
*/
PHP_FUNCTION(ncurses_end)
{
- RETURN_LONG(endwin()); /* endialize the curses library */
+ RETURN_LONG(endwin()); /* endialize the curses library */
}
/* }}} */
*/
PHP_FUNCTION(ncurses_getch)
{
- RETURN_LONG(getch());
+ RETURN_LONG(getch());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_has_colors)
{
- RETURN_LONG(has_colors());
+ RETURN_LONG(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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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);
}
/* }}} */
*/
PHP_FUNCTION(ncurses_refresh)
{
- RETURN_LONG(refresh());
+ RETURN_LONG(refresh());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_start_color)
{
- RETURN_LONG(start_color());
+ RETURN_LONG(start_color());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_standout)
{
- RETURN_LONG(standout());
+ RETURN_LONG(standout());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_standend)
{
- RETURN_LONG(standend());
+ RETURN_LONG(standend());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_baudrate)
{
- RETURN_LONG(baudrate());
+ RETURN_LONG(baudrate());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_beep)
{
- RETURN_LONG(beep());
+ RETURN_LONG(beep());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_can_change_color)
{
- RETURN_LONG(can_change_color());
+ RETURN_LONG(can_change_color());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_cbreak)
{
- RETURN_LONG(cbreak());
+ RETURN_LONG(cbreak());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_clear)
{
- RETURN_LONG(clear());
+ RETURN_LONG(clear());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_clrtobot)
{
- RETURN_LONG(clrtobot());
+ RETURN_LONG(clrtobot());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_clrtoeol)
{
- RETURN_LONG(clrtoeol());
+ RETURN_LONG(clrtoeol());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_def_prog_mode)
{
- RETURN_LONG(def_prog_mode());
+ RETURN_LONG(def_prog_mode());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_def_shell_mode)
{
- RETURN_LONG(def_shell_mode());
+ RETURN_LONG(def_shell_mode());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_delch)
{
- RETURN_LONG(delch());
+ RETURN_LONG(delch());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_deleteln)
{
- RETURN_LONG(deleteln());
+ RETURN_LONG(deleteln());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_doupdate)
{
- RETURN_LONG(doupdate());
+ RETURN_LONG(doupdate());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_echo)
{
- RETURN_LONG(echo());
+ RETURN_LONG(echo());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_erase)
{
- RETURN_LONG(erase());
+ RETURN_LONG(erase());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_erasechar)
{
- RETURN_LONG(erasechar());
+ RETURN_LONG(erasechar());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_flash)
{
- RETURN_LONG(flash());
+ RETURN_LONG(flash());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_flushinp)
{
- RETURN_LONG(flushinp());
+ RETURN_LONG(flushinp());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_has_ic)
{
- RETURN_LONG(has_ic());
+ RETURN_LONG(has_ic());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_has_il)
{
- RETURN_LONG(has_il());
+ RETURN_LONG(has_il());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_inch)
{
- RETURN_LONG(inch());
+ RETURN_LONG(inch());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_insertln)
{
- RETURN_LONG(insertln());
+ RETURN_LONG(insertln());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_isendwin)
{
- RETURN_LONG(isendwin());
+ RETURN_LONG(isendwin());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_killchar)
{
- RETURN_LONG(killchar());
+ RETURN_LONG(killchar());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_nl)
{
- RETURN_LONG(nl());
+ RETURN_LONG(nl());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_nocbreak)
{
- RETURN_LONG(nocbreak());
+ RETURN_LONG(nocbreak());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_noecho)
{
- RETURN_LONG(noecho());
+ RETURN_LONG(noecho());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_nonl)
{
- RETURN_LONG(nonl());
+ RETURN_LONG(nonl());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_noraw)
{
- RETURN_LONG(noraw());
+ RETURN_LONG(noraw());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_raw)
{
- RETURN_LONG(raw());
+ RETURN_LONG(raw());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_resetty)
{
- RETURN_LONG(resetty());
+ RETURN_LONG(resetty());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_savetty)
{
- RETURN_LONG(savetty());
+ RETURN_LONG(savetty());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_termattrs)
{
- RETURN_LONG(termattrs());
+ RETURN_LONG(termattrs());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_use_default_colors)
{
- RETURN_LONG(use_default_colors());
+ RETURN_LONG(use_default_colors());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_slk_attr)
{
- RETURN_LONG(slk_attr());
+ RETURN_LONG(slk_attr());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_slk_clear)
{
- RETURN_LONG(slk_clear());
+ RETURN_LONG(slk_clear());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_slk_noutrefresh)
{
- RETURN_LONG(slk_noutrefresh());
+ RETURN_LONG(slk_noutrefresh());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_slk_refresh)
{
- RETURN_LONG(slk_refresh());
+ RETURN_LONG(slk_refresh());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_slk_restore)
{
- RETURN_LONG(slk_restore());
+ RETURN_LONG(slk_restore());
}
/* }}} */
*/
PHP_FUNCTION(ncurses_slk_touch)
{
- RETURN_LONG(slk_touch());
+ RETURN_LONG(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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
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
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
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
}
/* }}} */
*/
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));
}
/* }}} */
*/
PHP_FUNCTION(ncurses_filter)
{
- filter();
+ filter();
}
/* }}} */
*/
PHP_FUNCTION(ncurses_noqiflush)
{
- noqiflush();
+ noqiflush();
}
/* }}} */
*/
PHP_FUNCTION(ncurses_qiflush)
{
- qiflush();
+ 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));
}
/* }}} */
*/
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));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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)));
}
/* }}} */
*/
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));
}
/* }}} */