zend_highlight.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 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. #ifndef ZEND_HIGHLIGHT_H
  20. #define ZEND_HIGHLIGHT_H
  21. #define HL_COMMENT_COLOR "#FF8000" /* orange */
  22. #define HL_DEFAULT_COLOR "#0000BB" /* blue */
  23. #define HL_HTML_COLOR "#000000" /* black */
  24. #define HL_STRING_COLOR "#DD0000" /* red */
  25. #define HL_KEYWORD_COLOR "#007700" /* green */
  26. typedef struct _zend_syntax_highlighter_ini {
  27. char *highlight_html;
  28. char *highlight_comment;
  29. char *highlight_default;
  30. char *highlight_string;
  31. char *highlight_keyword;
  32. } zend_syntax_highlighter_ini;
  33. BEGIN_EXTERN_C()
  34. ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini);
  35. ZEND_API void zend_strip(void);
  36. ZEND_API zend_result highlight_file(const char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
  37. ZEND_API void highlight_string(zend_string *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, const char *str_name);
  38. ZEND_API void zend_html_putc(char c);
  39. ZEND_API void zend_html_puts(const char *s, size_t len);
  40. END_EXTERN_C()
  41. extern zend_syntax_highlighter_ini syntax_highlighter_ini;
  42. #endif