diff options
author | Rob Landley | 2006-08-03 15:41:12 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-03 15:41:12 +0000 |
commit | d921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /shell/lash.c | |
parent | 6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff) | |
download | busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz |
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
Diffstat (limited to 'shell/lash.c')
-rw-r--r-- | shell/lash.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shell/lash.c b/shell/lash.c index 92c24d1..eae949e 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -710,7 +710,7 @@ static char * strsep_space( char *string, int * ix) return NULL; } - token = bb_xstrndup(string, *ix); + token = xstrndup(string, *ix); return token; } @@ -751,7 +751,7 @@ static int expand_arguments(char *command) /* We need a clean copy, so strsep can mess up the copy while * we write stuff into the original (in a minute) */ - cmd = cmd_copy = bb_xstrdup(command); + cmd = cmd_copy = xstrdup(command); *command = '\0'; for (ix = 0, tmpcmd = cmd; (tmpcmd = strsep_space(cmd, &ix)) != NULL; cmd += ix, ix=0) { @@ -1123,10 +1123,10 @@ static int parse_command(char **command_ptr, struct job *job, int *inbg) prog->argv[argc_l] = NULL; if (!return_command) { - job->text = bb_xstrdup(*command_ptr); + job->text = xstrdup(*command_ptr); } else { /* This leaves any trailing spaces, which is a bit sloppy */ - job->text = bb_xstrndup(*command_ptr, return_command - *command_ptr); + job->text = xstrndup(*command_ptr, return_command - *command_ptr); } *command_ptr = return_command; @@ -1543,7 +1543,7 @@ int lash_main(int argc_l, char **argv_l) input = NULL; if (local_pending_command != 0) bb_error_msg_and_die("multiple -c arguments"); - local_pending_command = bb_xstrdup(argv[optind]); + local_pending_command = xstrdup(argv[optind]); optind++; argv = argv+optind; break; @@ -1575,7 +1575,7 @@ int lash_main(int argc_l, char **argv_l) } } else if (!local_pending_command && argv[optind]) { //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]); - input = bb_xfopen(argv[optind], "r"); + input = xfopen(argv[optind], "r"); /* be lazy, never mark this closed */ llist_add_to(&close_me_list, (void *)(long)fileno(input)); } |