[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Length of command line in Xy4DOS



Reply to note from Wolfgang Bechstein  Wed, 18
Mar 1998 23:30:20 +0900

-> I downloaded all 800 bytes of this toot sweet (what a welcome
-> change from all the "10 megabytes before breakfast" stuff out
-> there on the web), gave it a brief whirl, and so far, it works
-> beautifully. It's just what the doctor ordered. Thanks very
-> much, sir!

You're welcome!

-> Incidentally, I had a quick peek at the program, but XPL
-> toddler that I am, I can't even begin to grasp how it works its
-> magic.)

In plain English, it's a 5-level procedure:
 1) Search for the first 10 characters of the string-to-replace.
 2) If found, search for the last 10 characters of same.
 3) If found, DeFine the block and compare its length to that of
   the string-to-replace.
 4) If the lengths are the same, see if the DeFine block is
   the same as the string-to-replace.
 5) If they're the same, delete the DF block and substitute the
   replacement string.

It keeps doing that until steps 1 or 2 produce a "not found" error;
then it quits.

But whoa! Looking at it again, I see there's a dumb error in the
case-absolute procedure! (I told you I didn't use this very often!)
Better fix that! Come to think of it, I can increase overall
robustness by halving the 10-char test to 5 and adding some code to
check for repetitive char. sequences at the beginning & end of the
string-to-replace. Oy! OK -- done.

So, Wolfgang, Alan, et al., please download those 800 bytes (now up
to 900) one more time. Use the new version, scrap the old! The
URL, again, is:

 http://users.datarealm.com/ammaze/xy/BIGCHG.ZIP

--------------
Carl Distefano
CLDistefano@xxxxxxxx
http://users.datarealm.com/xywwweb/