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.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index e66543d8c7..c36a375a1c 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -731,6 +731,36 @@ static int parse_viewport(const char *wps_bufptr,
731 return skip_end_of_line(wps_bufptr); 731 return skip_end_of_line(wps_bufptr);
732} 732}
733 733
734#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
735static int parse_image_special(const char *wps_bufptr,
736 struct wps_token *token,
737 struct wps_data *wps_data)
738{
739 (void)wps_data; /* kill warning */
740 (void)token;
741 const char *pos = NULL;
742 const char *newline;
743
744 pos = strchr(wps_bufptr + 1, '|');
745 newline = strchr(wps_bufptr, '\n');
746
747 if (pos > newline)
748 return WPS_ERROR_INVALID_PARAM;
749#if LCD_DEPTH > 1
750 if (token->type == WPS_TOKEN_IMAGE_BACKDROP)
751 {
752 /* format: %X|filename.bmp| */
753 bmp_names[BACKDROP_BMP] = wps_bufptr + 1;
754 }
755#endif
756
757 /* Skip the rest of the line */
758 return skip_end_of_line(wps_bufptr);
759}
760#endif
761
762#endif /* HAVE_LCD_BITMAP */
763
734static int parse_setting(const char *wps_bufptr, 764static int parse_setting(const char *wps_bufptr,
735 struct wps_token *token, 765 struct wps_token *token,
736 struct wps_data *wps_data) 766 struct wps_data *wps_data)
@@ -766,36 +796,6 @@ static int parse_setting(const char *wps_bufptr,
766} 796}
767 797
768 798
769#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
770static int parse_image_special(const char *wps_bufptr,
771 struct wps_token *token,
772 struct wps_data *wps_data)
773{
774 (void)wps_data; /* kill warning */
775 (void)token;
776 const char *pos = NULL;
777 const char *newline;
778
779 pos = strchr(wps_bufptr + 1, '|');
780 newline = strchr(wps_bufptr, '\n');
781
782 if (pos > newline)
783 return WPS_ERROR_INVALID_PARAM;
784#if LCD_DEPTH > 1
785 if (token->type == WPS_TOKEN_IMAGE_BACKDROP)
786 {
787 /* format: %X|filename.bmp| */
788 bmp_names[BACKDROP_BMP] = wps_bufptr + 1;
789 }
790#endif
791
792 /* Skip the rest of the line */
793 return skip_end_of_line(wps_bufptr);
794}
795#endif
796
797#endif /* HAVE_LCD_BITMAP */
798
799static int parse_dir_level(const char *wps_bufptr, 799static int parse_dir_level(const char *wps_bufptr,
800 struct wps_token *token, 800 struct wps_token *token,
801 struct wps_data *wps_data) 801 struct wps_data *wps_data)