Example #1
0
PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len) {
	if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
		return phpdbg_send_bytes(sock, ptr, len);
	}

	return write(sock, ptr, len);
}
Example #2
0
PHPDBG_API int phpdbg_mixed_write(int sock, const char *ptr, int len) {
	if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {
		return phpdbg_send_bytes(sock, ptr, len);
	}
	
	if ((PHPDBG_G(flags) & PHPDBG_HAS_PAGINATION)
	 && !(PHPDBG_G(flags) & PHPDBG_WRITE_XML)
	 && PHPDBG_G(io)[PHPDBG_STDOUT].fd == sock
	 && PHPDBG_G(lines) > 0) {
		return phpdbg_output_pager(sock, ptr, len);
	}

	return write(sock, ptr, len);
}