Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site godot.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!massar From: massar@godot.UUCP (J.P. Massar) Newsgroups: net.emacs Subject: CCA Emacs Elisp bug fix Message-ID: <1088@godot.UUCP> Date: Wed, 27-Feb-85 11:56:25 EST Article-I.D.: godot.1088 Posted: Wed Feb 27 11:56:25 1985 Date-Received: Fri, 1-Mar-85 07:04:57 EST Distribution: net Organization: Thinking Machines, Cambridge, MA Lines: 57 Problem: Typing in "ab\"c" would produce "ab"c" which is not correct as it cannot be read in as equal to the original string. Fix: In addition to escaping '"', the code will now escape '\' as well. Here is the diff: *** output.c~ Wed Feb 27 11:31:18 1985 --- output.c Wed Feb 27 11:42:10 1985 *************** *** 111,117 Ptr_Port pptr; { ! int j; for (j = 0; j < len; j++) { if (*buffer == '"') llb_put_a_char('\\',pptr); llb_put_a_char(afa_e_index_to_c_char(*buffer),pptr); --- 111,117 ----- Ptr_Port pptr; { ! int j,ch; for (j = 0; j < len; j++) { ch = *buffer; if (ch == '"' || ch == '\\') llb_put_a_char('\\',pptr); *************** *** 113,120 { int j; for (j = 0; j < len; j++) { ! if (*buffer == '"') llb_put_a_char('\\',pptr); ! llb_put_a_char(afa_e_index_to_c_char(*buffer),pptr); if (pptr -> at_eof) { return(T); --- 113,121 ----- { int j,ch; for (j = 0; j < len; j++) { ! ch = *buffer; ! if (ch == '"' || ch == '\\') llb_put_a_char('\\',pptr); ! llb_put_a_char(afa_e_index_to_c_char(ch),pptr); if (pptr -> at_eof) { return(T); -- -- JP Massar, Thinking Machines Corporation, Cambridge, MA -- ihnp4!godot!massar -- massar@cca-unix