aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorStefan Monnier2013-01-23 15:07:28 -0500
committerStefan Monnier2013-01-23 15:07:28 -0500
commitb09cca6ace3728ad8a93b3c0301520fa75e71586 (patch)
treefa12508ec95ada37cf95445ecf91d8f7786dab7e /src/alloc.c
parent54ab1c5acf892f07dd8121d4bbafe7601a54bcb5 (diff)
downloademacs-b09cca6ace3728ad8a93b3c0301520fa75e71586.tar.gz
emacs-b09cca6ace3728ad8a93b3c0301520fa75e71586.zip
* src/xdisp.c (message2, message2_nolog): Remove functions.
(message3, message3_nolog): Extract nbytes and multibyteness directly from the string. Change all callers. (message3_nolog): Don't set message_enable_multibyte since set_message will reset it anyway. (message1, message1_nolog): Use message3. (vmessage): Use a stack allocated buffer rather than f->message_buf. (with_echo_area_buffer): Remove last two arguments. Update all callers. (set_message): Drop all but the second arg, which has to be a string. (set_message_1): Simplify now that we know that a1 is NULL and the second arg is a string. * src/frame.h (struct frame): Remove `message_buf' field. Use glyphs_initialized_p instead. (FRAME_MESSAGE_BUF): Remove macro. * src/w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2. * src/lisp.h (message2, message2_nolog): Remove declarations. (message3, message3_nolog): Update declarations. * src/keyboard.c (read_char_minibuf_menu_text) (read_char_minibuf_menu_width): Remove vars. (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as to correctly handle multibyte strings. * src/frame.c (delete_frame): Don't free message_buf any more. * src/editfns.c (message_text, message_length): Remove vars. (Fmessage_box): Don't copy the Lisp string's bytes any longer. * src/fileio.c (auto_save_error): Use message3 instead of message2. * src/dispnew.c (adjust_frame_message_buffer): Remove function.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/alloc.c b/src/alloc.c
index a2e7282bb60..2624650ed2c 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -26,7 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include <limits.h> /* For CHAR_BIT. */ 26#include <limits.h> /* For CHAR_BIT. */
27 27
28#ifdef ENABLE_CHECKING 28#ifdef ENABLE_CHECKING
29#include <signal.h> /* For SIGABRT. */ 29#include <signal.h> /* For SIGABRT. */
30#endif 30#endif
31 31
32#ifdef HAVE_PTHREAD 32#ifdef HAVE_PTHREAD
@@ -1684,7 +1684,7 @@ allocate_string_data (struct Lisp_String *s,
1684 b = lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP); 1684 b = lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP);
1685 1685
1686#ifdef DOUG_LEA_MALLOC 1686#ifdef DOUG_LEA_MALLOC
1687 /* Back to a reasonable maximum of mmap'ed areas. */ 1687 /* Back to a reasonable maximum of mmap'ed areas. */
1688 mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); 1688 mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
1689#endif 1689#endif
1690 1690
@@ -1901,7 +1901,7 @@ compact_small_strings (void)
1901 1901
1902#ifdef GC_CHECK_STRING_BYTES 1902#ifdef GC_CHECK_STRING_BYTES
1903 /* Check that the string size recorded in the string is the 1903 /* Check that the string size recorded in the string is the
1904 same as the one recorded in the sdata structure. */ 1904 same as the one recorded in the sdata structure. */
1905 if (s && string_bytes (s) != SDATA_NBYTES (from)) 1905 if (s && string_bytes (s) != SDATA_NBYTES (from))
1906 emacs_abort (); 1906 emacs_abort ();
1907#endif /* GC_CHECK_STRING_BYTES */ 1907#endif /* GC_CHECK_STRING_BYTES */
@@ -6564,7 +6564,7 @@ die (const char *msg, const char *file, int line)
6564} 6564}
6565#endif 6565#endif
6566 6566
6567/* Initialization */ 6567/* Initialization. */
6568 6568
6569void 6569void
6570init_alloc_once (void) 6570init_alloc_once (void)
@@ -6579,9 +6579,9 @@ init_alloc_once (void)
6579#endif 6579#endif
6580 6580
6581#ifdef DOUG_LEA_MALLOC 6581#ifdef DOUG_LEA_MALLOC
6582 mallopt (M_TRIM_THRESHOLD, 128*1024); /* trim threshold */ 6582 mallopt (M_TRIM_THRESHOLD, 128 * 1024); /* Trim threshold. */
6583 mallopt (M_MMAP_THRESHOLD, 64*1024); /* mmap threshold */ 6583 mallopt (M_MMAP_THRESHOLD, 64 * 1024); /* Mmap threshold. */
6584 mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); /* max. number of mmap'ed areas */ 6584 mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); /* Max. number of mmap'ed areas. */
6585#endif 6585#endif
6586 init_strings (); 6586 init_strings ();
6587 init_vectors (); 6587 init_vectors ();