summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-26 23:14:40 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-26 23:14:40 +0000
commit41973ef1ab2935818a07b5899c1961e9c8c85214 (patch)
tree4c787ed51e8d3b7d00f11c61e2274c267c8a1981 /src/parse
parent83146f43df1f1330c10cedad4e97e90c7f2c1243 (diff)
downloadlibcss-41973ef1ab2935818a07b5899c1961e9c8c85214.tar.gz
libcss-41973ef1ab2935818a07b5899c1961e9c8c85214.tar.bz2
More refactoring groundwork. This actually compiles and passes the testsuite.
svn path=/trunk/libcss/; revision=7556
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/Makefile2
-rw-r--r--src/parse/language.c62
-rw-r--r--src/parse/language.h59
-rw-r--r--src/parse/properties/Makefile4
-rw-r--r--src/parse/properties/properties.c (renamed from src/parse/properties.c)3
-rw-r--r--src/parse/properties/properties.h3
-rw-r--r--src/parse/propstrings.c470
-rw-r--r--src/parse/propstrings.h462
8 files changed, 542 insertions, 523 deletions
diff --git a/src/parse/Makefile b/src/parse/Makefile
index 4d0603f..b75e8fa 100644
--- a/src/parse/Makefile
+++ b/src/parse/Makefile
@@ -1,4 +1,4 @@
# Sources
-DIR_SOURCES := parse.c language.c
+DIR_SOURCES := parse.c language.c propstrings.c
include build/makefiles/Makefile.subdir
diff --git a/src/parse/language.c b/src/parse/language.c
index 6b2d329..5d0403f 100644
--- a/src/parse/language.c
+++ b/src/parse/language.c
@@ -25,29 +25,6 @@ typedef struct context_entry {
void *data; /**< Data for context */
} context_entry;
-/**
- * Context for a CSS language parser
- */
-struct css_language {
- css_stylesheet *sheet; /**< The stylesheet to parse for */
-
-#define STACK_CHUNK 32
- parserutils_stack *context; /**< Context stack */
-
- enum {
- BEFORE_CHARSET,
- BEFORE_RULES,
- HAD_RULE
- } state; /**< State flag, for at-rule handling */
-
- /** \todo These should be statically allocated */
- /** Interned strings */
- lwc_string *strings[LAST_KNOWN];
-
- css_allocator_fn alloc; /**< Memory (de)allocation function */
- void *pw; /**< Client's private data */
-};
-
/* Event handlers */
static css_error language_handle_event(css_parser_event type,
const parserutils_vector *tokens, void *pw);
@@ -105,11 +82,6 @@ static inline css_error parseProperty(css_language *c,
const css_token *property, const parserutils_vector *vector,
int *ctx, css_rule *rule);
-/* Helpers */
-static inline void consumeWhitespace(const parserutils_vector *vector,
- int *ctx);
-static inline bool tokenIsChar(const css_token *token, uint8_t c);
-
/**
* Create a CSS language parser
*
@@ -1087,37 +1059,3 @@ css_error parseProperty(css_language *c, const css_token *property,
return CSS_OK;
}
-/******************************************************************************
- * Helper functions *
- ******************************************************************************/
-
-/**
- * Consume all leading whitespace tokens
- *
- * \param vector The vector to consume from
- * \param ctx The vector's context
- */
-void consumeWhitespace(const parserutils_vector *vector, int *ctx)
-{
- const css_token *token = NULL;
-
- while ((token = parserutils_vector_peek(vector, *ctx)) != NULL &&
- token->type == CSS_TOKEN_S)
- token = parserutils_vector_iterate(vector, ctx);
-}
-
-/**
- * Determine if a token is a character
- *
- * \param token The token to consider
- * \param c The character to match (lowercase ASCII only)
- * \return True if the token matches, false otherwise
- */
-bool tokenIsChar(const css_token *token, uint8_t c)
-{
- return token != NULL && token->type == CSS_TOKEN_CHAR &&
- lwc_string_length(token->ilower) == 1 &&
- lwc_string_data(token->ilower)[0] == c;
-}
-
-
diff --git a/src/parse/language.h b/src/parse/language.h
index cd7dd74..0b1d56f 100644
--- a/src/parse/language.h
+++ b/src/parse/language.h
@@ -8,18 +8,75 @@
#ifndef css_parse_language_h_
#define css_parse_language_h_
+#include <parserutils/utils/stack.h>
#include <parserutils/utils/vector.h>
#include <libcss/functypes.h>
#include <libcss/types.h>
+#include "lex/lex.h"
#include "parse/parse.h"
+#include "parse/propstrings.h"
-typedef struct css_language css_language;
+/**
+ * Context for a CSS language parser
+ */
+typedef struct css_language {
+ css_stylesheet *sheet; /**< The stylesheet to parse for */
+
+#define STACK_CHUNK 32
+ parserutils_stack *context; /**< Context stack */
+
+ enum {
+ BEFORE_CHARSET,
+ BEFORE_RULES,
+ HAD_RULE
+ } state; /**< State flag, for at-rule handling */
+
+ /** \todo These should be statically allocated */
+ /** Interned strings */
+ lwc_string *strings[LAST_KNOWN];
+
+ css_allocator_fn alloc; /**< Memory (de)allocation function */
+ void *pw; /**< Client's private data */
+} css_language;
css_error css_language_create(css_stylesheet *sheet, css_parser *parser,
css_allocator_fn alloc, void *pw, void **language);
css_error css_language_destroy(css_language *language);
+/******************************************************************************
+ * Helper functions *
+ ******************************************************************************/
+
+/**
+ * Consume all leading whitespace tokens
+ *
+ * \param vector The vector to consume from
+ * \param ctx The vector's context
+ */
+static inline void consumeWhitespace(const parserutils_vector *vector, int *ctx)
+{
+ const css_token *token = NULL;
+
+ while ((token = parserutils_vector_peek(vector, *ctx)) != NULL &&
+ token->type == CSS_TOKEN_S)
+ token = parserutils_vector_iterate(vector, ctx);
+}
+
+/**
+ * Determine if a token is a character
+ *
+ * \param token The token to consider
+ * \param c The character to match (lowercase ASCII only)
+ * \return True if the token matches, false otherwise
+ */
+static inline bool tokenIsChar(const css_token *token, uint8_t c)
+{
+ return token != NULL && token->type == CSS_TOKEN_CHAR &&
+ lwc_string_length(token->ilower) == 1 &&
+ lwc_string_data(token->ilower)[0] == c;
+}
+
#endif
diff --git a/src/parse/properties/Makefile b/src/parse/properties/Makefile
new file mode 100644
index 0000000..3afed97
--- /dev/null
+++ b/src/parse/properties/Makefile
@@ -0,0 +1,4 @@
+# Sources
+DIR_SOURCES := properties.c
+
+include build/makefiles/Makefile.subdir
diff --git a/src/parse/properties.c b/src/parse/properties/properties.c
index 59a728f..0442543 100644
--- a/src/parse/properties.c
+++ b/src/parse/properties/properties.c
@@ -5,6 +5,9 @@
* Copyright 2008 John-Mark Bell <jmb@netsurf-browser.org>
*/
+#include <assert.h>
+#include <string.h>
+
#include "bytecode/bytecode.h"
#include "bytecode/opcodes.h"
#include "parse/properties/properties.h"
diff --git a/src/parse/properties/properties.h b/src/parse/properties/properties.h
index 425f2e0..496d3dc 100644
--- a/src/parse/properties/properties.h
+++ b/src/parse/properties/properties.h
@@ -8,6 +8,9 @@
#ifndef css_parse_properties_properties_h_
#define css_parse_properties_properties_h_
+#include "stylesheet.h"
+#include "lex/lex.h"
+#include "parse/language.h"
#include "parse/propstrings.h"
/**
diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
new file mode 100644
index 0000000..208b384
--- /dev/null
+++ b/src/parse/propstrings.c
@@ -0,0 +1,470 @@
+/*
+ * This file is part of LibCSS.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2008 John-Mark Bell <jmb@netsurf-browser.org>
+ */
+
+#include "parse/propstrings.h"
+
+/* Must be synchronised with enum in propstrings.h */
+const stringmap_entry stringmap[LAST_KNOWN] = {
+ { "*", SLEN("*") },
+
+ { "charset", SLEN("charset") },
+ { "import", SLEN("import") },
+ { "media", SLEN("media") },
+ { "page", SLEN("page") },
+
+ { "aural", SLEN("aural") },
+ { "braille", SLEN("braille") },
+ { "embossed", SLEN("embossed") },
+ { "handheld", SLEN("handheld") },
+ { "print", SLEN("print") },
+ { "projection", SLEN("projection") },
+ { "screen", SLEN("screen") },
+ { "speech", SLEN("speech") },
+ { "tty", SLEN("tty") },
+ { "tv", SLEN("tv") },
+ { "all", SLEN("all") },
+
+ { "first-child", SLEN("first-child") },
+ { "link", SLEN("link") },
+ { "visited", SLEN("visited") },
+ { "hover", SLEN("hover") },
+ { "active", SLEN("active") },
+ { "focus", SLEN("focus") },
+ { "lang", SLEN("lang") },
+ { "first", SLEN("first") },
+
+ { "first-line", SLEN("first-line") },
+ { "first-letter", SLEN("first-letter") },
+ { "before", SLEN("before") },
+ { "after", SLEN("after") },
+
+ { "azimuth", SLEN("azimuth") },
+ { "background-attachment", SLEN("background-attachment") },
+ { "background-color", SLEN("background-color") },
+ { "background-image", SLEN("background-image") },
+ { "background-position", SLEN("background-position") },
+ { "background-repeat", SLEN("background-repeat") },
+ { "border-bottom-color", SLEN("border-bottom-color") },
+ { "border-bottom-style", SLEN("border-bottom-style") },
+ { "border-bottom-width", SLEN("border-bottom-width") },
+ { "border-collapse", SLEN("border-collapse") },
+ { "border-left-color", SLEN("border-left-color") },
+ { "border-left-style", SLEN("border-left-style") },
+ { "border-left-width", SLEN("border-left-width") },
+ { "border-right-color", SLEN("border-right-color") },
+ { "border-right-style", SLEN("border-right-style") },
+ { "border-right-width", SLEN("border-right-width") },
+ { "border-spacing", SLEN("border-spacing") },
+ { "border-top-color", SLEN("border-top-color") },
+ { "border-top-style", SLEN("border-top-style") },
+ { "border-top-width", SLEN("border-top-width") },
+ { "bottom", SLEN("bottom") },
+ { "caption-side", SLEN("caption-side") },
+ { "clear", SLEN("clear") },
+ { "clip", SLEN("clip") },
+ { "color", SLEN("color") },
+ { "content", SLEN("content") },
+ { "counter-increment", SLEN("counter-increment") },
+ { "counter-reset", SLEN("counter-reset") },
+ { "cue-after", SLEN("cue-after") },
+ { "cue-before", SLEN("cue-before") },
+ { "cursor", SLEN("cursor") },
+ { "direction", SLEN("direction") },
+ { "display", SLEN("display") },
+ { "elevation", SLEN("elevation") },
+ { "empty-cells", SLEN("empty-cells") },
+ { "float", SLEN("float") },
+ { "font-family", SLEN("font-family") },
+ { "font-size", SLEN("font-size") },
+ { "font-style", SLEN("font-style") },
+ { "font-variant", SLEN("font-variant") },
+ { "font-weight", SLEN("font-weight") },
+ { "height", SLEN("height") },
+ { "left", SLEN("left") },
+ { "letter-spacing", SLEN("letter-spacing") },
+ { "line-height", SLEN("line-height") },
+ { "list-style-image", SLEN("list-style-image") },
+ { "list-style-position", SLEN("list-style-position") },
+ { "list-style-type", SLEN("list-style-type") },
+ { "margin-bottom", SLEN("margin-bottom") },
+ { "margin-left", SLEN("margin-left") },
+ { "margin-right", SLEN("margin-right") },
+ { "margin-top", SLEN("margin-top") },
+ { "max-height", SLEN("max-height") },
+ { "max-width", SLEN("max-width") },
+ { "min-height", SLEN("min-height") },
+ { "min-width", SLEN("min-width") },
+ { "orphans", SLEN("orphans") },
+ { "outline-color", SLEN("outline-color") },
+ { "outline-style", SLEN("outline-style") },
+ { "outline-width", SLEN("outline-width") },
+ { "overflow", SLEN("overflow") },
+ { "padding-bottom", SLEN("padding-bottom") },
+ { "padding-left", SLEN("padding-left") },
+ { "padding-right", SLEN("padding-right") },
+ { "padding-top", SLEN("padding-top") },
+ { "page-break-after", SLEN("page-break-after") },
+ { "page-break-before", SLEN("page-break-before") },
+ { "page-break-inside", SLEN("page-break-inside") },
+ { "pause-after", SLEN("pause-after") },
+ { "pause-before", SLEN("pause-before") },
+ { "pitch-range", SLEN("pitch-range") },
+ { "pitch", SLEN("pitch") },
+ { "play-during", SLEN("play-during") },
+ { "position", SLEN("position") },
+ { "quotes", SLEN("quotes") },
+ { "richness", SLEN("richness") },
+ { "right", SLEN("right") },
+ { "speak-header", SLEN("speak-header") },
+ { "speak-numeral", SLEN("speak-numeral") },
+ { "speak-punctuation", SLEN("speak-punctuation") },
+ { "speak", SLEN("speak") },
+ { "speech-rate", SLEN("speech-rate") },
+ { "stress", SLEN("stress") },
+ { "table-layout", SLEN("table-layout") },
+ { "text-align", SLEN("text-align") },
+ { "text-decoration", SLEN("text-decoration") },
+ { "text-indent", SLEN("text-indent") },
+ { "text-transform", SLEN("text-transform") },
+ { "top", SLEN("top") },
+ { "unicode-bidi", SLEN("unicode-bidi") },
+ { "vertical-align", SLEN("vertical-align") },
+ { "visibility", SLEN("visibility") },
+ { "voice-family", SLEN("voice-family") },
+ { "volume", SLEN("volume") },
+ { "white-space", SLEN("white-space") },
+ { "widows", SLEN("widows") },
+ { "width", SLEN("width") },
+ { "word-spacing", SLEN("word-spacing") },
+ { "z-index", SLEN("z-index") },
+
+ { "inherit", SLEN("inherit") },
+ { "important", SLEN("important") },
+ { "none", SLEN("none") },
+ { "both", SLEN("both") },
+ { "fixed", SLEN("fixed") },
+ { "scroll", SLEN("scroll") },
+ { "transparent", SLEN("transparent") },
+ { "no-repeat", SLEN("no-repeat") },
+ { "repeat-x", SLEN("repeat-x") },
+ { "repeat-y", SLEN("repeat-y") },
+ { "repeat", SLEN("repeat") },
+ { "hidden", SLEN("hidden") },
+ { "dotted", SLEN("dotted") },
+ { "dashed", SLEN("dashed") },
+ { "solid", SLEN("solid") },
+ { "double", SLEN("double") },
+ { "groove", SLEN("groove") },
+ { "ridge", SLEN("ridge") },
+ { "inset", SLEN("inset") },
+ { "outset", SLEN("outset") },
+ { "thin", SLEN("thin") },
+ { "medium", SLEN("medium") },
+ { "thick", SLEN("thick") },
+ { "collapse", SLEN("collapse") },
+ { "separate", SLEN("separate") },
+ { "auto", SLEN("auto") },
+ { "ltr", SLEN("ltr") },
+ { "rtl", SLEN("rtl") },
+ { "inline", SLEN("inline") },
+ { "block", SLEN("block") },
+ { "list-item", SLEN("list-item") },
+ { "run-in", SLEN("run-in") },
+ { "inline-block", SLEN("inline-block") },
+ { "table", SLEN("table") },
+ { "inline-table", SLEN("inline-table") },
+ { "table-row-group", SLEN("table-row-group") },
+ { "table-header-group", SLEN("table-header-group") },
+ { "table-footer-group", SLEN("table-footer-group") },
+ { "table-row", SLEN("table-row") },
+ { "table-column-group", SLEN("table-column-group") },
+ { "table-column", SLEN("table-column") },
+ { "table-cell", SLEN("table-cell") },
+ { "table-caption", SLEN("table-caption") },
+ { "below", SLEN("below") },
+ { "level", SLEN("level") },
+ { "above", SLEN("above") },
+ { "higher", SLEN("higher") },
+ { "lower", SLEN("lower") },
+ { "show", SLEN("show") },
+ { "hide", SLEN("hide") },
+ { "xx-small", SLEN("xx-small") },
+ { "x-small", SLEN("x-small") },
+ { "small", SLEN("small") },
+ { "large", SLEN("large") },
+ { "x-large", SLEN("x-large") },
+ { "xx-large", SLEN("xx-large") },
+ { "larger", SLEN("larger") },
+ { "smaller", SLEN("smaller") },
+ { "normal", SLEN("normal") },
+ { "italic", SLEN("italic") },
+ { "oblique", SLEN("oblique") },
+ { "small-caps", SLEN("small-caps") },
+ { "bold", SLEN("bold") },
+ { "bolder", SLEN("bolder") },
+ { "lighter", SLEN("lighter") },
+ { "inside", SLEN("inside") },
+ { "outside", SLEN("outside") },
+ { "disc", SLEN("disc") },
+ { "circle", SLEN("circle") },
+ { "square", SLEN("square") },
+ { "decimal", SLEN("decimal") },
+ { "decimal-leading-zero", SLEN("decimal-leading-zero") },
+ { "lower-roman", SLEN("lower-roman") },
+ { "upper-roman", SLEN("upper-roman") },
+ { "lower-greek", SLEN("lower-greek") },
+ { "lower-latin", SLEN("lower-latin") },
+ { "upper-latin", SLEN("upper-latin") },
+ { "armenian", SLEN("armenian") },
+ { "georgian", SLEN("georgian") },
+ { "lower-alpha", SLEN("lower-alpha") },
+ { "upper-alpha", SLEN("upper-alpha") },
+ { "invert", SLEN("invert") },
+ { "visible", SLEN("visible") },
+ { "always", SLEN("always") },
+ { "avoid", SLEN("avoid") },
+ { "x-low", SLEN("x-low") },
+ { "low", SLEN("low") },
+ { "high", SLEN("high") },
+ { "x-high", SLEN("x-high") },
+ { "static", SLEN("static") },
+ { "relative", SLEN("relative") },
+ { "absolute", SLEN("absolute") },
+ { "once", SLEN("once") },
+ { "digits", SLEN("digits") },
+ { "continuous", SLEN("continuous") },
+ { "code", SLEN("code") },
+ { "spell-out", SLEN("spell-out") },
+ { "x-slow", SLEN("x-slow") },
+ { "slow", SLEN("slow") },
+ { "fast", SLEN("fast") },
+ { "x-fast", SLEN("x-fast") },
+ { "faster", SLEN("faster") },
+ { "slower", SLEN("slower") },
+ { "center", SLEN("center") },
+ { "justify", SLEN("justify") },
+ { "capitalize", SLEN("capitalize") },
+ { "uppercase", SLEN("uppercase") },
+ { "lowercase", SLEN("lowercase") },
+ { "embed", SLEN("embed") },
+ { "bidi-override", SLEN("bidi-override") },
+ { "baseline", SLEN("baseline") },
+ { "sub", SLEN("sub") },
+ { "super", SLEN("super") },
+ { "text-top", SLEN("text-top") },
+ { "middle", SLEN("middle") },
+ { "text-bottom", SLEN("text-bottom") },
+ { "silent", SLEN("silent") },
+ { "x-soft", SLEN("x-soft") },
+ { "soft", SLEN("soft") },
+ { "loud", SLEN("loud") },
+ { "x-loud", SLEN("x-loud") },
+ { "pre", SLEN("pre") },
+ { "nowrap", SLEN("nowrap") },
+ { "pre-wrap", SLEN("pre-wrap") },
+ { "pre-line", SLEN("pre-line") },
+ { "leftwards", SLEN("leftwards") },
+ { "rightwards", SLEN("rightwards") },
+ { "left-side", SLEN("left-side") },
+ { "far-left", SLEN("far-left") },
+ { "center-left", SLEN("center-left") },
+ { "center-right", SLEN("center-right") },
+ { "far-right", SLEN("far-right") },
+ { "right-side", SLEN("right-side") },
+ { "behind", SLEN("behind") },
+ { "rect", SLEN("rect") },
+ { "open-quote", SLEN("open-quote") },
+ { "close-quote", SLEN("close-quote") },
+ { "no-open-quote", SLEN("no-open-quote") },
+ { "no-close-quote", SLEN("no-close-quote") },
+ { "attr", SLEN("attr") },
+ { "counter", SLEN("counter") },
+ { "counters", SLEN("counters") },
+ { "crosshair", SLEN("crosshair") },
+ { "default", SLEN("default") },
+ { "pointer", SLEN("pointer") },
+ { "move", SLEN("move") },
+ { "e-resize", SLEN("e-resize") },
+ { "ne-resize", SLEN("ne-resize") },
+ { "nw-resize", SLEN("nw-resize") },
+ { "n-resize", SLEN("n-resize") },
+ { "se-resize", SLEN("se-resize") },
+ { "sw-resize", SLEN("sw-resize") },
+ { "s-resize", SLEN("s-resize") },
+ { "w-resize", SLEN("w-resize") },
+ { "text", SLEN("text") },
+ { "wait", SLEN("wait") },
+ { "help", SLEN("help") },
+ { "progress", SLEN("progress") },
+ { "serif", SLEN("serif") },
+ { "sans-serif", SLEN("sans-serif") },
+ { "cursive", SLEN("cursive") },
+ { "fantasy", SLEN("fantasy") },
+ { "monospace", SLEN("monospace") },
+ { "male", SLEN("male") },
+ { "female", SLEN("female") },
+ { "child", SLEN("child") },
+ { "mix", SLEN("mix") },
+ { "underline", SLEN("underline") },
+ { "overline", SLEN("overline") },
+ { "line-through", SLEN("line-through") },
+ { "blink", SLEN("blink") },
+ { "rgb", SLEN("rgb") },
+
+ { "aliceblue", SLEN("aliceblue") },
+ { "antiquewhite", SLEN("antiquewhite") },
+ { "aqua", SLEN("aqua") },
+ { "aquamarine", SLEN("aquamarine") },
+ { "azure", SLEN("azure") },
+ { "beige", SLEN("beige") },
+ { "bisque", SLEN("bisque") },
+ { "black", SLEN("black") },
+ { "blanchedalmond", SLEN("blanchedalmond") },
+ { "blue", SLEN("blue") },
+ { "blueviolet", SLEN("blueviolet") },
+ { "brown", SLEN("brown") },
+ { "burlywood", SLEN("burlywood") },
+ { "cadetblue", SLEN("cadetblue") },
+ { "chartreuse", SLEN("chartreuse") },
+ { "chocolate", SLEN("chocolate") },
+ { "coral", SLEN("coral") },
+ { "cornflowerblue", SLEN("cornflowerblue") },
+ { "cornsilk", SLEN("cornsilk") },
+ { "crimson", SLEN("crimson") },
+ { "cyan", SLEN("cyan") },
+ { "darkblue", SLEN("darkblue") },
+ { "darkcyan", SLEN("darkcyan") },
+ { "darkgoldenrod", SLEN("darkgoldenrod") },
+ { "darkgray", SLEN("darkgray") },
+ { "darkgreen", SLEN("darkgreen") },
+ { "darkgrey", SLEN("darkgrey") },
+ { "darkkhaki", SLEN("darkkhaki") },
+ { "darkmagenta", SLEN("darkmagenta") },
+ { "darkolivegreen", SLEN("darkolivegreen") },
+ { "darkorange", SLEN("darkorange") },
+ { "darkorchid", SLEN("darkorchid") },
+ { "darkred", SLEN("darkred") },
+ { "darksalmon", SLEN("darksalmon") },
+ { "darkseagreen", SLEN("darkseagreen") },
+ { "darkslateblue", SLEN("darkslateblue") },
+ { "darkslategray", SLEN("darkslategray") },
+ { "darkslategrey", SLEN("darkslategrey") },
+ { "darkturquoise", SLEN("darkturquoise") },
+ { "darkviolet", SLEN("darkviolet") },
+ { "deeppink", SLEN("deeppink") },
+ { "deepskyblue", SLEN("deepskyblue") },
+ { "dimgray", SLEN("dimgray") },
+ { "dimgrey", SLEN("dimgrey") },
+ { "dodgerblue", SLEN("dodgerblue") },
+ { "feldspar", SLEN("feldspar") },
+ { "firebrick", SLEN("firebrick") },
+ { "floralwhite", SLEN("floralwhite") },
+ { "forestgreen", SLEN("forestgreen") },
+ { "fuchsia", SLEN("fuchsia") },
+ { "gainsboro", SLEN("gainsboro") },
+ { "ghostwhite", SLEN("ghostwhite") },
+ { "gold", SLEN("gold") },
+ { "goldenrod", SLEN("goldenrod") },
+ { "gray", SLEN("gray") },
+ { "green", SLEN("green") },
+ { "greenyellow", SLEN("greenyellow") },
+ { "grey", SLEN("grey") },
+ { "honeydew", SLEN("honeydew") },
+ { "hotpink", SLEN("hotpink") },
+ { "indianred", SLEN("indianred") },
+ { "indigo", SLEN("indigo") },
+ { "ivory", SLEN("ivory") },
+ { "khaki", SLEN("khaki") },
+ { "lavender", SLEN("lavender") },
+ { "lavenderblush", SLEN("lavenderblush") },
+ { "lawngreen", SLEN("lawngreen") },
+ { "lemonchiffon", SLEN("lemonchiffon") },
+ { "lightblue", SLEN("lightblue") },
+ { "lightcoral", SLEN("lightcoral") },
+ { "lightcyan", SLEN("lightcyan") },
+ { "lightgoldenrodyellow", SLEN("lightgoldenrodyellow") },
+ { "lightgray", SLEN("lightgray") },
+ { "lightgreen", SLEN("lightgreen") },
+ { "lightgrey", SLEN("lightgrey") },
+ { "lightpink", SLEN("lightpink") },
+ { "lightsalmon", SLEN("lightsalmon") },
+ { "lightseagreen", SLEN("lightseagreen") },
+ { "lightskyblue", SLEN("lightskyblue") },
+ { "lightslateblue", SLEN("lightslateblue") },
+ { "lightslategray", SLEN("lightslategray") },
+ { "lightslategrey", SLEN("lightslategrey") },
+ { "lightsteelblue", SLEN("lightsteelblue") },
+ { "lightyellow", SLEN("lightyellow") },
+ { "lime", SLEN("lime") },
+ { "limegreen", SLEN("limegreen") },
+ { "linen", SLEN("linen") },
+ { "magenta", SLEN("magenta") },
+ { "maroon", SLEN("maroon") },
+ { "mediumaquamarine", SLEN("mediumaquamarine") },
+ { "mediumblue", SLEN("mediumblue") },
+ { "mediumorchid", SLEN("mediumorchid") },
+ { "mediumpurple", SLEN("mediumpurple") },
+ { "mediumseagreen", SLEN("mediumseagreen") },
+ { "mediumslateblue", SLEN("mediumslateblue") },
+ { "mediumspringgreen", SLEN("mediumspringgreen") },
+ { "mediumturquoise", SLEN("mediumturquoise") },
+ { "mediumvioletred", SLEN("mediumvioletred") },
+ { "midnightblue", SLEN("midnightblue") },
+ { "mintcream", SLEN("mintcream") },
+ { "mistyrose", SLEN("mistyrose") },
+ { "moccasin", SLEN("moccasin") },
+ { "navajowhite", SLEN("navajowhite") },
+ { "navy", SLEN("navy") },
+ { "oldlace", SLEN("oldlace") },
+ { "olive", SLEN("olive") },
+ { "olivedrab", SLEN("olivedrab") },
+ { "orange", SLEN("orange") },
+ { "orangered", SLEN("orangered") },
+ { "orchid", SLEN("orchid") },
+ { "palegoldenrod", SLEN("palegoldenrod") },
+ { "palegreen", SLEN("palegreen") },
+ { "paleturquoise", SLEN("paleturquoise") },
+ { "palevioletred", SLEN("palevioletred") },
+ { "papayawhip", SLEN("papayawhip") },
+ { "peachpuff", SLEN("peachpuff") },
+ { "peru", SLEN("peru") },
+ { "pink", SLEN("pink") },
+ { "plum", SLEN("plum") },
+ { "powderblue", SLEN("powderblue") },
+ { "purple", SLEN("purple") },
+ { "red", SLEN("red") },
+ { "rosybrown", SLEN("rosybrown") },
+ { "royalblue", SLEN("royalblue") },
+ { "saddlebrown", SLEN("saddlebrown") },
+ { "salmon", SLEN("salmon") },
+ { "sandybrown", SLEN("sandybrown") },
+ { "seagreen", SLEN("seagreen") },
+ { "seashell", SLEN("seashell") },
+ { "sienna", SLEN("sienna") },
+ { "silver", SLEN("silver") },
+ { "skyblue", SLEN("skyblue") },
+ { "slateblue", SLEN("slateblue") },
+ { "slategray", SLEN("slategray") },
+ { "slategrey", SLEN("slategrey") },
+ { "snow", SLEN("snow") },
+ { "springgreen", SLEN("springgreen") },
+ { "steelblue", SLEN("steelblue") },
+ { "tan", SLEN("tan") },
+ { "teal", SLEN("teal") },
+ { "thistle", SLEN("thistle") },
+ { "tomato", SLEN("tomato") },
+ { "turquoise", SLEN("turquoise") },
+ { "violet", SLEN("violet") },
+ { "violetred", SLEN("violetred") },
+ { "wheat", SLEN("wheat") },
+ { "white", SLEN("white") },
+ { "whitesmoke", SLEN("whitesmoke") },
+ { "yellow", SLEN("yellow") },
+ { "yellowgreen", SLEN("yellowgreen") }
+};
+
+
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index 884fe75..5931505 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -116,468 +116,12 @@ enum {
LAST_KNOWN
};
-/* Must be synchronised with above enum */
-static struct {
+typedef struct stringmap_entry {
const char *data;
size_t len;
-} stringmap[LAST_KNOWN] = {
- { "*", SLEN("*") },
+} stringmap_entry;
- { "charset", SLEN("charset") },
- { "import", SLEN("import") },
- { "media", SLEN("media") },
- { "page", SLEN("page") },
-
- { "aural", SLEN("aural") },
- { "braille", SLEN("braille") },
- { "embossed", SLEN("embossed") },
- { "handheld", SLEN("handheld") },
- { "print", SLEN("print") },
- { "projection", SLEN("projection") },
- { "screen", SLEN("screen") },
- { "speech", SLEN("speech") },
- { "tty", SLEN("tty") },
- { "tv", SLEN("tv") },
- { "all", SLEN("all") },
-
- { "first-child", SLEN("first-child") },
- { "link", SLEN("link") },
- { "visited", SLEN("visited") },
- { "hover", SLEN("hover") },
- { "active", SLEN("active") },
- { "focus", SLEN("focus") },
- { "lang", SLEN("lang") },
- { "first", SLEN("first") },
-
- { "first-line", SLEN("first-line") },
- { "first-letter", SLEN("first-letter") },
- { "before", SLEN("before") },
- { "after", SLEN("after") },
-
- { "azimuth", SLEN("azimuth") },
- { "background-attachment", SLEN("background-attachment") },
- { "background-color", SLEN("background-color") },
- { "background-image", SLEN("background-image") },
- { "background-position", SLEN("background-position") },
- { "background-repeat", SLEN("background-repeat") },
- { "border-bottom-color", SLEN("border-bottom-color") },
- { "border-bottom-style", SLEN("border-bottom-style") },
- { "border-bottom-width", SLEN("border-bottom-width") },
- { "border-collapse", SLEN("border-collapse") },
- { "border-left-color", SLEN("border-left-color") },
- { "border-left-style", SLEN("border-left-style") },
- { "border-left-width", SLEN("border-left-width") },
- { "border-right-color", SLEN("border-right-color") },
- { "border-right-style", SLEN("border-right-style") },
- { "border-right-width", SLEN("border-right-width") },
- { "border-spacing", SLEN("border-spacing") },
- { "border-top-color", SLEN("border-top-color") },
- { "border-top-style", SLEN("border-top-style") },
- { "border-top-width", SLEN("border-top-width") },
- { "bottom", SLEN("bottom") },
- { "caption-side", SLEN("caption-side") },
- { "clear", SLEN("clear") },
- { "clip", SLEN("clip") },
- { "color", SLEN("color") },
- { "content", SLEN("content") },
- { "counter-increment", SLEN("counter-increment") },
- { "counter-reset", SLEN("counter-reset") },
- { "cue-after", SLEN("cue-after") },
- { "cue-before", SLEN("cue-before") },
- { "cursor", SLEN("cursor") },
- { "direction", SLEN("direction") },
- { "display", SLEN("display") },
- { "elevation", SLEN("elevation") },
- { "empty-cells", SLEN("empty-cells") },
- { "float", SLEN("float") },
- { "font-family", SLEN("font-family") },
- { "font-size", SLEN("font-size") },
- { "font-style", SLEN("font-style") },
- { "font-variant", SLEN("font-variant") },
- { "font-weight", SLEN("font-weight") },
- { "height", SLEN("height") },
- { "left", SLEN("left") },
- { "letter-spacing", SLEN("letter-spacing") },
- { "line-height", SLEN("line-height") },
- { "list-style-image", SLEN("list-style-image") },
- { "list-style-position", SLEN("list-style-position") },
- { "list-style-type", SLEN("list-style-type") },
- { "margin-bottom", SLEN("margin-bottom") },
- { "margin-left", SLEN("margin-left") },
- { "margin-right", SLEN("margin-right") },
- { "margin-top", SLEN("margin-top") },
- { "max-height", SLEN("max-height") },
- { "max-width", SLEN("max-width") },
- { "min-height", SLEN("min-height") },
- { "min-width", SLEN("min-width") },
- { "orphans", SLEN("orphans") },
- { "outline-color", SLEN("outline-color") },
- { "outline-style", SLEN("outline-style") },
- { "outline-width", SLEN("outline-width") },
- { "overflow", SLEN("overflow") },
- { "padding-bottom", SLEN("padding-bottom") },
- { "padding-left", SLEN("padding-left") },
- { "padding-right", SLEN("padding-right") },
- { "padding-top", SLEN("padding-top") },
- { "page-break-after", SLEN("page-break-after") },
- { "page-break-before", SLEN("page-break-before") },
- { "page-break-inside", SLEN("page-break-inside") },
- { "pause-after", SLEN("pause-after") },
- { "pause-before", SLEN("pause-before") },
- { "pitch-range", SLEN("pitch-range") },
- { "pitch", SLEN("pitch") },
- { "play-during", SLEN("play-during") },
- { "position", SLEN("position") },
- { "quotes", SLEN("quotes") },
- { "richness", SLEN("richness") },
- { "right", SLEN("right") },
- { "speak-header", SLEN("speak-header") },
- { "speak-numeral", SLEN("speak-numeral") },
- { "speak-punctuation", SLEN("speak-punctuation") },
- { "speak", SLEN("speak") },
- { "speech-rate", SLEN("speech-rate") },
- { "stress", SLEN("stress") },
- { "table-layout", SLEN("table-layout") },
- { "text-align", SLEN("text-align") },
- { "text-decoration", SLEN("text-decoration") },
- { "text-indent", SLEN("text-indent") },
- { "text-transform", SLEN("text-transform") },
- { "top", SLEN("top") },
- { "unicode-bidi", SLEN("unicode-bidi") },
- { "vertical-align", SLEN("vertical-align") },
- { "visibility", SLEN("visibility") },
- { "voice-family", SLEN("voice-family") },
- { "volume", SLEN("volume") },
- { "white-space", SLEN("white-space") },
- { "widows", SLEN("widows") },
- { "width", SLEN("width") },
- { "word-spacing", SLEN("word-spacing") },
- { "z-index", SLEN("z-index") },
-
- { "inherit", SLEN("inherit") },
- { "important", SLEN("important") },
- { "none", SLEN("none") },
- { "both", SLEN("both") },
- { "fixed", SLEN("fixed") },
- { "scroll", SLEN("scroll") },
- { "transparent", SLEN("transparent") },
- { "no-repeat", SLEN("no-repeat") },
- { "repeat-x", SLEN("repeat-x") },
- { "repeat-y", SLEN("repeat-y") },
- { "repeat", SLEN("repeat") },
- { "hidden", SLEN("hidden") },
- { "dotted", SLEN("dotted") },
- { "dashed", SLEN("dashed") },
- { "solid", SLEN("solid") },
- { "double", SLEN("double") },
- { "groove", SLEN("groove") },
- { "ridge", SLEN("ridge") },
- { "inset", SLEN("inset") },
- { "outset", SLEN("outset") },
- { "thin", SLEN("thin") },
- { "medium", SLEN("medium") },
- { "thick", SLEN("thick") },
- { "collapse", SLEN("collapse") },
- { "separate", SLEN("separate") },
- { "auto", SLEN("auto") },
- { "ltr", SLEN("ltr") },
- { "rtl", SLEN("rtl") },
- { "inline", SLEN("inline") },
- { "block", SLEN("block") },
- { "list-item", SLEN("list-item") },
- { "run-in", SLEN("run-in") },
- { "inline-block", SLEN("inline-block") },
- { "table", SLEN("table") },
- { "inline-table", SLEN("inline-table") },
- { "table-row-group", SLEN("table-row-group") },
- { "table-header-group", SLEN("table-header-group") },
- { "table-footer-group", SLEN("table-footer-group") },
- { "table-row", SLEN("table-row") },
- { "table-column-group", SLEN("table-column-group") },
- { "table-column", SLEN("table-column") },
- { "table-cell", SLEN("table-cell") },
- { "table-caption", SLEN("table-caption") },
- { "below", SLEN("below") },
- { "level", SLEN("level") },
- { "above", SLEN("above") },
- { "higher", SLEN("higher") },
- { "lower", SLEN("lower") },
- { "show", SLEN("show") },
- { "hide", SLEN("hide") },
- { "xx-small", SLEN("xx-small") },
- { "x-small", SLEN("x-small") },
- { "small", SLEN("small") },
- { "large", SLEN("large") },
- { "x-large", SLEN("x-large") },
- { "xx-large", SLEN("xx-large") },
- { "larger", SLEN("larger") },
- { "smaller", SLEN("smaller") },
- { "normal", SLEN("normal") },
- { "italic", SLEN("italic") },
- { "oblique", SLEN("oblique") },
- { "small-caps", SLEN("small-caps") },
- { "bold", SLEN("bold") },
- { "bolder", SLEN("bolder") },
- { "lighter", SLEN("lighter") },
- { "inside", SLEN("inside") },
- { "outside", SLEN("outside") },
- { "disc", SLEN("disc") },
- { "circle", SLEN("circle") },
- { "square", SLEN("square") },
- { "decimal", SLEN("decimal") },
- { "decimal-leading-zero", SLEN("decimal-leading-zero") },
- { "lower-roman", SLEN("lower-roman") },
- { "upper-roman", SLEN("upper-roman") },
- { "lower-greek", SLEN("lower-greek") },
- { "lower-latin", SLEN("lower-latin") },
- { "upper-latin", SLEN("upper-latin") },
- { "armenian", SLEN("armenian") },
- { "georgian", SLEN("georgian") },
- { "lower-alpha", SLEN("lower-alpha") },
- { "upper-alpha", SLEN("upper-alpha") },
- { "invert", SLEN("invert") },
- { "visible", SLEN("visible") },
- { "always", SLEN("always") },
- { "avoid", SLEN("avoid") },
- { "x-low", SLEN("x-low") },
- { "low", SLEN("low") },
- { "high", SLEN("high") },
- { "x-high", SLEN("x-high") },
- { "static", SLEN("static") },
- { "relative", SLEN("relative") },
- { "absolute", SLEN("absolute") },
- { "once", SLEN("once") },
- { "digits", SLEN("digits") },
- { "continuous", SLEN("continuous") },
- { "code", SLEN("code") },
- { "spell-out", SLEN("spell-out") },
- { "x-slow", SLEN("x-slow") },
- { "slow", SLEN("slow") },
- { "fast", SLEN("fast") },
- { "x-fast", SLEN("x-fast") },
- { "faster", SLEN("faster") },
- { "slower", SLEN("slower") },
- { "center", SLEN("center") },
- { "justify", SLEN("justify") },
- { "capitalize", SLEN("capitalize") },
- { "uppercase", SLEN("uppercase") },
- { "lowercase", SLEN("lowercase") },
- { "embed", SLEN("embed") },
- { "bidi-override", SLEN("bidi-override") },
- { "baseline", SLEN("baseline") },
- { "sub", SLEN("sub") },
- { "super", SLEN("super") },
- { "text-top", SLEN("text-top") },
- { "middle", SLEN("middle") },
- { "text-bottom", SLEN("text-bottom") },
- { "silent", SLEN("silent") },
- { "x-soft", SLEN("x-soft") },
- { "soft", SLEN("soft") },
- { "loud", SLEN("loud") },
- { "x-loud", SLEN("x-loud") },
- { "pre", SLEN("pre") },
- { "nowrap", SLEN("nowrap") },
- { "pre-wrap", SLEN("pre-wrap") },
- { "pre-line", SLEN("pre-line") },
- { "leftwards", SLEN("leftwards") },
- { "rightwards", SLEN("rightwards") },
- { "left-side", SLEN("left-side") },
- { "far-left", SLEN("far-left") },
- { "center-left", SLEN("center-left") },
- { "center-right", SLEN("center-right") },
- { "far-right", SLEN("far-right") },
- { "right-side", SLEN("right-side") },
- { "behind", SLEN("behind") },
- { "rect", SLEN("rect") },
- { "open-quote", SLEN("open-quote") },
- { "close-quote", SLEN("close-quote") },
- { "no-open-quote", SLEN("no-open-quote") },
- { "no-close-quote", SLEN("no-close-quote") },
- { "attr", SLEN("attr") },
- { "counter", SLEN("counter") },
- { "counters", SLEN("counters") },
- { "crosshair", SLEN("crosshair") },
- { "default", SLEN("default") },
- { "pointer", SLEN("pointer") },
- { "move", SLEN("move") },
- { "e-resize", SLEN("e-resize") },
- { "ne-resize", SLEN("ne-resize") },
- { "nw-resize", SLEN("nw-resize") },
- { "n-resize", SLEN("n-resize") },
- { "se-resize", SLEN("se-resize") },
- { "sw-resize", SLEN("sw-resize") },
- { "s-resize", SLEN("s-resize") },
- { "w-resize", SLEN("w-resize") },
- { "text", SLEN("text") },
- { "wait", SLEN("wait") },
- { "help", SLEN("help") },
- { "progress", SLEN("progress") },
- { "serif", SLEN("serif") },
- { "sans-serif", SLEN("sans-serif") },
- { "cursive", SLEN("cursive") },
- { "fantasy", SLEN("fantasy") },
- { "monospace", SLEN("monospace") },
- { "male", SLEN("male") },
- { "female", SLEN("female") },
- { "child", SLEN("child") },
- { "mix", SLEN("mix") },
- { "underline", SLEN("underline") },
- { "overline", SLEN("overline") },
- { "line-through", SLEN("line-through") },
- { "blink", SLEN("blink") },
- { "rgb", SLEN("rgb") },
-
- { "aliceblue", SLEN("aliceblue") },
- { "antiquewhite", SLEN("antiquewhite") },
- { "aqua", SLEN("aqua") },
- { "aquamarine", SLEN("aquamarine") },
- { "azure", SLEN("azure") },
- { "beige", SLEN("beige") },
- { "bisque", SLEN("bisque") },
- { "black", SLEN("black") },
- { "blanchedalmond", SLEN("blanchedalmond") },
- { "blue", SLEN("blue") },
- { "blueviolet", SLEN("blueviolet") },
- { "brown", SLEN("brown") },
- { "burlywood", SLEN("burlywood") },
- { "cadetblue", SLEN("cadetblue") },
- { "chartreuse", SLEN("chartreuse") },
- { "chocolate", SLEN("chocolate") },
- { "coral", SLEN("coral") },
- { "cornflowerblue", SLEN("cornflowerblue") },
- { "cornsilk", SLEN("cornsilk") },
- { "crimson", SLEN("crimson") },
- { "cyan", SLEN("cyan") },
- { "darkblue", SLEN("darkblue") },
- { "darkcyan", SLEN("darkcyan") },
- { "darkgoldenrod", SLEN("darkgoldenrod") },
- { "darkgray", SLEN("darkgray") },
- { "darkgreen", SLEN("darkgreen") },
- { "darkgrey", SLEN("darkgrey") },
- { "darkkhaki", SLEN("darkkhaki") },
- { "darkmagenta", SLEN("darkmagenta") },
- { "darkolivegreen", SLEN("darkolivegreen") },
- { "darkorange", SLEN("darkorange") },
- { "darkorchid", SLEN("darkorchid") },
- { "darkred", SLEN("darkred") },
- { "darksalmon", SLEN("darksalmon") },
- { "darkseagreen", SLEN("darkseagreen") },
- { "darkslateblue", SLEN("darkslateblue") },
- { "darkslategray", SLEN("darkslategray") },
- { "darkslategrey", SLEN("darkslategrey") },
- { "darkturquoise", SLEN("darkturquoise") },
- { "darkviolet", SLEN("darkviolet") },
- { "deeppink", SLEN("deeppink") },
- { "deepskyblue", SLEN("deepskyblue") },
- { "dimgray", SLEN("dimgray") },
- { "dimgrey", SLEN("dimgrey") },
- { "dodgerblue", SLEN("dodgerblue") },
- { "feldspar", SLEN("feldspar") },
- { "firebrick", SLEN("firebrick") },
- { "floralwhite", SLEN("floralwhite") },
- { "forestgreen", SLEN("forestgreen") },
- { "fuchsia", SLEN("fuchsia") },
- { "gainsboro", SLEN("gainsboro") },
- { "ghostwhite", SLEN("ghostwhite") },
- { "gold", SLEN("gold") },
- { "goldenrod", SLEN("goldenrod") },
- { "gray", SLEN("gray") },
- { "green", SLEN("green") },
- { "greenyellow", SLEN("greenyellow") },
- { "grey", SLEN("grey") },
- { "honeydew", SLEN("honeydew") },
- { "hotpink", SLEN("hotpink") },
- { "indianred", SLEN("indianred") },
- { "indigo", SLEN("indigo") },
- { "ivory", SLEN("ivory") },
- { "khaki", SLEN("khaki") },
- { "lavender", SLEN("lavender") },
- { "lavenderblush", SLEN("lavenderblush") },
- { "lawngreen", SLEN("lawngreen") },
- { "lemonchiffon", SLEN("lemonchiffon") },
- { "lightblue", SLEN("lightblue") },
- { "lightcoral", SLEN("lightcoral") },
- { "lightcyan", SLEN("lightcyan") },
- { "lightgoldenrodyellow", SLEN("lightgoldenrodyellow") },
- { "lightgray", SLEN("lightgray") },
- { "lightgreen", SLEN("lightgreen") },
- { "lightgrey", SLEN("lightgrey") },
- { "lightpink", SLEN("lightpink") },
- { "lightsalmon", SLEN("lightsalmon") },
- { "lightseagreen", SLEN("lightseagreen") },
- { "lightskyblue", SLEN("lightskyblue") },
- { "lightslateblue", SLEN("lightslateblue") },
- { "lightslategray", SLEN("lightslategray") },
- { "lightslategrey", SLEN("lightslategrey") },
- { "lightsteelblue", SLEN("lightsteelblue") },
- { "lightyellow", SLEN("lightyellow") },
- { "lime", SLEN("lime") },
- { "limegreen", SLEN("limegreen") },
- { "linen", SLEN("linen") },
- { "magenta", SLEN("magenta") },
- { "maroon", SLEN("maroon") },
- { "mediumaquamarine", SLEN("mediumaquamarine") },
- { "mediumblue", SLEN("mediumblue") },
- { "mediumorchid", SLEN("mediumorchid") },
- { "mediumpurple", SLEN("mediumpurple") },
- { "mediumseagreen", SLEN("mediumseagreen") },
- { "mediumslateblue", SLEN("mediumslateblue") },
- { "mediumspringgreen", SLEN("mediumspringgreen") },
- { "mediumturquoise", SLEN("mediumturquoise") },
- { "mediumvioletred", SLEN("mediumvioletred") },
- { "midnightblue", SLEN("midnightblue") },
- { "mintcream", SLEN("mintcream") },
- { "mistyrose", SLEN("mistyrose") },
- { "moccasin", SLEN("moccasin") },
- { "navajowhite", SLEN("navajowhite") },
- { "navy", SLEN("navy") },
- { "oldlace", SLEN("oldlace") },
- { "olive", SLEN("olive") },
- { "olivedrab", SLEN("olivedrab") },
- { "orange", SLEN("orange") },
- { "orangered", SLEN("orangered") },
- { "orchid", SLEN("orchid") },
- { "palegoldenrod", SLEN("palegoldenrod") },
- { "palegreen", SLEN("palegreen") },
- { "paleturquoise", SLEN("paleturquoise") },
- { "palevioletred", SLEN("palevioletred") },
- { "papayawhip", SLEN("papayawhip") },
- { "peachpuff", SLEN("peachpuff") },
- { "peru", SLEN("peru") },
- { "pink", SLEN("pink") },
- { "plum", SLEN("plum") },
- { "powderblue", SLEN("powderblue") },
- { "purple", SLEN("purple") },
- { "red", SLEN("red") },
- { "rosybrown", SLEN("rosybrown") },
- { "royalblue", SLEN("royalblue") },
- { "saddlebrown", SLEN("saddlebrown") },
- { "salmon", SLEN("salmon") },
- { "sandybrown", SLEN("sandybrown") },
- { "seagreen", SLEN("seagreen") },
- { "seashell", SLEN("seashell") },
- { "sienna", SLEN("sienna") },
- { "silver", SLEN("silver") },
- { "skyblue", SLEN("skyblue") },
- { "slateblue", SLEN("slateblue") },
- { "slategray", SLEN("slategray") },
- { "slategrey", SLEN("slategrey") },
- { "snow", SLEN("snow") },
- { "springgreen", SLEN("springgreen") },
- { "steelblue", SLEN("steelblue") },
- { "tan", SLEN("tan") },
- { "teal", SLEN("teal") },
- { "thistle", SLEN("thistle") },
- { "tomato", SLEN("tomato") },
- { "turquoise", SLEN("turquoise") },
- { "violet", SLEN("violet") },
- { "violetred", SLEN("violetred") },
- { "wheat", SLEN("wheat") },
- { "white", SLEN("white") },
- { "whitesmoke", SLEN("whitesmoke") },
- { "yellow", SLEN("yellow") },
- { "yellowgreen", SLEN("yellowgreen") }
-};
+extern const stringmap_entry stringmap[LAST_KNOWN];
#endif