Subject: rxvt-1.3 patches
From: [email-masked] (Robert Nation)
Date: 2 Aug 1993 10:56:03 -0400
Newsgroups: comp.os.linux.announce

[rxvt is a stripped-down version of "xterm" which uses a lot less memory.
--mdw]

The following patches will address two problems with rxvt-1.3:
1. Control-space and Control-@ didn't work
2. rxvt core dumped if you hit the middle mouse button before
   a selection was available to paste in.

Please apply these patches, and consider your rxvt release to be
rxvt-1.31

Rob Nation
([email-masked])

-----------------start here --------------------------------------------
diff -c3 rxvt/command.c rxvt-1.3/command.c
*** rxvt/command.c	Thu Jul 29 12:15:09 1993
--- rxvt-1.3/command.c	Mon Aug  2 08:30:30 1993
***************
*** 299,502 ****
      {
      case XK_Up :
        strcpy(kbuf,(app_cur_keys ? "\033OA" : "\033[A"));
-       count = strlen(kbuf);
        break;
      case XK_Down :
        strcpy(kbuf,app_cur_keys ? "\033OB" : "\033[B");
-       count = strlen(kbuf);
        break;
      case XK_Right :
        strcpy(kbuf,app_cur_keys ? "\033OC" : "\033[C");
-       count = strlen(kbuf);
        break;
      case XK_Left :
        strcpy(kbuf,app_cur_keys ? "\033OD" : "\033[D");
-       count = strlen(kbuf);
        break;
      case XK_KP_F1 :
        strcpy(kbuf,"\033OP");
-       count = 3;
        break;
      case XK_KP_F2 :
        strcpy(kbuf,"\033OQ");
-       count = 3;
        break;
      case XK_KP_F3 :
        strcpy(kbuf,"\033OR");
-       count = 3;
        break;
      case XK_KP_F4 :
        strcpy(kbuf,"\033OS");
-       count = 3;
        break;
      case XK_KP_0 :
        strcpy(kbuf,app_kp_keys ? "\033Op" : "0");
-       count = strlen(kbuf);
        break;
      case XK_KP_1 :
        strcpy(kbuf,app_kp_keys ? "\033Oq" : "1");
-       count = strlen(kbuf);
        break;
      case XK_KP_2 :
        strcpy(kbuf,app_kp_keys ? "\033Or" : "2");
-       count = strlen(kbuf);
        break;
      case XK_KP_3 :
        strcpy(kbuf,app_kp_keys ? "\033Os" : "3");
-       count = strlen(kbuf);
        break;
      case XK_KP_4 :
        strcpy(kbuf,app_kp_keys ? "\033Ot" : "4");
-       count = strlen(kbuf);
        break;
      case XK_KP_5 :
        strcpy(kbuf,app_kp_keys ? "\033Ou" : "5");
-       count = strlen(kbuf);
        break;
      case XK_KP_6 :
        strcpy(kbuf,app_kp_keys ? "\033Ov" : "6");
-       count = strlen(kbuf);
        break;
      case XK_KP_7 :
        strcpy(kbuf,app_kp_keys ? "\033Ow" : "7");
-       count = strlen(kbuf);
        break;
      case XK_KP_8 :
        strcpy(kbuf,app_kp_keys ? "\033Ox" : "8");
-       count = strlen(kbuf);
        break;
      case XK_KP_9 :
        strcpy(kbuf,app_kp_keys ? "\033Oy" : "9");
-       count = strlen(kbuf);
        break;
      case XK_KP_Subtract :
        strcpy(kbuf,app_kp_keys ? "\033Om" : "-");
-       count = strlen(kbuf);
        break;
      case XK_KP_Separator :
        strcpy(kbuf,app_kp_keys ? "\033Ol" : ",");
-       count = strlen(kbuf);
        break;
      case XK_KP_Decimal :
        strcpy(kbuf,app_kp_keys ? "\033On" : ".");
-       count = strlen(kbuf);
        break;
      case XK_KP_Enter :
        strcpy(kbuf,app_kp_keys ? "\033OM" : "\r");
-       count = strlen(kbuf);
        break;
      case XK_Home :
        strcpy(kbuf,"\033Oq");
-       count = 3;
        break;
      case XK_End :
        strcpy(kbuf,"\033Ow");
-       count = 3;
        break;
      case XK_F1 :
        strcpy(kbuf,"\033[11~");
-       count = 5;
        break;
      case XK_F2 :
        strcpy(kbuf,"\033[12~");
-       count = 5;
        break;
      case XK_F3 :
        strcpy(kbuf,"\033[13~");
-       count = 5;
        break;
      case XK_F4 :
        strcpy(kbuf,"\033[14~");
-       count = 5;
        break;
      case XK_F5 :
        strcpy(kbuf,"\033[15~");
-       count = 5;
        break;
      case XK_F6 :
        strcpy(kbuf,"\033[17~");
-       count = 5;
        break;
      case XK_F7 :
        strcpy(kbuf,"\033[18~");
-       count = 5;
        break;
      case XK_F8 :
        strcpy(kbuf,"\033[19~");
-       count = 5;
        break;
      case XK_F9 :
        strcpy(kbuf,"\033[20~");
-       count = 5;
        break;
      case XK_F10 :
        strcpy(kbuf,"\033[21~");
-       count = 5;
        break;
      case XK_F11 :
        strcpy(kbuf,"\033[23~");
-       count = 5;
        break;
      case XK_F12 :
        strcpy(kbuf,"\033[24~");
-       count = 5;
        break;
      case XK_F13 :
        strcpy(kbuf,"\033[25~");
-       count = 5;
        break;
      case XK_F14 :
        strcpy(kbuf,"\033[26~");
-       count = 5;
        break;
      case XK_Help:
      case XK_F15:
        strcpy(kbuf,"\033[28~");
!       count = 5;
!       break;
      case XK_Menu:
      case XK_F16:
        strcpy(kbuf,"\033[29~");
-       count = 5;
        break;
      case XK_F17 :
        strcpy(kbuf,"\033[31~");
-       count = 5;
        break;
      case XK_F18 :
        strcpy(kbuf,"\033[32~");
-       count = 5;
        break;
      case XK_F19 :
        strcpy(kbuf,"\033[33~");
-       count = 5;
        break;
      case XK_F20 :
        strcpy(kbuf,"\033[34~");
-       count = 5;
        break;
      case XK_Find :
        strcpy(kbuf,"\033[1~");
-       count = 4;
        break;
      case XK_Insert :
        strcpy(kbuf,"\033[2~");
-       count = 4;
        break;
      case XK_Select :
        strcpy(kbuf,"\033[4~");
-       count = 4;
        break;
      case XK_Prior :
        strcpy(kbuf,"\033[5~");
-       count = 4;
        break;
      case XK_Next :
        strcpy(kbuf,"\033[6~");
-       count = 4;
        break;
      }
