zend_highlight.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1998-2016 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@zend.com> |
  16. | Zeev Suraski <zeev@zend.com> |
  17. +----------------------------------------------------------------------+
  18. */
  19. /* $Id$ */
  20. #ifndef ZEND_HIGHLIGHT_H
  21. #define ZEND_HIGHLIGHT_H
  22. #define HL_COMMENT_COLOR "#FF8000" /* orange */
  23. #define HL_DEFAULT_COLOR "#0000BB" /* blue */
  24. #define HL_HTML_COLOR "#000000" /* black */
  25. #define HL_STRING_COLOR "#DD0000" /* red */
  26. #define HL_KEYWORD_COLOR "#007700" /* green */
  27. typedef struct _zend_syntax_highlighter_ini {
  28. char *highlight_html;
  29. char *highlight_comment;
  30. char *highlight_default;
  31. char *highlight_string;
  32. char *highlight_keyword;
  33. } zend_syntax_highlighter_ini;
  34. BEGIN_EXTERN_C()
  35. ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC);
  36. ZEND_API void zend_strip(TSRMLS_D);
  37. ZEND_API int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC);
  38. ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, char *str_name TSRMLS_DC);
  39. ZEND_API void zend_html_putc(char c);
  40. ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC);
  41. END_EXTERN_C()
  42. extern zend_syntax_highlighter_ini syntax_highlighter_ini;
  43. #endif
  44. /*
  45. * Local variables:
  46. * tab-width: 4
  47. * c-basic-offset: 4
  48. * indent-tabs-mode: t
  49. * End:
  50. */