Cosmetic changes

This commit is contained in:
kamel5 2021-12-22 13:26:56 +01:00
parent d11d09ca6e
commit 2f64512710
3 changed files with 175 additions and 227 deletions

View File

@ -873,55 +873,6 @@ void cVeMenuMain::SplitText(void) {
number = strdup("");
}
}
/*
void cVeMenuMain::SplitText(void) {
char *start = skipspace(text);
bool found = false;
bool doBreak = false;
size_t i = 0;
char *c = start;
while (*c) {
if (i==0) {
//if text directly starts with nonnumeric, break
if (!(*c >= '0' && *c <= '9')) {
break;
}
}
if (found) {
//if current char is not a figure anymore, break
if (!(*c >= '0' && *c <= '9')) {
//there has to be a space after the menu item number
//plugins with figures in their name are eval :-)
if (*c != ' ')
found = false;
doBreak = true;
}
}
if (*c >= '0' && *c <= '9') {
found = true;
}
if (doBreak)
break;
if (i>4)
break;
c++;
i++;
}
free(number);
free(label);
if (found) {
number = (char*)malloc(i+1);
memset(number, 0, i+1);
strncpy(number, start, i);
} else {
number = (char*)malloc(2);
memset(number, 0, 2);
strncpy(number, "", 1);
}
label = strdup(skipspace(c));
}
*/
/******************************************************************
* cLeMenuMain

View File

@ -1387,6 +1387,3 @@ bool cVeDmTablabels::Parse(bool forced) {
}
return true;
}