[cmucl-commit] [git] CMU Common Lisp branch master updated. snapshot-2011-12-9-gf187450

Raymond Toy rtoy at common-lisp.net
Thu Dec 22 22:43:53 CET 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  f1874509af0afa2aedd12e9cc61654e0bc0a4519 (commit)
       via  0b7015bbe5cd76450e861da44b8692174c546a1a (commit)
       via  9f4256ad2b60bb21806f1edb0cd34099b984b523 (commit)
      from  43c8a8204942f7286daad33ed5bcf4dcbe9f4c7d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f1874509af0afa2aedd12e9cc61654e0bc0a4519
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Thu Dec 22 13:43:42 2011 -0800

    Prevent ldb from endless printing the prompt if EOF is reached.

diff --git a/src/lisp/monitor.c b/src/lisp/monitor.c
index b47a6b1..64e44f5 100644
--- a/src/lisp/monitor.c
+++ b/src/lisp/monitor.c
@@ -469,7 +469,14 @@ sub_monitor(void)
 	if (line == NULL) {
 	    if (isatty(0)) {
 		putchar('\n');
-		continue;
+                /*
+                    * We can no longer read anything from stdin, so
+                    * just exit this loop instead of spewing an
+                    * endless stream of prompts.  This also means we
+                    * can't use ldb anymore because stdin is
+                    * unreadable.
+                    */
+                break;
 	    } else {
 		fprintf(stderr, "\nEOF on something other than a tty.\n");
 		exit(1);

commit 0b7015bbe5cd76450e861da44b8692174c546a1a
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Thu Dec 22 10:45:24 2011 -0800

    It's ok to include elf.h on Darwin.  Need definition of
    map_core_sections to get rid of compiler warning.

diff --git a/src/lisp/lisp.c b/src/lisp/lisp.c
index 0bd6aff..d719c8d 100644
--- a/src/lisp/lisp.c
+++ b/src/lisp/lisp.c
@@ -33,10 +33,8 @@
 #include "save.h"
 #include "lispregs.h"
 #if defined(FEATURE_EXECUTABLE)
-#if !defined(DARWIN)
 #include "elf.h"
 #endif
-#endif
 
 #ifdef __linux__
 #include <sys/utsname.h>

commit 9f4256ad2b60bb21806f1edb0cd34099b984b523
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Thu Dec 22 10:23:41 2011 -0800

    Fix compiler warning about not using result of fgets.

diff --git a/src/lisp/monitor.c b/src/lisp/monitor.c
index 806e503..b47a6b1 100644
--- a/src/lisp/monitor.c
+++ b/src/lisp/monitor.c
@@ -312,12 +312,14 @@ static void
 quit(char **ptr)
 {
     char buf[10];
+    char *result; 
 
     printf("Really quit? [y] ");
     fflush(stdout);
-    fgets(buf, sizeof(buf), stdin);
-    if (buf[0] == 'y' || buf[0] == 'Y' || buf[0] == '\n')
+    result = fgets(buf, sizeof(buf), stdin);
+    if (result && (buf[0] == 'y' || buf[0] == 'Y' || buf[0] == '\n')) {
 	exit(0);
+    }
 }
 
 static void
diff --git a/src/lisp/print.c b/src/lisp/print.c
index cdf4b56..9f8fa10 100644
--- a/src/lisp/print.c
+++ b/src/lisp/print.c
@@ -154,12 +154,13 @@ continue_p(boolean newline)
 	    putchar('\n');
 
 	if (cur_lines >= max_lines) {
+            char *result;
 	    printf("More? [y] ");
 	    fflush(stdout);
 
-	    fgets(buffer, sizeof(buffer), stdin);
+	    result = fgets(buffer, sizeof(buffer), stdin);
 
-	    if (buffer[0] == 'n' || buffer[0] == 'N')
+	    if (result == NULL || buffer[0] == 'n' || buffer[0] == 'N')
 		throw_to_monitor();
 	    else
 		cur_lines = 0;

-----------------------------------------------------------------------

Summary of changes:
 src/lisp/lisp.c    |    2 --
 src/lisp/monitor.c |   15 ++++++++++++---
 src/lisp/print.c   |    5 +++--
 3 files changed, 15 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp


More information about the cmucl-commit mailing list