php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
phpdbg_out.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Authors: Felipe Pena <felipe@php.net> |
14 | Authors: Joe Watkins <joe.watkins@live.co.uk> |
15 | Authors: Bob Weinand <bwoebi@php.net> |
16 +----------------------------------------------------------------------+
17*/
18
19#ifndef PHPDBG_OUT_H
20#define PHPDBG_OUT_H
21
22#ifndef PHPDBG_DEBUG
23# define PHPDBG_DEBUG 0
24#endif
25
29enum {
37};
38
39PHPDBG_API int phpdbg_print(int severity, int fd, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
40PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
41PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
42
43#define phpdbg_error(strfmt, ...) phpdbg_print(P_ERROR , PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
44#define phpdbg_notice(strfmt, ...) phpdbg_print(P_NOTICE , PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
45#define phpdbg_writeln(strfmt, ...) phpdbg_print(P_WRITELN, PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
46#define phpdbg_write(strfmt, ...) phpdbg_print(P_WRITE , PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
47
48#define phpdbg_log(fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
49#define phpdbg_out(fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
50
51#define phpdbg_script(type, strfmt, ...) phpdbg_print(type, PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
52
53#define phpdbg_asprintf(buf, ...) _phpdbg_asprintf(buf, ##__VA_ARGS__)
54PHPDBG_API int _phpdbg_asprintf(char **buf, const char *format, ...);
55
56#if PHPDBG_DEBUG
57# define phpdbg_debug(strfmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDERR].fd, strfmt, ##__VA_ARGS__)
58#else
59# define phpdbg_debug(strfmt, ...)
60#endif
61
64PHPDBG_API int phpdbg_output_err_buf(const char *strfmt, ...);
65
66int phpdbg_process_print(int fd, int type, const char *msg, int msglen);
67
68
69/* {{{ For separation */
70#define SEPARATE "------------------------------------------------" /* }}} */
71
72#endif /* PHPDBG_OUT_H */
printf(string $format, mixed ... $values)
zend_ffi_type * type
Definition ffi.c:3812
zend_ffi_ctype_name_buf buf
Definition ffi.c:4685
#define PHP_ATTRIBUTE_FORMAT
Definition php.h:248
php_output_handler * active
Definition php_output.h:140
int msglen
Definition phpdbg.h:290
char * msg
Definition phpdbg.h:289
#define PHPDBG_API
Definition phpdbg.h:27
int fd
Definition phpdbg.h:282
PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt,...)
Definition phpdbg_out.c:209
PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt,...)
Definition phpdbg_out.c:225
PHPDBG_API int phpdbg_print(int severity, int fd, const char *strfmt,...) PHP_ATTRIBUTE_FORMAT(printf
PHPDBG_API void phpdbg_free_err_buf(void)
Definition phpdbg_out.c:159
int phpdbg_process_print(int fd, int type, const char *msg, int msglen)
Definition phpdbg_out.c:43
PHPDBG_API int _phpdbg_asprintf(char **buf, const char *format,...)
Definition phpdbg_out.c:32
@ P_STDERR
Definition phpdbg_out.h:35
@ P_ERROR
Definition phpdbg_out.h:30
@ P_NOTICE
Definition phpdbg_out.h:31
@ P_STDOUT
Definition phpdbg_out.h:34
@ P_WRITE
Definition phpdbg_out.h:33
@ P_LOG
Definition phpdbg_out.h:36
@ P_WRITELN
Definition phpdbg_out.h:32
PHPDBG_API void phpdbg_activate_err_buf(bool active)
Definition phpdbg_out.c:169
PHPDBG_API int phpdbg_output_err_buf(const char *strfmt,...)
Definition phpdbg_out.c:173