Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25264/src

Modified Files:
	defaults.c input.c 
Log Message:
Added in support for multiline macros using the NEWMACRO system with the recipient being a conditional variable, i.e. %p, %z, etc.  Prior to this change, only single line macros could be sent using a conditional variable for the recipient.  Changes were made as follows:
struct.h: New variable (int multi) in struct macro_list.
defaults.c: Initialize multi to 0, set to 1 in the case of multiline macros that are sent by mouse targetting.
input.c: Check for value of multi in the case of mouse targetted macros.  If multi is 1, continue reading in the rest of the macro.  If not, break out of loop per usual.

Index: input.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/input.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- input.c	28 May 2006 23:05:12 -0000	1.13
+++ input.c	10 Aug 2006 10:00:52 -0000	1.14
@@ -2041,7 +2041,13 @@
 
                     if (!pmacro (c, who, data))
                         W_Beep ();
-
+#ifdef MULTILINE_MACROS
+                    if (macro[c].multi == 1)
+                    {
+                    	found = 1;
+                    	break;          /* Loop again */
+                    }
+#endif
                     return;
                     break;
                 }

Index: defaults.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/defaults.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- defaults.c	3 Jul 2006 17:03:24 -0000	1.29
+++ defaults.c	10 Aug 2006 10:00:52 -0000	1.30
@@ -947,6 +947,7 @@
                 else
                 {
                     macro[macrocnt].key = c;
+                    macro[macrocnt].multi = 0;
 
                     if (str[0] == '.')
                     {
@@ -1000,9 +1001,19 @@
 #ifdef MULTILINE_MACROS
                     if (keysused[macro[macrocnt].key])
                     {
-                        macro[keysused[macro[macrocnt].key] - 1].type =
-                            NEWMULTIM;
-                        macro[macrocnt].type = NEWMULTIM;
+                    	/* Don't switch mouse targeted multiline macros to type
+                    	   multiline, just flag them as being multiline */
+                    	if (macro[macrocnt].type == NEWMMOUSE)
+                    	{
+                            macro[keysused[macro[macrocnt].key] - 1].multi = 1;
+                            macro[macrocnt].multi = 1;
+                        }
+                    	else
+                    	{
+                            macro[keysused[macro[macrocnt].key] - 1].type =
+                               NEWMULTIM;
+                            macro[macrocnt].type = NEWMULTIM;
+                	}
                     }
                     else
                     {