From: cat AT animal DOT u-net DOT com Subject: Re: File splitter or disassemble Organization: none Newsgroups: comp.os.msdos.djgpp NNTP-Posting-Host: host1.lowtech.org X-Original-NNTP-Posting-Host: host1.lowtech.org Message-ID: <39d491e4$1@news.gemsoft.net> Date: 29 Sep 2000 13:58:12 GMT X-Trace: 29 Sep 2000 13:58:12 GMT, host1.lowtech.org Lines: 79 X-Complaints-To: abuse AT gemsoft DOT net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com If you want a file splitter running on W95 then consider downloading the D-shell from http://www.d4maths.co.uk/iskra.exe. You can also read how to install the D-shell at http://www.d4maths.co.uk/mirage/install.htm The D-shell is an implementation of APL with PERL and shell like features and it includes for the preparation and extraction of UNIX style tar files amongst other features. There is a script to split files somewhere as a .d4f file. I certainly used it in the past to move DJGPP between machines on four floppies. There is a function called Z<-BSIZE SPLIT F where BSIZE is a block size (like 1.3Mb) and F is a file.ext and it creates file_00.ext file_01.ext file_02.ext. the numbers go up in hex. Download the interpretor, cut the function out of this message, save it to a file called split.df, the type the command #copy "split.df" 1200 SPLIT "xxxx.txt" and you will get about 7 files for 8 Mb. Z<-NB FSPLIT F;CNT;DIR;DST;FN;SZ;I;J;K;RP;FDIGIT;T |Split a file into directory DIR NB<-250 #ifndef "NB" | MAX number of blocks FDIGIT<-"123456789ABCDEF" FN<-FN_SPLIT F & K<-FNi"." & RP<-I<-0 ->(0 #ne Z<-F #open 3 1)/XX SZ<-#fsize 3 1024 "size = ",zSZ AA: DST<-DIR,((6fK)tFN),"_",FDIGIT[I],KdFN ->(0 #ne Z<-DST #open 4 3)/XX CNT<-0 "writing ", DST BB: T<-$VA[3 0 1024, RP] & ->(0=rT)/XX $VA[4 0,(rT),_1]<-T RP++ & CNT++ & ->(CNT < NB)/BB Z<-#close 4 I++ & ->AA XX: Z<-#close To join the files again you need to construct the DOS copy command which will be copy f1+f2+f3... dst. The D-shell would do this as follows DO "cp /b ",( 1 d ,"+",Z[#sort Z<-#files"xxxx_*.txt"])," dst" Needless to say splitting files is a trivial job. Instead of filling up my disk with RHIDE I simply use functions like MK_MAKE to create make files and a cloned 'vi' to edit C-sources. The fake vi in the D-shell can follow links in html files and follow #include links in C-source code, not to mention a possibility of directly editing gzipped files and working transparently on DOS or UNIX files. The fact is that there is already a split utility shipped with DJGPP. That is about 50k or so. The above script is about 500 bytes. Also the D-shell comes with 'info', 'find', 'awk' and 'grep' clones. All of these are rambling scripts of a few hundred bytes or so. And just in case you want to edit files in hebrew or any other language get the unix keytabs files and the D-shell editor can read these and set the keyboard right. Linux users can avail themselves of the termcap/terminfo capeabilities. Tony Goddard http://www.d4maths.co.uk