4 #include <readline/readline.h>
5 #include <readline/history.h>
9 char *stripwhite (char *string)
13 for (s = string; isspace (*s); s++)
19 t = s + strlen (s) - 1;
20 while (t > s && isspace (*t))
27 static char test[4096];
28 void numbers(const char *input)
32 FILE *f = fopen("toto.bin", "w");
36 strncpy(test, input, 4096);
40 for (word=strtok_r(test, sep, &brkt); word; word=strtok_r(NULL, sep, &brkt))
44 (strnstr(word, "0x", 2) == word) |
45 (strnstr(word, "0X", 2) == word) |
46 (strnstr(word, "X", 1) == word) |
47 (strnstr(word, "x", 1) == word)
53 r=strtol(word, NULL, mode);
54 printf("<%s> = %d", word, (int)r);
66 char* line=readline("$ ");
75 ex=!strcmp(line,"quit");