Install rules IDK

I HATE GIT
This commit is contained in:
LDA 2024-08-06 15:01:27 +02:00
commit a92e3daafa
8 changed files with 79 additions and 35 deletions

View file

@ -49,6 +49,7 @@ CommandParse(char *cmd)
char c = *cur;
char *tmp;
bool type;
char char_type;
switch (state)
{
case STATE_WHITE:
@ -73,23 +74,24 @@ CommandParse(char *cmd)
}
break;
case STATE_VALUE:
type = c == '"';
type = c == '"' || c == '\'';
if (type)
{
char_type = c;
cur++;
}
while (*cur)
{
char c = *cur;
char cb[2] = { c, '\0' };
if ((type && c == '"') || (!type && isblank(c)))
if ((type && c == char_type) || (!type && isblank(c)))
{
break;
}
if (c == '\\' && *(cur + 1) == '"')
if (c == '\\' && *(cur + 1) == char_type)
{
cb[0] = '"';
cb[0] = char_type;
cur++;
}
tmp = val;