Skip to content

Commit

Permalink
Change licensing
Browse files Browse the repository at this point in the history
Fix some warnings
  • Loading branch information
jonathanstowe committed Oct 26, 2013
1 parent b3fe535 commit 0e00cb0
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile.PL
Expand Up @@ -9,7 +9,7 @@ if( $mm_version < 3.5 ) {

&WriteMakefile(
NAME => 'Term::ReadKey',
DISTNAME => 'Term-ReadKey',
DISTNAME => 'TermReadKey',
LICENSE => 'perl',
META_MERGE => {
'meta-spec' => { version => 2 },
Expand Down
20 changes: 18 additions & 2 deletions README
@@ -1,11 +1,27 @@
Term::ReadKey 2.30 - Change terminal modes, and perform non-blocking reads.
Term::ReadKey 2.31 - Change terminal modes, and perform non-blocking reads.

Copyright (C) 1994-1999 Kenneth Albanowski.
2001-2005 Jonathan Stowe and others
2001-2013 Jonathan Stowe and others

This package is dual licensed. You can either choose to license it under
the original terms which were:

Unlimited distribution and/or modification is allowed as long as this
copyright notice remains intact.

Or the standard Perl terms:

This module is free software; you can redistribute it and/or modify it
under the terms of the Artistic License. For details, see the full
text of the license in the file "Artistic" that should have been provided
with the version of perl you are using.

This program is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.



This module, ReadKey, provides ioctl control for terminals and Win32
consoles so the input modes can be changed (thus allowing reads of a single
character at a time), and also provides non-blocking reads of stdin, as well
Expand Down
47 changes: 41 additions & 6 deletions ReadKey.pm
@@ -1,6 +1,5 @@
#
# $Id: ReadKey.pm,v 2.23 2005/01/11 21:16:31 jonathan Exp $
#

package Term::ReadKey;

=head1 NAME
Expand Down Expand Up @@ -209,13 +208,49 @@ This call does nothing under Windows.
Kenneth Albanowski <kjahds@kjahds.com>
Currently maintained by Jonathan Stowe <jns@gellyfish.com>
Currently maintained by Jonathan Stowe <jns@gellyfish.co.uk>
=item SUPPORT
The code is maintained at
https://github.com/jonathanstowe/TermReadKey
Please feel free to fork and suggest patches.
=item LICENSE
Prior to the 2.31 release the license statement was:
Copyright (C) 1994-1999 Kenneth Albanowski.
2001-2005 Jonathan Stowe and others
Unlimited distribution and/or modification is allowed as long as this
copyright notice remains intact.
And was only stated in the README file.
Because I believe the original author's intent was to be more open than the
other commonly used licenses I would like to leave that in place. However if
you or your lawyers require something with some more words you can optionally
choose to license this under the standard Perl license:
This module is free software; you can redistribute it and/or modify it
under the terms of the Artistic License. For details, see the full
text of the license in the file "Artistic" that should have been provided
with the version of perl you are using.
This program is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.
=cut

package Term::ReadKey;
use vars qw($VERSION);

$VERSION = '2.30.01';
$VERSION = '2.31';

require Exporter;
require AutoLoader;
Expand Down
4 changes: 2 additions & 2 deletions ReadKey.xs
Expand Up @@ -1397,8 +1397,8 @@ void ReadMode(PerlIO *file,int mode)
/*warn("Mode set to %d.\n",mode);*/

if( firsttime ) {
hv_delete(filehash,(char*)&handle,sizeof(int),0);
hv_delete(modehash,(char*)&handle,sizeof(int),0);
(void*)hv_delete(filehash,(char*)&handle,sizeof(int),0);
(void*)hv_delete(modehash,(char*)&handle,sizeof(int),0);
} else {
if(!hv_store(modehash,(char*)&handle,sizeof(int),
newSViv(mode),0))
Expand Down
1 change: 0 additions & 1 deletion genchars.pl
Expand Up @@ -170,7 +170,6 @@
#endif
croak(\"Unable to read terminal settings in GetControlChars\");
else {
int i;
EXTEND(sp,MAXCC*2); ".join('',map("
#if defined($values[$_]) && ($values[$_] < LEGALMAXCC) "."
PUSHs(sv_2mortal(newSVpv(cc_names[$_],strlen(cc_names[$_])))); /* $possible{$values[$_]} */
Expand Down

0 comments on commit 0e00cb0

Please sign in to comment.