xref: /PHP-7.3/Zend/zend_highlight.h (revision 9afce019)
1 /*
2    +----------------------------------------------------------------------+
3    | Zend Engine                                                          |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1998-2018 Zend Technologies Ltd. (http://www.zend.com) |
6    +----------------------------------------------------------------------+
7    | This source file is subject to version 2.00 of the Zend license,     |
8    | that is bundled with this package in the file LICENSE, and is        |
9    | available through the world-wide-web at the following url:           |
10    | http://www.zend.com/license/2_00.txt.                                |
11    | If you did not receive a copy of the Zend license and are unable to  |
12    | obtain it through the world-wide-web, please send a note to          |
13    | license@zend.com so we can mail you a copy immediately.              |
14    +----------------------------------------------------------------------+
15    | Authors: Andi Gutmans <andi@php.net>                                 |
16    |          Zeev Suraski <zeev@php.net>                                 |
17    +----------------------------------------------------------------------+
18 */
19 
20 #ifndef ZEND_HIGHLIGHT_H
21 #define ZEND_HIGHLIGHT_H
22 
23 #define HL_COMMENT_COLOR     "#FF8000"    /* orange */
24 #define HL_DEFAULT_COLOR     "#0000BB"    /* blue */
25 #define HL_HTML_COLOR        "#000000"    /* black */
26 #define HL_STRING_COLOR      "#DD0000"    /* red */
27 #define HL_KEYWORD_COLOR     "#007700"    /* green */
28 
29 
30 typedef struct _zend_syntax_highlighter_ini {
31 	char *highlight_html;
32 	char *highlight_comment;
33 	char *highlight_default;
34 	char *highlight_string;
35 	char *highlight_keyword;
36 } zend_syntax_highlighter_ini;
37 
38 
39 BEGIN_EXTERN_C()
40 ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
41 ZEND_API void zend_strip(void);
42 ZEND_API int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
43 ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name);
44 ZEND_API void zend_html_putc(char c);
45 ZEND_API void zend_html_puts(const char *s, size_t len);
46 END_EXTERN_C()
47 
48 extern zend_syntax_highlighter_ini syntax_highlighter_ini;
49 
50 #endif
51 
52 /*
53  * Local variables:
54  * tab-width: 4
55  * c-basic-offset: 4
56  * indent-tabs-mode: t
57  * End:
58  * vim600: sw=4 ts=4 fdm=marker
59  * vim<600: sw=4 ts=4
60  */
61