Date: Thu, 8 Aug 1996 00:28:54 +0000 () From: James Raynard <fqueries@jraynard.demon.co.uk> To: Don Yuniskis <dgy@rtd.com> Cc: questions@freebsd.org Subject: Re: perhaps i am just stupid. Message-ID: <199608080028.AAA05336@jraynard.demon.co.uk> In-Reply-To: <199608071139.EAA17578@seagull.rtd.com> from "Don Yuniskis" at Aug 7, 96 04:39:13 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > So, Why waste time doing both.. a Dos based cksum compatiable with
> > FreeBSD's cksum's output as well as a kludge'y batch file!
> > It would be just as easy to whip up a dos based program that
> > read the *.sum files and compared them to the files on the fly!
>
> I would advocate *against* modifying the code for this. Put that
> functionality into a .BAT file wrapper. This allows someone
> already knowledgable in cksum(1) to modify the BAT file without
> having to learn some bogus *new* MyCksum program.
I don't like the batch file idea at all. And assuming that users
will FTP down the files in alphabetical order (which I think you
mentioned in another post) is just asking for trouble.
> Also cuts down
> on the maintenance of yet another piece of software
But we've already introduced more maintenance work - someone has
to generate these checksums every time a new release comes out.
This program shouldn't need much maintenance - all it will need for
each release is a config file that tells it what distributions are
available and which files are in each one (in fact, I believe that's
what the *.inf files in 2.1.5 do).
> (and, is more
> in tune with the UNIX philosophy of building with existing tools).
If we were talking about a Unix environment you would have my 101%
agreement. Unfortunately, DOS was designed on the philosophy that
a program has to do everything itself; the "shell" is practically
useless for anything more than launching applications. As for the
OS, well, why do so many DOS programmers talk directly to the
hardware?
> It hardly seems worth any "performance increase" to replace DOS's
> batch file interpretter with hardcoded system("cksum.exe")
You don't have to call system() - just hack cksum's command-line
handling so it reads the names from a file instead and sorts them into
alphabetic order. Put #ifdef MSDOS/#endif around this if it makes you
happier :-)
(BTW what's the max length of a DOS command line? The bin.* files
in 2.1.0 are 6 chars long, and there's 82 of them, plus a space
between each one - that's getting on for 600 chars by my reckoning).
Once you've done that, then adding a couple of lines to read in
a number from a file and compare it to the number you first thought
of is trivial.
I do understand why you want to do this in as Unix-like a way as
possible, but I don't think it's workable. Sorry.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608080028.AAA05336>
