Mercurial > emacs
diff mac/src/macterm.c @ 36417:350e6092a4c4
* src/macfns.c: Rename everything containing *busy_cursor* and
similar to *hourglass*.
Change IMAGE_POSITIVE_INTEGER_VALUE to
IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR throughout.
(x_set_font): If font hasn't changed, avoid recomputing faces and
other things, as in xfns.c.
(Qcancel_timer): New variable.
(syms_of_macfns): Rename x-busy-pointer-shape to
x-hourglass-pointer-shape, display-busy-cursor to
display-hourglass, busy-cursor-delay to hourglass-delay, as in
xfns.c.
(x_set_tool_bar_lines): Modify as in xfns.c
(x_change_window_heights): New function.
* inc/macterm.h (struct x_output): Rename busy_cursor to
hourglass_cursor, busy_window to hourglass_window, busy_p to
hourglass_p, as in xterm.h.
* src/macmenu.c (set_frame_menubar): Run activate-menu-bar-hook with
safe_run_hooks, as in xmenu.c.
* src/macterm.c (do_check_ram_size): New function.
* src/Emacs.r: Add ALRT resource #129 for alert when there is over
256 MB RAM.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Tue, 27 Feb 2001 14:33:20 +0000 |
parents | 16e83e3dab3d |
children | c04e66e2c50c |
line wrap: on
line diff
--- a/mac/src/macterm.c Tue Feb 27 13:24:54 2001 +0000 +++ b/mac/src/macterm.c Tue Feb 27 14:33:20 2001 +0000 @@ -540,7 +540,7 @@ /* Mac version of XClearArea. */ -static void +void XClearArea (display, w, x, y, width, height, exposures) Display *display; WindowPtr w; @@ -11101,6 +11101,7 @@ #define ARGV_STRING_LIST_ID 129 #define ABOUT_ALERT_ID 128 +#define RAM_TOO_LARGE_ALERT_ID 129 Boolean terminate_flag = false; @@ -11178,6 +11179,22 @@ static void +do_check_ram_size (void) +{ + SInt32 physical_ram_size, logical_ram_size; + + if (Gestalt (gestaltPhysicalRAMSize, &physical_ram_size) != noErr + || Gestalt (gestaltLogicalRAMSize, &logical_ram_size) != noErr + || physical_ram_size > 256 * 1024 * 1024 + || logical_ram_size > 256 * 1024 * 1024) + { + StopAlert (RAM_TOO_LARGE_ALERT_ID, NULL); + exit (1); + } +} + + +static void do_window_update (WindowPtr win) { struct mac_output *mwp = (mac_output *) GetWRefCon (win); @@ -11644,6 +11661,8 @@ do_get_menus (); + do_check_ram_size (); + init_emacs_passwd_dir (); init_environ ();