Skip to content
Myr

application: minor code style fixes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Eklöf · committed by Daniel Eklöf · parent e338ab9 · Browse files · 1 file+10 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−4 removed

  • other:+10 added−4 removed

1 file+10 added−4 removed

modified:application.c+10 added-4 removed
52 unmodified lines
53 if (*p == '\\') {54 /* lookahead to handle escaped chars55 * only escape if not within single quotes */56 if (open_quote != '\'') {57 /* within double quotes, only \$, \`, \", \\ should be escaped, others should be literal */58 if ((open_quote != '"' && (*(p + 1) == '\'' || *(p + 1) == ' '))59 || *(p + 1) == '$' || *(p + 1) == '"' || *(p + 1) == '`' || *(p + 1) == '\\') {57 /* within double quotes, only \$, \`, \", \\ should be58 * escaped, others should be literal */59 if ((open_quote != '"' && (*(p + 1) == '\'' || *(p + 1) == ' ')) ||60 *(p + 1) == '$' ||61 *(p + 1) == '"' ||62 *(p + 1) == '`' ||63 *(p + 1) == '\\')64 {65 /* essentially delete the (first) backslash */66 memmove(p, p + 1, strlen(p + 1) + 1);67 }68 }69 /* ignore the other cases */70 } else {71 if (open_quote == 0 && (*p == '\'' || *p == '"')) {67 /* open a quote, delete the opening character but remember that we have one open */72 /* open a quote, delete the opening character but73 * remember that we have one open */74 open_quote = *p;75 memmove(p, p + 1, strlen(p + 1) + 1);76 continue; /* don't increment p */77 } else if (*p == open_quote) {
262 unmodified lines