Path: utzoo!attcan!uunet!cbmvax!sterling From: sterling@cbmvax.UUCP (Rick Sterling QA) Newsgroups: comp.sys.amiga Subject: Re: Atalk III 1.0e Message-ID: <5707@cbmvax.UUCP> Date: 17 Jan 89 16:48:06 GMT References: <470@infohh.rmi.de> <6818@killer.DALLAS.TX.US> Reply-To: sterling@cbmvax.UUCP (Rick Sterling QA) Organization: Commodore Technology, West Chester, PA Lines: 51 In article <6818@killer.DALLAS.TX.US> elg@killer.DALLAS.TX.US (Eric Green) writes: > in article <470@infohh.rmi.de>, shimoda@infohh.rmi.de (Markus Schmidt) says: > > If the uploader handled the file correct there should be no problem > > with chopping. According to Chuck Forsberg you may pad either with NUL > > or CMP_EOF, and there is no reason for not using CMP_EOF when the last > > byte of the file is NUL. > > Of course the receiver may only chop those PADs that match the last byte > > in the transfer and not mixed 00 and 1A. > > Let's say that your file length is an exact multiple of 128 bytes. > Further, let's say that your file ends with fifteen NUL characters. > Xmodem will not create an extra empty padding block. Thus an ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > autochopper will chop off 15 bytes of your file. > > That's just one example of why Xmodem is brain-dead for use with > non-CP/M systems. I personally use Batch Ymodem or Zmodem whenever > possible, just to bypass those problems. > > -- > Eric Lee Green ..!{ames,decwrl,mit-eddie,osu-cis}!killer!elg > Snail Mail P.O. Box 92191 Lafayette, LA 70509 > Netter A: In Hell they run VMS. > Netter B: No. In Hell, they run MS-DOS. And you only get 256k. According to my reading of the protocol it should create the extra padding block with ^Z's ... This is how I implemented it in several term progs in the past.... 1. If file is a multiple of 128 bytes and does not end with $00 or $1A send file as is. 2. If file is a multiple of 128 bytes and ends with $00 then pad extra block with $1A 3. If file is a multiple of 128 bytes and ends with $1A then pad extra block with $00 4. If file is not multiple of 128 bytes and ends with $00 then pad to end of block with $1A 5. If file is not multiple of 128 bytes and ends with $1A then pad to end of block with $00 6. If file is not a multiple of 128 bytes and does not end with $00 or $1A then pad to end of block with $1A No 'munged' files ;-) - Rick - -- ============================================================================= Rick Sterling COMMODORE AMIGA TEST ENGINEERING N2CGI UUCP {allegra,rutgers}!cbmvax!sterling =============================================================================