mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 08:11:11 -06:00
PlaceholderParser extended with {if}/{elsif}{else} blocks and
+ - * / == != <> numeric expressions.
This commit is contained in:
parent
9205c8aab4
commit
708f416c84
4 changed files with 485 additions and 196 deletions
|
@ -101,18 +101,16 @@ namespace nowide {
|
|||
{
|
||||
char const *key = string;
|
||||
char const *key_end = string;
|
||||
while(*key_end!='=' && key_end!='\0')
|
||||
key_end++;
|
||||
if(*key_end == '\0')
|
||||
while(*key_end != '=' && *key_end != 0)
|
||||
++ key_end;
|
||||
if(*key_end == 0)
|
||||
return -1;
|
||||
wshort_stackstring wkey;
|
||||
if(!wkey.convert(key,key_end))
|
||||
return -1;
|
||||
|
||||
wstackstring wvalue;
|
||||
if(!wvalue.convert(key_end+1))
|
||||
return -1;
|
||||
|
||||
if(SetEnvironmentVariableW(wkey.c_str(),wvalue.c_str()))
|
||||
return 0;
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue