🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Lonhyn T. Jasinskyj Thu, 21 May 1992 20:42
8bit patch bug and a fix for it
#1467
Author: Lonhyn T. Jasinskyj
Date: Thu, 21 May 1992 20:42
56 lines
2368 bytes
I have had a problem with the 8bit patches that were distributed in
the contrib portion of the epoch-4.0p1 distribution.  The problem is
that the "\M-" construct in strings sets the high bit on the following
character instead of the "meta bit".  So you could say:

	(global-set-key "\eg" 'goto-line)

but not 

	(global-set-key "\M-g" 'goto-line)

as that would bind goto-line to the ASCII value for 'g' + 0200.
My fix makes the rest of epoch think that it saw a '\e' (i.e. \033)
every time it sees a "\M-".  This seems to work fine.

Here is the patch to lread.c.  Apply it in src/ and ascii/ although I've
only used the non-ascii part.

*** lread.c.old	Thu May 21 10:40:46 1992
--- lread.c	Thu May 21 13:22:54 1992
***************
*** 850,859 ****
--- 850,868 ----
        c = READCHAR;
        if (c != '-')
  	error ("Invalid escape character syntax");
+       /*
+        * this is for the eight bit patches so that no high bits are set.
+        * convert \M-char constructs to ESCchar in string parsing.  This
+        * should work even if no eight bit patches are installed.
+        * -- lonhyn@nas.nasa.gov 21-05-92
+        *
        c = READCHAR;
        if (c == '\\')
  	c = read_escape (readcharfun);
        return c | 0200;
+        *
+        */
+       return 033;
  
      case 'C':
        c = READCHAR;


-- 

Please let me know if someone has already fixed this in a more elegant
way or there are other problems that I haven't addressed.

lonnie


        -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
       Email to: lonhyn@gulag.nas.nasa.gov     Human at: 415-604-3989
        -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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