189 |
and must start with PRINTPREPARE, end with PRINTFINISH, |
and must start with PRINTPREPARE, end with PRINTFINISH, |
190 |
and use PRINTDECLARE to declare common variables. |
and use PRINTDECLARE to declare common variables. |
191 |
Use PRINTCHAR to output one character, |
Use PRINTCHAR to output one character, |
192 |
or call strout to output a block of characters. */ |
or call strout to output a block of characters. */ |
193 |
|
|
194 |
#define PRINTDECLARE \ |
#define PRINTDECLARE \ |
195 |
struct buffer *old = current_buffer; \ |
struct buffer *old = current_buffer; \ |
321 |
int len = CHAR_STRING (ch, str); |
int len = CHAR_STRING (ch, str); |
322 |
|
|
323 |
QUIT; |
QUIT; |
324 |
|
|
325 |
if (NILP (fun)) |
if (NILP (fun)) |
326 |
{ |
{ |
327 |
if (print_buffer_pos_byte + len >= print_buffer_size) |
if (print_buffer_pos_byte + len >= print_buffer_size) |
340 |
{ |
{ |
341 |
int multibyte_p |
int multibyte_p |
342 |
= !NILP (current_buffer->enable_multibyte_characters); |
= !NILP (current_buffer->enable_multibyte_characters); |
343 |
|
|
344 |
setup_echo_area_for_printing (multibyte_p); |
setup_echo_area_for_printing (multibyte_p); |
345 |
insert_char (ch); |
insert_char (ch); |
346 |
message_dolog (str, len, 0, multibyte_p); |
message_dolog (str, len, 0, multibyte_p); |
397 |
int i; |
int i; |
398 |
int multibyte_p |
int multibyte_p |
399 |
= !NILP (current_buffer->enable_multibyte_characters); |
= !NILP (current_buffer->enable_multibyte_characters); |
400 |
|
|
401 |
setup_echo_area_for_printing (multibyte_p); |
setup_echo_area_for_printing (multibyte_p); |
402 |
message_dolog (ptr, size_byte, 0, multibyte_p); |
message_dolog (ptr, size_byte, 0, multibyte_p); |
403 |
|
|
404 |
if (size == size_byte) |
if (size == size_byte) |
405 |
{ |
{ |
406 |
for (i = 0; i < size; ++i) |
for (i = 0; i < size; ++i) |
415 |
insert_char (ch); |
insert_char (ch); |
416 |
} |
} |
417 |
} |
} |
418 |
|
|
419 |
#ifdef MAX_PRINT_CHARS |
#ifdef MAX_PRINT_CHARS |
420 |
if (max_print) |
if (max_print) |
421 |
print_chars += size; |
print_chars += size; |
653 |
|
|
654 |
If variable `temp-buffer-show-function' is non-nil, call it at the end |
If variable `temp-buffer-show-function' is non-nil, call it at the end |
655 |
to get the buffer displayed instead of just displaying the non-selected |
to get the buffer displayed instead of just displaying the non-selected |
656 |
buffer and calling the hook. It gets one argument, the buffer to display. |
buffer and calling the hook. It gets one argument, the buffer to display. |
657 |
|
|
658 |
usage: (with-output-to-temp-buffer BUFFNAME BODY ...) */) |
usage: (with-output-to-temp-buffer BUFFNAME BODY ...) */) |
659 |
(args) |
(args) |
1005 |
else |
else |
1006 |
Fprin1 (obj, stream); |
Fprin1 (obj, stream); |
1007 |
} |
} |
1008 |
|
|
1009 |
UNGCPRO; |
UNGCPRO; |
1010 |
} |
} |
1011 |
|
|
1016 |
* largest float, printed in the biggest notation. This is undoubtedly |
* largest float, printed in the biggest notation. This is undoubtedly |
1017 |
* 20d float_output_format, with the negative of the C-constant "HUGE" |
* 20d float_output_format, with the negative of the C-constant "HUGE" |
1018 |
* from <math.h>. |
* from <math.h>. |
1019 |
* |
* |
1020 |
* On the vax the worst case is -1e38 in 20d format which takes 61 bytes. |
* On the vax the worst case is -1e38 in 20d format which takes 61 bytes. |
1021 |
* |
* |
1022 |
* I assume that IEEE-754 format numbers can take 329 bytes for the worst |
* I assume that IEEE-754 format numbers can take 329 bytes for the worst |
1023 |
* case of -1e307 in 20d float_output_format. What is one to do (short of |
* case of -1e307 in 20d float_output_format. What is one to do (short of |
1024 |
* re-writing _doprnt to be more sane)? |
* re-writing _doprnt to be more sane)? |
1032 |
{ |
{ |
1033 |
unsigned char *cp; |
unsigned char *cp; |
1034 |
int width; |
int width; |
1035 |
|
|
1036 |
/* Check for plus infinity in a way that won't lose |
/* Check for plus infinity in a way that won't lose |
1037 |
if there is no plus infinity. */ |
if there is no plus infinity. */ |
1038 |
if (data == data / 2 && data > 1.0) |
if (data == data / 2 && data > 1.0) |
1061 |
*buf++ = '-'; |
*buf++ = '-'; |
1062 |
break; |
break; |
1063 |
} |
} |
1064 |
|
|
1065 |
strcpy (buf, "0.0e+NaN"); |
strcpy (buf, "0.0e+NaN"); |
1066 |
return; |
return; |
1067 |
} |
} |
1598 |
else |
else |
1599 |
{ |
{ |
1600 |
PRINTCHAR ('('); |
PRINTCHAR ('('); |
1601 |
|
|
1602 |
/* If the first element is a backquote form, |
/* If the first element is a backquote form, |
1603 |
print it old-style so it won't be misunderstood. */ |
print it old-style so it won't be misunderstood. */ |
1604 |
if (print_quoted && CONSP (XCAR (obj)) |
if (print_quoted && CONSP (XCAR (obj)) |
1670 |
} |
} |
1671 |
} |
} |
1672 |
} |
} |
1673 |
|
|
1674 |
if (i++) |
if (i++) |
1675 |
PRINTCHAR (' '); |
PRINTCHAR (' '); |
1676 |
|
|
1677 |
if (print_length && i > print_length) |
if (print_length && i > print_length) |
1678 |
{ |
{ |
1679 |
strout ("...", 3, 3, printcharfun, 0); |
strout ("...", 3, 3, printcharfun, 0); |
1680 |
goto end_of_list; |
goto end_of_list; |
1681 |
} |
} |
1682 |
|
|
1683 |
print_object (XCAR (obj), printcharfun, escapeflag); |
print_object (XCAR (obj), printcharfun, escapeflag); |
1684 |
|
|
1685 |
obj = XCDR (obj); |
obj = XCDR (obj); |
1686 |
if (!(i & 1)) |
if (!(i & 1)) |
1687 |
halftail = XCDR (halftail); |
halftail = XCDR (halftail); |
1694 |
strout (" . ", 3, 3, printcharfun, 0); |
strout (" . ", 3, 3, printcharfun, 0); |
1695 |
print_object (obj, printcharfun, escapeflag); |
print_object (obj, printcharfun, escapeflag); |
1696 |
} |
} |
1697 |
|
|
1698 |
end_of_list: |
end_of_list: |
1699 |
PRINTCHAR (')'); |
PRINTCHAR (')'); |
1700 |
} |
} |