From ce937a42102cf549662678cd91026f6aa1b0a7cd Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 11 Sep 2015 22:48:28 -0700 Subject: Treat comment lines in repl, and plug memory leak. * parser.c (repl): If we continue the loop due to detecting a blank line, we must free that line, since we are outside of the unwind block (and continue would violate that block if we were). If a line contains nothing but a comment, then enter that line into the history. * txr.1: Documented treatment of commented lines. --- txr.1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 32799345..5e054e83 100644 --- a/txr.1 +++ b/txr.1 @@ -33259,8 +33259,16 @@ intercepts the exception and prints information about it preceded by two asterisks and a space. These asterisks distinguish an exception from a result value. -If an empty line is entered, or a line containing only spaces and tabs, -the prompt is repeated without incrementing the number. +If an empty line is entered, or a line containing only spaces, tabs +or embedded carriage returns or linefeeds, the prompt is repeated without +incrementing the number. Such a line is not entered into the history. + +A line which only contains a \*(TL comment (optional spaces, tabs or embedded +carriage returns or linefeeds, followed by a semicolon), also causes +the prompt to be repeated without incrementing the number. However, +such a line +.B is +entered into the history. .SS* Ways to Quit -- cgit v1.2.3