X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fprint.c;h=833ec91d6098fd35fc8354756b45159a72d8252b;hb=85e1967527101d2d8a4c0f5d37857cf731690733;hp=394d781e4b375146deece354b1b516b2fc96f10b;hpb=d0ceeb45a7042703bfd9c6d4c335680a3c07a974;p=sbcl.git diff --git a/src/runtime/print.c b/src/runtime/print.c index 394d781..833ec91 100644 --- a/src/runtime/print.c +++ b/src/runtime/print.c @@ -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; + } } } @@ -237,7 +240,8 @@ static void print_fixnum(lispobj obj) static void brief_otherimm(lispobj obj) { - int type, c, idx; + int type, c; + unsigned int idx; char buffer[10]; type = widetag_of(obj); @@ -288,7 +292,9 @@ static void brief_otherimm(lispobj obj) static void print_otherimm(lispobj obj) { - int type, idx; + int type; + + unsigned int idx; type = widetag_of(obj); idx = type >> 2; @@ -379,7 +385,7 @@ static void brief_struct(lispobj obj) static void print_struct(lispobj obj) { struct instance *instance = (struct instance *)native_pointer(obj); - int i; + unsigned int i; char buffer[16]; print_obj("type: ", ((struct instance *)native_pointer(obj))->slots[0]); for (i = 1; i < HeaderValue(instance->header); i++) { @@ -732,9 +738,9 @@ static void print_obj(char *prefix, lispobj obj) if (var == NULL && ((obj & LOWTAG_MASK) == FUN_POINTER_LOWTAG || - (obj & LOWTAG_MASK) == LIST_POINTER_LOWTAG || - (obj & LOWTAG_MASK) == INSTANCE_POINTER_LOWTAG || - (obj & LOWTAG_MASK) == OTHER_POINTER_LOWTAG)) + (obj & LOWTAG_MASK) == LIST_POINTER_LOWTAG || + (obj & LOWTAG_MASK) == INSTANCE_POINTER_LOWTAG || + (obj & LOWTAG_MASK) == OTHER_POINTER_LOWTAG)) var = define_var(NULL, obj, 0); if (var != NULL)