Reduce writes trimming endlevel input
This commit is contained in:
parent
3368390f37
commit
ab326e9c8b
|
@ -1429,11 +1429,15 @@ try_again:
|
||||||
if ((p=strchr(line,';'))!=NULL)
|
if ((p=strchr(line,';'))!=NULL)
|
||||||
*p = 0; //cut off comment
|
*p = 0; //cut off comment
|
||||||
|
|
||||||
for (p=line+strlen(line)-1;p>line && isspace(*p);*p--=0);
|
for (p = line; isspace(static_cast<unsigned>(*p)); ++p)
|
||||||
for (p=line;isspace(*p);p++);
|
;
|
||||||
|
|
||||||
if (!*p) //empty line
|
if (!*p) //empty line
|
||||||
continue;
|
continue;
|
||||||
|
auto ns = p;
|
||||||
|
for (auto p2 = p; *p2; ++p2)
|
||||||
|
if (!isspace(static_cast<unsigned>(*p2)))
|
||||||
|
ns = p2;
|
||||||
|
*++ns = 0;
|
||||||
|
|
||||||
switch (var) {
|
switch (var) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue