Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/cd.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/cd.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/cd.c	(revision 31590)
@@ -24,6 +24,5 @@
     }
     if (VERBOSE) gprint (GP_LOG, "cwd: %s\n", cwd);
-    ohana_memregister (cwd);
-    free (cwd);
+    real_free (cwd);
     return (TRUE);
   }
@@ -62,6 +61,5 @@
       free (var);
   }
-  ohana_memregister (cwd);
-  free (cwd);
+  real_free (cwd);
   return (TRUE);
   
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/list.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/list.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/list.c	(revision 31590)
@@ -223,5 +223,5 @@
     /* get the next line (from correct place) */
     if (ThisList == 0) {
-      input = readline (prompt);
+      input = opihi_readline (prompt);
     } else {
       input = get_next_listentry (ThisList);
@@ -236,5 +236,4 @@
       input = strcreate ("end");
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     stripwhite (input);
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_for.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_for.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_for.c	(revision 31590)
@@ -48,5 +48,5 @@
     /* get the next line (from correct place) */
     if (ThisList == 0) 
-      input = readline (prompt);
+      input = opihi_readline (prompt);
     else 
       input = get_next_listentry (ThisList);
@@ -67,5 +67,4 @@
       }	
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     /* test for new macro (or other list, in the future?) */
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_if.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_if.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_if.c	(revision 31590)
@@ -66,5 +66,5 @@
     /* get the next line (from correct place) */
     if (ThisList == 0) {
-      input = readline (prompt);
+      input = opihi_readline (prompt);
     } else {
       input = get_next_listentry (ThisList);
@@ -79,5 +79,4 @@
       input = strcreate ("end");
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     stripwhite (input);
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_while.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_while.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_while.c	(revision 31590)
@@ -25,5 +25,5 @@
     /* get the next line (from correct place) */
     if (ThisList == 0) 
-      input = readline (prompt);
+      input = opihi_readline (prompt);
     else 
       input = get_next_listentry (ThisList);
@@ -44,5 +44,4 @@
       }	
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     /* test for new macro (or other list, in the future?) */
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/shell.h
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/shell.h	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/shell.h	(revision 31590)
@@ -158,4 +158,7 @@
 char 	     *strip_version 		PROTO((char *input));
 
+// wrap readline in ohana mem functions:
+char         *opihi_readline            PROTO((char *prompt));
+
 /* gprint functions */
 void          gprintInit      		PROTO((void));
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/macro_create.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/macro_create.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/macro_create.c	(revision 31590)
@@ -68,8 +68,9 @@
 
     /* get the next line (from correct place) */
-    if (ThisList == 0) 
-      input = readline (prompt);
-    else 
+    if (ThisList == 0) {
+      input = opihi_readline (prompt);
+    } else {
       input = get_next_listentry (ThisList);
+    }
 
     if ((ThisList == 0) && (input == (char *) NULL)) {
@@ -77,5 +78,4 @@
       continue;
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     if ((ThisList > 0) && (input == (char *) NULL)) {
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/opihi.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/opihi.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/opihi.c	(revision 31590)
@@ -19,5 +19,5 @@
     if (Nbad == 10) exit (20);
 
-    line = readline (prompt);
+    line = opihi_readline (prompt);
 
     if (line == NULL) { 
@@ -36,5 +36,4 @@
 
     Nbad = 0;
-    ohana_memregister (line);
 
     stripwhite (line);
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/string.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/string.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/string.c	(revision 31590)
@@ -276,4 +276,17 @@
 }
 
+char *opihi_readline (char *prompt) {
+
+# ifdef OHANA_MEMORY
+    char *raw = readline (prompt);
+    char *line = strcreate (raw);
+    real_free (raw);
+    return line;
+# else
+    char *line = readline (prompt);
+    return line;
+# endif
+}
+
 /* replace all instances of \A with A in line */
 void interpolate_slash (char *line) {
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/client_shell.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/client_shell.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/client_shell.c	(revision 31590)
@@ -22,5 +22,5 @@
     if (Nbad == 10) exit (3);
 
-    line = readline (prompt);
+    line = opihi_readline (prompt);
 
     if (line == NULL) { 
@@ -37,5 +37,4 @@
     }
     Nbad = 0;
-    ohana_memregister (line);
 
     stripwhite (line);
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task.c	(revision 31590)
@@ -34,5 +34,5 @@
     /* get the next line (from correct place) */
     if (ThisList == 0) 
-      input = readline (prompt);
+      input = opihi_readline (prompt);
     else 
       input = get_next_listentry (ThisList);
@@ -46,5 +46,4 @@
       input = strcreate ("end");
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     stripwhite (input);
Index: /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task_macros.c
===================================================================
--- /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task_macros.c	(revision 31589)
+++ /branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task_macros.c	(revision 31590)
@@ -112,5 +112,5 @@
     /* get the next line (from correct place) */
     if (ThisList == 0) 
-      input = readline (prompt);
+      input = opihi_readline (prompt);
     else 
       input = get_next_listentry (ThisList);
@@ -124,5 +124,4 @@
       input = strcreate ("end");
     }
-    if (ThisList == 0) ohana_memregister (input);
 
     stripwhite (input);
