diff --git a/src/Console/Resources/getch.c b/src/Console/Resources/getch.c index 126072c..7a25d88 100644 --- a/src/Console/Resources/getch.c +++ b/src/Console/Resources/getch.c @@ -4,6 +4,22 @@ #include static struct termios oldattr; +static char *strrev(char *str) +{ + char *p1, *p2; + + if (! str || ! *str) + return str; + for (p1 = str, p2 = str + wcslen(str) - 1; p2 > p1; ++p1, --p2) + { + *p1 ^= *p2; + *p2 ^= *p1; + *p1 ^= *p2; + } + return str; +} + + static void setRawMode(void) { struct termios newattr;