[comp.os.minix] kernel/tty.c patches

tholm@uvicctr.UUCP (Terrence W. Holm) (05/18/88)

EFTH Minix report #14  - May 1988 -  kernel/tty.c patches


Below are three changes that we have applied to kernel/tty.c.
This is a very big program with multiple changes already applied,
we suggest that you scan over this report, and if nothing applies
to you then don't bother patching tty.c any more than it already
is; simply wait for version 1.3.


1) The logic for the escape codes on the numeric pad was not
   complete. (This would prevent some AT-type keyboards from
   using elle.)

   Change in_char(),

>   if ( scode >= SCODE1 && scode <= SCODE2 && 
> 	    (      ( shift1 == 0 && shift2 == 0 ) && numlock == 0
>            ||  ! ( shift1 == 0 && shift2 == 0 ) && numlock != 0  )
>            ||  scode == SCODE_NM || scode == SCODE_NP ) {



2) The only ansi mode supported was ^[[7m (reverse). We have added
   bold, underline and blinking.

   Change do_escape(),

> 	case 'm':		/* Set graphic rendition */
> 		switch (tp->tty_esc_parmv[0]) {
> 
> 			case 1: /*  BOLD  (light green on black)  */
> 				tp->tty_attribute = 0x0a << 8;
> 				break;
> 
> 			case 4: /*  UNDERLINE  (blue on red)  */
> 				tp->tty_attribute = 0x41 << 8;
> 				break;
> 
> 			case 5: /*  BLINKING  (light grey on black)  */
> 				tp->tty_attribute = 0x87 << 8;
> 				break;
> 
> 			case 7: /*  REVERSE  (black on light grey)  */
> 				tp->tty_attribute = 0x70 << 8;
>  				break;
> 
>  			default: /*  NORMAL  (light grey on black)  */
> 				 tp->tty_attribute = 0x07 << 8;
>   				 break;
>  		}
> 		break;



3) Errors from the keyboard controller simply go to "never-never" land.
   This is OK 99.99% of the time. However, a small problem can really
   confuse a developer for a long time. (If you ever have an AT
   clone lock up while using extended memory, then this is where
   one starts looking for the problem....it also happens under MS-DOS
   on some clones.)

   Change keyboard(),

>  if (k > 0) {
>	if ( k + 0200 > 0xe0 )
>		printf( "Received keyboard response 0x%2x\n", k + 0200 );

--------------------------------------------------------------------
               Edwin L. Froese
                  (in London for the month)

               Terrence W. Holm
                  {uw-beaver,ubc-cs}!uvicctr!sirius!tholm