Re: patch(1) max line length

2024-07-12 Thread Steffen Nurpmeso
Mouse wrote in <202407122106.raa17...@stone.rodents-montreal.org>: |>>> I note the specification does not forbid the handling of lines |>>> longer than LINE_MAX characters. |>> No, it certainly does not do that. | |Yeah; like a lot of examples, recovery from error cases is allowed to |be "ha

Re: patch(1) max line length

2024-07-12 Thread Mouse
>>> I note the specification does not forbid the handling of lines >>> longer than LINE_MAX characters. >> No, it certainly does not do that. Yeah; like a lot of examples, recovery from error cases is allowed to be "handle it as if the limit weren't there". > It is your fault to think normal rule

Re: patch(1) max line length

2024-07-12 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20240712172239.8n2tqdo2@steffen%sdaoden.eu>: |Robert Elz wrote in | <28937.1720777...@jacaranda.noi.kre.to>: ||Date:Fri, 12 Jul 2024 08:15:57 + ||From:Emmanuel Dreyfus ||Message-ID: || ||| I note the specification does not forbid

Re: patch(1) max line length

2024-07-12 Thread Steffen Nurpmeso
Robert Elz wrote in <28937.1720777...@jacaranda.noi.kre.to>: |Date:Fri, 12 Jul 2024 08:15:57 + |From:Emmanuel Dreyfus |Message-ID: | || I note the specification does not forbid the || handling of lines longer than LINE_MAX characters. | |No, it certainly

Re: patch(1) max line length

2024-07-12 Thread Robert Elz
Date:Fri, 12 Jul 2024 08:15:57 + From:Emmanuel Dreyfus Message-ID: | I note the specification does not forbid the | handling of lines longer than LINE_MAX characters. No, it certainly does not do that. However applications (at least if there's any attempt

Re: patch(1) max line length

2024-07-12 Thread Crystal Kolipe
On Fri, Jul 12, 2024 at 09:32:28AM +0700, Robert Elz wrote: > I'd also note that if you're going to change things, "long" probably > isn't really big enough, that's just 32 bits (4GiB) on many ports, > and files, and hence "lines" in files, can be much larger than that, > so all you've really done

Re: patch(1) max line length

2024-07-12 Thread Emmanuel Dreyfus
On Fri, Jul 12, 2024 at 09:32:28AM +0700, Robert Elz wrote: > While I don't object to the change (and core dumps are never good) what > you're doing is actually unspecified behaviour. Thank you for the hint. I note the specification does not forbid the handling of lines longer than LINE_MAX chara

Re: patch(1) max line length

2024-07-11 Thread Robert Elz
Date:Fri, 12 Jul 2024 01:17:57 + From:Emmanuel Dreyfus Message-ID: | I just encoutered a patch(1) limitation when using it on minified json | files from Wordpress. The lines can span more than the maximum of what | patch(1) can cope, which is INT16_MAX. He

patch(1) max line length

2024-07-11 Thread Emmanuel Dreyfus
Hello I just encoutered a patch(1) limitation when using it on minified json files from Wordpress. The lines can span more than the maximum of what patch(1) can cope, which is INT16_MAX. Here is a test for taht: jot -b A $(( 37268 / 2 )) |tr '\n' 'A' > g.txt mv g.txt g.txt.orig sed 's/A/B/' g.tx