Changeset 31590
- Timestamp:
- May 31, 2011, 8:03:14 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/Ohana/src/opihi
- Files:
-
- 12 edited
-
cmd.basic/cd.c (modified) (2 diffs)
-
cmd.basic/list.c (modified) (2 diffs)
-
cmd.basic/run_for.c (modified) (2 diffs)
-
cmd.basic/run_if.c (modified) (2 diffs)
-
cmd.basic/run_while.c (modified) (2 diffs)
-
include/shell.h (modified) (1 diff)
-
lib.shell/macro_create.c (modified) (2 diffs)
-
lib.shell/opihi.c (modified) (2 diffs)
-
lib.shell/string.c (modified) (1 diff)
-
pantasks/client_shell.c (modified) (2 diffs)
-
pantasks/task.c (modified) (2 diffs)
-
pantasks/task_macros.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/cd.c
r27435 r31590 24 24 } 25 25 if (VERBOSE) gprint (GP_LOG, "cwd: %s\n", cwd); 26 ohana_memregister (cwd); 27 free (cwd); 26 real_free (cwd); 28 27 return (TRUE); 29 28 } … … 62 61 free (var); 63 62 } 64 ohana_memregister (cwd); 65 free (cwd); 63 real_free (cwd); 66 64 return (TRUE); 67 65 -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/list.c
r27587 r31590 223 223 /* get the next line (from correct place) */ 224 224 if (ThisList == 0) { 225 input = readline (prompt);225 input = opihi_readline (prompt); 226 226 } else { 227 227 input = get_next_listentry (ThisList); … … 236 236 input = strcreate ("end"); 237 237 } 238 if (ThisList == 0) ohana_memregister (input);239 238 240 239 stripwhite (input); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_for.c
r27798 r31590 48 48 /* get the next line (from correct place) */ 49 49 if (ThisList == 0) 50 input = readline (prompt);50 input = opihi_readline (prompt); 51 51 else 52 52 input = get_next_listentry (ThisList); … … 67 67 } 68 68 } 69 if (ThisList == 0) ohana_memregister (input);70 69 71 70 /* test for new macro (or other list, in the future?) */ -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_if.c
r23583 r31590 66 66 /* get the next line (from correct place) */ 67 67 if (ThisList == 0) { 68 input = readline (prompt);68 input = opihi_readline (prompt); 69 69 } else { 70 70 input = get_next_listentry (ThisList); … … 79 79 input = strcreate ("end"); 80 80 } 81 if (ThisList == 0) ohana_memregister (input);82 81 83 82 stripwhite (input); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/cmd.basic/run_while.c
r27491 r31590 25 25 /* get the next line (from correct place) */ 26 26 if (ThisList == 0) 27 input = readline (prompt);27 input = opihi_readline (prompt); 28 28 else 29 29 input = get_next_listentry (ThisList); … … 44 44 } 45 45 } 46 if (ThisList == 0) ohana_memregister (input);47 46 48 47 /* test for new macro (or other list, in the future?) */ -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/include/shell.h
r30614 r31590 158 158 char *strip_version PROTO((char *input)); 159 159 160 // wrap readline in ohana mem functions: 161 char *opihi_readline PROTO((char *prompt)); 162 160 163 /* gprint functions */ 161 164 void gprintInit PROTO((void)); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/macro_create.c
r16444 r31590 68 68 69 69 /* get the next line (from correct place) */ 70 if (ThisList == 0) 71 input = readline (prompt);72 else70 if (ThisList == 0) { 71 input = opihi_readline (prompt); 72 } else { 73 73 input = get_next_listentry (ThisList); 74 } 74 75 75 76 if ((ThisList == 0) && (input == (char *) NULL)) { … … 77 78 continue; 78 79 } 79 if (ThisList == 0) ohana_memregister (input);80 80 81 81 if ((ThisList > 0) && (input == (char *) NULL)) { -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/opihi.c
r16473 r31590 19 19 if (Nbad == 10) exit (20); 20 20 21 line = readline (prompt);21 line = opihi_readline (prompt); 22 22 23 23 if (line == NULL) { … … 36 36 37 37 Nbad = 0; 38 ohana_memregister (line);39 38 40 39 stripwhite (line); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/lib.shell/string.c
r15878 r31590 276 276 } 277 277 278 char *opihi_readline (char *prompt) { 279 280 # ifdef OHANA_MEMORY 281 char *raw = readline (prompt); 282 char *line = strcreate (raw); 283 real_free (raw); 284 return line; 285 # else 286 char *line = readline (prompt); 287 return line; 288 # endif 289 } 290 278 291 /* replace all instances of \A with A in line */ 279 292 void interpolate_slash (char *line) { -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/client_shell.c
r8548 r31590 22 22 if (Nbad == 10) exit (3); 23 23 24 line = readline (prompt);24 line = opihi_readline (prompt); 25 25 26 26 if (line == NULL) { … … 37 37 } 38 38 Nbad = 0; 39 ohana_memregister (line);40 39 41 40 stripwhite (line); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task.c
r23530 r31590 34 34 /* get the next line (from correct place) */ 35 35 if (ThisList == 0) 36 input = readline (prompt);36 input = opihi_readline (prompt); 37 37 else 38 38 input = get_next_listentry (ThisList); … … 46 46 input = strcreate ("end"); 47 47 } 48 if (ThisList == 0) ohana_memregister (input);49 48 50 49 stripwhite (input); -
branches/eam_branches/ipp-20110505/Ohana/src/opihi/pantasks/task_macros.c
r23530 r31590 112 112 /* get the next line (from correct place) */ 113 113 if (ThisList == 0) 114 input = readline (prompt);114 input = opihi_readline (prompt); 115 115 else 116 116 input = get_next_listentry (ThisList); … … 124 124 input = strcreate ("end"); 125 125 } 126 if (ThisList == 0) ohana_memregister (input);127 126 128 127 stripwhite (input);
Note:
See TracChangeset
for help on using the changeset viewer.
