This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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";
 ## 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