Hello,

Versions : 

i tried M4 1.4 and M4 1.4.7 which both shows the problem
M4 1.4.4 do not show the problem, but i cannot see a comment, that something
is fixed in this area

Preprocess a file with the following content
'a' 
and then some 9000 x "0x0d 0x0a" 

Then the output is very similar to the input, except that on all offsets
divisible by 1024 (0x400) the sequence 0d0a changes to
0d0d0a.

Note : 

sourcefile 
offset 1023 : 0D
offset 1024 : 0A
offset 1025 : 0D
....

TargetFile
offset 1023 : 0D
offset 1024 : 0D (!!)
offset 1025 : 0A

When the first 'a' is replaced by, nothing or by 'aa' then the problem does
not occur.

i guess that there is a buffer size of 1024 used in M4 for the output buffer
and when the first char in the
output buffer is 0A then 0D0A is written. 

I attach such a testfile and the output generated from M4.

"a2" is the input file
"a2.out" is the output file.

generated with : m4 a2 > a2.out

Is there any version with this bug fixed and where can i download this
version?


best regards/Mit freundlichen Grüßen
Mario Semo




Attachment: a2.out
Description: Binary data

Attachment: a2
Description: Binary data

_______________________________________________
Bug-m4 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-m4

Reply via email to