From: Andrew Choi Date: Mon, 2 Dec 2002 17:13:46 +0000 (+0000) Subject: 2002-12-02 Andrew Choi X-Git-Tag: ttn-vms-21-2-B4~12199 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=72742a999a8b0ea7a67dd2c3c17f89579a2bb102;p=emacs.git 2002-12-02 Andrew Choi * macmenu.c (add_menu_item, fill_menubar): Truncate menu item names to 255 characters. * macterm.c (XTread_socket): If all frames have been collapsed, expand the first one before handling drag-and-drop events. * s/darwin.h (GETPGRP_NO_ARG): Delete. Replaced by GETPGRP_VOID, which is detected by autoconf. --- diff --git a/src/ChangeLog b/src/ChangeLog index 3275ca3759d..5b4eed74cf6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2002-12-02 Andrew Choi + + * macmenu.c (add_menu_item, fill_menubar): Truncate menu item + names to 255 characters. + + * macterm.c (XTread_socket): If all frames have been collapsed, + expand the first one before handling drag-and-drop events. + + * s/darwin.h (GETPGRP_NO_ARG): Delete. Replaced by GETPGRP_VOID, + which is detected by autoconf. + 2002-12-01 Steven Tamm * unexmacosx.c (copy_twolevelhints, dump_it): Now corrects the diff --git a/src/macmenu.c b/src/macmenu.c index 128235c027b..05424ead2fa 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -2226,13 +2226,14 @@ add_menu_item (MenuHandle menu, widget_value *wv, int submenu, int indent, strcpy (item_name, ""); for (i = 0; i < indent; i++) - strcat (item_name, " "); - strcat (item_name, wv->name); + strncat (item_name, " ", 255); + strncat (item_name, wv->name, 255); if (wv->key != NULL) { - strcat (item_name, " "); - strcat (item_name, wv->key); + strncat (item_name, " ", 255); + strncat (item_name, wv->key, 255); } + item_name[255] = 0; c2pstr (item_name); SetMenuItemText (menu, pos, item_name); @@ -2316,7 +2317,8 @@ fill_menubar (widget_value *wv) MenuHandle menu; Str255 title; - strcpy (title, wv->name); + strncpy (title, wv->name, 255); + title[255] = 0; c2pstr (title); menu = NewMenu (id, title); diff --git a/src/macterm.c b/src/macterm.c index 2646b28618d..a0997c4e061 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -13046,6 +13046,14 @@ XTread_socket (int sd, struct input_event *bufp, int numchars, int expected) Lisp_Object frame; wp = FrontNonFloatingWindow (); + + if (!wp) + { + struct frame *f = XFRAME (XCAR (Vframe_list)); + CollapseWindow (FRAME_MAC_WINDOW (f), false); + wp = FrontNonFloatingWindow (); + } + if (wp && is_emacs_window(wp)) f = ((mac_output *) GetWRefCon (wp))->mFP; diff --git a/src/s/darwin.h b/src/s/darwin.h index b5a358549da..21b11d9554a 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -209,9 +209,6 @@ Boston, MA 02111-1307, USA. */ /* Used in dispnew.c. Copied from freebsd.h. */ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) -/* Darwin provides POSIX-style getpgrp. */ -#define GETPGRP_NO_ARG - /* System uses OXTABS instead of the expected TAB3. (Copied from bsd386.h.) */ #define TAB3 OXTABS