mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Implemented output paging
This commit is contained in:
parent
daddb7a832
commit
f231ddddaf
7 changed files with 103 additions and 6 deletions
|
@ -351,6 +351,24 @@ PHPDBG_API int phpdbg_get_terminal_width(void) /* {{{ */
|
|||
return columns;
|
||||
} /* }}} */
|
||||
|
||||
PHPDBG_API int phpdbg_get_terminal_height(void) /* {{{ */
|
||||
{
|
||||
int lines;
|
||||
#ifdef _WIN32
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
|
||||
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
lines = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
|
||||
#elif defined(HAVE_SYS_IOCTL_H) && defined(TIOCGWINSZ)
|
||||
struct winsize w;
|
||||
|
||||
lines = ioctl(fileno(stdout), TIOCGWINSZ, &w) == 0 ? w.ws_row : 40;
|
||||
#else
|
||||
lines = 40;
|
||||
#endif
|
||||
return lines;
|
||||
} /* }}} */
|
||||
|
||||
PHPDBG_API void phpdbg_set_async_io(int fd) {
|
||||
#if !defined(_WIN32) && defined(FASYNC)
|
||||
int flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue