DA_DESTROY(&vv);
} else if (strcmp(p, "delete") == 0) {
int n = atoi(strtok(0, " "));
- DA_SLIDE(&v, -n);
+ DA_UNSLIDE(&v, n);
} else if (strcmp(p, "reduce") == 0) {
int n = atoi(strtok(0, " "));
- DA_EXTEND(&v, -n);
+ DA_SHRINK(&v, n);
} else if (strcmp(p, "set") == 0) {
size_t i = atoi(strtok(0, " "));
int n = atoi(strtok(0, " "));
puts("*RANGE*");
else
printf("%i\n", DA(&v)[i]);
+ } else if (strcmp(p, "first") == 0) {
+ printf("%i\n", DA_FIRST(&v));
+ } else if (strcmp(p, "last") == 0) {
+ printf("%i\n", DA_LAST(&v));
} else if (strcmp(p, "show") == 0) {
if (DA_LEN(&v) == 0)
puts("*EMPTY*");