comparison src/print.c @ 444:576fb035e263 r21-2-37

Import from CVS: tag r21-2-37
author cvs
date Mon, 13 Aug 2007 11:36:19 +0200
parents abe6d1db359e
children 1ccc32a20af4
comparison
equal deleted inserted replaced
443:a8296e22da4e 444:576fb035e263
507 write_string_1 ((const Bufbyte *) str, strlen (str), stream); 507 write_string_1 ((const Bufbyte *) str, strlen (str), stream);
508 } 508 }
509 509
510 510
511 DEFUN ("write-char", Fwrite_char, 1, 2, 0, /* 511 DEFUN ("write-char", Fwrite_char, 1, 2, 0, /*
512 Output character CH to stream STREAM. 512 Output character CHARACTER to stream STREAM.
513 STREAM defaults to the value of `standard-output' (which see). 513 STREAM defaults to the value of `standard-output' (which see).
514 */ 514 */
515 (ch, stream)) 515 (character, stream))
516 { 516 {
517 /* This function can GC */ 517 /* This function can GC */
518 Bufbyte str[MAX_EMCHAR_LEN]; 518 Bufbyte str[MAX_EMCHAR_LEN];
519 Bytecount len; 519 Bytecount len;
520 520
521 CHECK_CHAR_COERCE_INT (ch); 521 CHECK_CHAR_COERCE_INT (character);
522 len = set_charptr_emchar (str, XCHAR (ch)); 522 len = set_charptr_emchar (str, XCHAR (character));
523 output_string (canonicalize_printcharfun (stream), str, Qnil, 0, len); 523 output_string (canonicalize_printcharfun (stream), str, Qnil, 0, len);
524 return ch; 524 return character;
525 } 525 }
526 526
527 void 527 void
528 temp_output_buffer_setup (Lisp_Object bufname) 528 temp_output_buffer_setup (Lisp_Object bufname)
529 { 529 {
671 671
672 DEFUN ("princ", Fprinc, 1, 2, 0, /* 672 DEFUN ("princ", Fprinc, 1, 2, 0, /*
673 Output the printed representation of OBJECT, any Lisp object. 673 Output the printed representation of OBJECT, any Lisp object.
674 No quoting characters are used; no delimiters are printed around 674 No quoting characters are used; no delimiters are printed around
675 the contents of strings. 675 the contents of strings.
676 Output stream is STREAM, or value of standard-output (which see). 676 Output stream is STREAM, or value of `standard-output' (which see).
677 */ 677 */
678 (object, stream)) 678 (object, stream))
679 { 679 {
680 /* This function can GC */ 680 /* This function can GC */
681 Lisp_Object frame = Qnil; 681 Lisp_Object frame = Qnil;
1602 1602
1603 return char_or_string; 1603 return char_or_string;
1604 } 1604 }
1605 1605
1606 DEFUN ("open-termscript", Fopen_termscript, 1, 1, "FOpen termscript file: ", /* 1606 DEFUN ("open-termscript", Fopen_termscript, 1, 1, "FOpen termscript file: ", /*
1607 Start writing all terminal output to FILE as well as the terminal. 1607 Start writing all terminal output to FILENAME as well as the terminal.
1608 FILE = nil means just close any termscript file currently open. 1608 FILENAME = nil means just close any termscript file currently open.
1609 */ 1609 */
1610 (file)) 1610 (filename))
1611 { 1611 {
1612 /* This function can GC */ 1612 /* This function can GC */
1613 if (termscript != 0) 1613 if (termscript != 0)
1614 fclose (termscript); 1614 {
1615 termscript = 0; 1615 fclose (termscript);
1616 1616 termscript = 0;
1617 if (! NILP (file)) 1617 }
1618 { 1618
1619 file = Fexpand_file_name (file, Qnil); 1619 if (! NILP (filename))
1620 termscript = fopen ((char *) XSTRING_DATA (file), "w"); 1620 {
1621 filename = Fexpand_file_name (filename, Qnil);
1622 termscript = fopen ((char *) XSTRING_DATA (filename), "w");
1621 if (termscript == NULL) 1623 if (termscript == NULL)
1622 report_file_error ("Opening termscript", list1 (file)); 1624 report_file_error ("Opening termscript", list1 (filename));
1623 } 1625 }
1624 return Qnil; 1626 return Qnil;
1625 } 1627 }
1626 1628
1627 #if 1 1629 #if 1