static int j, k, scratchloc, pies;
static char inp[BUFSIZ]; /* common input buffer */
+#define NUMBERS "0123456789"
#define YOU 0
#define RMS 1
#define STARLET1 2
extern void check_shot(), move_superhack();
int j9;
- j9 = sscanf(inp + isalpha(inp[0]), "%d %d %d %d %d",
+ j9 = sscanf(inp + strcspn(inp, NUMBERS), "%d %d %d %d %d",
&path[0], &path[1], &path[2], &path[3], &path[4]);
+
if (j9 < 1)
{
PM("Sorry, I didn't see any room numbers after your throw command.");
void move()
{
- if (sscanf(inp + isalpha(inp[0]), "%d", &scratchloc) < 1)
+ if (sscanf(inp + strcspn(inp, NUMBERS), "%d", &scratchloc) < 1)
{
PM("Sorry, I didn't see a room number after your `m' command.");
return;