=== modified file 'termkey.c' --- termkey.c 2008-10-07 02:17:06 +0000 +++ termkey.c 2008-10-06 22:53:25 +0000 @@ -8,11 +8,6 @@ #include -static struct termkey_driver *drivers[] = { - &termkey_driver_csi, - NULL, -}; - termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime) { termkey_t *tk = malloc(sizeof(*tk)); @@ -64,19 +59,9 @@ for(i = 0; i < tk->nkeynames; i++) tk->keynames[i] = NULL; - for(i = 0; drivers[i]; i++) { - void *driver_info = (*drivers[i]->new_driver)(tk); - if(!driver_info) - continue; - - tk->driver = *(drivers[i]); - tk->driver_info = driver_info; - } - - if(!tk->driver_info) { - fprintf(stderr, "Unable to find a terminal driver\n"); - return NULL; - } + tk->driver = termkey_driver_csi; + + tk->driver_info = (*tk->driver.new_driver)(tk); // Special built-in names termkey_register_keyname(tk, TERMKEY_SYM_NONE, "NONE");