Index: trunk/Ohana/src/opihi/lib.shell/multicommand.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/multicommand.c	(revision 2598)
+++ trunk/Ohana/src/opihi/lib.shell/multicommand.c	(revision 4462)
@@ -1,16 +1,31 @@
 # include "opihi.h"
 
-char **multicommand (char *line, int *nlist) {
+/* take input line and split into multiple lines
+   at the semi-colons.  send these to 'command' */
 
-  char **list;
-  int Nlist, NLIST;
+int multicommand (char *line) {
+ 
+  int done, status;
+  char *p, *q, *tmpline, *outline;
 
-  Nlist = 0;
-  NLIST = 10;
-  ALLOCATE (list, char *, NLIST);
-
-  list[0] = strcreate (line);
-  *nlist = 1;
-  return (list);
+  p = line; 
+  done = FALSE;
+  while (!done) {
+    q = strchr (p, ';');
+    if (q == NULL) {
+      q = p + strlen(p);
+      done = TRUE;
+    }
+    tmpline = strncreate (p, q - p);
+    stripwhite (tmpline);
+    if (*tmpline) {
+      status = command (tmpline, &outline);
+      if (outline != NULL) free (outline);
+      if (!status && auto_break) done = TRUE;
+    }
+    p = q + 1;
+  }
+  return (status);
 }
 
+/* should skip ; surrounded by "" */
