From 2d31d77a8ba231cb03ec35863c4c4ce2024f6509 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 29 Jul 2010 12:37:48 +0000 Subject: FS#11470 - new skin code, finally svn uses the new parser from the theme editor. This means that a skin that passes the editor WILL pass svn and checkwps (unless the target runs out of skin buffer or something. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27613 a1c6a512-1295-4272-9138-f99709370657 --- lib/skin_parser/skin_debug.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'lib/skin_parser/skin_debug.c') diff --git a/lib/skin_parser/skin_debug.c b/lib/skin_parser/skin_debug.c index c03b32e910..88ad209cce 100644 --- a/lib/skin_parser/skin_debug.c +++ b/lib/skin_parser/skin_debug.c @@ -35,6 +35,7 @@ extern char* skin_start; /* Global error variables */ int error_line; int error_col; +char *error_line_start; char* error_message; /* Debugging functions */ @@ -48,6 +49,7 @@ void skin_error(enum skin_errorcode error, char* cursor) cursor--; error_col++; } + error_line_start = cursor+1; error_line = skin_line; @@ -285,4 +287,42 @@ void skin_debug_indent() for(i = 0; i < debug_indent_level; i++) printf(" "); } + #endif + +#define MIN(a,b) ((a...<10 chars>" */ + strncpy(text, error_line_start, 6); + i = 5; + text[i++] = '.'; + text[i++] = '.'; + text[i++] = '.'; + for (j=error_col-10; error_line_start[j] && error_line_start[j] != '\n'; j++) + text[i++] = error_line_start[j]; + text[i] = '\0'; + error_col = 18; + } + printf("%s\n", text); + for (i=0; i