| 15 |
|
#include <ctype.h> |
| 16 |
|
|
| 17 |
|
#ifndef VIEWHISTLEN |
| 18 |
< |
#define VIEWHISTLEN 2 /* number of remembered views */ |
| 18 |
> |
#define VIEWHISTLEN 4 /* number of remembered views */ |
| 19 |
|
#endif |
| 20 |
|
|
| 21 |
|
HOLO *hdlist[HDMAX+1]; /* global holodeck list */ |
| 214 |
|
char *err; |
| 215 |
|
/* restore previous view? */ |
| 216 |
|
if (v == NULL) { |
| 217 |
< |
if (nhist < 2) { |
| 218 |
< |
error(COMMAND, "no previous view"); |
| 219 |
< |
return; |
| 220 |
< |
} |
| 221 |
< |
nhist--; /* get one before last setting */ |
| 217 |
> |
if (nhist > 1) /* get one before last setting */ |
| 218 |
> |
nhist--; |
| 219 |
> |
else /* else go to end of list */ |
| 220 |
> |
while (nhist < VIEWHISTLEN && viewhist[nhist].type) |
| 221 |
> |
nhist++; |
| 222 |
|
v = viewhist + ((nhist-1)%VIEWHISTLEN); |
| 223 |
|
} else if ((err = setview(v)) != NULL) { |
| 224 |
|
error(COMMAND, err); |