diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-12-03 13:42:25 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-12-03 13:42:25 -0500 |
commit | 227f982e3db958cbe3c649e8ee7b2bc099250b81 (patch) | |
tree | 7459231fb3ab89da5a428765fa447539dbec344f /make_cmd.c | |
parent | 6e70dbff655716a31da3871cb8176b21aaef806c (diff) | |
download | bash-227f982e3db958cbe3c649e8ee7b2bc099250b81.tar.gz |
commit bash-20050120 snapshot
Diffstat (limited to 'make_cmd.c')
-rw-r--r-- | make_cmd.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -77,15 +77,23 @@ cmd_init () } WORD_DESC * +alloc_word_desc () +{ + WORD_DESC *temp; + + ocache_alloc (wdcache, WORD_DESC, temp); + temp->flags = 0; + temp->word = 0; + return temp; +} + +WORD_DESC * make_bare_word (string) const char *string; { WORD_DESC *temp; -#if 0 - temp = (WORD_DESC *)xmalloc (sizeof (WORD_DESC)); -#else - ocache_alloc (wdcache, WORD_DESC, temp); -#endif + + temp = alloc_word_desc (); if (*string) temp->word = savestring (string); @@ -95,7 +103,6 @@ make_bare_word (string) temp->word[0] = '\0'; } - temp->flags = 0; return (temp); } @@ -161,11 +168,8 @@ make_word_list (word, wlink) { WORD_LIST *temp; -#if 0 - temp = (WORD_LIST *)xmalloc (sizeof (WORD_LIST)); -#else ocache_alloc (wlcache, WORD_LIST, temp); -#endif + temp->word = word; temp->next = wlink; return (temp); |