- Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathphpdbg_out.h
72 lines (58 loc) · 3.17 KB
/
phpdbg_out.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Felipe Pena <felipe@php.net> |
| Authors: Joe Watkins <joe.watkins@live.co.uk> |
| Authors: Bob Weinand <bwoebi@php.net> |
+----------------------------------------------------------------------+
*/
#ifndefPHPDBG_OUT_H
#definePHPDBG_OUT_H
#ifndefPHPDBG_DEBUG
# definePHPDBG_DEBUG 0
#endif
/**
* Error/notice/formatting helpers
*/
enum {
P_ERROR=1,
P_NOTICE,
P_WRITELN,
P_WRITE,
P_STDOUT,
P_STDERR,
P_LOG
};
PHPDBG_APIintphpdbg_print(intseverity, intfd, constchar*strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
PHPDBG_APIintphpdbg_log_internal(intfd, constchar*fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
PHPDBG_APIintphpdbg_out_internal(intfd, constchar*fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
#definephpdbg_error(strfmt, ...) phpdbg_print(P_ERROR , PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
#definephpdbg_notice(strfmt, ...) phpdbg_print(P_NOTICE , PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
#definephpdbg_writeln(strfmt, ...) phpdbg_print(P_WRITELN, PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
#definephpdbg_write(strfmt, ...) phpdbg_print(P_WRITE , PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
#definephpdbg_log(fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
#definephpdbg_out(fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, fmt, ##__VA_ARGS__)
#definephpdbg_script(type, strfmt, ...) phpdbg_print(type, PHPDBG_G(io)[PHPDBG_STDOUT].fd, strfmt, ##__VA_ARGS__)
#definephpdbg_asprintf(buf, ...) _phpdbg_asprintf(buf, ##__VA_ARGS__)
PHPDBG_APIint_phpdbg_asprintf(char**buf, constchar*format, ...);
#ifPHPDBG_DEBUG
# definephpdbg_debug(strfmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDERR].fd, strfmt, ##__VA_ARGS__)
#else
# definephpdbg_debug(strfmt, ...)
#endif
PHPDBG_APIvoidphpdbg_free_err_buf(void);
PHPDBG_APIvoidphpdbg_activate_err_buf(boolactive);
PHPDBG_APIintphpdbg_output_err_buf(constchar*strfmt, ...);
intphpdbg_process_print(intfd, inttype, constchar*msg, intmsglen);
/* {{{ For separation */
#defineSEPARATE "------------------------------------------------" /* }}} */
#endif/* PHPDBG_OUT_H */