summaryrefslogtreecommitdiff
path: root/lib/skin_parser/skin_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/skin_parser/skin_parser.c')
-rw-r--r--lib/skin_parser/skin_parser.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/lib/skin_parser/skin_parser.c b/lib/skin_parser/skin_parser.c
index 3e7f96af82..7a30e93fb5 100644
--- a/lib/skin_parser/skin_parser.c
+++ b/lib/skin_parser/skin_parser.c
@@ -459,21 +459,9 @@ static int skin_parse_tag(struct skin_element* element, char** document)
459 return 1; 459 return 1;
460 } 460 }
461 461
462 /* Eating a newline if necessary */
463 if(tag_args[0] == '\n')
464 {
465 while (*cursor && *cursor != '\n')
466 cursor++;
467 if (*cursor)
468 cursor++;
469 skin_line++;
470 *document = cursor;
471 return 1;
472 }
473 462
474 /* Checking the number of arguments and allocating args */ 463 /* Checking the number of arguments and allocating args */
475 if(*cursor != ARGLISTOPENSYM && tag_args[0] != '|' 464 if(*cursor != ARGLISTOPENSYM && tag_args[0] != '|')
476 && tag_args[0] != '\n')
477 { 465 {
478 skin_error(ARGLIST_EXPECTED); 466 skin_error(ARGLIST_EXPECTED);
479 return 0; 467 return 0;
@@ -521,7 +509,7 @@ static int skin_parse_tag(struct skin_element* element, char** document)
521 for(i = 0; i < num_args; i++) 509 for(i = 0; i < num_args; i++)
522 { 510 {
523 /* Making sure we haven't run out of arguments */ 511 /* Making sure we haven't run out of arguments */
524 if(*tag_args == '\0' || *tag_args == '\n') 512 if(*tag_args == '\0')
525 { 513 {
526 skin_error(TOO_MANY_ARGS); 514 skin_error(TOO_MANY_ARGS);
527 return 0; 515 return 0;
@@ -620,27 +608,11 @@ static int skin_parse_tag(struct skin_element* element, char** document)
620 } 608 }
621 609
622 /* Checking for a premature end */ 610 /* Checking for a premature end */
623 if(*tag_args != '\0' && *tag_args != '\n' && !optional) 611 if(*tag_args != '\0' && !optional)
624 { 612 {
625 skin_error(INSUFFICIENT_ARGS); 613 skin_error(INSUFFICIENT_ARGS);
626 return 0; 614 return 0;
627 } 615 }
628
629 if(*tag_args == '\n')
630 {
631 while (*cursor && *cursor != '\n')
632 cursor++;
633 if (*cursor)
634 cursor++;
635 skin_line++;
636 }
637
638 if((strcmp(tag->name, "Vf") == 0 || strcmp(tag->name, "Vb") == 0)
639 && *cursor == '\n' && skin_line == viewport_line)
640 {
641 cursor++;
642 skin_line++;
643 }
644 616
645 *document = cursor; 617 *document = cursor;
646 618