diff options
| author | Joakim Verona | 2013-07-14 11:04:49 +0200 |
|---|---|---|
| committer | Joakim Verona | 2013-07-14 11:04:49 +0200 |
| commit | 0bb9bb0841d89fff09820a57369df4cb01b16b43 (patch) | |
| tree | 832bf9fa8415eef0ce464d22b3ee1300cfa90bb1 /src/print.c | |
| parent | 3718127221fbbc31f8ebd027ab7c95403dbe9118 (diff) | |
| parent | 3af1c8684ed6e48fbc21481d129e9aa164752c6e (diff) | |
| download | emacs-0bb9bb0841d89fff09820a57369df4cb01b16b43.tar.gz emacs-0bb9bb0841d89fff09820a57369df4cb01b16b43.zip | |
Merge branch 'trunk' into xwidget
Conflicts:
src/xdisp.c
Diffstat (limited to 'src/print.c')
| -rw-r--r-- | src/print.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/print.c b/src/print.c index f5ee47dc114..1257b46dda4 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | #include <config.h> | 22 | #include <config.h> |
| 23 | #include <stdio.h> | 23 | #include "sysstdio.h" |
| 24 | 24 | ||
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "character.h" | 26 | #include "character.h" |
| @@ -767,7 +767,7 @@ append to existing target file. */) | |||
| 767 | { | 767 | { |
| 768 | file = Fexpand_file_name (file, Qnil); | 768 | file = Fexpand_file_name (file, Qnil); |
| 769 | initial_stderr_stream = stderr; | 769 | initial_stderr_stream = stderr; |
| 770 | stderr = fopen (SSDATA (file), NILP (append) ? "w" : "a"); | 770 | stderr = emacs_fopen (SSDATA (file), NILP (append) ? "w" : "a"); |
| 771 | if (stderr == NULL) | 771 | if (stderr == NULL) |
| 772 | { | 772 | { |
| 773 | stderr = initial_stderr_stream; | 773 | stderr = initial_stderr_stream; |
| @@ -1774,9 +1774,8 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1774 | #endif | 1774 | #endif |
| 1775 | else if (WINDOWP (obj)) | 1775 | else if (WINDOWP (obj)) |
| 1776 | { | 1776 | { |
| 1777 | int len; | 1777 | void *ptr = XWINDOW (obj); |
| 1778 | strout ("#<window ", -1, -1, printcharfun); | 1778 | int len = sprintf (buf, "#<window %p", ptr); |
| 1779 | len = sprintf (buf, "%p", XWINDOW (obj)); | ||
| 1780 | strout (buf, len, len, printcharfun); | 1779 | strout (buf, len, len, printcharfun); |
| 1781 | if (BUFFERP (XWINDOW (obj)->contents)) | 1780 | if (BUFFERP (XWINDOW (obj)->contents)) |
| 1782 | { | 1781 | { |
| @@ -1807,6 +1806,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1807 | ptrdiff_t real_size, size; | 1806 | ptrdiff_t real_size, size; |
| 1808 | int len; | 1807 | int len; |
| 1809 | #if 0 | 1808 | #if 0 |
| 1809 | void *ptr = h; | ||
| 1810 | strout ("#<hash-table", -1, -1, printcharfun); | 1810 | strout ("#<hash-table", -1, -1, printcharfun); |
| 1811 | if (SYMBOLP (h->test)) | 1811 | if (SYMBOLP (h->test)) |
| 1812 | { | 1812 | { |
| @@ -1819,9 +1819,8 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1819 | len = sprintf (buf, "%"pD"d/%"pD"d", h->count, ASIZE (h->next)); | 1819 | len = sprintf (buf, "%"pD"d/%"pD"d", h->count, ASIZE (h->next)); |
| 1820 | strout (buf, len, len, printcharfun); | 1820 | strout (buf, len, len, printcharfun); |
| 1821 | } | 1821 | } |
| 1822 | len = sprintf (buf, " %p", h); | 1822 | len = sprintf (buf, " %p>", ptr); |
| 1823 | strout (buf, len, len, printcharfun); | 1823 | strout (buf, len, len, printcharfun); |
| 1824 | PRINTCHAR ('>'); | ||
| 1825 | #endif | 1824 | #endif |
| 1826 | /* Implement a readable output, e.g.: | 1825 | /* Implement a readable output, e.g.: |
| 1827 | #s(hash-table size 2 test equal data (k1 v1 k2 v2)) */ | 1826 | #s(hash-table size 2 test equal data (k1 v1 k2 v2)) */ |
| @@ -1901,6 +1900,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1901 | else if (FRAMEP (obj)) | 1900 | else if (FRAMEP (obj)) |
| 1902 | { | 1901 | { |
| 1903 | int len; | 1902 | int len; |
| 1903 | void *ptr = XFRAME (obj); | ||
| 1904 | Lisp_Object frame_name = XFRAME (obj)->name; | 1904 | Lisp_Object frame_name = XFRAME (obj)->name; |
| 1905 | 1905 | ||
| 1906 | strout ((FRAME_LIVE_P (XFRAME (obj)) | 1906 | strout ((FRAME_LIVE_P (XFRAME (obj)) |
| @@ -1916,9 +1916,8 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 1916 | frame_name = build_string ("*INVALID*FRAME*NAME*"); | 1916 | frame_name = build_string ("*INVALID*FRAME*NAME*"); |
| 1917 | } | 1917 | } |
| 1918 | print_string (frame_name, printcharfun); | 1918 | print_string (frame_name, printcharfun); |
| 1919 | len = sprintf (buf, " %p", XFRAME (obj)); | 1919 | len = sprintf (buf, " %p>", ptr); |
| 1920 | strout (buf, len, len, printcharfun); | 1920 | strout (buf, len, len, printcharfun); |
| 1921 | PRINTCHAR ('>'); | ||
| 1922 | } | 1921 | } |
| 1923 | else if (FONTP (obj)) | 1922 | else if (FONTP (obj)) |
| 1924 | { | 1923 | { |