aboutsummaryrefslogtreecommitdiff
path: root/driver-ti.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-28 19:48:41 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-28 19:48:41 +0000
commitd245285df2bbe20ff2e78020acc3667eac1e7868 (patch)
treeda341204c2138ecd419b706d76880b3821f254e0 /driver-ti.c
parentfef558eeb4923598b2c720f7cede49b3914141ab (diff)
downloadtermo-d245285df2bbe20ff2e78020acc3667eac1e7868.tar.gz
termo-d245285df2bbe20ff2e78020acc3667eac1e7868.tar.xz
termo-d245285df2bbe20ff2e78020acc3667eac1e7868.zip
Cast 'term' to (non-const) char* when passing to setupterm() because terminfo's prototypes don't use const
Diffstat (limited to 'driver-ti.c')
-rw-r--r--driver-ti.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver-ti.c b/driver-ti.c
index 727cb78..952bf76 100644
--- a/driver-ti.c
+++ b/driver-ti.c
@@ -148,7 +148,9 @@ static void *new_driver(termkey_t *tk, const char *term)
{
int err;
- if(setupterm(term, 1, &err) != OK)
+ /* Have to cast away the const. But it's OK - we know terminfo won't really
+ * modify term */
+ if(setupterm((char*)term, 1, &err) != OK)
return NULL;
termkey_ti *ti = malloc(sizeof *ti);