Mail Archives: djgpp/2013/07/06/12:49:05
<rugxulo AT gmail DOT com> wrote in message
news:bf73996e-8743-4bf7-a5f6-56df4a937263 AT googlegroups DOT com...
> Just for completeness (at always seeing such annoying issues),
> here's the deal:
>
> =============================================
> (Fri Jul 05, 11:09 AM) /tmp/doydoy # cat blah.sh
> #!/bin/sh
> md5sum [hH]imem*
> sed -i~ -e '1,/BEGIN---cut-here--/d' -e '/END---cut-here--/,$d'
> himem_rp.dif
> unzip -qja Himem332.zip SOURCE/HIMEMX.ASM
> patch -l HIMEMX.ASM himem_rp.dif -o himemx.rod
> unzip -qjao himem334-unofficial-rp.zip SOURCE/HIMEMX.ASM
> diff -was HIMEMX.ASM himemx.rod
>
> (Fri Jul 05, 11:10 AM) /tmp/doydoy # blah.sh
> 7ded523745ae836452402e402f02a11b Himem332.zip
> 866e5d607f18b6bda49ab54f621d2e0f himem334-unofficial-rp.zip
> 22ae67d811af236c5496c53e383a9b2b himem_rp.dif
> patching file HIMEMX.ASM
> Files HIMEMX.ASM and himemx.rod are identical
> =============================================
>
Uh, okay...
> I don't use patch as much as diff, hence why I wasn't
> remembering the -l switch to ignore whitespace (same
> as diff -w). But yes, also source and patch must
> (apparently) match in line endings too. Instead of
> manually running dos2unix, here I just let Info-Zip
> fix that for me (-a to auto-convert).
>
> This seems unavoidable, however, as some files (e.g.
> GNU makefiles or Python or whatever) are sensitive
> to changes in whitespace and might break otherwise.
Well, I tested the patch against a fresh unzip of Japheth's 3.32.
Of course, that was prior to me posting the patch, which may have
whitespace issues after posting... I didn't test the patch after
posting. But, I don't think that's an issue or hope it's not. (?)
This could be affected by your browser or editor too.
The posted patch is against Japheth's 3.32 assembly file which
doesn't have spaces at the end-of-line (EOL) trimmed. Using it
will result in a patched version of 3.32 (to 3.34) with whitespaces
untrimmed. I chose to do that because I had hoped Japheth
would host 3.34 and his prior versions have untrimmed whitespaces.
My source in the 3.34 zip has EOL whitespaces trimmed. IIRC, it
also has one section of text realigned slightly with space padding.
Anyway, you shouldn't need the -l for patch. You can use diff -w
to remove the effects of whitespace, when comparing the patched
source (3.32->3.34) and the source in 3.34 zip. All you should
have to do is unzip Japheth's 3.32 and run patch with the diff:
patch -p0 himemx.asm himemx.dif
(Where, himemx.asm is from Japheth's 3.32 and himemx.dif is the
posted diff without the delimiting lines.)
This process was mentioned in the comp.os.msdos.programmer post:
https://groups.google.com/d/msg/comp.os.msdos.programmer/jKuJKgUXRNU/6Rkm0bwB_iYJ
Then, once you have the new asm file, run build.bat, which is also
from Japheth's 3.32.
http://www.japheth.de/Jemm.html
As mentioned in the c.o.m.d. post, I used JWasm v2.10 (4/20/2013).
http://www.japheth.de/JWasm.html
Of course, you've got a zip now with a complete source file that's
both patched and trimmed of EOL whitespace. So, I'm not sure
exactly what your post is in regards to... i.e., the patch is
completely unecessary now.
Rod Pemberton
- Raw text -