Use vtable in driver to indirect calls to the CSI driver

This commit is contained in:
Paul LeoNerd Evans
2008-10-06 23:36:14 +01:00
parent f5c6ecf9af
commit e3eca8d51a
3 changed files with 19 additions and 15 deletions

View File

@@ -8,8 +8,9 @@
struct termkey_driver
{
void *(*new_driver)(void);
void (*free_driver)(void *);
void *(*new_driver)(termkey_t *tk);
void (*free_driver)(void *);
termkey_result (*getkey)(termkey_t *tk, termkey_key *key);
};
struct termkey {
@@ -34,6 +35,6 @@ struct termkey {
void *driver_info;
};
void *termkeycsi_new_driver(termkey_t *t);
extern struct termkey_driver termkey_driver_csi;
#endif