From owner-freebsd-questions Wed Aug 7 17:52:54 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA21862 for questions-outgoing; Wed, 7 Aug 1996 17:52:54 -0700 (PDT) Received: from relay-4.mail.demon.net (relay-4.mail.demon.net [158.152.1.108]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id RAA21844 for ; Wed, 7 Aug 1996 17:52:51 -0700 (PDT) Received: from post.demon.co.uk ([158.152.1.72]) by relay-4.mail.demon.net id aa10599; 8 Aug 96 0:52 GMT Received: from jraynard.demon.co.uk ([158.152.42.77]) by relay-3.mail.demon.net id aa14561; 8 Aug 96 1:51 +0100 Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.7.5/8.6.12) id AAA05336; Thu, 8 Aug 1996 00:28:54 GMT From: James Raynard Message-Id: <199608080028.AAA05336@jraynard.demon.co.uk> Subject: Re: perhaps i am just stupid. To: Don Yuniskis Date: Thu, 8 Aug 1996 00:28:54 +0000 () Cc: questions@freebsd.org In-Reply-To: <199608071139.EAA17578@seagull.rtd.com> from "Don Yuniskis" at Aug 7, 96 04:39:13 am X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > 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.