diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-11-08 17:47:57 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-11-08 17:47:57 +0000 |
commit | e8806029447040591775cab4fb5bbd355d65bbdf (patch) | |
tree | 5174866e38af9b23124a1f9c69e45ba7ed6bebee /termkey.c | |
parent | 9969e197ba48b4c4fd3aab1d29067603e20d1e90 (diff) | |
download | termo-e8806029447040591775cab4fb5bbd355d65bbdf.tar.gz termo-e8806029447040591775cab4fb5bbd355d65bbdf.tar.xz termo-e8806029447040591775cab4fb5bbd355d65bbdf.zip |
Pass driver_info as explicit void* parameter into driver methods
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -186,7 +186,7 @@ termkey_t *termkey_new_full(int fd, int flags, size_t buffsize, int waittime) } if(tk->driver.start_driver) - (*tk->driver.start_driver)(tk); + (*tk->driver.start_driver)(tk, tk->driver_info); return tk; @@ -221,7 +221,7 @@ void termkey_free(termkey_t *tk) void termkey_destroy(termkey_t *tk) { if(tk->driver.stop_driver) - (*tk->driver.stop_driver)(tk); + (*tk->driver.stop_driver)(tk, tk->driver_info); if(tk->restore_termios_valid) tcsetattr(tk->fd, TCSANOW, &tk->restore_termios); @@ -375,7 +375,7 @@ static termkey_result getkey_simple(termkey_t *tk, termkey_key *key, int force) tk->buffcount--; // Run the full driver - termkey_result metakey_result = (*tk->driver.getkey)(tk, key, force); + termkey_result metakey_result = (*tk->driver.getkey)(tk, tk->driver_info, key, force); tk->buffstart--; tk->buffcount++; @@ -497,12 +497,12 @@ static termkey_result getkey_simple(termkey_t *tk, termkey_key *key, int force) termkey_result termkey_getkey(termkey_t *tk, termkey_key *key) { - return (*tk->driver.getkey)(tk, key, 0); + return (*tk->driver.getkey)(tk, tk->driver_info, key, 0); } termkey_result termkey_getkey_force(termkey_t *tk, termkey_key *key) { - return (*tk->driver.getkey)(tk, key, 1); + return (*tk->driver.getkey)(tk, tk->driver_info, key, 1); } termkey_result termkey_waitkey(termkey_t *tk, termkey_key *key) |