Changeset 3907
- Timestamp:
- May 12, 2005, 1:07:37 PM (21 years ago)
- Location:
- trunk/Ohana/src/opihi
- Files:
-
- 10 edited
-
cmd.basic/input.c (modified) (1 diff)
-
cmd.basic/memory.c (modified) (1 diff)
-
cmd.basic/run_for.c (modified) (1 diff)
-
cmd.basic/run_if.c (modified) (1 diff)
-
cmd.basic/run_while.c (modified) (1 diff)
-
lib.shell/MacroOps.c (modified) (1 diff)
-
lib.shell/macro_create.c (modified) (4 diffs)
-
lib.shell/opihi.c (modified) (1 diff)
-
pantasks/task.c (modified) (1 diff)
-
pantasks/task_macros.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/input.c
r2598 r3907 47 47 free (inlist.line[i]); 48 48 } 49 free (inlist.line[i]); /* note that we always alloc one extra line */ 49 50 free (inlist.line); 50 51 return (status); -
trunk/Ohana/src/opihi/cmd.basic/memory.c
r3905 r3907 13 13 return (TRUE); 14 14 } 15 if (!strncasecmp ("variables", argv[1], strlen(argv[1]))) { 16 ListVariables (); 17 return (TRUE); 18 } 19 if (!strncasecmp ("vectors", argv[1], strlen(argv[1]))) { 20 ListVectors (); 21 return (TRUE); 22 } 23 if (!strncasecmp ("buffers", argv[1], strlen(argv[1]))) { 24 PrintBuffers (0); 25 return (TRUE); 26 } 27 if (!strncasecmp ("macros", argv[1], strlen(argv[1]))) { 28 ListMacros(); 29 return (TRUE); 30 } 31 if (!strncasecmp ("commands", argv[1], strlen(argv[1]))) { 32 print_commands (stderr); 33 return (TRUE); 34 } 15 35 16 36 usage: -
trunk/Ohana/src/opihi/cmd.basic/run_for.c
r3337 r3907 51 51 } 52 52 } 53 if (ThisList == 0) ohana_memregister (input); 53 54 54 55 /* test for new macro (or other list, in the future?) */ -
trunk/Ohana/src/opihi/cmd.basic/run_if.c
r2843 r3907 61 61 input = strcreate ("end"); 62 62 } 63 if (ThisList == 0) ohana_memregister (input); 63 64 64 65 stripwhite (input); -
trunk/Ohana/src/opihi/cmd.basic/run_while.c
r2598 r3907 48 48 } 49 49 } 50 if (ThisList == 0) ohana_memregister (input); 50 51 51 52 /* test for new macro (or other list, in the future?) */ -
trunk/Ohana/src/opihi/lib.shell/MacroOps.c
r2598 r3907 56 56 } 57 57 return; 58 } 59 60 void ListMacros () { 61 int i; 62 for (i = 0; i < Nmacros; i++) { 63 fprintf (stderr, "%s\n", macros[i].name); 64 } 58 65 } 59 66 -
trunk/Ohana/src/opihi/lib.shell/macro_create.c
r2598 r3907 46 46 AddCommand (cmd); 47 47 free (cmd); 48 49 48 macro = NewMacro (argv[1]); 50 49 } else { /**** Old Macro ****/ … … 58 57 NLINES = D_NLINES; 59 58 for (i = 0; i < macro[0].Nlines; i++) free (macro[0].line[i]); 60 ALLOCATE (macro[0].line, char *, NLINES);59 REALLOCATE (macro[0].line, char *, NLINES); 61 60 62 61 /* read in macro … … 79 78 continue; 80 79 } 80 if (ThisList == 0) ohana_memregister (input); 81 81 82 82 if ((ThisList > 0) && (input == (char *) NULL)) { … … 96 96 free (input); 97 97 macro[0].Nlines = i; 98 if (macro[0].Nlines == 0) 99 i = 1; 98 if (macro[0].Nlines == 0) i = 1; 100 99 REALLOCATE (macro[0].line, char *, i); 101 100 return (TRUE); -
trunk/Ohana/src/opihi/lib.shell/opihi.c
r3905 r3907 43 43 add_history (line); 44 44 append_history (1, history); 45 free (line);46 45 free (list); 47 46 } 47 free (line); 48 48 line = (char *) NULL; 49 49 } -
trunk/Ohana/src/opihi/pantasks/task.c
r2598 r3907 58 58 input = strcreate ("end"); 59 59 } 60 if (ThisList == 0) ohana_memregister (input); 60 61 61 62 stripwhite (input); -
trunk/Ohana/src/opihi/pantasks/task_macros.c
r2598 r3907 126 126 input = strcreate ("end"); 127 127 } 128 if (ThisList == 0) ohana_memregister (input); 128 129 129 130 stripwhite (input);
Note:
See TracChangeset
for help on using the changeset viewer.
