diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-09 20:23:45 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-09 20:23:45 +0100 |
commit | 05639c477367fa436ef33a0a4dc5fc37215acd94 (patch) | |
tree | 39397ecf384a611af004b6b393fefbf7492b92a6 /driver-ti.c | |
parent | a61b916c18f6997a76186609e0697bd893865412 (diff) | |
download | termo-05639c477367fa436ef33a0a4dc5fc37215acd94.tar.gz termo-05639c477367fa436ef33a0a4dc5fc37215acd94.tar.xz termo-05639c477367fa436ef33a0a4dc5fc37215acd94.zip |
Pass 'term' string into new_driver virtual method; have drivers sensitive to it and return NULL if they can't handle. Try CSI driver first; only for xterm-alikes
Diffstat (limited to 'driver-ti.c')
-rw-r--r-- | driver-ti.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/driver-ti.c b/driver-ti.c index 05f39d8..66cdbe7 100644 --- a/driver-ti.c +++ b/driver-ti.c @@ -25,9 +25,12 @@ typedef struct { static int funcname2keysym(const char *funcname, termkey_type *typep, termkey_keysym *symp, int *modmask, int *modsetp); static void register_seq(termkey_ti *ti, const char *seq, termkey_type type, termkey_keysym sym, int modmask, int modset); -static void *new_driver(termkey_t *tk) +static void *new_driver(termkey_t *tk, const char *term) { - setupterm((char*)0, 1, (int*)0); + int err; + + if(setupterm(term, 1, &err) != OK) + return NULL; termkey_ti *ti = malloc(sizeof *ti); |