diff options
Diffstat (limited to 'lib/skin_parser')
-rw-r--r-- | lib/skin_parser/skin_debug.c | 6 | ||||
-rw-r--r-- | lib/skin_parser/skin_parser.c | 34 | ||||
-rw-r--r-- | lib/skin_parser/skin_parser.h | 2 | ||||
-rw-r--r-- | lib/skin_parser/skin_scan.c | 2 | ||||
-rw-r--r-- | lib/skin_parser/symbols.h | 4 |
5 files changed, 24 insertions, 24 deletions
diff --git a/lib/skin_parser/skin_debug.c b/lib/skin_parser/skin_debug.c index 3a5a5a7441..a09cd673c7 100644 --- a/lib/skin_parser/skin_debug.c +++ b/lib/skin_parser/skin_debug.c | |||
@@ -85,14 +85,14 @@ void skin_error(enum skin_errorcode error, const char* cursor) | |||
85 | case DECIMAL_EXPECTED: | 85 | case DECIMAL_EXPECTED: |
86 | error_message = "Expected decimal"; | 86 | error_message = "Expected decimal"; |
87 | break; | 87 | break; |
88 | case SEPERATOR_EXPECTED: | 88 | case SEPARATOR_EXPECTED: |
89 | error_message = "Expected argument seperator"; | 89 | error_message = "Expected argument separator"; |
90 | break; | 90 | break; |
91 | case CLOSE_EXPECTED: | 91 | case CLOSE_EXPECTED: |
92 | error_message = "Expected list close"; | 92 | error_message = "Expected list close"; |
93 | break; | 93 | break; |
94 | case MULTILINE_EXPECTED: | 94 | case MULTILINE_EXPECTED: |
95 | error_message = "Expected subline seperator"; | 95 | error_message = "Expected subline separator"; |
96 | break; | 96 | break; |
97 | }; | 97 | }; |
98 | 98 | ||
diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c index 689a315bfa..5a5d746c8e 100644 --- a/lib/skin_parser/skin_parser.c +++ b/lib/skin_parser/skin_parser.c | |||
@@ -261,7 +261,7 @@ static struct skin_element* skin_parse_line(const char**document) | |||
261 | 261 | ||
262 | /* | 262 | /* |
263 | * If conditional is set to true, then this will break upon encountering | 263 | * If conditional is set to true, then this will break upon encountering |
264 | * SEPERATESYM. This should only be used when parsing a line inside a | 264 | * SEPARATESYM. This should only be used when parsing a line inside a |
265 | * conditional, otherwise just use the wrapper function skin_parse_line() | 265 | * conditional, otherwise just use the wrapper function skin_parse_line() |
266 | */ | 266 | */ |
267 | static struct skin_element* skin_parse_line_optional(const char** document, | 267 | static struct skin_element* skin_parse_line_optional(const char** document, |
@@ -280,9 +280,9 @@ static struct skin_element* skin_parse_line_optional(const char** document, | |||
280 | retval->type = LINE; | 280 | retval->type = LINE; |
281 | retval->line = skin_line; | 281 | retval->line = skin_line; |
282 | if(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM | 282 | if(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM |
283 | && !(conditional && (*cursor == ARGLISTSEPERATESYM | 283 | && !(conditional && (*cursor == ARGLISTSEPARATESYM |
284 | || *cursor == ARGLISTCLOSESYM | 284 | || *cursor == ARGLISTCLOSESYM |
285 | || *cursor == ENUMLISTSEPERATESYM | 285 | || *cursor == ENUMLISTSEPARATESYM |
286 | || *cursor == ENUMLISTCLOSESYM))) | 286 | || *cursor == ENUMLISTCLOSESYM))) |
287 | { | 287 | { |
288 | retval->children_count = 1; | 288 | retval->children_count = 1; |
@@ -313,9 +313,9 @@ static struct skin_element* skin_parse_line_optional(const char** document, | |||
313 | #endif | 313 | #endif |
314 | 314 | ||
315 | while(*cursor != '\n' && *cursor != '\0' && *cursor != MULTILINESYM | 315 | while(*cursor != '\n' && *cursor != '\0' && *cursor != MULTILINESYM |
316 | && !((*cursor == ARGLISTSEPERATESYM | 316 | && !((*cursor == ARGLISTSEPARATESYM |
317 | || *cursor == ARGLISTCLOSESYM | 317 | || *cursor == ARGLISTCLOSESYM |
318 | || *cursor == ENUMLISTSEPERATESYM | 318 | || *cursor == ENUMLISTSEPARATESYM |
319 | || *cursor == ENUMLISTCLOSESYM) | 319 | || *cursor == ENUMLISTCLOSESYM) |
320 | && conditional) | 320 | && conditional) |
321 | && !(check_viewport(cursor) && cursor != *document)) | 321 | && !(check_viewport(cursor) && cursor != *document)) |
@@ -390,9 +390,9 @@ static struct skin_element* skin_parse_sublines_optional(const char** document, | |||
390 | 390 | ||
391 | /* First we count the sublines */ | 391 | /* First we count the sublines */ |
392 | while(*cursor != '\0' && *cursor != '\n' | 392 | while(*cursor != '\0' && *cursor != '\n' |
393 | && !((*cursor == ARGLISTSEPERATESYM | 393 | && !((*cursor == ARGLISTSEPARATESYM |
394 | || *cursor == ARGLISTCLOSESYM | 394 | || *cursor == ARGLISTCLOSESYM |
395 | || *cursor == ENUMLISTSEPERATESYM | 395 | || *cursor == ENUMLISTSEPARATESYM |
396 | || *cursor == ENUMLISTCLOSESYM) | 396 | || *cursor == ENUMLISTCLOSESYM) |
397 | && conditional) | 397 | && conditional) |
398 | && !(check_viewport(cursor) && cursor != *document)) | 398 | && !(check_viewport(cursor) && cursor != *document)) |
@@ -565,7 +565,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document) | |||
565 | { | 565 | { |
566 | skip_arglist(&cursor); | 566 | skip_arglist(&cursor); |
567 | } | 567 | } |
568 | else if(*cursor == ARGLISTSEPERATESYM) | 568 | else if(*cursor == ARGLISTSEPARATESYM) |
569 | { | 569 | { |
570 | num_args++; | 570 | num_args++; |
571 | cursor++; | 571 | cursor++; |
@@ -753,9 +753,9 @@ static int skin_parse_tag(struct skin_element* element, const char** document) | |||
753 | 753 | ||
754 | skip_whitespace(&cursor); | 754 | skip_whitespace(&cursor); |
755 | 755 | ||
756 | if(*cursor != ARGLISTSEPERATESYM && i < num_args - 1) | 756 | if(*cursor != ARGLISTSEPARATESYM && i < num_args - 1) |
757 | { | 757 | { |
758 | skin_error(SEPERATOR_EXPECTED, cursor); | 758 | skin_error(SEPARATOR_EXPECTED, cursor); |
759 | return 0; | 759 | return 0; |
760 | } | 760 | } |
761 | else if(*cursor != ARGLISTCLOSESYM && i == num_args - 1) | 761 | else if(*cursor != ARGLISTCLOSESYM && i == num_args - 1) |
@@ -801,7 +801,7 @@ static int skin_parse_tag(struct skin_element* element, const char** document) | |||
801 | 801 | ||
802 | /* | 802 | /* |
803 | * If the conditional flag is set true, then parsing text will stop at an | 803 | * If the conditional flag is set true, then parsing text will stop at an |
804 | * ARGLISTSEPERATESYM. Only set that flag when parsing within a conditional | 804 | * ARGLISTSEPARATESYM. Only set that flag when parsing within a conditional |
805 | */ | 805 | */ |
806 | static int skin_parse_text(struct skin_element* element, const char** document, | 806 | static int skin_parse_text(struct skin_element* element, const char** document, |
807 | int conditional) | 807 | int conditional) |
@@ -814,9 +814,9 @@ static int skin_parse_text(struct skin_element* element, const char** document, | |||
814 | /* First figure out how much text we're copying */ | 814 | /* First figure out how much text we're copying */ |
815 | while(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM | 815 | while(*cursor != '\0' && *cursor != '\n' && *cursor != MULTILINESYM |
816 | && *cursor != COMMENTSYM | 816 | && *cursor != COMMENTSYM |
817 | && !((*cursor == ARGLISTSEPERATESYM | 817 | && !((*cursor == ARGLISTSEPARATESYM |
818 | || *cursor == ARGLISTCLOSESYM | 818 | || *cursor == ARGLISTCLOSESYM |
819 | || *cursor == ENUMLISTSEPERATESYM | 819 | || *cursor == ENUMLISTSEPARATESYM |
820 | || *cursor == ENUMLISTCLOSESYM) | 820 | || *cursor == ENUMLISTCLOSESYM) |
821 | && conditional)) | 821 | && conditional)) |
822 | { | 822 | { |
@@ -932,7 +932,7 @@ static int skin_parse_conditional(struct skin_element* element, const char** doc | |||
932 | break; | 932 | break; |
933 | cursor++; | 933 | cursor++; |
934 | } | 934 | } |
935 | else if(*cursor == ENUMLISTSEPERATESYM) | 935 | else if(*cursor == ENUMLISTSEPARATESYM) |
936 | { | 936 | { |
937 | children++; | 937 | children++; |
938 | cursor++; | 938 | cursor++; |
@@ -984,9 +984,9 @@ static int skin_parse_conditional(struct skin_element* element, const char** doc | |||
984 | cursor = conditional_end; | 984 | cursor = conditional_end; |
985 | #endif | 985 | #endif |
986 | 986 | ||
987 | if(i < children - 1 && *cursor != ENUMLISTSEPERATESYM) | 987 | if(i < children - 1 && *cursor != ENUMLISTSEPARATESYM) |
988 | { | 988 | { |
989 | skin_error(SEPERATOR_EXPECTED, cursor); | 989 | skin_error(SEPARATOR_EXPECTED, cursor); |
990 | return 0; | 990 | return 0; |
991 | } | 991 | } |
992 | else if(i == children - 1 && *cursor != ENUMLISTCLOSESYM) | 992 | else if(i == children - 1 && *cursor != ENUMLISTCLOSESYM) |
@@ -1048,7 +1048,7 @@ static struct skin_element* skin_parse_code_as_arg(const char** document) | |||
1048 | 1048 | ||
1049 | /* Checking for sublines */ | 1049 | /* Checking for sublines */ |
1050 | while(*cursor != '\n' && *cursor != '\0' | 1050 | while(*cursor != '\n' && *cursor != '\0' |
1051 | && *cursor != ENUMLISTSEPERATESYM && *cursor != ARGLISTSEPERATESYM | 1051 | && *cursor != ENUMLISTSEPARATESYM && *cursor != ARGLISTSEPARATESYM |
1052 | && *cursor != ENUMLISTCLOSESYM && *cursor != ARGLISTCLOSESYM) | 1052 | && *cursor != ENUMLISTCLOSESYM && *cursor != ARGLISTCLOSESYM) |
1053 | { | 1053 | { |
1054 | if(*cursor == MULTILINESYM) | 1054 | if(*cursor == MULTILINESYM) |
diff --git a/lib/skin_parser/skin_parser.h b/lib/skin_parser/skin_parser.h index 7cef0107a3..6f1af25a05 100644 --- a/lib/skin_parser/skin_parser.h +++ b/lib/skin_parser/skin_parser.h | |||
@@ -58,7 +58,7 @@ enum skin_errorcode | |||
58 | INSUFFICIENT_ARGS, | 58 | INSUFFICIENT_ARGS, |
59 | INT_EXPECTED, | 59 | INT_EXPECTED, |
60 | DECIMAL_EXPECTED, | 60 | DECIMAL_EXPECTED, |
61 | SEPERATOR_EXPECTED, | 61 | SEPARATOR_EXPECTED, |
62 | CLOSE_EXPECTED, | 62 | CLOSE_EXPECTED, |
63 | MULTILINE_EXPECTED | 63 | MULTILINE_EXPECTED |
64 | }; | 64 | }; |
diff --git a/lib/skin_parser/skin_scan.c b/lib/skin_parser/skin_scan.c index de9c423f04..50d58bc250 100644 --- a/lib/skin_parser/skin_scan.c +++ b/lib/skin_parser/skin_scan.c | |||
@@ -101,7 +101,7 @@ char* scan_string(const char** document) | |||
101 | char* buffer = NULL; | 101 | char* buffer = NULL; |
102 | int i; | 102 | int i; |
103 | 103 | ||
104 | while(*cursor != ARGLISTSEPERATESYM && *cursor != ARGLISTCLOSESYM && | 104 | while(*cursor != ARGLISTSEPARATESYM && *cursor != ARGLISTCLOSESYM && |
105 | *cursor != '\0') | 105 | *cursor != '\0') |
106 | { | 106 | { |
107 | if(*cursor == COMMENTSYM) | 107 | if(*cursor == COMMENTSYM) |
diff --git a/lib/skin_parser/symbols.h b/lib/skin_parser/symbols.h index b4f31289ef..e18a770d3b 100644 --- a/lib/skin_parser/symbols.h +++ b/lib/skin_parser/symbols.h | |||
@@ -36,8 +36,8 @@ extern "C" | |||
36 | #define MULTILINESYM ';' | 36 | #define MULTILINESYM ';' |
37 | #define ARGLISTOPENSYM '(' | 37 | #define ARGLISTOPENSYM '(' |
38 | #define ARGLISTCLOSESYM ')' | 38 | #define ARGLISTCLOSESYM ')' |
39 | #define ARGLISTSEPERATESYM ',' | 39 | #define ARGLISTSEPARATESYM ',' |
40 | #define ENUMLISTSEPERATESYM '|' | 40 | #define ENUMLISTSEPARATESYM '|' |
41 | #define ENUMLISTOPENSYM '<' | 41 | #define ENUMLISTOPENSYM '<' |
42 | #define ENUMLISTCLOSESYM '>' | 42 | #define ENUMLISTCLOSESYM '>' |
43 | #define DEFAULTSYM '-' | 43 | #define DEFAULTSYM '-' |