delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Subject: | RE: Problem with the dos2unix command |
MIME-Version: | 1.0 |
Date: | Fri, 19 Oct 2007 12:27:59 +0200 |
Message-ID: | <AB5E58B87EB73C46A38073D8F459F11335B8E2@dataspheresrv01> |
In-Reply-To: | <4716E9E2.9030509@cwilson.fastmail.fm> |
From: | "Patrick Monnerat" <Patrick DOT Monnerat AT datasphere DOT ch> |
To: | <cygwin AT cygwin DOT com> |
X-Virus-Status: | Clean |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
------_=_NextPart_001_01C8123A.B8E78B93 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =20 Charles Wilson wrote: > If someone were to submit a patch to add an optional, "non-greedy" mode to dos2unix it would be thoughtfully considered... So here is it! It adds the following new options to conv, dos2unix and unix2dos: _ --full/--eol: in full mode (default), it behaves as ever. In eol mode, all characters that are not part of the source endline (regarding the conversion type) are not processed. _ --no-check-format/--check-format: in check-format mode, do not convert files that have their first line already ending in the desired type. This does not work for stdin. Default is --no-check-format (behaves as ever). I hope you will find it useful Regards Patrick ------_=_NextPart_001_01C8123A.B8E78B93 Content-Type: application/octet-stream; name="cygutils-1.3.2-newconvoptions.patch" Content-Transfer-Encoding: base64 Content-Description: cygutils-1.3.2-newconvoptions.patch Content-Disposition: attachment; filename="cygutils-1.3.2-newconvoptions.patch" ZGlmZiAtTmF1ciBjeWd1dGlscy0xLjMuMi5vcmlnL3NyYy9jb252L2NvbnYu YyBjeWd1dGlscy0xLjMuMi5uZXcvc3JjL2NvbnYvY29udi5jCi0tLSBjeWd1 dGlscy0xLjMuMi5vcmlnL3NyYy9jb252L2NvbnYuYwkyMDA1LTAyLTA2IDE5 OjUyOjI1LjAwMDAwMDAwMCArMDEwMAorKysgY3lndXRpbHMtMS4zLjIubmV3 L3NyYy9jb252L2NvbnYuYwkyMDA3LTEwLTE5IDExOjUxOjU1LjgzMDE1OTEw MCArMDIwMApAQCAtNjIsMTAgKzYyLDE4IEBACiAjZGVmaW5lIFNNX1NBRkUg ICAgICAgICAwCiAjZGVmaW5lIFNNX0ZPUkNFICAgICAgICAxCiAKKyNkZWZp bmUgQ01fRlVMTCAgICAgICAgIDAKKyNkZWZpbmUgQ01fRU9MICAgICAgICAg IDEKKworI2RlZmluZSBGQ19OT0NIRUNLICAgICAgMAorI2RlZmluZSBGQ19D SEVDSyAgICAgICAgMQorCiB0eXBlZGVmIHN0cnVjdCBPcHRfIHsKICAgY2hh ciAqIHByb2duYW1lOwogICBpbnQgICAgQ29udlR5cGU7CiAgIGludCAgICBT YWZlTW9kZTsKKyAgaW50ICAgIENvbnZNb2RlOworICBpbnQgICAgRm10Q2hl Y2s7CiB9IE9wdDsKIAogc3RhdGljIHZvaWQgcHJpbnRUb3BEZXNjcmlwdGlv bihGSUxFICogZiwgY2hhciAqIG5hbWUpOwpAQCAtODYsMTMgKzk0LDE5IEBA CiAgIE9wdCBvcHRzID0gewogICAgIE5VTEwsCiAgICAgQ1RfQVVUTywKLSAg ICBTTV9TQUZFCisgICAgU01fU0FGRSwKKyAgICBDTV9GVUxMLAorICAgIEZD X05PQ0hFQ0sKICAgfTsKICAgaW50IHNhZmVGbGFnID0gMDsKICAgaW50IGZv cmNlRmxhZyA9IDA7CiAgIGludCB1MmRGbGFnID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ZWFuRXhpdChPcHQgb3B0cywgRklMRSAqIGluLCBGSUxFICogb3V0 LCBjaGFyICogdGVtcEZuKQoreworICBpbnQgZXJyID0gMDsKKworICBpZiAo ZmNsb3NlKGluKSA8IDApIHsKKyAgICBwZXJyb3Iob3B0cy5wcm9nbmFtZSk7 CisgICAgZXJyID0gMTsKKyAgfQorICBpZiAoZmNsb3NlKG91dCkgPCAwKSB7 CisgICAgaWYgKCFlcnIpCisgICAgICBwZXJyb3Iob3B0cy5wcm9nbmFtZSk7 CisgICAgZXJyID0gMTsKKyAgfQorICBpZiAocmVtb3ZlKHRlbXBGbikgPCAw KSB7CisgICAgaWYgKCFlcnIpCisgICAgICBwZXJyb3Iob3B0cy5wcm9nbmFt ZSk7CisgICAgZXJyID0gMTsKKyAgfQorICByZXR1cm4gZXJyPyAtMjogMTsK K30KKwogLy8gIDAgOiBjb250aW51ZQogLy8gIDEgOiBlcnJvciwgc2tpcCB0 byBuZXh0IGZpbGUKIC8vIDwwIDogZXJyb3IsIGV4aXQgaW1tZWRpYXRlbHkK QEAgLTM4NiwyOSArNDQ4LDMxIEBACiAgICAgICAgICAgICAgIlxuJXM6IHNr aXBwaW5nIGJpbmFyeSBmaWxlICVzLi4uIiwgb3B0cy5wcm9nbmFtZSwgZm4p OwogICAgIGJ1ZltQQVRIX01BWCoyIC0gMV0gPSAnXDAnOwogICAgIGZwdXRz KGJ1Ziwgc3RkZXJyKTsKLQotICAgIGlmIChmY2xvc2UoaW4pIDwgMCkgewot ICAgICAgcGVycm9yKG9wdHMucHJvZ25hbWUpOwotICAgICAgcmV0dXJuIC0y OwotICAgIH0KLSAgICBpZiAoZmNsb3NlKG91dCkgPCAwKSB7Ci0gICAgICBw ZXJyb3Iob3B0cy5wcm9nbmFtZSk7Ci0gICAgICByZXR1cm4gLTI7Ci0gICAg fQotICAgIGlmIChyZW1vdmUodGVtcEZuKSA8IDApIHsKLSAgICAgIHBlcnJv cihvcHRzLnByb2duYW1lKTsKLSAgICAgIHJld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KG91 dCA9IGZvcGVuKHRlbXBGbiwgIndiIikpID09IE5VTEwpIHsKICAgICAgIHNu cHJpbnRmKGJ1ZiwgUEFUSF9NQVgqMiAtIDEsICJcbiVzIHByb2Nlc3Npbmcg JXMiLCBvcHRzLnByb2duYW1lLCBmbik7CiAgICAgICBwZXJyb3IoYnVmKTsK KyAgICAgIGZjbG9zZShpbik7CiAgICAgICByZXR1cm4gLTI7CiAgICAgfQog ICB9CkBAIC00MzIsNiArNDk3LDggQEAKICAgICBzZXRtb2RlKDEsIE9fQklO QVJZKTsKICAgfQogCisgIGNoZWNrRmxhZyA9IGZuPyBvcHRzLkZtdENoZWNr OiBGQ19OT0NIRUNLOworCiAgIHdoaWxlICgoYyA9IGZnZXRjKGluKSkgIT0g RU9GKSB7CiAKICAgICBpZiAoYyA9PSAnXDAnKSB7CkBAIC00NDQsNzcgKzUx MSw5MCBAQAogICAgIH0KIAogICAgIGlmIChjID09ICdccicpIHsKLSAgICAg IGlmIChvcHRzLkNvbnZUeXBlID09IENUX0FVVE8pIHsKLSAgICAgICAgb3B0 cy5Db252VHlwZSA9IENUX0RPUzJVTklYOwotICAgICAgfQorICAgICAgYyA9 IGZnZXRjKGluKTsKKworICAgICAgaWYgKG9wdHMuQ29udk1vZGUgPT0gQ01f RU9MKQorICAgICAgICBmb3IgKDsgYyA9PSAnXHInOyBjID0gZmdldGMoaW4p KQorICAgICAgICAgIGZwdXRjKCdccicsIG91dCk7CisgICAgICBlbHNlCisg ICAgICAgIGZvciAoOyBjID09ICdccic7IGMgPSBmZ2V0YyhpbikpCisgICAg ICAgICAgZmlsZUNoYW5nZWQgPSAxOworCisgICAgICBpZiAob3B0cy5Db252 VHlwZSA9PSBDVF9BVVRPKQorICAgICAgICBpZiAob3B0cy5Db252TW9kZSAh PSBDTV9FT0wgfHwgYyA9PSAnXG4nKQorICAgICAgICAgIG9wdHMuQ29udlR5 cGUgPSBDVF9ET1MyVU5JWDsKKwogICAgICAgaWYgKG9wdHMuQ29udlR5cGUg PT0gQ1RfRE9TMlVOSVgpIHsKLSAgICAgICAgLy8gY2hlY2sgbmV4dCBjaGFy Ci0gICAgICAgIGludCBjMjsKLSAgICAgICAgLy8gZWF0IGFsbCBleHRyYSAn XHInCi0gICAgICAgIHdoaWxlICgoYzIgPSBmZ2V0YyhpbikpID09ICdccicp IHsKKyAgICAgICAgaWYgKGMgPT0gJ1xuJykgeworICAgICAgICAgIC8vICdc cicgZm9sbG93ZWQgYnkgJ1xuJy4gIEZhbGwgb2ZmIAorICAgICAgICAgIGNo ZWNrRmxhZyA9IEZDX05PQ0hFQ0s7CiAgICAgICAgICAgZmlsZUNoYW5nZWQg PSAxOwogICAgICAgICB9Ci0gICAgICAgIGlmIChjMiA9PSBFT0YpIHsKKyAg ICAgICAgZWxzZSBpZiAob3B0cy5Db252TW9kZSA9PSBDTV9FT0wpCisgICAg ICAgICAgZnB1dGMoJ1xyJywgb3V0KTsKKworICAgICAgICBpZiAoYyA9PSBF T0YpIHsKICAgICAgICAgICAvLyBmaWxlIGVuZGVkIG9uIGEgJ1xyJy4gIEZp bmlzaCB0aGUgbGluZSBhbmQgcXVpdCBsb29wLgogICAgICAgICAgIGZwdXRj KCdcbicsIG91dCk7CiAgICAgICAgICAgZmlsZUNoYW5nZWQgPSAxOwotICAg ICAgICAgIGMgPSBjMjsKICAgICAgICAgICBicmVhazsKLSAgICAgICAgfSBl bHNlIGlmIChjMiA9PSAnXDAnKSB7CisgICAgICAgIH0gZWxzZSBpZiAoYyA9 PSAnXDAnKSB7CiAgICAgICAgICAgaW50IGEgPSBleGl0T25aZXJvKGZuLCBv cHRzLCBpbiwgb3V0LCB0ZW1wRm4pOwogICAgICAgICAgIGlmIChhIDwgMCkg cmV0dXJuIGE7CiAgICAgICAgICAgaWYgKGEgPiAwKSBnb3RvIGNvbnZlcnRf cmV0OwotICAgICAgICAgIC8vIG90aGVyd2lzZSwgZmluaXNoIHRoZSBsaW5l LCBwcm9tb3RlIGMyLCBhbmQgZmFsbCBvZmYgYm90dG9tIG9mIGxvb3AKLSAg ICAgICAgICBmcHV0YygnXG4nLCBvdXQpOwotICAgICAgICAgIGZpbGVDaGFu Z2VkID0gMTsKLSAgICAgICAgICBjID0gYzI7Ci0gICAgICAgIH0gZWxzZSBp ZiAoYzIgPT0gJ1xuJykgewotICAgICAgICAgIC8vICdccicgZm9sbG93ZWQg YnkgJ1xuJy4gIFByb21vdGUgYzIsIGFuZCBmYWxsIG9mZiAKLSAgICAgICAg ICBmaWxlQ2hhbmdlZCA9IDE7Ci0gICAgICAgICAgYyA9IGMyOwotICAgICAg ICB9IGVsc2UgewotICAgICAgICAgIC8vICdccicgZm9sbG93ZWQgYnkgc29t ZXRoaW5nIGVsc2UuIFdyaXRlIG91dCAnXG4nLCBwcm9tb3RlIGMyLCBhbmQg ZmFsbCBvZmYKKyAgICAgICAgICAvLyBvdGhlcndpc2UsIGZpbmlzaCB0aGUg bGluZSwgYW5kIGZhbGwgb2ZmIGJvdHRvbSBvZiBsb29wCisgICAgICAgICAg aWYgKG9wdHMuQ29udk1vZGUgIT0gQ01fRU9MKSB7CisgICAgICAgICAgICBm cHV0YygnXG4nLCBvdXQpOworICAgICAgICAgICAgZmlsZUNoYW5nZWQgPSAx OworICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChj ICE9ICdcbicgJiYgb3B0cy5Db252TW9kZSAhPSBDTV9FT0wpIHsKKyAgICAg ICAgICAvLyAnXHInIGZvbGxvd2VkIGJ5IHNvbWV0aGluZyBlbHNlLiBXcml0 ZSBvdXQgJ1xuJyBhbmQgZmFsbCBvZmYKICAgICAgICAgICBmcHV0YygnXG4n LCBvdXQpOwogICAgICAgICAgIGZpbGVDaGFuZ2VkID0gMTsKLSAgICAgICAg ICBjID0gYzI7CiAgICAgICAgIH0KICAgICAgICAgZnB1dGMoYywgb3V0KTsK ICAgICAgICAgY29udGludWU7CiAgICAgICB9IC8vIENUX0RPUzJVTklYCiAK ICAgICAgIGlmIChvcHRzLkNvbnZUeXBlID09IENUX1VOSVgyRE9TKSB7Ci0g ICAgICAgIC8vIGNoZWNrIG5leHQgY2hhcgotICAgICAgICBpbnQgYzI7Ci0g ICAgICAgIC8vIGVhdCBhbGwgZXh0cmEgJ1xyJwotICAgICAgICB3aGlsZSAo KGMyID0gZmdldGMoaW4pKSA9PSAnXHInKSB7Ci0gICAgICAgICAgZmlsZUNo YW5nZWQgPSAxOworICAgICAgICBmcHV0YygnXHInLCBvdXQpOworCisgICAg ICAgIGlmIChjID09ICdcbicpIHsKKyAgICAgICAgICBpZiAoY2hlY2tGbGFn ID09IEZDX0NIRUNLKSB7CisgICAgICAgICAgICAvKiBBbHJlYWR5IGluIERP UyBmb3JtYXQuICovCisgICAgICAgICAgICBpbnQgYSA9IGV4aXRPbkVvbChm biwgb3B0cywgaW4sIG91dCwgdGVtcEZuKTsKKyAgICAgICAgICAgIGlmIChh ID49IDApCisgICAgICAgICAgICAgIGdvdG8gY29udmVydF9yZXQ7CisgICAg ICAgICAgICByZXR1cm4gYTsKKyAgICAgICAgICB9CisgICAgICAgICAgaWYg KG9wdHMuQ29udk1vZGUgPT0gQ01fRU9MKSB7CisgICAgICAgICAgICBmcHV0 YygnXHInLCBvdXQpOworICAgICAgICAgICAgZmlsZUNoYW5nZWQgPSAxOwor ICAgICAgICAgIH0KICAgICAgICAgfQotICAgICAgICBpZiAoYzIgPT0gRU9G KSB7CisgICAgICAgIGVsc2UgaWYgKGMgPT0gRU9GKSB7CiAgICAgICAgICAg Ly8gZmlsZSBlbmRlZCBvbiBhICdccicuICBGaW5pc2ggdGhlIGxpbmUgYW5k IHF1aXQgbG9vcC4KLSAgICAgICAgICBmcHV0YygnXHInLCBvdXQpOworICAg ICAgICAgIGlmIChvcHRzLkNvbnZNb2RlID09IENNX0VPTCkgeworICAgICAg ICAgICAgZnB1dGMoJ1xyJywgb3V0KTsKKyAgICAgICAgICAgIGZpbGVDaGFu Z2VkID0gMTsKKyAgICAgICAgICB9CiAgICAgICAgICAgZnB1dGMoJ1xuJywg b3V0KTsKLSAgICAgICAgICBmaWxlQ2hhbmdlZCA9IDE7Ci0gICAgICAgICAg YyA9IGMyOwogICAgICAgICAgIGJyZWFrOwotICAgICAgICB9IGVsc2UgaWYg KGMyID09ICdcMCcpIHsKKyAgICAgICAgfSBlbHNlIGlmIChjID09ICdcMCcp IHsKICAgICAgICAgICBpbnQgYSA9IGV4aXRPblplcm8oZm4sIG9wdHMsIGlu LCBvdXQsIHRlbXBGbik7CiAgICAgICAgICAgaWYgKGEgPCAwKSByZXR1cm4g YTsKICAgICAgICAgICBpZiAoYSA+IDApIGdvdG8gY29udmVydF9yZXQ7Ci0g ICAgICAgICAgLy8gb3RoZXJ3aXNlLCBmaW5pc2ggdGhlIGxpbmUsIHByb21v dGUgYzIsIGFuZCBmYWxsIG9mZiBib3R0b20gb2YgbG9vcAotICAgICAgICAg IGZwdXRjKCdccicsIG91dCk7Ci0gICAgICAgICAgZnB1dGMoJ1xuJywgb3V0 KTsKLSAgICAgICAgICBmaWxlQ2hhbmdlZCA9IDE7Ci0gICAgICAgICAgYyA9 IGMyOwotICAgICAgICB9IGVsc2UgaWYgKGMyID09ICdcbicpIHsKLSAgICAg ICAgICAvLyAnXHInIGZvbGxvd2VkIGJ5ICdcbicuICBXcml0ZSBvdXQgJ1xy JywgcHJvbW90ZSBjMiwgYW5kIGZhbGwgb2ZmIAotICAgICAgICAgIGZwdXRj KCdccicsIG91dCk7Ci0gICAgICAgICAgYyA9IGMyOwotICAgICAgICB9IGVs c2UgewotICAgICAgICAgIC8vICdccicgZm9sbG93ZWQgYnkgc29tZXRoaW5n IGVsc2UuIFdyaXRlIG91dCAnXHJcbicsIHByb21vdGUgYzIsIGFuZCBmYWxs IG9mZgotICAgICAgICAgIGZwdXRjKCdccicsIG91dCk7CisgICAgICAgICAg Ly8gb3RoZXJ3aXNlLCBmaW5pc2ggdGhlIGxpbmUgYW5kIGZhbGwgb2ZmIGJv dHRvbSBvZiBsb29wCisgICAgICAgICAgaWYgKG9wdHMuQ29udk1vZGUgIT0g Q01fRU9MKSB7CisgICAgICAgICAgICBmcHV0YygnXG4nLCBvdXQpOworICAg ICAgICAgICAgZmlsZUNoYW5nZWQgPSAxOworICAgICAgICAgIH0KKyAgICAg ICAgfQorICAgICAgICBlbHNlIGlmIChvcHRzLkNvbnZNb2RlICE9IENNX0VP TCkgeworICAgICAgICAgIC8vICdccicgZm9sbG93ZWQgYnkgc29tZXRoaW5n IGVsc2UuIFdyaXRlIG91dCAnXHJcbicgYW5kIGZhbGwgb2ZmCiAgICAgICAg ICAgZnB1dGMoJ1xuJywgb3V0KTsKICAgICAgICAgICBmaWxlQ2hhbmdlZCA9 IDE7Ci0gICAgICAgICAgYyA9IGMyOwogICAgICAgICB9CiAgICAgICAgIGZw dXRjKGMsIG91dCk7CiAgICAgICAgIGNvbnRpbnVlOwpAQCAtNTI2LDkgKzYw NiwxNyBAQAogICAgICAgaWYgKG9wdHMuQ29udlR5cGUgPT0gQ1RfQVVUTykK ICAgICAgICAgb3B0cy5Db252VHlwZSA9IENUX1VOSVgyRE9TOwogICAgICAg aWYgKG9wdHMuQ29udlR5cGUgPT0gQ1RfVU5JWDJET1MpIHsKKyAgICAgICAg Y2hlY2tGbGFnID0gRkNfTk9DSEVDSzsKICAgICAgICAgZmlsZUNoYW5nZWQg PSAxOwogICAgICAgICBmcHV0YygnXHInLCBvdXQpOwogICAgICAgfQorICAg ICAgZWxzZSBpZiAoY2hlY2tGbGFnID09IEZDX0NIRUNLKSB7CisgICAgICAg IC8qIEFscmVhZHkgaW4gVU5JWCBmb3JtYXQuICovCisgICAgICAgIGludCBh ID0gZXhpdE9uRW9sKGZuLCBvcHRzLCBpbiwgb3V0LCB0ZW1wRm4pOworICAg ICAgICBpZiAoYSA+PSAwKQorICAgICAgICAgIGdvdG8gY29udmVydF9yZXQ7 CisgICAgICAgIHJldHVybiBhOworICAgICAgfQogICAgICAgZnB1dGMoJ1xu Jywgb3V0KTsKICAgICAgIGNvbnRpbnVlOwogICAgIH0gLy8gJ1xuJwo= ------_=_NextPart_001_01C8123A.B8E78B93 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ ------_=_NextPart_001_01C8123A.B8E78B93--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |