diff src/menubar-msw.c @ 400:a86b2b5e0111 r21-2-30

Import from CVS: tag r21-2-30
author cvs
date Mon, 13 Aug 2007 11:14:34 +0200
parents 74fd4e045ea6
children 2f8bb876ab1d
line wrap: on
line diff
--- a/src/menubar-msw.c	Mon Aug 13 11:13:33 2007 +0200
+++ b/src/menubar-msw.c	Mon Aug 13 11:14:34 2007 +0200
@@ -136,24 +136,24 @@
 
   /* Escape '&' as '&&' */
   ptr = buf;
-  while ((ptr=memchr (ptr, '&', ll-(ptr-buf))) != NULL)
+  while ((ptr = (char*) memchr (ptr, '&', ll - (ptr - buf))) != NULL)
     {
-      if (ll+2 >= MAX_MENUITEM_LENGTH)
+      if (ll + 2 >= MAX_MENUITEM_LENGTH)
 	signal_simple_error ("Menu item produces too long displayable string",
 			     XGUI_ITEM (gui_item)->name);
-      memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
+      memmove (ptr + 1, ptr, (ll - (ptr - buf)) + 1);
       ll++;
-      ptr+=2;
+      ptr += 2;
     }
 
   /* Replace XEmacs accelerator '%_' with Windows accelerator '&' */
   ptr = buf;
-  while ((ptr=memchr (ptr, '%', ll-(ptr-buf))) != NULL)
+  while ((ptr = (char*) memchr (ptr, '%', ll - (ptr - buf))) != NULL)
     {
-      if (*(ptr+1) == '_')
+      if (*(ptr + 1) == '_')
 	{
 	  *ptr = '&';
-	  memmove (ptr+1, ptr+2, ll-(ptr-buf+2));
+	  memmove (ptr + 1, ptr + 2, ll - (ptr - buf + 2));
 	  ll--;
 	}
       ptr++;