get_history_event
ptr = get_history_event(str, &idx, 0);
ptr = get_history_event(command + offs, &idx, qchar);
const char *get_history_event(const char *, int *, int);