svn commit: [26211] trunk/busybox/shell: hush_test/hush-misc hush_test/hush-z_sl etc...

vda at busybox.net vda at busybox.net
Sun Apr 26 20:06:14 UTC 2009


Author: vda
Date: 2009-04-26 20:06:14 +0000 (Sun, 26 Apr 2009)
New Revision: 26211

Log:
hush: nommu fix for function passing



Added:
   trunk/busybox/shell/hush_test/hush-misc/func4.right
   trunk/busybox/shell/hush_test/hush-misc/func4.tests

Modified:
   trunk/busybox/shell/hush.c
   trunk/busybox/shell/hush_test/hush-z_slow/leak_all1.tests


Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2009-04-26 11:25:19 UTC (rev 26210)
+++ trunk/busybox/shell/hush.c	2009-04-26 20:06:14 UTC (rev 26211)
@@ -5328,9 +5328,12 @@
 		 * within double quotes by preceding it with a backslash.
 		 */
 		if (strchr("$`\"\\", next) != NULL) {
-			o_addqchr(dest, i_getch(input));
+			ch = i_getch(input);
+			o_addqchr(dest, ch);
+			nommu_addchr(as_string, ch);
 		} else {
 			o_addqchr(dest, '\\');
+			nommu_addchr(as_string, '\\');
 		}
 		goto again;
 	}

Added: trunk/busybox/shell/hush_test/hush-misc/func4.right
===================================================================
--- trunk/busybox/shell/hush_test/hush-misc/func4.right	                        (rev 0)
+++ trunk/busybox/shell/hush_test/hush-misc/func4.right	2009-04-26 20:06:14 UTC (rev 26211)
@@ -0,0 +1,2 @@
+24
+Done

Added: trunk/busybox/shell/hush_test/hush-misc/func4.tests
===================================================================
--- trunk/busybox/shell/hush_test/hush-misc/func4.tests	                        (rev 0)
+++ trunk/busybox/shell/hush_test/hush-misc/func4.tests	2009-04-26 20:06:14 UTC (rev 26211)
@@ -0,0 +1,7 @@
+func() { 
+	eval "echo \"\${val_${1}}\"" 
+}
+
+val_x=24 
+(func x)
+echo Done


Property changes on: trunk/busybox/shell/hush_test/hush-misc/func4.tests
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/busybox/shell/hush_test/hush-z_slow/leak_all1.tests
===================================================================
--- trunk/busybox/shell/hush_test/hush-z_slow/leak_all1.tests	2009-04-26 11:25:19 UTC (rev 26210)
+++ trunk/busybox/shell/hush_test/hush-z_slow/leak_all1.tests	2009-04-26 20:06:14 UTC (rev 26211)
@@ -67,6 +67,7 @@
     f >/dev/null
     : $((i++))
 done
+unset i l t
 unset -f f
 
 memleak
@@ -134,6 +135,7 @@
     f >/dev/null
     : $((i++))
 done
+unset i l t
 unset -f f
 
 



More information about the busybox-cvs mailing list