diff options
author | krakjoe <joe.watkins@live.co.uk> | 2014-02-23 07:33:48 +0000 |
---|---|---|
committer | krakjoe <joe.watkins@live.co.uk> | 2014-02-23 07:33:48 +0000 |
commit | 4b738cee2b789228b34bc5ef0f246e325890fd78 (patch) | |
tree | b0ca31f89991bdbbcebb6986bfa24616216851fb /phpdbg_utils.h | |
parent | ee6cc5ba603cfc7204d090a7b93b1cd5094396f4 (diff) | |
download | php-git-4b738cee2b789228b34bc5ef0f246e325890fd78.tar.gz |
set colors working
Diffstat (limited to 'phpdbg_utils.h')
-rw-r--r-- | phpdbg_utils.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/phpdbg_utils.h b/phpdbg_utils.h index ee7ff3f5bd..f2be63be10 100644 --- a/phpdbg_utils.h +++ b/phpdbg_utils.h @@ -85,12 +85,17 @@ PHPDBG_API int phpdbg_rlog(FILE *stream, const char *fmt, ...); {color, sizeof(color)-1, code} #define PHPDBG_COLOR_END \ {NULL, 0L, {0}} +#define PHPDBG_ELEMENT_LEN 3 +#define PHPDBG_ELEMENT_D(name, id) \ + {name, sizeof(name)-1, id} +#define PHPDBG_ELEMENT_END \ + {NULL, 0L, 0} #define PHPDBG_COLOR_INVALID -1 -#define PHPDBG_COLOR_PROMPT 0 -#define PHPDBG_COLOR_ERROR 1 -#define PHPDBG_COLOR_NOTICE 2 -#define PHPDBG_COLORS 3 +#define PHPDBG_COLOR_PROMPT 0 +#define PHPDBG_COLOR_ERROR 1 +#define PHPDBG_COLOR_NOTICE 2 +#define PHPDBG_COLORS 3 typedef struct _phpdbg_color_t { char *name; @@ -98,10 +103,17 @@ typedef struct _phpdbg_color_t { const char code[PHPDBG_COLOR_LEN]; } phpdbg_color_t; +typedef struct _phpdbg_element_t { + char *name; + size_t name_length; + int id; +} phpdbg_element_t; + PHPDBG_API const phpdbg_color_t *phpdbg_get_color(const char *name, size_t name_length TSRMLS_DC); PHPDBG_API void phpdbg_set_color(int element, const phpdbg_color_t *color TSRMLS_DC); PHPDBG_API void phpdbg_set_color_ex(int element, const char *name, size_t name_length TSRMLS_DC); -PHPDBG_API const phpdbg_color_t* phpdbg_get_colors(TSRMLS_D); /* }}} */ +PHPDBG_API const phpdbg_color_t* phpdbg_get_colors(TSRMLS_D); +PHPDBG_API int phpdbg_get_element(const char *name, size_t len TSRMLS_DC); /* }}} */ /* {{{ Prompt Management */ PHPDBG_API void phpdbg_set_prompt(const char* TSRMLS_DC); |