Changeset 3907 for trunk/Ohana/src/opihi/lib.shell/macro_create.c
- Timestamp:
- May 12, 2005, 1:07:37 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/macro_create.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.
