bool idebug; // debug mode
FILE *logfp, *replayfp;
-char *systnames[NINHAB + 1];
+char *systnames[NINHAB];
char *device[NDEVICES];
static struct
{"HELP", HELP, 0},
#define SEED 37
{"SEED", SEED, 0},
-#if BSD_BUG_FOR_BUG
+#ifdef BSD_BUG_FOR_BUG
#define VISUAL 38
{"VISUAL", VISUAL, 0},
#endif
if (key == IHREAL)
seed = (int)aaitem;
break;
-#if BSD_BUG_FOR_BUG
+#ifdef BSD_BUG_FOR_BUG
case VISUAL:
visual(); // perform visual scan
break;
chew();
return IHEOL;
}
- if (isdigit(*linep) || *linep=='+' || *linep=='-' || *linep=='.') {
- // treat as a number
- i = 0;
- if (sscanf(linep, "%lf%n", &aaitem, &i) < 1) {
- linep = line; // Invalid numbers are ignored
- *linep = 0;
- return IHEOL;
- }
- else {
- // skip to end
- linep += i;
- return IHREAL;
- }
+ i = 0;
+ // try a number
+ if (sscanf(linep, "%lf%n", &aaitem, &i) > 0) {
+ // skip to end
+ linep += i;
+ return IHREAL;
}
// Treat as alpha
cp = citem;