Commit Graph

203 Commits

Author SHA1 Message Date
Paul LeoNerd Evans 4a108d4916 Compress trie nodes down to extent maps after loading, to save memory 2008-11-12 23:58:20 +00:00
Paul LeoNerd Evans 754214c200 Use a trie instead of a linear list of sequence strings in the terminfo driver - nicer lookup properties 2008-11-12 16:32:17 +00:00
Paul LeoNerd Evans 04e1926df6 Handle malloc() failures during setup of driver-ti 2008-11-12 16:10:58 +00:00
Paul LeoNerd Evans 62c5c97080 Make CSI driver's debugging output messages on unrecognised sequences conditional on #ifdef DEBUG 2008-11-12 13:02:30 +00:00
Paul LeoNerd Evans 927eaabae9 CSI driver shouldn't eat sequences it doesn't understand; leave them for another driver 2008-11-12 12:51:19 +00:00
Paul LeoNerd Evans 2c0d0f0f3c Bugfix to 'unknown CSI' case in CSI driver - neater output message to avoid uninitialised ints 2008-11-12 12:44:33 +00:00
Paul LeoNerd Evans 781c2160c3 Added documentation on termkey_{get,set}_flags() 2008-11-10 22:29:21 +00:00
Paul LeoNerd Evans 397a7fb683 Added (undocumented) termkey_{get,set}_flags() calls to API 2008-11-10 21:21:19 +00:00
Paul LeoNerd Evans 9757a73daa CSI driver should also load when TERM=screen because of screen's stupid way of blind-forwarding keypresses it doesn't understand 2008-11-09 22:41:44 +00:00
Paul LeoNerd Evans 30a3356815 Implemented free_driver() in terminfo driver 2008-11-09 22:38:10 +00:00
Paul LeoNerd Evans 20cc4b1701 When debugging, also print details of a key event when applicable 2008-11-09 21:58:30 +00:00
Paul LeoNerd Evans fd2466c4ce Load terminfo triver before CSI; in case they both apply 2008-11-09 20:04:14 +00:00
Paul LeoNerd Evans 73cee7f0b0 Allow stacking drivers in a linked list; try all of them at getkey() time 2008-11-09 19:58:11 +00:00
Paul LeoNerd Evans aef2e91277 If debugging, print verbose output about internals of getkey operation 2008-11-09 19:48:06 +00:00
Paul LeoNerd Evans 09edf2377f Driver getkey() can return TERMKEY_RES_NONE which attempts getkey_simple() afterwards 2008-11-09 19:45:43 +00:00
Paul LeoNerd Evans de74ffa67f getkey_simple() should return TERMKEY_RES_NONE if no bytes available; as a safety check 2008-11-09 19:29:30 +00:00
Paul LeoNerd Evans 0483eacb68 Print name of driver on startup if debugging 2008-11-08 17:56:57 +00:00
Paul LeoNerd Evans d50d772ca5 Drivers have names 2008-11-08 17:56:44 +00:00
Paul LeoNerd Evans e880602944 Pass driver_info as explicit void* parameter into driver methods 2008-11-08 17:47:57 +00:00
Paul LeoNerd Evans 9969e197ba Pass 'csi' value to static helper functions in driver-csi 2008-11-08 17:43:51 +00:00
Paul LeoNerd Evans 9cd46fcea3 Renamed termkey_{set,get}waittime() to termkey_{set,get}_waittime() to be more consistent 2008-11-06 20:29:50 +00:00
Paul LeoNerd Evans 023943c738 Don't document the termkey_free() function as it doesn't restore termios; document termkey_destroy() instead 2008-11-06 19:50:53 +00:00
Paul LeoNerd Evans 9aaf16888c Include demo.c and demo-async.c in the manpages under an EXAMPLE section 2008-11-06 19:40:28 +00:00
Paul LeoNerd Evans 9df6f621b9 Added asynchronous demo which uses poll() 2008-11-06 19:33:07 +00:00
Paul LeoNerd Evans c2496a38be Also document termkey_advisereadable() 2008-11-06 00:56:01 +00:00
Paul LeoNerd Evans 388782b89b Added manpages for (most of) the external API functions 2008-11-06 00:02:41 +00:00
Paul LeoNerd Evans 6adbb40f6e Neater bitfield constants in .h file; added docs of TERMKEY_FORMAT_* constants 2008-11-03 21:23:59 +00:00
Paul LeoNerd Evans c0f839c40d Make sure all .c->.o builds depend on all .h files 2008-11-03 21:22:47 +00:00
Paul LeoNerd Evans a2f3d807f8 Better handling of incomplete UTF-8 sequences - just emit a UTF8_INVALID if waittime is up 2008-11-03 21:10:14 +00:00
Paul LeoNerd Evans 76147e92d4 Better handling in termkey_waitkey() of EOF conditions 2008-11-03 21:08:34 +00:00
Paul LeoNerd Evans 86933f1836 Reuse common Esc-prefix code in getkey_simple() from CSI driver; avoids code duplication 2008-11-03 14:46:42 +00:00
Paul LeoNerd Evans ca485ca670 Bugfix to recursive 'meta-' getkey code - handle buffcount too 2008-11-03 14:45:59 +00:00
Paul LeoNerd Evans 7b42e9bfb7 Some platforms need -fPIC when compiling C code for eventual use in a shared library 2008-11-03 14:02:04 +00:00
Paul LeoNerd Evans 1c46f5edfa Recognise 'key_mouse' as an ignored terminfo key 2008-11-02 22:16:03 +00:00
Paul LeoNerd Evans ca2bbaf251 Install a .pc file so that pkg-config works 2008-11-02 18:37:29 +00:00
Paul LeoNerd Evans aef409c460 Terminfo driver needs to put terminal into 'keypad_xmit' mode when starting 2008-11-02 17:59:30 +00:00
Paul LeoNerd Evans 5107112a91 Added new driver virtual methods 'start_driver' and 'stop_driver' 2008-11-02 17:54:24 +00:00
Paul LeoNerd Evans 1d4d908cb8 Remeber to handle Esc-prefixed keypresses in base getkey_simple() function - involves some code duplication with CSI driver currently 2008-11-02 14:54:33 +00:00
Paul LeoNerd Evans 62d4e7eccb Pass the 'force' value through to getkey_simple() 2008-11-02 14:43:19 +00:00
Paul LeoNerd Evans e5ff066539 Added 'make install' target 2008-11-02 14:22:34 +00:00
Paul LeoNerd Evans 6574198993 Adjusted Makefile to build a shared library 2008-11-02 14:18:16 +00:00
Paul LeoNerd Evans bb00cd64b1 Added many more key symbols and names + translations from terminfo 2008-10-10 01:11:24 +01:00
Paul LeoNerd Evans 2ceb64261a Binary search terminfo funcname => termkey sym conversion, rather than linear 2008-10-10 00:44:13 +01:00
Paul LeoNerd Evans fd769d621e 'int' might not be wide enough to hold any Unicode codepoint; use 'long' 2008-10-10 00:50:56 +01:00
Paul LeoNerd Evans 37156ad580 Added some TODO notes about handling realloc() failures 2008-10-09 23:53:35 +01:00
Paul LeoNerd Evans 2b08f88f19 Better free() tracking in constructor failure cases 2008-10-09 23:19:10 +01:00
Paul LeoNerd Evans 286532e602 Respect user's CC and CFLAGS 2008-10-09 23:05:40 +01:00
Paul LeoNerd Evans 247fae6a72 Gracefully handle constructor failure rather than SEGV 2008-10-09 22:41:07 +01:00
Paul LeoNerd Evans 05639c4773 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 2008-10-09 20:23:45 +01:00
Paul LeoNerd Evans a61b916c18 Adjustment to demo.c; just print the vim style format 2008-10-08 02:06:00 +01:00