summaryrefslogtreecommitdiff
path: root/apps/gui/wps_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps_debug.c')
-rw-r--r--apps/gui/wps_debug.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/gui/wps_debug.c b/apps/gui/wps_debug.c
index 4e6af388ac..f843b989a2 100644
--- a/apps/gui/wps_debug.c
+++ b/apps/gui/wps_debug.c
@@ -25,7 +25,11 @@
25#include <string.h> 25#include <string.h>
26#include "gwps.h" 26#include "gwps.h"
27#ifdef __PCTOOL__ 27#ifdef __PCTOOL__
28#ifdef WPSEDITOR
29#include "proxy.h"
30#else
28#define DEBUGF printf 31#define DEBUGF printf
32#endif
29#else 33#else
30#include "debug.h" 34#include "debug.h"
31#endif 35#endif
@@ -589,18 +593,18 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line
589 { 593 {
590 char buf[64]; 594 char buf[64];
591 595
592 DEBUGF("Failed parsing on line %d : ", line); 596 DEBUGF("ERR: Failed parsing on line %d : ", line);
593 switch (fail) 597 switch (fail)
594 { 598 {
595 case PARSE_OK: 599 case PARSE_OK:
596 break; 600 break;
597 601
598 case PARSE_FAIL_UNCLOSED_COND: 602 case PARSE_FAIL_UNCLOSED_COND:
599 DEBUGF("Unclosed conditional"); 603 DEBUGF("ERR: Unclosed conditional");
600 break; 604 break;
601 605
602 case PARSE_FAIL_INVALID_CHAR: 606 case PARSE_FAIL_INVALID_CHAR:
603 DEBUGF("unexpected conditional char after token %d: \"%s\"", 607 DEBUGF("ERR: Unexpected conditional char after token %d: \"%s\"",
604 data->num_tokens-1, 608 data->num_tokens-1,
605 get_token_desc(&data->tokens[data->num_tokens-1], data, 609 get_token_desc(&data->tokens[data->num_tokens-1], data,
606 buf, sizeof(buf)) 610 buf, sizeof(buf))
@@ -608,7 +612,7 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line
608 break; 612 break;
609 613
610 case PARSE_FAIL_COND_SYNTAX_ERROR: 614 case PARSE_FAIL_COND_SYNTAX_ERROR:
611 DEBUGF("Conditional syntax error after token %d: \"%s\"", 615 DEBUGF("ERR: Conditional syntax error after token %d: \"%s\"",
612 data->num_tokens-1, 616 data->num_tokens-1,
613 get_token_desc(&data->tokens[data->num_tokens-1], data, 617 get_token_desc(&data->tokens[data->num_tokens-1], data,
614 buf, sizeof(buf)) 618 buf, sizeof(buf))
@@ -616,7 +620,7 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line
616 break; 620 break;
617 621
618 case PARSE_FAIL_COND_INVALID_PARAM: 622 case PARSE_FAIL_COND_INVALID_PARAM:
619 DEBUGF("Invalid parameter list for token %d: \"%s\"", 623 DEBUGF("ERR: Invalid parameter list for token %d: \"%s\"",
620 data->num_tokens, 624 data->num_tokens,
621 get_token_desc(&data->tokens[data->num_tokens], data, 625 get_token_desc(&data->tokens[data->num_tokens], data,
622 buf, sizeof(buf)) 626 buf, sizeof(buf))
@@ -624,7 +628,7 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line
624 break; 628 break;
625 629
626 case PARSE_FAIL_LIMITS_EXCEEDED: 630 case PARSE_FAIL_LIMITS_EXCEEDED:
627 DEBUGF("Limits exceeded"); 631 DEBUGF("ERR: Limits exceeded");
628 break; 632 break;
629 } 633 }
630 DEBUGF("\n"); 634 DEBUGF("\n");