tweaks: reshuffle some lines, to be more readable instead of compact
This commit is contained in:
parent
5b654ce9fb
commit
c7a600063d
21
src/winio.c
21
src/winio.c
@ -362,19 +362,24 @@ int get_code_from_plantation(void)
|
|||||||
commandname = measured_copy(plants_pointer + 1, closing - plants_pointer - 1);
|
commandname = measured_copy(plants_pointer + 1, closing - plants_pointer - 1);
|
||||||
planted_shortcut = strtosc(commandname);
|
planted_shortcut = strtosc(commandname);
|
||||||
|
|
||||||
if (planted_shortcut) {
|
if (!planted_shortcut)
|
||||||
plants_pointer = closing + 1;
|
|
||||||
if (*plants_pointer != '\0')
|
|
||||||
put_back(MORE_PLANTS);
|
|
||||||
return PLANTED_COMMAND;
|
|
||||||
} else
|
|
||||||
return NO_SUCH_FUNCTION;
|
return NO_SUCH_FUNCTION;
|
||||||
|
|
||||||
|
plants_pointer = closing + 1;
|
||||||
|
|
||||||
|
if (*plants_pointer != '\0')
|
||||||
|
put_back(MORE_PLANTS);
|
||||||
|
|
||||||
|
return PLANTED_COMMAND;
|
||||||
} else {
|
} else {
|
||||||
char *opening = strchr(plants_pointer, '{');
|
char *opening = strchr(plants_pointer, '{');
|
||||||
int length = (opening ? opening - plants_pointer : strlen(plants_pointer));
|
int length;
|
||||||
|
|
||||||
if (opening)
|
if (opening) {
|
||||||
|
length = opening - plants_pointer;
|
||||||
put_back(MORE_PLANTS);
|
put_back(MORE_PLANTS);
|
||||||
|
} else
|
||||||
|
length = strlen(plants_pointer);
|
||||||
|
|
||||||
for (int index = length - 1; index >= 0; index--)
|
for (int index = length - 1; index >= 0; index--)
|
||||||
put_back((unsigned char)plants_pointer[index]);
|
put_back((unsigned char)plants_pointer[index]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user