!   *pcount = count;
    if(meta && (mask == 0xff))
      {
        for(c = kbuf; c < (kbuf+(*pcount)) ; c++)
--- 299,453 ----
      {
      case XK_Up :
        strcpy(kbuf,(app_cur_keys ? "\033OA" : "\033[A"));
        break;
      case XK_Down :
        strcpy(kbuf,app_cur_keys ? "\033OB" : "\033[B");
        break;
      case XK_Right :
        strcpy(kbuf,app_cur_keys ? "\033OC" : "\033[C");
        break;
      case XK_Left :
        strcpy(kbuf,app_cur_keys ? "\033OD" : "\033[D");
        break;
      case XK_KP_F1 :
        strcpy(kbuf,"\033OP");
        break;
      case XK_KP_F2 :
        strcpy(kbuf,"\033OQ");
        break;
      case XK_KP_F3 :
        strcpy(kbuf,"\033OR");
        break;
      case XK_KP_F4 :
        strcpy(kbuf,"\033OS");
        break;
      case XK_KP_0 :
        strcpy(kbuf,app_kp_keys ? "\033Op" : "0");
        break;
      case XK_KP_1 :
        strcpy(kbuf,app_kp_keys ? "\033Oq" : "1");
        break;
      case XK_KP_2 :
        strcpy(kbuf,app_kp_keys ? "\033Or" : "2");
        break;
      case XK_KP_3 :
        strcpy(kbuf,app_kp_keys ? "\033Os" : "3");
        break;
      case XK_KP_4 :
        strcpy(kbuf,app_kp_keys ? "\033Ot" : "4");
        break;
      case XK_KP_5 :
        strcpy(kbuf,app_kp_keys ? "\033Ou" : "5");
        break;
      case XK_KP_6 :
        strcpy(kbuf,app_kp_keys ? "\033Ov" : "6");
        break;
      case XK_KP_7 :
        strcpy(kbuf,app_kp_keys ? "\033Ow" : "7");
        break;
      case XK_KP_8 :
        strcpy(kbuf,app_kp_keys ? "\033Ox" : "8");
        break;
      case XK_KP_9 :
        strcpy(kbuf,app_kp_keys ? "\033Oy" : "9");
        break;
      case XK_KP_Subtract :
        strcpy(kbuf,app_kp_keys ? "\033Om" : "-");
        break;
      case XK_KP_Separator :
        strcpy(kbuf,app_kp_keys ? "\033Ol" : ",");
        break;
      case XK_KP_Decimal :
        strcpy(kbuf,app_kp_keys ? "\033On" : ".");
        break;
      case XK_KP_Enter :
        strcpy(kbuf,app_kp_keys ? "\033OM" : "\r");
        break;
      case XK_Home :
        strcpy(kbuf,"\033Oq");
        break;
      case XK_End :
        strcpy(kbuf,"\033Ow");
        break;
      case XK_F1 :
        strcpy(kbuf,"\033[11~");
        break;
      case XK_F2 :
        strcpy(kbuf,"\033[12~");
        break;
      case XK_F3 :
        strcpy(kbuf,"\033[13~");
        break;
      case XK_F4 :
        strcpy(kbuf,"\033[14~");
        break;
      case XK_F5 :
        strcpy(kbuf,"\033[15~");
        break;
      case XK_F6 :
        strcpy(kbuf,"\033[17~");
        break;
      case XK_F7 :
        strcpy(kbuf,"\033[18~");
        break;
      case XK_F8 :
        strcpy(kbuf,"\033[19~");
        break;
      case XK_F9 :
        strcpy(kbuf,"\033[20~");
        break;
      case XK_F10 :
        strcpy(kbuf,"\033[21~");
        break;
      case XK_F11 :
        strcpy(kbuf,"\033[23~");
        break;
      case XK_F12 :
        strcpy(kbuf,"\033[24~");
        break;
      case XK_F13 :
        strcpy(kbuf,"\033[25~");
        break;
      case XK_F14 :
        strcpy(kbuf,"\033[26~");
        break;
      case XK_Help:
      case XK_F15:
        strcpy(kbuf,"\033[28~");
! 	break;
      case XK_Menu:
      case XK_F16:
        strcpy(kbuf,"\033[29~");
        break;
      case XK_F17 :
        strcpy(kbuf,"\033[31~");
        break;
      case XK_F18 :
        strcpy(kbuf,"\033[32~");
        break;
      case XK_F19 :
        strcpy(kbuf,"\033[33~");
        break;
      case XK_F20 :
        strcpy(kbuf,"\033[34~");
        break;
      case XK_Find :
        strcpy(kbuf,"\033[1~");
        break;
      case XK_Insert :
        strcpy(kbuf,"\033[2~");
        break;
      case XK_Select :
        strcpy(kbuf,"\033[4~");
        break;
      case XK_Prior :
        strcpy(kbuf,"\033[5~");
        break;
      case XK_Next :
        strcpy(kbuf,"\033[6~");
        break;
      }
!   *pcount = strlen(kbuf);
    if(meta && (mask == 0xff))
      {
        for(c = kbuf; c < (kbuf+(*pcount)) ; c++)
diff -c3 rxvt/screen.c rxvt-1.3/screen.c
*** rxvt/screen.c	Tue Jul 27 08:32:46 1993
--- rxvt-1.3/screen.c	Mon Aug  2 08:30:30 1993
***************
*** 1029,1037 ****
    long nitems, bytes_after, nread;
    unsigned char *data;
    
-   if (property == None)
-     return;
- 
    nread = 0;
    do 
      {
--- 1029,1034 ----

-- 
Send submissions for comp.os.linux.announce to: [email-masked]