/******************************************************************* Copyright (C) 1994,1995,1996,1997 Kenneth Albanowski. Unlimited distribution and/or modification is allowed as long as this copyright notice remains intact. Written by Kenneth Albanowski on Thu Oct 6 11:42:20 EDT 1994 Contact at kjahds@kjahds.com or CIS:70705,126 Maintained by Jonathan Stowe $Id: ReadKey.xs,v 1.6 2002/03/21 07:38:21 gellyfish Exp $ Version 2.19, Thu Mar 21 07:25:31 GMT 2002 Added check for definedness of $_[0] in comparisons in ReadKey, ReadLine after reports of warnings. Version 2.18, Sun Feb 10 13:06:57 GMT 2002 Altered prototyping style after reports of compile failures on Windows. Version 2.17, Fri Jan 25 06:58:47 GMT 2002 The '_' macro for non-ANSI compatibility was removed in 5.7.2 Version 2.16, Thu Nov 29 21:19:03 GMT 2001 It appears that the genchars.pl bit of the patch didnt apply Applied the new ppport.h from Devel::PPPort Version 2.15, Sun Nov 4 15:02:37 GMT 2001 (jns) Applied the patch in http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg01588.html for PerlIO compatibility. Version 2.14, Sun Mar 28 23:26:13 EST 1999 ppport.h 1.007 fixed for 5.005_55. Version 2.13, Wed Mar 24 20:46:06 EST 1999 Adapted to ppport.h 1.006. Version 2.12, Wed Jan 7 10:33:11 EST 1998 Slightly modified test and error reporting for Win32. Version 2.11, Sun Dec 14 00:39:12 EST 1997 First attempt at Win32 support. Version 2.10, skipped Version 2.09, Tue Oct 7 13:07:43 EDT 1997 Grr. Added explicit detection of sys/poll.h and poll.h. Version 2.08, Mon Oct 6 16:07:44 EDT 1997 Changed poll.h to sys/poll.h. Version 2.07, Sun Jan 26 19:11:56 EST 1997 Added $VERSION to .pm. Version 2.06, Tue Nov 26 01:47:09 EST 1996 Added PERLIO support and removed duplicate declaration in .pm. Version 2.05, Tue Mar 12 19:08:33 EST 1996 Changed poll support so it works. Cleaned up .pm a little. Version 2.04, Tue Oct 10 05:35:48 EDT 1995 Whoops. Changed GetTermSize back so that GSIZE code won't be compiled if GWINSZ is being used. Also took ts_xxx and ts_yyy out of GSIZE. Version 2.03, Thu Sep 21 21:53:16 EDT 1995 Fixed up debugging info in Readkey.pm, and changed TermSizeVIO to use _scrsize(). Hopefully this is GO for both Solaris and OS/2. Version 2.02, Mon Sep 18 22:17:57 EDT 1995 Workaround for Solaris bug wasn't sufficient. Modularlized GetTermSize into perl code, and added support for the `resize` executable. Hard coded path for Solaris machines. Version 2.01, Wed Sep 13 22:22:23 EDT 1995 Change error reporting around in getscreensize so that if an ioctl fails but getenv succeeds, no warning will be printed. This is an attempt to work around a Solaris bug where TIOCGWINSZ fails in telnet sessions. Version 2.00, Mon Sep 4 06:37:24 EDT 1995 Added timeouts to select/poll, added USE_STDIO_PTR support (required for recent perl revisions), and fixed up compilation under OS/2. Version 1.99, Fri Aug 11 20:18:11 EDT 1995 Add file handles to ReadMode. Version 1.97, Mon Apr 10 21:41:52 EDT 1995 Changed mode 5 to disable UC & delays. Added more ECHO flags. Tested termio[s] & sgtty. Added termoptions so test.pl can give more info. Version 1.96, Mucked with filehandle selection in ReadKey.pm. Version 1.95, Cleaning up for distribution. Version 1.94, Dealt with get/settermsize sillyness. Version 1.91, Sat Mar 11 23:47:04 EST 1995: Andy's patches, and a bit of termsize finesse. Version 1.9, Thu Mar 9 14:11:49 EST 1995: Modifying for portability. Prototypes, singed chars, etc. Version 1.8, Mon Jan 9 23:18:14 EST 1995: Added use of Configure.pm. No changes to ReadKey. Version 1.7, Fri Dec 16 13:48:14 EST 1994: Getting closer to release. Added new readmode 2. Had to bump up other modes, unfortunately. This is the _last_ time I do that. If I have to bump up the modes again, I'm switching to a different scheme. Version 1.6, Wed Dec 14 17:36:59 EST 1994: Completly reorganized the control-char support (twice!) so that it is automatically ported by the preproccessor for termio[s], or by an included script for sgtty. Logical defaults for sgtty are included too. Added Sun TermSize support. (Hope I got it right.) Version 1.5, Fri Dec 9 16:07:49 EST 1994: Added SetTermSize, GetSpeeds, Get/SetControlChars, PerlIO support. Version 1.01, Thu Oct 20 23:32:39 EDT 1994: Added Select_fd_set_t casts to select() call. Version 1.0: First "real" release. Everything seems cool. *******************************************************************/