[BusyBox] new command line munging

Matt Kraai kraai at alumni.carnegiemellon.edu
Fri Dec 15 00:29:49 UTC 2000


On Thu, Dec 14, 2000 at 10:00:59AM -0700, Erik Andersen wrote:
> On Wed Dec 13, 2000 at 10:32:51PM -0800, Matt Kraai wrote:
> > The appended patch shrinks command line munging.  It results in a
> > decent size difference.  However, it is somewhat non-obvious to me
> > (I had to draw a picture to figure out if it was correct) so I
> > wanted to give people the chance to object before I committed it.
> > Assuming that it is OK, I'll probably split it into a separate
> > function so that can also be used by sh.c when calling applets
> > directly.
> 
> I see.  Yes.  This works and is much nicer then my looping version.
> Neat!  Writing this routing took me a bunch of thinking about how 
> to do this without any temporary storage, and not messing up memory,
> but still zeroing out the leftovers when the dest if larger then the 
> source.  I like how you handled that (and saves ~100bytes... :-)  By 
> all means, do work up a standalone function for this.

Upon further inspection, I'll need to write another function for
sh, as it is going to need to cram the subcommand into the space
of the original command line.  This could be fun.  I'll go ahead
and commit just the busybox.c update for now.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20001214/10a12c21/attachment.pgp 


More information about the busybox mailing list