From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Daniel Engeler" Newsgroups: gmane.emacs.devel Subject: Contribution: Serial port access Date: Thu, 5 Jun 2008 23:35:53 +0200 Message-ID: References: <73E47418-2ADD-4682-91CB-D3F0C94B1662@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7386_30912129.1212701753629" X-Trace: ger.gmane.org 1212743944 18495 80.91.229.12 (6 Jun 2008 09:19:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Jun 2008 09:19:04 +0000 (UTC) Cc: eliz@gnu.org, monnier@iro.umontreal.ca To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 06 11:19:43 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K4Y3J-0002VC-8o for ged-emacs-devel@m.gmane.org; Fri, 06 Jun 2008 11:19:38 +0200 Original-Received: from localhost ([127.0.0.1]:57359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4Y1s-0006JL-Ht for ged-emacs-devel@m.gmane.org; Fri, 06 Jun 2008 05:14:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4N7r-0007FA-Af for emacs-devel@gnu.org; Thu, 05 Jun 2008 17:36:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4N7p-0007CY-BM for emacs-devel@gnu.org; Thu, 05 Jun 2008 17:36:02 -0400 Original-Received: from [199.232.76.173] (port=38491 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4N7p-0007Bl-2G for emacs-devel@gnu.org; Thu, 05 Jun 2008 17:36:01 -0400 Original-Received: from an-out-0708.google.com ([209.85.132.243]:9459) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4N7l-0008Oz-G0 for emacs-devel@gnu.org; Thu, 05 Jun 2008 17:36:00 -0400 Original-Received: by an-out-0708.google.com with SMTP id c38so152172ana.84 for ; Thu, 05 Jun 2008 14:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=DhgJrv8X2SGRqDvv98dkfbTXjhkkOhVmg1+/5Se0Yqo=; b=sPi0do2bzpeg2kozbq3BdI2fHlaJfRd222Zc+WOWk9OLnxaapFt4L4mQAidOI/Wn71 wBq0jdn2XbkJmHLOuUp0dpqnlAb9pCzU84hQQ4tscloW0KRJiI9H9oc1uUAZFT5QDzCM 99K2sLNx9vgkDKki3m4ZTj2Duqg5MOuWfBUGE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=uvhclL3pRhSvpmGULJx3k+ArcxGDJbDviTJejfR4D9R8+FTl3fTHmkHpJ/gHUBgwfQ /QjrEMkm9Tocn9tn3n+sYZBpKe5HWlnNuVHtKck0UkTbuyj5gkG4cwiYuRe/uOzHZiqO rrYHURkajOJBNRHW3/RWAqjPAaaBKDXEn3Oio= Original-Received: by 10.100.6.13 with SMTP id 13mr20337anf.83.1212701753659; Thu, 05 Jun 2008 14:35:53 -0700 (PDT) Original-Received: by 10.100.37.9 with HTTP; Thu, 5 Jun 2008 14:35:53 -0700 (PDT) In-Reply-To: <73E47418-2ADD-4682-91CB-D3F0C94B1662@gmail.com> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-Mailman-Approved-At: Fri, 06 Jun 2008 05:12:17 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98507 Archived-At: ------=_Part_7386_30912129.1212701753629 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Stefan, Eli, Now that my paperwork is done, please find attached the final diff of my contribution. I already sent this file to Eli on May 7, 2008, and haven't changed it since. Kind regards, Daniel ------=_Part_7386_30912129.1212701753629 Content-Type: application/octet-stream; name=engeler-serial-2.diff Content-Transfer-Encoding: base64 X-Attachment-Id: 0.1 Content-Disposition: attachment; filename=engeler-serial-2.diff SW5kZXg6IGRvYy9lbWFjcy9lbWFjcy50ZXhpCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9zb3VyY2Vz L2VtYWNzL2VtYWNzL2RvYy9lbWFjcy9lbWFjcy50ZXhpLHYKcmV0cmlldmluZyByZXZpc2lvbiAx LjkKZGlmZiAtYyAtcCAtcjEuOSBlbWFjcy50ZXhpCioqKiBkb2MvZW1hY3MvZW1hY3MudGV4aQky MyBBcHIgMjAwOCAwNTo1NTozNiAtMDAwMAkxLjkKLS0tIGRvYy9lbWFjcy9lbWFjcy50ZXhpCTcg TWF5IDIwMDggMTg6NTI6MzggLTAwMDAKKioqKioqKioqKioqKioqIFJ1bm5pbmcgU2hlbGwgQ29t bWFuZHMgZnJvbSBFbWFjcwoqKiogODY0LDg2OSAqKioqCi0tLSA4NjQsODcwIC0tLS0KICAqIFRl cm0gTW9kZTo6ICAgICAgICAgICBTcGVjaWFsIEVtYWNzIGNvbW1hbmRzIHVzZWQgaW4gVGVybSBt b2RlLgogICogUGFnaW5nIGluIFRlcm06OiAgICAgIFBhZ2luZyBpbiB0aGUgdGVybWluYWwgZW11 bGF0b3IuCiAgKiBSZW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L2RvYy9saXNwcmVmL2VsaXNw LnRleGksdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNgpkaWZmIC1jIC1wIC1yMS42IGVsaXNwLnRl eGkKKioqIGRvYy9saXNwcmVmL2VsaXNwLnRleGkJMTMgTWFyIDIwMDggMDM6MTU6MzkgLTAwMDAJ MS42Ci0tLSBkb2MvbGlzcHJlZi9lbGlzcC50ZXhpCTcgTWF5IDIwMDggMTg6NTI6NDQgLTAwMDAK KioqKioqKioqKioqKioqIFByb2Nlc3NlcwoqKiogMTE5NSwxMjAwICoqKioKLS0tIDExOTUsMTIw MSAtLS0tCiAgKiBMb3ctTGV2ZWwgTmV0d29yazo6ICAgICAgIExvd2VyLWxldmVsIGJ1dCBtb3Jl IGdlbmVyYWwgZnVuY3Rpb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBjcmVh dGUgY29ubmVjdGlvbnMgYW5kIHNlcnZlcnMuCiAgKiBNaXNjIE5ldHdvcms6OiAgICAgICAgICAg IEFkZGl0aW9uYWwgcmVsZXZhbnQgZnVuY3Rpb25zIGZvciBuZXR3b3JrIGNvbm5lY3Rpb25zLgor ICogU2VyaWFsIFBvcnRzOjogICAgICAgICAgICBDb21tdW5pY2F0aW5nIHdpdGggc2VyaWFsIHBv cnRzLgogICogQnl0ZSBQYWNraW5nOjogICAgICAgICAgICBVc2luZyBiaW5kYXQgdG8gcGFjayBh bmQgdW5wYWNrIGJpbmFyeSBkYXRhLgogIAogIFJlY2VpdmluZyBPdXRwdXQgZnJvbSBQcm9jZXNz ZXMKSW5kZXg6IGRvYy9saXNwcmVmL2ludGVybmFscy50ZXhpCj09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6 IC9zb3VyY2VzL2VtYWNzL2VtYWNzL2RvYy9saXNwcmVmL2ludGVybmFscy50ZXhpLHYKcmV0cmll dmluZyByZXZpc2lvbiAxLjMKZG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SkKICAKICAoZGVmdW4g dGVybS11cGRhdGUtbW9kZS1saW5lICgpCiEgICAobGV0ICgodGVybS1tb2RlIChpZiAodGVybS1p bi1jaGFyLW1vZGUpICJjaGFyIiAibGluZSIpKQohICAgICAgICAgKHRlcm0tcGFnZSAod2hlbiAo dGVybS1wYWdlci1lbmFibGVkKSAiIHBhZ2UiKSkKISAgICAgICAgIChzZXJpYWwtaXRlbS1zcGVl ZCkKISAgICAgICAgIChzZXJpYWwtaXRlbS1jb25maWcpCiEgICAgICAgICAodGVtcCkKISAgICAg ICAgIChwcm9jIChnZXQtYnVmZmVyLXByb2Nlc3MgKGN1cnJlbnQtYnVmZmVyKSkpKQohICAgICAo d2hlbiAoYW5kICh0ZXJtLWNoZWNrLXByb2MgKGN1cnJlbnQtYnVmZmVyKSkKISAgICAgICAgICAg ICAgICAoZXF1YWwgKHByb2Nlc3MtdHlwZSBuaWwpICdzZXJpYWwpKQohICAgICAgIChsZXQgKCh0 ZW1wIChzZXJpYWwtc3BlZWQpKSkKISAgICAgICAgIChzZXRxIHNlcmlhbC1pdGVtLXNwZWVkCiEg ICAgICAgICAgICAgYCg6cHJvcGVydGl6ZQohICAgICAgICAgICAgICAgLChvciAoYW5kIHRlbXAg KGZvcm1hdCAiICVkIiB0ZW1wKSkgIiIpCiEgICAgICAgICAgICAgICBoZWxwLWVjaG8gIm1vdXNl LTE6IENoYW5nZSB0aGUgc3BlZWQgb2YgdGhlIHNlcmlhbCBwb3J0IgohICAgICAgICAgICAgICAg bW91c2UtZmFjZSBtb2RlLWxpbmUtaGlnaGxpZ2h0CiEgICAgICAgICAgICAgICBsb2NhbC1tYXAg KGtleW1hcCAobW9kZS1saW5lIGtleW1hcAohICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGRvd24tbW91c2UtMSAuIHNlcmlhbC1tb2RlLWxpbmUtc3BlZWQtbWVudS0xKSkpKSkpCiEg ICAgICAgKGxldCAoKHRlbXAgKHByb2Nlc3MtY29udGFjdCBwcm9jIDpzdW1tYXJ5KSkpCiEgICAg ICAgICAoc2V0cSBzZXJpYWwtaXRlbS1jb25maWcKISAgICAgICAgICAgICAgIGAoOnByb3BlcnRp emUKISAgICAgICAgICAgICAgICAgLChvciAoYW5kIHRlbXAgKGZvcm1hdCAiICVzIiB0ZW1wKSkg IiIpCiEgICAgICAgICAgICAgICAgIGhlbHAtZWNobyAibW91c2UtMTogQ2hhbmdlIHRoZSBjb25m aWd1cmF0aW9uIG9mIHRoZSBzZXJpYWwgcG9ydCIKISAgICAgICAgICAgICAgICAgbW91c2UtZmFj ZSBtb2RlLWxpbmUtaGlnaGxpZ2h0CiEgICAgICAgICAgICAgICAgIGxvY2FsLW1hcCAoa2V5bWFw IChtb2RlLWxpbmUga2V5bWFwCiEgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRvd24tbW91 c2UtMSAuIHNlcmlhbC1tb2RlLWxpbmUtY29uZmlnLW1lbnUtMSkpKSkpKSkKISAgICAgKHNldHEg bW9kZS1saW5lLXByb2Nlc3MKISAgICAgICAgICAgKGxpc3QgIjogIiB0ZXJtLW1vZGUgdGVybS1w YWdlCiEgICAgICAgICAgICAgICAgIHNlcmlhbC1pdGVtLXNwZWVkCiEgICAgICAgICAgICAgICAg IHNlcmlhbC1pdGVtLWNvbmZpZwohICAgICAgICAgICAgICAgICAiICVzIikpKQogICAgKGZvcmNl LW1vZGUtbGluZS11cGRhdGUpKQogIAogIChkZWZ1biB0ZXJtLWNoZWNrLXByb2MgKGJ1ZmZlcikK ISAgICJUcnVlIGlmIHRoZXJlIGlzIGEgcHJvY2VzcyBhc3NvY2lhdGVkIHcvYnVmZmVyIEJVRkZF UiwgYW5kIGl0CiEgaXMgYWxpdmUuICBCVUZGRVIgY2FuIGJlIGVpdGhlciBhIGJ1ZmZlciBvciB0 aGUgbmFtZSBvZiBvbmUuIgogICAgKGxldCAoKHByb2MgKGdldC1idWZmZXItcHJvY2VzcyBidWZm ZXIpKSkKISAgICAgKGFuZCBwcm9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CByZWNlbnRseSB1c2VkIHBv cnQsIG9yIGluIGEgcmVhc29uYWJsZQorICAgICAgICAgICAgICAgICAgOzsgZGVmYXVsdCBkaXJl Y3RvcnkuCisgICAgICAgICAgICAgICAgICAob3IgKGFuZCBoIChmaWxlLW5hbWUtZGlyZWN0b3J5 IGgpKQorICAgICAgICAgICAgICAgICAgICAgIChhbmQgKGZpbGUtZXhpc3RzLXAgIi9kZXYvIikg Ii9kZXYvIikKKyAgICAgICAgICAgICAgICAgICAgICAoYW5kIChmaWxlLWV4aXN0cy1wICIvIikg Ii8iKSkKKyAgICAgICAgICAgICAgICAgIDs7IGBkZWZhdWx0JzogVGhpcyBjYXVzZXMgKHJlYWQt ZmlsZS1uYW1lKSB0byByZXR1cm4KKyAgICAgICAgICAgICAgICAgIDs7IHRoZSBlbXB0eSBzdHJp bmcgaWYgaGUgdXNlciBzaW1wbHkgcHJlc3NlcyByZXR1cm4uCisgICAgICAgICAgICAgICAgICA7 OyBVc2luZyBuaWwgaGVyZSBtYXkgcmVzdWx0IGluIGEgZGVmYXVsdCBkaXJlY3RvcnkKKyAgICAg ICAgICAgICAgICAgIDs7IG9mIHRoZSBjdXJyZW50IGJ1ZmZlciwgd2hpY2ggaXMgbm90IHVzZWZ1 bCBmb3IKKyAgICAgICAgICAgICAgICAgIDs7IHNlcmlhbCBwb3J0LgorICAgICAgICAgICAgICAg ICAgIiIpCisgICAgICAgICAgICAgICAocmVhZC1mcm9tLW1pbmlidWZmZXIKKyAgICAgICAgICAg ICAgICAoaWYgKHN0cmluZ3AgaCkgKGZvcm1hdCAiU2VyaWFsIHBvcnQgKGRlZmF1bHQgJXMpOiAi IGgpCisgICAgICAgICAgICAgICAgICAiU2VyaWFsIHBvcnQ6ICIpCisgICAgICAgICAgICAgICAg bmlsIG5pbCBuaWwgJyhmaWxlLW5hbWUtaGlzdG9yeSAuIDEpIG5pbCBuaWwpKSkpCisgICAgIChp ZiAob3IgKG51bGwgeCkgKGFuZCAoc3RyaW5ncC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yk6ICIgaCkpCisgICAgICAgICAgICAgICAgICAgICh0CisgCQkgICAgKGZvcm1hdCAi U3BlZWQgKGIvcyk6ICIpKSkKKyAgICAgICAgICAgICAgbmlsIG5pbCBuaWwgJyhoaXN0b3J5IC4g MSkgbmlsIG5pbCkpKQorICAgICAod2hlbiAob3IgKG51bGwgeCkgKGFuZCAoc3RyaW5ncCB4KSAo emVyb3AgKGxlbmd0aCB4KSkpKQorICAgICAgIChzZXRxIHggaCkpCisgICAgICh3aGVuIChvciAo bnVsbCB4KSAobm90IChzdHJpbmdwIHgpKSAoemVyb3AgKGxlbmd0aCB4KSkpCisgICAgICAgKGVy cm9yICJJbnZhbGlkIHNwZWVkIikpCisgICAgIChpZiAoc3RyaW5nPSB4IHNlcmlhbC1uby1zcGVl ZCkKKyAgICAgICAgIChzZXRxIHggbmlsKQorICAgICAgIChzZXRxIHggKHN0cmluZy10by1udW1i ZXIgeCkpCisgICAgICAgKHdoZW4gKG9yIChudWxsIHgpIChub3QgKGludGVnZXJwIHgpKSAoPD0g eCAwKSkKKyAgICAgICAgIChlcnJvciAiSW52YWxpZCBzcGVlZCIpKSkKKyAgICAgKHNldHEgc2Vy aWFsLXNwZWVkLWhpc3RvcnkgaGlzdG9yeSkKKyAgICAgeCkpCisgCisgOzs7IyMjYXV0b2xvYWQK KyAoZGVmdW4gc2VyaWFsLXRlcm0gKHBvcnQgc3BlZWQpCisgICAiU3RhcnQgYSB0ZXJtaW5hbC1l bXVsYXRvciBmb3IgYSBzZXJpYWwgcG9ydCBpbiBhIG5ldyBidWZmZXIuCisgUE9SVCBpcyB0aGUg cGF0aCBvciBuYW1lIG9mIHRoZSBzZXJpYWwgcG9ydC4gIEZvciBleGFtcGxlLCB0aGlzCisgY291 bGQgYmUgXCIvZGV2L3R0eVMwXCIgb24gVW5peC4gIE9uIFdpbmRvd3MsIHRoaXMgY291bGQgYmUK KyBcIkNPTTFcIiBvciBcIlxcXFwuXFxDT00xMFwiLgorIFNQRUVEIGlzIH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SkpKSkKKyAgICAgICAod2hlbiBiaW5k aW5nIChjYWxsLWludGVyYWN0aXZlbHkgYmluZGluZykpKSkpCisgCisgKGRlZnVuIHNlcmlhbC1t b2RlLWxpbmUtc3BlZWQtbWVudSAoZXZlbnQpCisgICAoeC1wb3B1cC1tZW51IGV2ZW50IHNlcmlh bC1tb2RlLWxpbmUtc3BlZWQtbWVudSkpCisgCisgKGRlZnVuIHNlcmlhbC11cGRhdGUtc3BlZWQt bWVudSAoKQorICAgKHNldHEgc2VyaWFsLW1vZGUtbGluZS1zcGVlZC1tZW51IChtYWtlLXNwYXJz ZS1rZXltYXAgIlNwZWVkIChiL3MpIikpCisgICAoZGVmaW5lLWtleSBzZXJpYWwtbW9kZS1saW5l LXNwZWVkLW1lbnUgW3NlcmlhbC1tb2RlLWxpbmUtc3BlZWQtbWVudS1vdGhlcl0KKyAgICAgJyht ZW51LWl0ZW0gIk90aGVyLi4uIgorICAgICAgICAgICAgICAgICAobGFtYmRhIChldmVudCkgKGlu dGVyYWN0aXZlICJlIikKKyAgICAgICAgICAgICAgICAgICAobGV0ICgoc3BlZWQgKHNlcmlhbC1y ZWFkLXNwZWVkKSkpCisgICAgICAgICAgICAgICAgICAgICAoc2VyaWFsLXByb2Nlc3MtY29uZmln dXJlIDpzcGVlZCBzcGVlZCkKKyAgICAgICAgICAgICAgICAgICAgICh0ZXJtLXVwZGF0ZS1tb2Rl LWxpbmUpCisgICAgICAgICAgICAgICAgICAgICAobWVzc2FnZSAiU3BlZWQgc2V0IHRvICVkIGIv cyIgc3BlZWQpKSkpKQorICAgKGRvbGlzdCAoc3RyIChzZXJpYWwtbmljZS1zcGVlZC1oaXN0b3J5 KSkKKyAgICAgKGxldCAoKG51bSAob3IgKGFuZCAoc3RyaW5ncCBzdHIpIChzdHJpbmctdG8tbnVt YmVyIHN0cikpIDApKSkKKyAgICAgICAoZGVmaW5lLWtleQorICAgICAgICAgc2VyaWFsLW1vZGUt bGluZS1zcGVlZC1tZW51CisgICAgICAgICAodmVjdG9yIChtYWtlLXN5bWJvbCAoZm9ybWF0ICJz ZXJpYWwtbW9kZS1saW5lLXNwZWVkLW1lbnUtJXMiIHN0cikpKQorICAgICAgICAgYChtZW51LWl0 ZW0KKyAgICAgICAgICAgLHN0cgorICAgICAgICAgICAobGFtYmRhIChldmVudCkgKGludGVyYWN0 aXZlICJlIikKKyAgICAgICAgICAgICAoc2VyaWFsLXByb2Nlc3MtY29uZmlndXJlIDpzcGVlZCAs bnVtKQorICAgICAgICAgICAgICh0ZXJtLXVwZGF0ZS1tb2RlLWxpbmUpCisgICAgICAgICAgICAg KG1lc3NhZ2UgIlNwZWVkIHNldCB0byAlZCBiL3MiICxudW0pKQorICAgICAgICAgICA6YnV0dG9u ICg6dG9nZ2xlIC4gKD0gKHNlcmlhbC1zcGVlZCkgLG51bSkpKSkpKSkKKyAKKyAoZGVmdW4gc2Vy aWFsLW1vZGUtbGluZS1jb25maWctbWVudS0xIChldmVudCkKKyAgIChpbnRlcmFjdGl2ZSAiZSIp CisgICAoc2F2ZS1zZWxlY3RlZC13aW5kb3cKKyAgICAgKHNlbGVjdC13aW5kb3cgKHBvc24td2lu ZG93IChldmVudC1zdGFydCBldmVudCkpKQorICAgICAoc2VyaWFsLXVwZGF0ZS1jb25maWctbWVu dSkKKyAgICAgKGxldCogKChzZWxlY3Rpb24gKHNlcmlhbC1tb2RlLWxpbmUtY29uZmlnLW1lbnUg ZXZlbnQpKQorICAgICAgICAgICAgKGJpbmRpbmcgKGFuZCBzZWxlY3Rpb24gKGxvb2t1cC1rZXkg c2VyaWFsLW1vZGUtbGluZS1jb25maWctbWVudQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHZlY3RvciAoY2FyIHNlbGVjdGlvbikpKSkpKQorICAgICAg ICh3aGVuIGJpbmRpbmcgKGNhbGwtaW50ZXJhY3RpdmVseSBiaW5kaW5nKSkpKSkKKyAKKyAoZGVm dW4gc2VyaWFsLW1vZGUtbGluZS1jb25maWctbWVudSAoZXZlbnQpCisgICAoeC1wb3B1cC1tZW51 IGV2ZW50IHNlcmlhbC1tb2RlLWxpbmUtY29uZmlnLW1lbnUpKQorIAorIChkZWZ1biBzZXJpYWwt dXBkYXRlLWNvbmZpZy1tZW51ICgpCisgICAoc2V0cSBzZXJpYWwtbW9kZS1saW5lLWNvbmZpZy1t ZW51IChtYWtlLXNwYXJzZS1rZXltYXAgIkNvbmZpZ3VyYXRpb24iKSkKKyAgIChsZXQgKChjb25m aWcgKHByb2Nlc3MtY29udGFjdAorICAgICAgICAgICAgICAgICAgKGdldC1idWZmZXItcHJvY2Vz cyAoY3VycmVudC1idWZmZXIpKSB0KSkKKyAgICAgICAgICh5KQorICAgICAgICAgKHN0cikpCisg ICAgIChkb2xpc3QgKHkgJygoOmZsb3djb250cm9sIGh3ICAgIkhhcmR3YXJlIGZsb3djb250cm9s IChSVFMvQ1RTKSIpCisgICAgICAgICAgICAgICAgICAoOmZsb3djb250cm9sIHN3ICAgIlNvZnR3 YXJlIGZsb3djb250cm9sIChYT04vWE9GRikiKQorICAgICAgICAgICAgICAgICAgKDpmbG93Y29u dHJvbCBuaWwgICJObyBmbG93Y29udHJvbCIpCisgICAgICAgICAgICAgICAgICAoOnN0b3BiaXRz ICAgIDIgICAgIjIgc3RvcGJpdHMiKQorICAgICAgICAgICAgICAgICAgKDpzdG9wYml0cyAgICAx ICAgICIxIHN0b3BiaXQiKQorICAgICAgICAgICAgICAgICAgKDpwYXJpdHkgICAgICBvZGQgICJP ZGQgcGFyaXR5IikKKyAgICAgICAgICAgICAgICAgICg6cGFyaXR5ICAgICAgZXZlbiAiRXZlbiBw YXJpdHkiKQorICAgICAgICAgICAgICAgICAgKDpwYXJpdHkgICAgICBuaWwgICJObyBwYXJpdHki KQorICAgICAgICAgICAgICAgICAgKDpieXRlc2l6ZSAgICA3ICAgICI3IGJpdHMgcGVyIGJ5dGUi KQorICAgICAgICAgICAgICAgICAgKDpieXRlc2l6ZSAgICA4ICAgICI4IGJpdHMgcGVyIGJ5dGUi KSkpCisgICAgICAgKGRlZmluZS1rZXkgc2VyaWFsLW1vZGUtbGluZS1jb25maWctbWVudQorICAg ICAgICAgKHZlY3RvciAobWFrZS1zeW1ib2wgKGZvcm1hdCAiJXMtJXMiIChudGggMCB5KSAobnRo IDEgeSkpKSkKKyAgICAgICAgIGAobWVudS1pdGVtCisgICAgICAgICAgICwobnRoIDIgeSkKKyAg ICAgICAgICAgKGxhbWJkYSAoZXZlbnQpIChpbnRlcmFjdGl2ZSAiZSIpCisgICAgICAgICAgICAg KHNlcmlhbC1wcm9jZXNzLWNvbmZpZ3VyZSAsKG50aCAwIHkpICcsKG50aCAxIHkpKQorICAgICAg ICAgICAgICh0ZXJtLXVwZGF0ZS1tb2RlLWxpbmUpCisgICAgICAgICAgICAgKG1lc3NhZ2UgIiVz IiAsKG50aCAyIHkpKSkKKyAgICAgICAgICAgOzsgVXNlIDp0b2dnbGUgaW5zdGVhZCBvZiA6cmFk aW8gYmVjYXVzZSBhIG5vbi1zdGFuZGFyZCBwb3J0CisgICAgICAgICAgIDs7IGNvbmZpZ3VyYXRp b24gbWF5IG5vdCBtYXRjaCBhbnkgbWVudSBpdGVtcy4KKyAgICAgICAgICAgOmJ1dHRvbiAoOnRv Z2dsZSAuICwoZXF1YWwgKHBsaXN0LWdldCBjb25maWcgKG50aCAwIHkpKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobnRoIDEgeSkpKSkpKSkpCisgCisgDAogIDs7OyBD b252ZXJ0aW5nIHByb2Nlc3MgbW9kZXMgdG8gdXNlIHRlcm0gbW9kZQogIDs7OyA9PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0KICA7OzsgUmVuYW1pbmcgdmFyaWFibGVzCkluZGV4OiBzcmMvcHJvY2Vzcy5jCj09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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MCiAgZXh0ZXJuIGludCBlcnJubzsKICAjZW5kaWYKKioqKioqKioqKioq KioqIG5pbCwgaW5kaWNhdGluZyB0aGUgY3VycmVudCBidWZmZXIncyBwcm8KKioqIDc4Niw3OTIg KioqKgogICAgcCA9IFhQUk9DRVNTIChwcm9jZXNzKTsKICAKICAgIHAtPnJhd19zdGF0dXNfbmV3 ID0gMDsKISAgIGlmIChORVRDT05OMV9QIChwKSkKICAgICAgewogICAgICAgIHAtPnN0YXR1cyA9 IEZjb25zIChRZXhpdCwgRmNvbnMgKG1ha2VfbnVtYmVyICgwKSwgUW5pbCkpOwogICAgICAgIHAt PnRpY2sgPSArK3Byb2Nlc3NfdGljazsKLS0tIDgwMiw4MDggLS0tLQogICAgcCA9IFhQUk9DRVNT IChwcm9jZXNzKTsKICAKICAgIHAtPnJhd19zdGF0dXNfbmV3ID0gMDsKISAgIGlmIChORVRDT05O MV9QIChwKSB8fCBTRVJJQUxDT05OMV9QIChwKSkKICAgICAgewogICAgICAgIHAtPnN0YXR1cyA9 IEZjb25zIChRZXhpdCwgRmNvbnMgKG1ha2VfbnVtYmVyICgwKSwgUW5pbCkpOwogICAgICAgIHAt PnRpY2sgPSArK3Byb2Nlc3NfdGljazsKKioqKioqKioqKioqKioqIG5pbCwgaW5kaWNhdGluZyB0 aGUgY3VycmVudCBidWZmZXIncyBwcm8KKioqIDg2Myw4NjkgKioqKgogICAgc3RhdHVzID0gcC0+ c3RhdHVzOwogICAgaWYgKENPTlNQIChzdGF0dXMpKQogICAgICBzdGF0dXMgPSBYQ0FSIChzdGF0 dXMpOwohICAgaWYgKE5FVENPTk4xX1AgKHApKQogICAgICB7CiAgICAgICAgaWYgKEVRIChzdGF0 dXMsIFFleGl0KSkKICAJc3RhdHVzID0gUWNsb3NlZDsKLS0tIDg3OSw4ODUgLS0tLQogICAgc3Rh dHVzID0gcC0+c3RhdHVzOwogICAgaWYgKENPTlNQIChzdGF0dXMpKQogICAgICBzdGF0dXMgPSBY Q0FSIChz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AgIExpc3BfT2JqZWN0IHByb2M7CisgICBwcm9jID0gZ2V0X3Byb2Nlc3Mg KHByb2Nlc3MpOworICAgcmV0dXJuIFhQUk9DRVNTIChwcm9jKS0+dHlwZTsKKyB9CiAgCiAgI2lm ZGVmIEhBVkVfU09DS0VUUwogIERFRlVOICgiZm9ybWF0LW5ldHdvcmstYWRkcmVzcyIsIEZmb3Jt YXRfbmV0d29ya19hZGRyZXNzLCBTZm9ybWF0X25ldHdvcmtfYWRkcmVzcywKKioqKioqKioqKioq KioqIGxpc3RfcHJvY2Vzc2VzXzEgKHF1ZXJ5X29ubHkpCioqKiAxMzI3LDEzMzMgKioqKgogIAog ICAgICAgIHByb2MgPSBGY2RyIChYQ0FSICh0YWlsKSk7CiAgICAgICAgcCA9IFhQUk9DRVNTIChw cm9jKTsKISAgICAgICBpZiAoTklMUCAocC0+Y2hpbGRwKSkKICAJY29udGludWU7CiAgICAgICAg aWYgKCFOSUxQIChxdWVyeV9vbmx5KSAmJiBwLT5raWxsX3dpdGhvdXRfcXVlcnkpCiAgCWNvbnRp bnVlOwotLS0gMTM2MywxMzY5IC0tLS0KICAKICAgICAgICBwcm9jID0gRmNkciAoWENBUiAodGFp bCkpOwogICAgICAgIHAgPSBYUFJPQ0VTUyAocHJvYyk7CiEgICAgICAgaWYgKE5JTFAgKHAtPnR5 cGUpKQogIAljb250aW51ZTsKICAgICAgICBpZiAoIU5JTFAgKHF1ZXJ5X29ubHkpICYmIHAtPmtp bGxfd2l0aG91dF9xdWVyeSkKICAJY29udGludWU7CioqKioqKioqKioqKioqKiBsaXN0X3Byb2Nl c3Nlc18xIChxdWVyeV9vbmx5KQoqKiogMTM5NSwxNDAxICoqKioKICAKICAgICAgICBwcm9jID0g RmNkciAoWENBUiAodGFpbCkpOwogICAgICAgIHAgPSBYUFJPQ0VTUyAocHJvYyk7CiEgICAgICAg aWYgKE5JTFAgKHAtPmNoaWxkcCkpCiAgCWNvbnRpbnVlOwogICAgICAgIGlmICghTklMUCA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cm4gKCI6cG9ydCIpOwor ICAgc3RhdGljcHJvICgmUUNwb3J0KTsKKyAgIFFDc3BlZWQgPSBpbnRlcm4gKCI6c3BlZWQiKTsK KyAgIHN0YXRpY3BybyAoJlFDc3BlZWQpOworICAgUUNwcm9jZXNzID0gaW50ZXJuICgiOnByb2Nl c3MiKTsKKyAgIHN0YXRpY3BybyAoJlFDcHJvY2Vzcyk7CisgCisgICBRQ2J5dGVzaXplID0gaW50 ZXJuICgiOmJ5dGVzaXplIik7CisgICBzdGF0aWNwcm8gKCZRQ2J5dGVzaXplKTsKKyAgIFFDc3Rv cGJpdHMgPSBpbnRlcm4gKCI6c3RvcGJpdHMiKTsKKyAgIHN0YXRpY3BybyAoJlFDc3RvcGJpdHMp OworICAgUUNwYXJpdHkgPSBpbnRlcm4gKCI6cGFyaXR5Iik7CisgICBzdGF0aWNwcm8gKCZRQ3Bh cml0eSk7CisgICBRb2RkID0gaW50ZXJuICgib2RkIik7CisgICBzdGF0aWNwcm8gKCZRb2RkKTsK KyAgIFFldmVuID0gaW50ZXJuICgiZXZlbiIpOworICAgc3RhdGljcHJvICgmUWV2ZW4pOworICAg UUNmbG93Y29udHJvbCA9IGludGVybiAoIjpmbG93Y29udHJvbCIpOworICAgc3RhdGljcHJvICgm UUNmbG93Y29udHJvbCk7CisgICBRaHcgPSBpbnRlcm4gKCJodyIpOworICAgc3RhdGljcHJvICgm UWh3KTsKKyAgIFFzdyA9IGludGVybiAoInN3Iik7CisgICBzdGF0aWNwcm8gKCZRc3cpOworICAg UUNzdW1tYXJ5ID0gaW50ZXJuICgiOnN1bW1hcnkiKTsKKyAgIHN0YXRpY3BybyAoJlFDc3VtbWFy eSk7CisgCisgICBRcmVhbCA9IGludGVybiAoInJlYWwiKTsKKyAgIHN0YXRpY3BybyAoJlFyZWFs KTsKKyAgIFFuZXR3b3JrID0gaW50ZXJuICgibmV0d29yayIpOworICAgc3RhdGljcHJvICgmUW5l dHdvcmspOworICAgUXNlcmlhbCA9IGludG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2x1ZGUgPGRpcmVjdC5oPgogIC8qIElu IHByb2Nlc3MuaCB3aGljaCBjb25mbGljdHMgd2l0aCB0aGUgbG9jYWwgY29weS4gICovCioqKioq KioqKioqKioqKiBzdHJzaWduYWwgKGNvZGUpCioqKiA1Mzc0LDUzNzkgKioqKgotLS0gNTM3OSw1 NTc4IC0tLS0KICAgIHJldHVybiBzaWduYW1lOwogIH0KICAjZW5kaWYgLyogSEFWRV9TVFJTSUdO QUwgKi8KKyAMCisgI2lmZGVmIEhBVkVfVEVSTUlPUworIC8qIEZvciBtYWtlLXNlcmlhbC1wcm9j ZXNzICAqLworIGludCBzZXJpYWxfb3BlbiAoY2hhciAqcG9ydCkKKyB7CisgICBpbnQgZmQgPSAt MTsKKyAKKyAgIGZkID0gZW1hY3Nfb3BlbiAoKGNoYXIqKSBwb3J0LAorIAkJICAgT19SRFdSCisg I2lmZGVmIE9fTk9OQkxPQ0sKKyAJCSAgIHwgT19OT05CTE9DSworICNlbHNlCisgCQkgICB8IE9f TkRFTEFZCisgI2VuZGlmCisgI2lmZGVmIE9fTk9DVFRZCisgCQkgICB8IE9fTk9DVFRZCisgI2Vu ZGlmCisgCQkgICAsIDApOworICAgaWYgKGZkIDwgMCkKKyAgICAgeworICAgICAgIGVycm9yICgi Q291bGQgbm90IG9wZW4gJXM6ICVzIiwKKyAJICAgICBwb3J0LCBlbWFjc19zdHJlcnJvciAoZXJy bm8pKTsKKyAgICAgfQorICNpZmRlZiBUSU9DRVhDTAorICAgaW9jdGwgKGZkLCBUSU9DRVhDTCwg KGNoYXIgKikgMCk7CisgI2VuZGlmCisgCisgICByZXR1cm4gZmQ7CisgfQorICNlbmRpZiAvKiBU RVJNSU9TICAqLworIAorICNpZmRlZiBIQVZFX1RFUk1JT1MKKyAvKiBGb3Igc2VyaWFsLXByb2Nl c3MtY29uZmlndXJlICAqLworIHZvaWQKKyBzZXJpYWxfY29uZmlndXJlIChzdHJ1Y3QgTGlzcF9Q cm9jZXNzICpwLAorIAk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hh bmdlZCIpOworICNlbmRpZgorICAgY2hpbGRwMiA9IEZwbGlzdF9wdXQgKGNoaWxkcDIsIFFDYnl0 ZXNpemUsIHRlbSk7CisgCisgICAvKiBDb25maWd1cmUgcGFyaXR5LiAgKi8KKyAgIGlmICghTklM UCAoRnBsaXN0X21lbWJlciAoY29udGFjdCwgUUNwYXJpdHkpKSkKKyAgICAgdGVtID0gRnBsaXN0 X2dldCAoY29udGFjdCwgUUNwYXJpdHkpOworICAgZWxzZQorICAgICB0ZW0gPSBGcGxpc3RfZ2V0 IChwLT5jaGlsZHAsIFFDcGFyaXR5KTsKKyAgIGlmICghTklMUCAodGVtKSAmJiAhRVEgKHRlbSwg UWV2ZW4pICYmICFFUSAodGVtLCBRb2RkKSkKKyAgICAgZXJyb3IgKCI6cGFyaXR5IG11c3QgYmUg bmlsIChubyBwYXJpdHkpLCBgZXZlbicsIG9yIGBvZGQnIik7CisgI2lmIGRlZmluZWQgKFBBUkVO QikgJiYgZGVmaW5lZCAoUEFST0REKSAmJiBkZWZpbmVkIChJR05QQVIpICYmIGRlZmluZWQgKElO UENLKQorICAgYXR0ci5jX2NmbGFnICY9IH4oUEFSRU5CIHwgUEFST0REKTsKKyAgIGF0dHIuY19p ZmxhZyAmPSB+KElHTlBBUiB8IElOUENLKTsKKyAgIGlmIChOSUxQICh0ZW0pKQorICAgICB7Cisg ICAgICAgc3VtbWFyeVsxXSA9ICdOJzsKKyAgICAgfQorICAgZWxzZSBpZiAoRVEgKHRlbSwgUWV2 ZW4pKQorICAgICB7CisgICAgICAgc3VtbWFyeVsxXSA9ICdFJzsKKyAgICAgICBhdHRyLmNfY2Zs YWcgfD0gUEFSRU5COworICAgICAgIGF0dHIuY19pZmxhZyB8PSAoSUdOUEFSIHwgSU5QQ0spOwor ICAgICB9CisgICBlbHNlIGlmIChFUSAodGVtLCBRb2RkKSkKKyAgICAgeworICAgICAgIHN1bW1h cnlbMV0gPSAnTyc7CisgICAgICAgYXR0ci5jX2NmbGFnIH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hciAqKTsKICAKKioqKioqKioqKioqKioqIF9zeXNfcmVhZF9h aGVhZCAoaW50IGZkKQoqKiogMzgwMywzODEyICoqKioKICAgIGlmIChjcCA9PSBOVUxMIHx8IGNw LT5mZCAhPSBmZCB8fCBjcC0+c3RhdHVzICE9IFNUQVRVU19SRUFEX1JFQURZKQogICAgICByZXR1 cm4gU1RBVFVTX1JFQURfRVJST1I7CiAgCiEgICBpZiAoKGZkX2luZm9bZmRdLmZsYWdzICYgKEZJ TEVfUElQRSB8IEZJTEVfU09DS0VUKSkgPT0gMAogICAgICAgIHx8IChmZF9pbmZvW2ZkXS5mbGFn cyAmIEZJTEVfUkVBRCkgPT0gMCkKICAgICAgewohICAgICAgIERlYlByaW50ICgoIl9zeXNfcmVh ZF9haGVhZDogaW50ZXJuYWwgZXJyb3I6IGZkICVkIGlzIG5vdCBhIHBpcGUgb3Igc29ja2V0IVxu IiwgZmQpKTsKICAgICAgICBhYm9ydCAoKTsKICAgICAgfQogIAotLS0gMzgxMCwzODE5IC0tLS0K ICAgIGlmIChjcCA9PSBOVUxMIHx8IGNwLT5mZCAhPSBmZCB8fCBjcC0+c3RhdHVzICE9IFNUQVRV U19SRUFEX1JFQURZKQogICAgICByZXR1cm4gU1RBVFVTX1JFQURfRVJST1I7CiAgCiEgICBpZiAo KGZkX2luZm9bZmRdLmZsYWdzICYgKEZJTEVfUElQRSB8IEZJTEVfU0VSSUFMIHwgRklMRV9TT0NL RVQpKSA9PSAwCiAgICAgICAgfHwgKGZkX2luZm9bZmRdLmZsYWdzICYgRklMRV9SRUFEKSA9PSAw KQogICAgICB7CiEgICAgICAgRGViUHJpbnQgKCgiX3N5c19yZWFkX2FoZWFkOiBpbnRlcm5hbCBl cnJvcjogZmQgJWQgaXMgbm90IGEgcGlwZSwgc2VyaWFsIHBvcnQsIG9yIHNvY2tldCFcbiIsIGZk KSk7CiAgICAgICAgYWJvcnQgKCk7CiAgICAgIH0KICAKKioqKioqKioqKioqKioqIF9zeXNfcmVh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TkRMRSBobmQgPSBmZF9pbmZvW2ZkXS5obmQ7CisgCSAgICAgIE9WRVJM QVBQRUQgKm92bCA9ICZmZF9pbmZvW2ZkXS5jcC0+b3ZsX3JlYWQ7CisgCSAgICAgIERXT1JEIGVy ciA9IDA7CisgCSAgICAgIGludCByYyA9IDA7CisgCSAgICAgIENPTU1USU1FT1VUUyBjdDsKKyAK KyAJICAgICAgaWYgKGNvdW50ID4gMCkKKyAJCXsKKyAJCSAgLyogQ29uZmlndXJlIHRpbWVvdXRz IGZvciBub24tYmxvY2tpbmcgcmVhZC4gICovCisgCQkgIGlmICghR2V0Q29tbVRpbWVvdXRzICho bmQsICZjdCkpCisgCQkgICAgeworIAkJICAgICAgZXJybm8gPSBFSU87CisgCQkgICAgICByZXR1 cm4gLTE7CisgCQkgICAgfQorIAkJICBjdC5SZWFkSW50ZXJ2YWxUaW1lb3V0CSA9IE1BWERXT1JE OworIAkJICBjdC5SZWFkVG90YWxUaW1lb3V0TXVsdGlwbGllcgkgPSAwOworIAkJICBjdC5SZWFk VG90YWxUaW1lb3V0Q29uc3RhbnQJID0gMDsKKyAJCSAgaWYgKCFTZXRDb21tVGltZW91dHMgKGhu ZCwgJmN0KSkKKyAJCSAgICB7CisgCQkgICAgICBlcnJubyA9IEVJTzsKKyAJCSAgICAgIHJldHVy biAtMTsKKyAJCSAgICB9CisgCisgCQkgIGlmICghUmVzZXRFdmVudCAob3ZsLT5oRXZlbnQpKQor IAkJICAgIHsKKyAJCSAgICAgIGVycm5vID0gRUlPOworIAkJICAgICAgcmV0dXJuIC0xOworIAkJ ICAgIH0KKyAJCSAgaWYgKCFSZWFkRmlsZSAoaG5kLCBidWZmZXIsIGNvdW50LCAoRFdPUkQqKSAm cmMsIG92bCkpCisgCQkgICAgeworIAkJICAgICAgaWYgKEdldExhc3RFcnJvciAoKSAhPSBFUlJP Ul9JT19QRU5ESU5HKQorIAkJCXsKKyAJCQkgIGVycm5vID0gRUlPOworIAkJCSAgcmV0dXJuIC0x OworIAkJCX0KKyAJCSAgICAgIGlmICghR2V0T3ZlcmxhcHBlZFJlc3VsdCAoaG5kLCBvdmwsIChE V09SRCopICZyYywgVFJVRSkpCisgCQkJeworIAkJCSAgZXJybm8gPSBFSU87CisgCQkJICByZXR1 cm4gLTE7CisgCQkJfQorIAkJICAgIH0KKyAJCSAgbmNoYXJzICs9IHJjOworIAkJfQorIAkgICAg fQogICNpZmRlZiBIQVZFX1NPQ0tFVFMKICAJICBlbHNlIC8qIEZJTEVfU09DS0VUICovCiAgCSAg ICB7CioqKioqKioqKioqKioqKiBzeXNfcmVhZCAoaW50IGZkLCBjaGFyICogYnVmZmVyLCB1bnNp Z25lCioqKiA0MDM5LDQwNDQgKioqKgotLS0gNDExNSw0MTIzIC0tLS0KICAgIHJldHVybiBuY2hh cnM7CiAgfQogIAorIC8qIEZyb20gdzMyeGZucy5jICovCisgZXh0ZXJuIEhBTkRMRSBpbnRlcnJ1 cHRfaGFuZGxlOworIAogIC8qIEZvciBub3csIGRvbid0IGJvdGhlciB3aXRoIGEgbm9uLWJsb2Nr aW5nIG1vZGUgKi8KICBpbnQKICBzeXNfd3JpdGUgKGludCBmZCwgY29uc3Qgdm9pZCAqIGJ1ZmZl ciwgdW5zaWduZWQgaW50IGNvdW50KQoqKioqKioqKioqKioqKiogc3lzX3dyaXRlIChpbnQgZmQs IGNvbnN0IHZvaWQgKiBidWZmZXIsIAoqKiogNDA1MSw0MDU3ICoqKioKICAgICAgICByZXR1cm4g LTE7CiAgICAgIH0KICAKISAgIGlmIChmZCA8IE1BWERFU0MgJiYgZmRfaW5mb1tmZF0uZmxhZ3Mg JiAoRklMRV9QSVBFIHwgRklMRV9TT0NLRVQpKQogICAgICB7CiAgICAgICAgaWYgKChmZF9pbmZv W2ZkXS5mbGFncyAmIEZJTEVfV1JJVEUpID09IDApCiAgCXsKLS0tIDQxMzAsNDEzNiAtLS0tCiAg ICAgICAgcmV0dXJuIC0xOwogICAgICB9CiAgCiEgICBpZiAoZmQgPCBNQVhERVNDICYmIGZkX2lu Zm9bZmRdLmZsYWdzICYgKEZJTEVfUElQRSB8IEZJTEVfU09DS0VUIHwgRklMRV9TRVJJQUwpKQog ICAgICB7CiAgICAgICAgaWYgKChmZF9pbmZvW2ZkXS5mbGFncyAmIEZJTEVfV1JJVEUpID09IDAp CiAgCXsKKioqKioqKioqKioqKioqIHN5c193cml0ZSAoaW50IGZkLCBjb25zdCB2b2lkICogYnVm ZmVyLCAKKioqIDQwOTIsNDA5NyAqKioqCi0tLSA0MTcxLDQyMTIgLS0tLQogIAl9CiAgICAgIH0K ICAKKyAgIGlmIChmZCA8IE1BWERFU0MgJiYgZmRfaW5mb1tmZF0uZmxhZ3MgJiBGSUxFX1NFUklB TCkKKyAgICAgeworICAgICAgIEhBTkRMRSBobmQgPSAoSEFORExFKSBfZ2V0X29zZmhhbmRsZSAo ZmQpOworICAgICAgIE9WRVJMQVBQRUQgKm92bCA9ICZmZF9pbmZvW2ZkXS5jcC0+b3ZsX3dyaXRl OworICAgICAgIEhBTkRMRSB3YWl0X2huZFsyXSA9IHsgaW50ZXJydXB0X2hhbmRsZSwgb3ZsLT5o RXZlbnQgfTsKKyAgICAgICBEV09SRCBhY3RpdmUgPSAwOworIAorICAgICAgIGlmICghV3JpdGVG aWxlIChobmQsIGJ1ZmZlciwgY291bnQsIChEV09SRCopICZuY2hhcnMsIG92bCkpCisgCXsKKyAJ ICBpZiAoR2V0TGFzdEVycm9yICgpICE9IEVSUk9SX0lPX1BFTkRJTkcpCisgCSAgICB7CisgCSAg ICAgIGVycm5vID0gRUlPOworIAkgICAgICByZXR1cm4gLTE7CisgCSAgICB9CisgCSAgaWYgKGRl dGVjdF9pbnB1dF9wZW5kaW5nICgpKQorIAkgICAgYWN0aXZlID0gTXNnV2FpdEZvck11bHRpcGxl T2JqZWN0cyAoMiwgd2FpdF9obmQsIEZBTFNFLCBJTkZJTklURSwKKyAJCQkJCQlRU19BTExJTlBV VCk7CisgCSAgZWxzZQorIAkgICAg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KKyAgICAgdGVtID0g RnBsaXN0X2dldCAoY29udGFjdCwgUUNzdG9wYml0cyk7CisgICBlbHNlCisgICAgIHRlbSA9IEZw bGlzdF9nZXQgKHAtPmNoaWxkcCwgUUNzdG9wYml0cyk7CisgICBpZiAoTklMUCAodGVtKSkKKyAg ICAgdGVtID0gbWFrZV9udW1iZXIgKDEpOworICAgQ0hFQ0tfTlVNQkVSICh0ZW0pOworICAgaWYg KFhJTlQgKHRlbSkgIT0gMSAmJiBYSU5UICh0ZW0pICE9IDIpCisgICAgIGVycm9yICgiOnN0b3Bi aXRzIG11c3QgYmUgbmlsICgxIHN0b3BiaXQpLCAxLCBvciAyIik7CisgICBzdW1tYXJ5WzJdID0g WElOVCAodGVtKSArICcwJzsKKyAgIGlmIChYSU5UICh0ZW0pID09IDEpCisgICAgIGRjYi5TdG9w Qml0cyA9IE9ORVNUT1BCSVQ7CisgICBlbHNlIGlmIChYSU5UICh0ZW0pID09IDIpCisgICAgIGRj Yi5TdG9wQml0cyA9IFRXT1NUT1BCSVRTOworICAgY2hpbGRwMiA9IEZwbGlzdF9wdXQgKGNoaWxk cDIsIFFDc3RvcGJpdHMsIHRlbSk7CisgCisgICAvKiBDb25maWd1cmUgZmxvd2NvbnRyb2wuICAq LworICAgaWYgKCFOSUxQIChGcGxpc3RfbWVtYmVyIChjb250YWN0LCBRQ2Zsb3djb250cm9sKSkp CisgICAgIHRlbSA9IEZwbGlzdF9nZXQgKGNvbnRhY3QsIFFDZmxvd2NvbnRyb2wpOworICAgZWxz ZQorICAgICB0ZW0gPSBGcGxpc3RfZ2V0IChwLT5jaGlsZHAsIFFDZmxvd2NvbnRyb2wpOworICAg aWYgKCFOSUxQICh0ZW0pICYmICFFUSAodGVtLCBRaHcpICYmICFFUSAodGVtLCBRc3cpKQorICAg ICBlcnJvciAoIjpmbG93Y29udHJvbCBtdXN0IGJlIG5pbCAobm8gZmxvd2NvbnRyb2wpLCBgaHcn LCBvciBgc3cnIik7CisgICBkY2IuZk91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ICNkZWZpbmUgRklMRV9TT0NLRVQg ICAgICAgICAgICAgMHgwMjAwCiAgI2RlZmluZSBGSUxFX05ERUxBWSAgICAgICAgICAgICAweDA0 MDAKKyAjZGVmaW5lIEZJTEVfU0VSSUFMICAgICAgICAgICAgIDB4MDgwMAogIAogIGV4dGVybiBj aGlsZF9wcm9jZXNzICogbmV3X2NoaWxkICh2b2lkKTsKICBleHRlcm4gdm9pZCBkZWxldGVfY2hp bGQgKGNoaWxkX3Byb2Nlc3MgKmNwKTsK ------=_Part_7386_30912129.1212701753629--