Thread View: comp.unix.sysv286
1 messages
1 total messages
Started by John Plocher
Sat, 26 Jan 1991 22:03
Speed up your Microport 2.4/286 or 3.0/386 keyboard
Author: John Plocher
Date: Sat, 26 Jan 1991 22:03
Date: Sat, 26 Jan 1991 22:03
54 lines
1685 bytes
1685 bytes
/*
** I found this little gem while cleaning out some old disk space
**
** It is known to work on Microport's SysV 3.0 (and 3.0e) versions
** of V/386 and on the 2.4 version of V/AT for the 286.
**
** It is a simple demo of the typomatic ioctl for the console driver.
**
** It sets the repeat speed/threshold for the keyboard
**
**
** This code is released completely into the public domain
**
** John Plocher, January, 1991
*/
#include <sys/kd_info.h>
#define SNL(s) s,strlen( s )
void usage();
main( argc, argv )
int argc;
char *argv[];
{
int rate, result;
if ( argc != 2 ) {
usage( argv[0] );
exit( 1 );
}
rate = *argv[1] - '0';
if ( rate < 0 || 9 < rate ) {
usage( argv[0] );
exit( 1 );
}
result = ioctl( 0, KDSETTYPO, rate );
if ( result == -1 ) {
write( 2, SNL( "ioctl( 0, KDSETTYPO, rate ) failed\n" ) );
exit( 1 );
}
return 0;
}
void usage( s )
char *s;
{
write( 2, SNL( "usage: " ) );
write( 2, SNL( s ) );
write( 2, SNL( " rate\n" ) );
write( 2, SNL( " rate must be [0-9]\n" ) );
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads