aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-09-05 14:14:09 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2011-09-05 14:14:09 +0100
commit3008ed29d195ecff454a160c153bcbb9d651cc68 (patch)
tree07a6a79d057e87609fd90af7b4dd5c724a29dd42 /termkey.c
parent3fb6f398e95a441d9e6b739073e0ad8a56cd8d7e (diff)
downloadtermo-3008ed29d195ecff454a160c153bcbb9d651cc68.tar.gz
termo-3008ed29d195ecff454a160c153bcbb9d651cc68.tar.xz
termo-3008ed29d195ecff454a160c153bcbb9d651cc68.zip
A few more DEBUG fprintf(stderr)s at construction time
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/termkey.c b/termkey.c
index 1cd7562..9376916 100644
--- a/termkey.c
+++ b/termkey.c
@@ -256,7 +256,7 @@ static TermKey *termkey_new_full(int fd, int flags, size_t buffsize, int waittim
continue;
#ifdef DEBUG
- fprintf(stderr, "Loading the %s driver\n", drivers[i]->name);
+ fprintf(stderr, "Loading the %s driver...\n", drivers[i]->name);
#endif
struct TermKeyDriverNode *thisdrv = malloc(sizeof(*thisdrv));
@@ -273,6 +273,10 @@ static TermKey *termkey_new_full(int fd, int flags, size_t buffsize, int waittim
tail->next = thisdrv;
tail = thisdrv;
+
+#ifdef DEBUG
+ fprintf(stderr, "Loaded %s driver\n", drivers[i]->name);
+#endif
}
if(!tk->drivers) {
@@ -304,6 +308,9 @@ static TermKey *termkey_new_full(int fd, int flags, size_t buffsize, int waittim
#endif
}
+#ifdef DEBUG
+ fprintf(stderr, "Setting termios(3) flags\n");
+#endif
tcsetattr(fd, TCSANOW, &termios);
}
}
@@ -313,6 +320,10 @@ static TermKey *termkey_new_full(int fd, int flags, size_t buffsize, int waittim
if(p->driver->start_driver)
(*p->driver->start_driver)(tk, p->info);
+#ifdef DEBUG
+ fprintf(stderr, "Drivers started; termkey instance %p is ready\n", tk);
+#endif
+
return tk;
abort_free_drivers: