X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgt-info.c;h=9ff7766c5c51701de18bcda1287fe418f740a25c;hb=3a6e947bef1b2942e24d2fdee1a76dbf3305b508;hp=c8308fab98bda0d51919450bf730b2185c04283a;hpb=27bb304eee3485c73e1be677fbc820591bacc2f9;p=src%2Fapp-framework-main.git diff --git a/src/wgt-info.c b/src/wgt-info.c index c8308fa..9ff7766 100644 --- a/src/wgt-info.c +++ b/src/wgt-info.c @@ -1,5 +1,5 @@ /* - Copyright 2015, 2016 IoT.bzh + Copyright 2015, 2016, 2017 IoT.bzh author: José Bollo @@ -20,6 +20,7 @@ #include #include #include +#include #include @@ -117,6 +118,16 @@ static char *mkidaver(char *id, char *ver) return NULL; } +static void make_lowercase(char *s) +{ + if (s) { + while(*s) { + *s = (char)tolower(*s); + s++; + } + } +} + static int fill_desc(struct wgt_desc *desc, int want_icons, int want_features, int want_preferences) { xmlNodePtr node, pnode; @@ -132,8 +143,10 @@ static int fill_desc(struct wgt_desc *desc, int want_icons, int want_features, i return -1; } desc->id = xmlGetProp(node, wgt_config_string_id); + make_lowercase(desc->id); desc->version = xmlGetProp(node, wgt_config_string_version); desc->ver = mkver(desc->version); + make_lowercase(desc->ver); desc->idaver = mkidaver(desc->id, desc->ver); desc->width = getpropnum(node, wgt_config_string_width, 0); desc->height = getpropnum(node, wgt_config_string_height, 0);