summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r--apps/gui/wps_parser.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index d3e8454737..ec98d95ee4 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -69,11 +69,8 @@ static const char *backdrop_bmp_name;
69#endif 69#endif
70 70
71#ifdef DEBUG 71#ifdef DEBUG
72/* debugging functions */ 72/* debugging function */
73extern void dump_wps_tokens(struct wps_data *data); 73extern void print_debug_info(struct wps_data *data, int fail, int line);
74extern void print_line_info(struct wps_data *data);
75extern void print_img_cond_indexes(struct wps_data *data);
76extern void print_wps_strings(struct wps_data *data);
77#endif 74#endif
78 75
79static void wps_reset(struct wps_data *data); 76static void wps_reset(struct wps_data *data);
@@ -795,36 +792,8 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr)
795 } 792 }
796 793
797#ifdef DEBUG 794#ifdef DEBUG
798 795 print_debug_info(data, fail, line);
799#if 0 /* optional debugging code */
800 dump_wps_tokens(data);
801 print_line_info(data);
802 print_wps_strings(data);
803#ifdef HAVE_LCD_BITMAP
804 print_img_cond_indexes(data);
805#endif 796#endif
806#endif
807
808 if (fail)
809 {
810 DEBUGF("Failed parsing on line %d : ", line);
811 switch (fail)
812 {
813 case PARSE_FAIL_UNCLOSED_COND:
814 DEBUGF("Unclosed conditional");
815 break;
816
817 case PARSE_FAIL_INVALID_CHAR:
818 DEBUGF("Invalid conditional char (not in an open conditional)");
819 break;
820
821 case PARSE_FAIL_COND_SYNTAX_ERROR:
822 DEBUGF("Conditional syntax error");
823 break;
824 }
825 DEBUGF("\n");
826 }
827#endif /* DEBUG */
828 797
829 if (fail) 798 if (fail)
830 wps_reset(data); 799 wps_reset(data);