Looks OK. The amount of indexing can be decreased by a factor of two though. How about something like
```
    last = a[0];
    for (i = 1; (i < lena) && (a[i] == last); i++);
    if (i == lena) {
        return 1;
    }
    next = a[i];
    if (next > last) {
        for (i = i + 1; i < lena; i++) {
            last = next;
            next = a[i];
            if (next < last) {
                return 0;
            }
        }
        return 1;
    }
    else {
        for (i = i + 1; i < lena; i++) {
            last = next
            next = a[i];
            if (next > last) {
                return 0;
            }
        }
        return -1;
    }
```