Menu system broken
Dependencies: ANSITermMenuSystem
Fork of menuSystemMbed by
Diff: Constantdisplay.cpp
- Revision:
- 8:6ddb8c26387a
- Parent:
- 6:2f220f5d782d
diff -r df9f5b6dd4ed -r 6ddb8c26387a Constantdisplay.cpp --- a/Constantdisplay.cpp Fri Apr 26 16:17:18 2013 +0000 +++ b/Constantdisplay.cpp Sat May 04 17:37:57 2013 +0000 @@ -61,6 +61,21 @@ if (sign < 0) s[i++] = '-'; s[i] = '\0'; + reverse(s); } +void Constantdisplay::reverse(char *s) +{ + char *j; + int c; + + j = s + strlen(s) - 1; + while(s < j) { + c = *s; + *s++ = *j; + *j-- = c; + } +} + +