1.0.29.44: Complex float improvements
[sbcl.git] / src / runtime / print.c
index 73ec03b..6f3b505 100644 (file)
@@ -195,12 +195,15 @@ static boolean continue_p(boolean newline)
             printf("More? [y] ");
             fflush(stdout);
 
-            fgets(buffer, sizeof(buffer), stdin);
-
-            if (buffer[0] == 'n' || buffer[0] == 'N')
-                throw_to_monitor();
-            else
+            if (fgets(buffer, sizeof(buffer), stdin)) {
+                if (buffer[0] == 'n' || buffer[0] == 'N')
+                    throw_to_monitor();
+                else
+                    cur_lines = 0;
+            } else {
+                printf("\nUnable to read response, assuming y.\n");
                 cur_lines = 0;
+            }
         }
     }
 
@@ -546,9 +549,17 @@ static void print_otherptr(lispobj obj)
 #ifdef COMPLEX_SINGLE_FLOAT_WIDETAG
             case COMPLEX_SINGLE_FLOAT_WIDETAG:
                 NEWLINE_OR_RETURN;
+#ifdef LISP_FEATURE_X86_64
+                printf("%g", ((struct complex_single_float *)native_pointer(obj))->data.data[0]);
+#else
                 printf("%g", ((struct complex_single_float *)native_pointer(obj))->real);
+#endif
                 NEWLINE_OR_RETURN;
+#ifdef LISP_FEATURE_X86_64
+                printf("%g", ((struct complex_single_float *)native_pointer(obj))->data.data[1]);
+#else
                 printf("%g", ((struct complex_single_float *)native_pointer(obj))->imag);
+#endif
                 break;
 #endif