Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm Sender: cygwin-owner@sourceware.cygnus.com Delivered-To: mailing list cygwin@sourceware.cygnus.com Date: Thu, 29 Apr 99 18:13:05 PDT From: pvhp@forte.com (Peter Prymmer) Message-Id: <9904300113.AA03994@forte.com> To: cygwin@sourceware.cygnus.com, ppt@perl.com, rich@alcor.concordia.ca, textutils-bugs@gnu.ai.mit.edu Subject: DOSish patch to ppt split With the following patch I was able to get Rich Lafferty's split to split up a 3.5 meg installshield .EXE file into pieces tiny enough to copy onto floppies. I was then able to reconstruct the file with: copy /b xaaa + xaab + ... ISHFILE.EXE and was able to run the resultant .EXE on NT 4 SP4 (In other words everything worked). Interestingly enough, the split.exe that comes with cygwin B20.1 appears to have the same text mode "bug" that the original perl version had, inasmuch as for this particular binary file that I've done my testing with either program (split.exe or split.lafferty) stopped after having only produced a 1017 byte xaaa file. I may not be thinking carefully enough but I am having a hard time imagining how this binmode patch would hurt other things including the splitting of text files. To the cygwin folks: I haven't tracked down the source to split.c but I think you want a couple of freopen(FOO,"b");'s or somesuch in there. Hope this helps. Peter Prymmer --- split.lafferty Thu Apr 29 17:15:18 1999 +++ split.plx Thu Apr 29 17:15:46 1999 @@ -58,7 +58,7 @@ # MS-DOS: $curname = "$prefix." . $curext; $curname = $prefix . $curext; open (FH, ">$curname") or die "$me: Can't open $curname: $!\n"; - + binmode(FH); return *FH; } @@ -92,7 +92,7 @@ my $prefix = ($ARGV[1] ? "$ARGV[1]" : "x"); open (INFILE, "$infile") || die "$me: Can't open $infile: $!\n"; - +binmode(INFILE); ## Byte operations. if ($opt{b} and (! $opt{p}) and (! $opt{l}) and (! $opt{"?"})) { End of Patch. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com