// }\r
index = 0;\r
}\r
- else if (key == 8) {\r
+ else if (key == 8 || key == 127) {\r
if (numWords > 0) {\r
if (words[numWords-1].len == 1 && words[numWords-1].str[0] == '(') level--;\r
if (words[numWords-1].len == 1 && words[numWords-1].str[0] == ')') level++;\r
numWords++;\r
words[numWords-1].len = 0;\r
}\r
+ printw("%d\n", key);\r
words[numWords-1].str[index++] = (char)key;\r
words[numWords-1].len++;\r
}\r
int result = 0;
int c;
while ((c = getch()), (c != '\r') && (c != '\n')) {
- if (c == 8 && intStrLen > 0) {
+ if ((c == 8 || c == 127) && intStrLen > 0) {
intStrLen--;
intStr[intStrLen] = '\0';
result /= 10;
int strLen = 0;
int c;
while ((c = getch()), (c != '\r') && (c != '\n')) {
- if (c == 8 && strLen > 0) {
+ if ((c == 8 || c == 127) && strLen > 0) {
strLen--;
str[strLen] = '\0';
Draw(g_Node, str);
break;
}
case 8:
- //case 127:
+ case 127:
JSONNodePop(parent);
Draw(g_Node, "");
result = GetNode(parent);
// JSONFree(n);
return 0;
-}
\ No newline at end of file
+}