changeset 48625:b696e2bae8da

2002-12-02 Andrew Choi <akochoi@shaw.ca> * 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.
author Andrew Choi <akochoi@shaw.ca>
date Mon, 02 Dec 2002 17:13:46 +0000
parents 7d37fc403193
children bdbf27c68b39
files src/ChangeLog src/macmenu.c src/macterm.c src/s/darwin.h
diffstat 4 files changed, 26 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Dec 02 16:30:23 2002 +0000
+++ b/src/ChangeLog	Mon Dec 02 17:13:46 2002 +0000
@@ -1,3 +1,14 @@
+2002-12-02  Andrew Choi  <akochoi@shaw.ca>
+
+	* 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  <steventamm@mac.com>
 
 	* unexmacosx.c (copy_twolevelhints, dump_it):  Now corrects the
--- a/src/macmenu.c	Mon Dec 02 16:30:23 2002 +0000
+++ b/src/macmenu.c	Mon Dec 02 17:13:46 2002 +0000
@@ -2226,13 +2226,14 @@
 
       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 @@
       MenuHandle menu;
       Str255 title;
         
-      strcpy (title, wv->name);
+      strncpy (title, wv->name, 255);
+      title[255] = 0;
       c2pstr (title);
       menu = NewMenu (id, title);
 
--- a/src/macterm.c	Mon Dec 02 16:30:23 2002 +0000
+++ b/src/macterm.c	Mon Dec 02 17:13:46 2002 +0000
@@ -13046,6 +13046,14 @@
             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;            
 
--- a/src/s/darwin.h	Mon Dec 02 16:30:23 2002 +0000
+++ b/src/s/darwin.h	Mon Dec 02 17:13:46 2002 +0000
@@ -209,9 +209,6 @@
 /* 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