www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/05/01/19:57:40

From: Mark Bergman <bergman AT Panix DOT Com>
Subject: names2dos The Next Generation
To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP)
Date: Sat, 1 May 1993 19:52:50 -0400 (EDT)

Preface:
	Stepehn Turnbull (turnbull DOT 1 AT osu DOT edu) was having trouble using
	names2dos on an Ultrix machine. That problem was resolved, but
	the issue of the declining speed of names2dos came up. I've
	also covered the inefficiency problem with Osman F Buyukisik
	(ae1181t AT stnfor DOT ae DOT ge DOT com).

	Stephen suggested using djtarx as a starting point for a new
	version, and I agree.

Yep. It's too slow right now. The biggest bottleneck is the (large) awk
script that generates MS-DOS compliant filenames and maintains a table
to ensure that the new names are unique. There are other limitations,
particularly in the area of the sed pattern files, that will show up
soon. My goal is to:

	1) Re-write the awk script into C, re-distribute the
	   script+C code and see if the preformance issue is
	   resolved.

	2) Re-write the entire names2dos script into C, and
	   add code to allow it to operate directly on tar files.  This
	   means building a data structure representation of the
	   directory structure in the tar file, making the changes,
	   re-computing the checksums for each changed file in the tar
	   file.

	   I'd also like to see the C version operate on directory
	   trees, just as the script does now. I'd look at the code for
	   GNU "find" as a starting point.

As I see it, part 1 is the natural division between the current
sh/awk/sed/find script and a standalone, OS independant C coded
executable.

Fun, no? In the final form, the program would be portable C code that
would include options (a text-file specification of filename types) for
the "allowed" filename format (256 char Unix filenames, 14 char Unix
char filenames, to 8.3 char DOS filenames, etc.) This code could then
be run directly on the tar file on the machine that the code is being
ported to. Thus, shell access on a Unix machine would not be needed.

Any suggestions, code fragments or help would be gratefully
appreciated. If someone wants to take on this project, singularly or
collectively, you have my blessing and assistance.

----
Mark Bergman    (Biker, Stagehand, (former) Unix user support grunt)
718-855-9148

bergman AT panix DOT com
{cmcl2,uunet}!panix!bergman

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019