zend_highlight.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. #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 int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlighter_ini);
  37. ZEND_API int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ini, 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
  43. /*
  44. * Local variables:
  45. * tab-width: 4
  46. * c-basic-offset: 4
  47. * indent-tabs-mode: t
  48. * End:
  49. * vim600: sw=4 ts=4 fdm=marker
  50. * vim<600: sw=4 ts=4
  51. */