From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: [PATCH] system-type cygwin with window-system w32 Date: Sun, 17 Jul 2011 17:01:38 -0700 Message-ID: <4E2377E2.1020804@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1348E8AE1F367C1AE159F713" X-Trace: dough.gmane.org 1310947354 17334 80.91.229.12 (18 Jul 2011 00:02:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2011 00:02:34 +0000 (UTC) To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 18 02:02:25 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QibHz-0001YT-P4 for ged-emacs-devel@m.gmane.org; Mon, 18 Jul 2011 02:02:24 +0200 Original-Received: from localhost ([::1]:45480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QibHy-0005h8-Vs for ged-emacs-devel@m.gmane.org; Sun, 17 Jul 2011 20:02:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QibHZ-0005fT-QB for emacs-devel@gnu.org; Sun, 17 Jul 2011 20:02:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QibHP-0000PV-Rf for emacs-devel@gnu.org; Sun, 17 Jul 2011 20:01:57 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:42412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QibHO-0000PQ-Rp for emacs-devel@gnu.org; Sun, 17 Jul 2011 20:01:47 -0400 Original-Received: by iwn8 with SMTP id 8so2865682iwn.0 for ; Sun, 17 Jul 2011 17:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; bh=AEuEPxzzclE65ADvlL+FqaMrfEPka+A7RlJvNDfltuA=; b=v1X1qh17xkGUwowgeQ5mZQYlDa8lcNUuj5j2mUJJ2qf4Xy/RcycQKaW5O93uf9Yu6q BYB15sjoo2/dDBR8hzcU2cVAsq/DP6OiCEA4WMDQyzKZDrk8GIx4vbKkdxEG+A5SE6Qd Z/ar2S77rT8nKeu/CYgWtA5gylkgdFkCcZdEk= Original-Received: by 10.231.45.82 with SMTP id d18mr5570347ibf.39.1310947305375; Sun, 17 Jul 2011 17:01:45 -0700 (PDT) Original-Received: from [192.168.1.2] (c-24-18-179-193.hsd1.wa.comcast.net [24.18.179.193]) by mx.google.com with ESMTPS id c2sm2522894ibd.5.2011.07.17.17.01.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Jul 2011 17:01:43 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 X-Enigmail-Version: 1.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142081 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1348E8AE1F367C1AE159F713 Content-Type: multipart/mixed; boundary="------------080804060304030308040007" This is a multi-part message in MIME format. --------------080804060304030308040007 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This patch makes it possible to use the NT GUI with a Cygwin core Emacs. The patch is still a little rough around the edges, but it works well enough to let me do real work in this new Emacs configuration. For me, at least, forgoing the hassle of an X server and gaining some integration makes the new configuration worthwhile. (Of course, I don't plan to merge this before the feature freeze ends. Do we have an emacs-next branch of some sort?) What works: - All the usual Cygwin features, including multitty, real ptys, job control, etc. - Native NT GUI - File dialogs What's new: - Rewritten clipboard system mostly implemented in lisp - Preserving formatting when copying text into other applications (probably better structured as a separate package using the extensible clipboard system) What doesn't work yet: - The normal NT build (I don't have a toolchain to test it) - Graphical menus in customize What I haven't tested: - Image support --------------080804060304030308040007 Content-Type: text/plain; name="cygwin-w32.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="cygwin-w32.patch" PT09IG1vZGlmaWVkIGZpbGUgJ2NvbmZpZ3VyZS5pbicKLS0tIGNvbmZpZ3VyZS5pbgkyMDEx LTA3LTEzIDEwOjM2OjEyICswMDAwCisrKyBjb25maWd1cmUuaW4JMjAxMS0wNy0xNyAxMDoy NDoxOCArMDAwMApAQCAtMTY4LDYgKzE2OCw3IEBACiBPUFRJT05fREVGQVVMVF9PTihbeGF3 M2RdLFtkb24ndCB1c2UgWGF3M2RdKQogT1BUSU9OX0RFRkFVTFRfT04oW3hpbV0sW2Rvbid0 IHVzZSBYMTEgWElNXSkKIE9QVElPTl9ERUZBVUxUX09GRihbbnNdLFt1c2UgTmVYVHN0ZXAg KENvY29hIG9yIEdOVXN0ZXApIHdpbmRvd2luZyBzeXN0ZW1dKQorT1BUSU9OX0RFRkFVTFRf T0ZGKFt3MzJdLCBbdXNlIGEgV2luMzJdKQogCiBPUFRJT05fREVGQVVMVF9PTihbZ3BtXSxb ZG9uJ3QgdXNlIC1sZ3BtIGZvciBtb3VzZSBzdXBwb3J0IG9uIGEgR05VL0xpbnV4IGNvbnNv bGVdKQogT1BUSU9OX0RFRkFVTFRfT04oW2RidXNdL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Cj09PSBtb2RpZmllZCBmaWxlICds aXNwL2xvYWR1cC5lbCcKLS0tIGxpc3AvbG9hZHVwLmVsCTIwMTEtMDctMDYgMjI6NDM6NDgg KzAwMDAKKysrIGxpc3AvbG9hZHVwLmVsCTIwMTEtMDctMTYgMTQ6NDU6MTggKzAwMDAKQEAg LTIwNywxNSArMjA3LDE3IEBACiAgICAgICAobG9hZCAidGVybS9jb21tb24td2luIikKICAg ICAgIChsb2FkICJ0ZXJtL3gtd2luIikpKQogCi0oaWYgKGVxIHN5c3RlbS10eXBlICd3aW5k b3dzLW50KQorKGlmIChvciAoZXEgc3lzdGVtLXR5cGUgJ3dpbmRvd3MtbnQpCisgICAgICAg IChmZWF0dXJlcCAndzMyKSkKICAgICAocHJvZ24KICAgICAgIChsb2FkICJ3MzItdmFycyIp CiAgICAgICAobG9hZCAidGVybS9jb21tb24td2luIikKICAgICAgIChsb2FkICJ0ZXJtL3cz Mi13aW4iKQotICAgICAgKGxvYWQgImxzLWxpc3AiKQogICAgICAgKGxvYWQgImRpc3AtdGFi bGUiKQotICAgICAgKGxvYWQgImRvcy13MzIiKQotICAgICAgKGxvYWQgInczMi1mbnMiKSkp CisgICAgICAod2hlbiAoZXEgc3lzdGVtLXR5cGUgJ3dpbmRvd3MtbnQpCisgICAgICAgIChs b2FkICJscy1saXNwIikKKyAgICAgICAgKGxvYWQgImRvcy13MzIiKQorICAgICAgICAobG9h ZCAidzMyLWZucyIpKSkpCiAoaWYgKGVxIHN5c3RlbS10eXBlICdtcy1kb3MpCiAgICAgKHBy b2duCiAgICAgICAobG9hZCAiZG9zLXczMiIpCgo9PT0gbW9kaWZpZWQgZmlsZSAnbGlzcC9t b3VzZS5lbCcKLS0tIGxpc3AvbW91c2UuZWwJMjAxMS0wNy0xNCAxNDowMToxNiArMDAwMAor KysgbGlzcC9tb3VzZS5lbAkyMDExLTA3LTE3IDEyOjMxOjE4ICswMDAwCkBAIC0xMjc3LDcg KzEyNzcsNyBAQAogICAob3IgbW91c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ICAgICAgICAgICAgICAgICAgLmJvcmRl cldpZHRoCis7OyAtZGlzcGxheSAgICAgICAgICAgICAuZGlzcGxheQorOzsgLWZnICAgICAg ICAgICAgICAgICAgKmZvcmVncm91bmQKKzs7IC1mbiAgICAgICAgICAgICAgICAgICpmb250 Cis7OyAtZm9udCAgICAgICAgICAgICAgICAqZm9udAorOzsgLWZvcmVncm91bmQgICAgICAg ICAgKmZvcmVncm91bmQKKzs7IC1nZW9tZXRyeSAgICAgICAgICAgIC5nZW9tZXRyeQorOzsg LWkgICAgICAgICAgICAgICAgICAgLmljb25UeXBlCis7OyAtaXR5cGUgICAgICAgICAgICAg ICAuaWNvblR5cGUKKzs7IC1pY29uaWMgICAgICAgICAgICAgIC5pY29uaWMKKzs7IC1uYW1l ICAgICAgICAgICAgICAgIC5uYW1lCis7OyAtcmV2ZXJzZSAgICAgICAgICAgICAqcmV2ZXJz ZVZpZGVvCis7OyAtcnYgICAgICAgICAgICAgICAgICAqcmV2ZXJzZVZpZGVvCiA7OyAtc2Vs ZWN0aW9uVGltZW91dCAgICAuc2VsZWN0aW9uVGltZW91dAotOzsgLXN5bmNocm9ub3VzCQkq c3luY2hyb25vdXMKKzs7IC1zeW5jaHJvbm91cyAgICAgICAgICpzeW5jaHJvbm91cwogOzsg LXhybQogCiA7OyBBbiBhbGlzdCBvZiBYIG9wdGlvbnMgYW5kIHRoZSBmdW5jdGlvbiB3aGlj aCBoYW5kbGVzIHRoZW0uICBTZWUKQEAgLTExMCwyMyArMTEwLDIzIEBACiAgICAgOzsgYmVm b3JlIHNldHRpbmcgdGhlIHNlbGVjdGVkIGZyYW1lIC0gb3RoZXJ3aXNlIGl0CiAgICAgOzsg d29uJ3Qgd29yay4gIDxza3hAdGFyZGlzLmVkLmFjLnVrPgogICAgIChsZXQqICgod2luZG93 IChwb3NuLXdpbmRvdyAoZXZlbnQtc3RhcnQgZXZlbnQpKSkKLQkgICAoY29vcmRzIChwb3Nu LXgteSAoZXZlbnQtc3RhcnQg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mctc3lzdGVtCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdC1maWxlLW5hbWUtY29kaW5nLXN5c3Rl bSkpKQorICAgICAgICAgICAgICAgICAgKHNldHEgZmlsZS1uYW1lCisgICAgICAgICAgICAg ICAgICAgICAgICAobWFwY29uY2F0ICd1cmwtaGV4aWZ5LXN0cmluZworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoc3BsaXQtc3RyaW5nIChlbmNvZGUtY29kaW5nLXN0 cmluZyBmIGNvZGluZykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAiLyIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIv IikpKQorICAgICAgICAgICAgICAgIChkbmQtaGFuZGxlLW9uZS11cmwgd2luZG93ICdwcml2 YXRlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29uY2F0ICJmaWxl OiIgZmlsZS1uYW1lKSkpCisgICAgICAgICAgICAgICAgKGNhciAoY2RyIChjZHIgZXZlbnQp KSkpKQogICAocmFpc2UtZnJhbWUpKSkKIAogKGRlZnVuIHczMi1kcmFnLW4tZHJvcC1vdGhl ci1mcmFtZSAoZXZlbnQpCkBAIC0xOTcsMTEgKzE5NywxMSBAQAogICAgICAgIDs7IHRoZSB2 ZXJzaW9uIHdlIHdlcmUgY29tcGlsZWQgYWdhaW5zdC4gIChJZiB3ZSB3ZXJlIGNvbXBpbGVk CiAgICAgICAgOzsgd2l0aG91dCBQTkcgc3VwcG9ydCwgbGlicG5nLXZlcnNpb24ncyB2YWx1 ZSBpcyAtMS4pCiAgICAgICAgKGlmICg+PSBsaWJwbmctdmVyc2lvbiAxMDQwMCkKLQkgICA7 OyBsaWJwbmcxNC0xNC5kbGwgaXMgbGlicG5nIDEuNC4zIGZyb20gR1RLKwotCSAgICcocG5n ICJsaWJwbmcxNC0xNC5kbGwiICJsaWJwbmcxNC5kbGwiKQ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sb3Itc3RyaW5nIChuYW1lIGNvbG9yKQorICAoaWYgY29sb3IKKyAgICAgIChw cm9nbgorICAgICAgICAoc2V0cSBjb2xvciAoY29sb3ItdmFsdWVzIGNvbG9yKSkKKyAgICAg ICAgKGZvcm1hdCAiJXM6IyUwMnglMDJ4JTAyeDsiCisgICAgICAgICAgICAgICAgbmFtZQor ICAgICAgICAgICAgICAgICgvIChjYXIgY29sb3IpIDI1NikKKyAgICAgICAgICAgICAgICAo LyAoY2FyIChjZHIgY29sb3IpKSAyNTYpCisgICAgICAgICAgICAgICAgKC8gKGNhciAoY2Ry IChjZHIgY29sb3IpKSkgMjU2KSkpCisgICAgIiIpKQorCisoZGVmdW4gdzMyLWNsaXBib2Fy ZC1mYWNlLWFzLXN0eWxlIChmYWNlICZvcHRpb25hbCBiYWNrZ3JvdW5kKQorICAoaWYgKG51 bGwgZmFjZSkKKyAgICAgICIiCisgICAgKGNvbmNhdAorICAgICAiIHN0eWxlPVwiIgorICAg ICAodzMyLWNsaXBib2FyZC1jb2xvci1zdHJpbmcgCisgICAgICAiY29sb3IiCisgICAgICAo ZmFjZS1hdHRyaWJ1dGUgZmFjZSA6Zm9yZWdyb3VuZCBuaWwgJ2RlZmF1bHQpKQorICAgICAo aWYgYmFja2dyb3VuZAorICAgICAgICAgKHczMi1jbGlwYm9hcmQtY29sb3Itc3RyaW5nIAor ICAgICAgICAgICJiYWNrZ3JvdW5kLWNvbG9yIgorICAgICAgICAgIChmYWNlLWF0dHJpYnV0 ZSBmYWNlIDpiYWNrZ3JvdW5kIG5pbCAnZGVmYXVsdCkpCisgICAgICAgIiIpCisgICAgIlwi IikpKQorCisoZGVmdW4gdzMyLWNsaXBib2FyZC1zdHJpbmctdG8taHRtbCAoc3RyKQorICAi Rm9ybWF0IGEgc3RyaW5nIGZvciBXaW5kb3dzIEhUTUwgaW50ZXJjaGFuZ2UgdmlhIHRoZSBj bGlwYm9hcmQuIgorICAobGV0IChmYWNlIHByZXYtZmFjZQorICAgICAgICAgICAgIGJvZHkK KyAgICAgICAgICAgICByZXN1bHQKKyAgICAgICAgICAgICBjaHIgcGFydAorICAgICAgICAg ICAgIChpIDApIChsZW4gKGxlbmd0aCBzdHIpKSkKKyAgICAod2hpbGUgKDwgaSBsZW4pCisg ICAgICAoc2V0cSBjaHIgKGFyZWYgc3RyIGkpKQorICAgICAgKGNvbmQgKChhbmQgKD49IGNo ciAzMikKKyAgICAgICAgICAgICAgICAgICg8PSBjaHIgMTI2KQorICAgICAgICAgICAgICAg ICAgKG5vdCAobWVtcWwgY2hyICcoP1w8ID9cPiA/XCIgXD8mKSkpKQorICAgICAgICAgICAg IChzZXRxIHBhcnQgKGNoYXItdG8tc3RyaW5nIGNocikpKQorICAgICAgICAgICAgKChlcWwg Y2hyID9cbikKKyAgICAgICAgICAgICAoc2V0cSBwYXJ0ICJcclxuIikpCisgICAgICAgICAg ICAodAorICAgICAgICAgICAgIChzZXRxIHBhcnQgKGZvcm1hdCAiJiN4JXg7IiBjaHIpKSkp CisgICAgICAoc2V0cSBmYWNlIChvciAoZ2V0LXRleHQtcHJvcGVydHkgaSAnZmFjZSBzdHIp KSkKKyAgICAgICh3aGVuIChvciAobm90IGJvZHkpIChub3QgKGVxIGZhY2UgcHJldi1mYWNl KSkpCisgICAgICAgIChzZXRxIGJvZHkgKGNvbnMgKGZvcm1hdCAoaWYgYm9keSAiPC9zcGFu PjxzcGFuJXM+IiAiPHNwYW4lcz4iKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHczMi1jbGlwYm9hcmQtZmFjZS1hcy1zdHlsZSBmYWNlKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICBib2R5KSkKKyAgICAgICAgKHNldHEgcHJldi1mYWNlIGZhY2UpKQorICAg ICAgKHNldHEgYm9keSAoY29ucyBwYXJ0IGJvZHkpKQorICAgICAgKHNldHEgaSAoMSsgaSkp KQorCisgICAgKHdoZW4gYm9keQorICAgICAgKHNldHEgYm9keSAoY29ucyAiPC9zcGFuPiIg Ym9keSkpKQorICAgIChzZXRxIGJvZHkgKG1hcGNvbmNhdCAjJ2lkZW50aXR5IChucmV2ZXJz ZSBib2R5KSAiIikpCisgICAgKGxldCogKChwcmVmaXggKGZvcm1hdCB3MzItY2xpcGJvYXJk LWh0bWwtZnJhZ21lbnQtcHJlZml4CisgICAgICAgICAgICAgICAgICAgICAgICAgICAodzMy LWNsaXBib2FyZC1mYWNlLWFzLXN0eWxlICdkZWZhdWx0IHQpKSkKKyAgICAgICAgICAgKHN1 ZmZpeCB3MzItY2xpcGJvYXJkLWh0bWwtZnJhZ21lbnQtc3VmZml4KQorICAgICAgICAgICAo U3RhcnRIVE1MIChsZW5ndGggdzMyLWNsaXBib2FyZC1odG1sLWhlYWRlcikpCisgICAgICAg ICAgIChTdGFydEZyYWdtZW50ICgrIFN0YXJ0SFRNTCAobGVuZ3RoIHByZWZpeCkpKQorICAg ICAgICAgICAoRW5kRnJhZ21lbnQgKCsgU3RhcnRGcmFnbWVudCAobGVuZ3RoIGJvZHkpKSkK KyAgICAgICAgICAgKEVuZEhUTUwgKCsgRW5kRnJhZ21lbnQgKGxlbmd0aCBzdWZmaXgpKSkp CisgICAgICAoc2V0cSByZXN1bHQKKyAgICAgICAgICAgIChjb25jYXQKKyAgICAgICAgICAg ICAoZm9ybWF0IHczMi1jbGlwYm9hcmQtaHRtbC1oZWFkZXIKKyAgICAgICAgICAgICAgICAg ICAgIFN0YXJ0SFRNTAorICAgICAgICAgICAgICAgICAgICAgRW5kSFRNTAorICAgICAgICAg ICAgICAgICAgICAgU3RhcnRGcmFnbWVudAorICAgICAgICAgICAgICAgICAgICAgRW5kRnJh Z21lbnQpCisgICAgICAgICAgICAgcHJlZml4CisgICAgICAgICAgICAgYm9keQorICAgICAg ICAgICAgIHN1ZmZpeCkpCisgICAgICAobWVzc2FnZSAiJVMiIHJlc3VsdCkKKyAgICAgIHJl c3VsdCkpKQorCisoYWRkLWhvb2sgJ3czMi1jbGlwYm9hcmQtcmVu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llURSoKK19tYnNuY3B5IChCWVRFKiBkZXN0LCBjb25zdCBCWVRFKiBzcmMsIHNp emVfdCBjb3VudCkKK3sKKyAgcmV0dXJuIHN0cm5jcHkgKGRlc3QsIHNyYywgY291bnQpOyAv KiBYWFg6IHN0dWIgKi8KK30KKworZXh0ZXJuIExpc3BfT2JqZWN0Citjb252X2ZpbGVuYW1l X3RvX3czMl91bmljb2RlIChMaXNwX09iamVjdCBpbiwgaW50IGFic29sdXRlX3ApCit7Cisg IHNzaXplX3QgY29udmVydGVkX2xlbjsKKyAgTGlzcF9PYmplY3QgY29udmVydGVkOworICB1 bnNpZ25lZCBmbGFnczsKKworICBmbGFncyA9IENDUF9QT1NJWF9UT19XSU5fVzsKKyAgaWYg KCFhYnNvbHV0ZV9wKSB7CisgICAgZmxhZ3MgfD0gQ0NQX1JFTEFUSVZFOworICB9CisKKyAg aW4gPSBFTkNPREVfVVRGXzggKGluKTsKKworICBjb252ZXJ0ZWRfbGVuID0gY3lnd2luX2Nv bnZfcGF0aCAoZmxhZ3MsIFNEQVRBIChpbiksIE5VTEwsIDApOworICBpZiAoY29udmVydGVk X2xlbiA8IDIpCisgICAgZXJyb3IgKCJjeWd3aW5fY29udl9wYXRoOiAlcyIsIHN0cmVycm9y IChlcnJubykpOworICAKKyAgY29udmVydGVkID0gbWFrZV91bmluaXRfc3RyaW5nIChjb252 ZXJ0ZWRfbGVuIC0gMSk7CisgIGlmIChjeWd3aW5fY29udl9wYXRoIChmbGFncywgU0RBVEEg KGluKSwKKyAgICAgICAgICAgICAgICAgICAgICAgIFNEQVRBIChjb252ZXJ0ZWQpLCBjb252 ZXJ0ZWRfbGVuKSkKKyAgICBlcnJvciAoImN5Z3dpbl9jb252X3BhdGg6ICVzIiwgc3RyZXJy b3IgKGVycm5vKSk7CisgIAorICByZXR1cm4gY29udmVydGVkOworfQorCitleHRlcm4gTGlz cF9PYmplY3QKK2NvbnZfZmlsZW5hbWVfZnJvbV93MzJfdW5pY29kZSAoY29uc3Qgd2NoYXJf dCogaW4sIGludCBhYnNvbHV0ZV9wKQoreworICBzc2l6ZV90IGNvbnZlcnRlZF9sZW47Cisg IExpc3BfT2JqZWN0IGNvbnZlcnRlZDsKKyAgdW5zaWduZWQgZmxhZ3M7CisKKyAgZmxhZ3Mg PSBDQ1BfV0lOX1dfVE9fUE9TSVg7CisgIGlmICghYWJzb2x1dGVfcCkgeworICAgIGZsYWdz IHw9IENDUF9SRUxBVElWRTsKKyAgfQorCisgIGNvbnZlcnRlZF9sZW4gPSBjeWd3aW5fY29u dl9wYXRoIChmbGFncywgaW4sIE5VTEwsIDApOworICBpZiAoY29udmVydGVkX2xlbiA8IDEp CisgICAgZXJyb3IgKCJjeWd3aW5fY29udl9wYXRoOiAlcyIsIHN0cmVycm9yIChlcnJubykp OworICAKKyAgY29udmVydGVkID0gbWFrZV91bmluaXRfc3RyaW5nIChjb252ZXJ0ZWRfbGVu IC0gMSAvKnN1YnRyYWN0IHRlcm1pbmF0b3IqLyk7CisgIGlmIChjeWd3aW5fY29udl9wYXRo IChmbGFncywgaW4sIFNEQVRBIChjb252ZXJ0ZWQpLCBjb252ZXJ0ZWRfbGVuKSkKKyAgICBl cnJvciAoImN5Z3dpbl9jb252X3BhdGg6ICVzIiwgc3RyZXJyb3IgKGVycm5vKSk7CisgIAor ICByZXR1cm4gY29kZV9jb252ZXJ0X3N0cmluZ19ub3JlY29yZCAoY29udmVydGVkLCBRdXRm XzgsIDApOworfQorCitMaXNwX09iamVjdAorZnJvbV91bmljb2RlIChMaXNwX09iamVjdCBz dHIpCit7CisgIENIRUNLX1NUUklORyAoc3RyKTsKKyAgaWYgKCFTVFJJTkdfTVVMVElCWVRF IChzdHIpICYmCisgICAgICBTQllURVMgKHN0cikgJiAxKQorICAgIHsKKyAgICAgIHN0ciA9 IEZzdWJzdHJpbmcgKHN0ciwgbWFrZV9udW1iZXIgKDApLCBtYWtlX251bWJlciAoLTEpKTsK KyAgICB9CisgIAorICByZXR1cm4gY29kZV9jb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KKyAgICAgICAxLCAyLCAwLAorICAgICAgIGRvYzogLyogQ29udmVydCBQ QVRIIHRvIGEgV2luZG93cyBwYXRoLiAgSWYgQUJTT0xVVEUtUCBpZgorICAgICAgICAgICAg ICAgbm9uLW5pbCwgcmV0dXJuIGFuIGFic29sdXRlIHBhdGguKi8pCisgIChMaXNwX09iamVj dCBwYXRoLCBMaXNwX09iamVjdCBhYnNvbHV0ZV9wKQoreworICByZXR1cm4gZnJvbV91bmlj b2RlICgKKyAgICBjb252X2ZpbGVuYW1lX3RvX3czMl91bmljb2RlIChwYXRoLCBhYnNvbHV0 ZV9wID09IFFuaWwgPyAwIDogMSkpOworfQorCitERUZVTiAoImN5Z3dpbi1jb252ZXJ0LXBh dGgtZnJvbS13aW5kb3dzIiwKKyAgICAgICBGY3lnd2luX2NvbnZlcnRfcGF0aF9mcm9tX3dp bmRvd3MsIFNjeWd3aW5fY29udmVydF9wYXRoX2Zyb21fd2luZG93cywKKyAgICAgICAxLCAy LCAwLAorICAgICAgIGRvYzogLyogQ29udmVydCBhIFdpbmRvd3MgcGF0aCB0byBhIEN5Z3dp biBwYXRoLiAgSWYgQUJTT0xVVEUtUAorICAgICAgICAgICAgICAgaWYgbm9uLW5pbCwgcmV0 dXJuIGFuIGFic29sdXRlIHBhdGguKi8pCisgIChMaXNwX09iamVjdCBwYXRoLCBMaXNwX09i amVjdCBhYnNvbHV0ZV9wKQoreworICByZXR1cm4gY29udl9maWxlbmFtZV9mcm9tX3czMl91 bmljb2RlICh0b191bmljb2RlIChwYXRoLCAmcGF0aCksCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGFic29sdXRlX3AgPT0gUW5pbCA/IDAgOiAxKTsKK30K Kwordm9pZAorc3ltc19vZl9jeWd3MzIgKHZvaWQpCit7CisgIC8qIE5vLCBub3QgdXRmLTE2 LWxlOiB0aGF0IG9uZSBoYXMgYSBCT00uICAqLworICBERUZTWU0gKFF1dGZfMTZfbGUsICJ1 dGYt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EFWRV9OVEdVSSkKICAgREVGU1lNIChRbGFuZ3Vh Z2VfY2hhbmdlLCAibGFuZ3VhZ2UtY2hhbmdlIik7CiAjZW5kaWYKIAoKPT09IG1vZGlmaWVk IGZpbGUgJ3NyYy9rZXlib2FyZC5oJwotLS0gc3JjL2tleWJvYXJkLmgJMjAxMS0wNi0yMyAw NjozMTo0MSArMDAwMAorKysgc3JjL2tleWJvYXJkLmgJMjAxMS0wNy0xNiAwNjoyODowMCAr MDAwMApAQCAtNTExLDYgKzUxMSw2IEBACiBleHRlcm4gRU1BQ1NfVElNRSB0aW1lcl9jaGVj ayAodm9pZCk7CiBleHRlcm4gdm9pZCBtYXJrX2tib2FyZHMgKHZvaWQpOwogCi0jaWZkZWYg V0lORE9XU05UCisjaWZkZWYgSEFWRV9OVEdVSQogZXh0ZXJuIGNvbnN0IGNoYXIgKmNvbnN0 IGxpc3B5X2Z1bmN0aW9uX2tleXNbXTsKICNlbmRpZgoKPT09IG1vZGlmaWVkIGZpbGUgJ3Ny Yy9saXNwLmgnCi0tLSBzcmMvbGlzcC5oCTIwMTEtMDYtMjQgMjE6MjU6MjIgKzAwMDAKKysr IHNyYy9saXNwLmgJMjAxMS0wNy0xNyAxNzozNDoxNSArMDAwMApAQCAtMjcsNiArMjcsMTQg QEAKIAogI2luY2x1ZGUgPGludHByb3BzLmg+CiAKKyNkZWZpbmUgdCguLi4pICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICh7ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICBmcHJpbnRm IChzdGRlcnIsICJUOiVzOiV1OiAiLCAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAg ICAgICAgIF9fRlVOQ1RJT05fXywgX19MSU5FX18pOyAgICAgICAgICAgICAgICAgXAorICAg ICAgZnByaW50ZiAoc3RkZXJyLCBfX1ZBX0FSR1NfXyk7ICAgICAgICAgICAgICAgICAg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ZXJu YWwiKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbV91bmljb2Rl IChkaXIpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtdXN0bWF0Y2gs CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb21fdW5pY29kZSAoZGly KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUWZpbGVfbmFtZV9oaXN0 b3J5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0X2ZpbGVu YW1lLCBRbmlsICk7CisgICAgZmlsZW5hbWUgPSB1bmJpbmRfdG8gKGNvdW50LCBmaWxlbmFt ZSk7CiAgIH0KIAogICBVTkdDUFJPOwogCiAgIC8qIE1ha2UgIkNhbmNlbCIgZXF1aXZhbGVu dCB0byBDLWcuICAqLwotICBpZiAoTklMUCAoZmlsZSkpCisgIGlmIChOSUxQIChmaWxlbmFt ZSkpCiAgICAgRnNpZ25hbCAoUXF1aXQsIFFuaWwpOwogCi0gIHJldHVybiB1bmJpbmRfdG8g KGNvdW50LCBmaWxlKTsKKyAgcmV0dXJuIHVuYmluZF90byAoY291bnQsIGZpbGVuYW1lKTsK IH0KIAorI2lmZGVmIFdJTkRPV1NOVAogCiAvKiBNb3ZpbmcgZmlsZXMgdG8gdGhlIHN5c3Rl bSByZWN5Y2xlIGJpbi4KICAgIFVzZWQgYnkgYG1vdmUtZmlsZS10by10cmFzaCcgaW5zdGVh ZCBvZiB0aGUgZGVmYXVsdCBtb3ZpbmcgdG8gfi8uVHJhc2ggICovCkBAIC02MDk4LDYgKzYx ODYsOCBAQAogICByZXR1cm4gUW5pbDsKIH0KIAorI2VuZGlmIC8qIFdJTkRPV1NOVCAqLwor CiAMCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioKICAgICAgICAgICAgICAgICAgICAgICAgICB3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ZXJyb3IgY29kZXMu ICAqLworY2hhciAqCit3MzJfc3RyZXJyb3IgKGludCBlcnJvcl9ubykKK3sKKyAgc3RhdGlj IGNoYXIgYnVmWzUwMF07CisgIERXT1JEIHJldDsKKworICBpZiAoZXJyb3Jfbm8gPT0gMCkK KyAgICBlcnJvcl9ubyA9IEdldExhc3RFcnJvciAoKTsKKworICByZXQgPSBGb3JtYXRNZXNz YWdlIChGT1JNQVRfTUVTU0FHRV9GUk9NX1NZU1RFTSB8CisgICAgICAgICAgICAgICAgICAg ICAgIEZPUk1BVF9NRVNTQUdFX0lHTk9SRV9JTlNFUlRTLAorICAgICAgICAgICAgICAgICAg ICAgICBOVUxMLAorICAgICAgICAgICAgICAgICAgICAgICBlcnJvcl9ubywKKyAgICAgICAg ICAgICAgICAgICAgICAgMCwgLyogY2hvb3NlIG1vc3Qgc3VpdGFibGUgbGFuZ3VhZ2UgKi8K KyAgICAgICAgICAgICAgICAgICAgICAgYnVmLCBzaXplb2YgKGJ1ZiksIE5VTEwpOworICAK KyAgd2hpbGUgKHJldCA+IDAgJiYgKGJ1ZltyZXQgLSAxXSA9PSAnXG4nIHx8CisgICAgICAg ICAgICAgICAgICAgICBidWZbcmV0IC0gMV0gPT0gJ1xyJyApKQorICAgICAgLS1yZXQ7Cisg IGJ1ZltyZXRdID0gJ1wwJzsKKyAgaWYgKCFyZXQpCisgICAgc3ByaW50ZiAoYnVmLCAidzMy IGVycm9yICV1IiwgZXJyb3Jfbm8pOworICAKKyAgcmV0dXJuIGJ1ZjsKK30KKworLyogRm9y IGNvbnZlbmllbmNlIHdoZW4gZGVidWdnaW5nLiAgKi8KK2ludAordzMyX2xhc3RfZXJyb3Ig KHZvaWQpCit7CisgIHJldHVybiBHZXRMYXN0RXJyb3IgKCk7Cit9CisKKy8qIENhY2hlIGlu Zm9ybWF0aW9uIGRlc2NyaWJpbmcgdGhlIE5UIHN5c3RlbSBmb3IgbGF0ZXIgdXNlLiAgKi8K K3ZvaWQKK2NhY2hl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cHNMb2NrLiAg Ki8KKyAgICAgICYmICggICAgKGtleSA9PSBWS19CQUNLKQorCSAgIHx8IChrZXkgPT0gVktf VEFCKQorCSAgIHx8IChrZXkgPT0gVktfQ0xFQVIpCisJICAgfHwgKGtleSA9PSBWS19SRVRV Uk4pCisJICAgfHwgKGtleSA9PSBWS19FU0NBUEUpCisJICAgfHwgKChrZXkgPj0gVktfU1BB Q0UpICYmIChrZXkgPD0gVktfSEVMUCkpCisJICAgfHwgKChrZXkgPj0gVktfTlVNUEFEMCkg JiYgKGtleSA8PSBWS19GMjQpKQorCSAgIHx8ICgoa2V5ID49IFZLX05VTVBBRF9DTEVBUikg JiYgKGtleSA8PSBWS19OVU1QQURfREVMRVRFKSkKKwkgKSkKKyAgICB7CisgICAgICAvKiBP bmx5IGNvbnNpZGVyIHNoaWZ0IHN0YXRlLiAgKi8KKyAgICAgIGlmICgobW9kcyAmIFNISUZU X1BSRVNTRUQpICE9IDApCisJcmV0dmFsIHw9IHNoaWZ0X21vZGlmaWVyOworICAgIH0KKyAg ZWxzZQorICAgIHsKKyAgICAgIC8qIElnbm9yZSBDYXBzTG9jayBzdGF0ZSBpZiBub3QgZW5h YmxlZC4gICovCisgICAgICBpZiAoTklMUCAoVnczMl9lbmFibGVfY2Fwc19sb2NrKSkKKwlt b2RzICY9IH5DQVBTTE9DS19PTjsKKyAgICAgIGlmICgobW9kcyAmIChTSElGVF9QUkVTU0VE IHwgQ0FQU0xPQ0tfT04pKSAhPSAwKQorCXJldHZhbCB8PSBzaGlmdF9tb2RpZmllcjsKKyAg ICB9CisKKyAgcmV0dXJuIHJldHZhbDsKK30KKworLyogVGhlIHJldHVybiBjb2RlIGluZGlj YXRlcyBrZXkgY29kZSBzaXplLiAqLworaW50Cit3MzJfa2JkX3BhdGNoX2tleSAoS0VZX0VW RU5UX1JFQ09SRCAqZXZlbnQpCit7CisgIHVuc2lnbmVkIGludCBrZXlfY29kZSA9IGV2ZW50 LT53VmlydHVhbEtleUNvZGU7CisgIHVuc2lnbmVkIGludCBtb2RzID0gZXZlbnQtPmR3Q29u dHJvbEtleVN0YXRlOworICBCWVRFIGtleXN0YXRlWzI1Nl07CisgIHN0YXRpYyBCWVRFIGFu c2lfY29kZVs0XTsKKyAgc3RhdGljIGludCBpc2RlYWQgPSAwOworCisgIGlmIChpc2RlYWQg PT0gMikKKyAgICB7CisgICAgICBldmVudC0+dUNoYXIuQXNjaWlDaGFyID0gYW5zaV9jb2Rl WzJdOworICAgICAgaXNkZWFkID0gMDsKKyAgICAgIHJldHVybiAxOworICAgIH0KKyAgaWYg KGV2ZW50LT51Q2hhci5Bc2NpaUNoYXIgIT0gMCkKKyAgICByZXR1cm4gMTsKKworICBtZW1z ZXQgKGtleXN0YXRlLCAwLCBzaXplb2YgKGtleXN0YXRlKSk7CisgIGtleXN0YXRlW2tleV9j b2RlXSA9IDB4ODA7CisgIGlmIChtb2RzICYgU0hJRlRfUFJFU1NFRCkKKyAgICBrZXlzdGF0 ZVtWS19TSElGVF0gPSAweDgwOworICBpZiAobW9kcyAmIENBUFNMT0NLX09OKQorICAgIGtl eXN0YXRlW1ZLX0NBUElUQUxdID0gMTsKKyAgLyogSWYgd2UgcmVjb2duaXplIHJpZ2h0LWFs dCBhbmQgbGVmdC1jdHJsIGFzIEFsdEdyLCBzZXQgdGhlIGtleQorICAgICBzdGF0ZXMgYWNj b3JkaW5nbHkgYmVmb3JlIGludm9raW5nIFRvQXNjaWkuICAqLworICBpZiAoIU5JTFAgKFZ3 MzJfcmVjb2duaXplX2FsdGdyKQorICAgICAgJiYgKG1vZHMgJiBMRUZUX0NUUkxfUFJFU1NF RCkgJiYgKG1vZHMgJiBSSUdIVF9BTFRfUFJFU1NFRCkpCisgICAgeworICAgICAga2V5c3Rh dGVbVktfQ09OVFJPTF0gPSAweDgwOworICAgICAga2V5c3RhdGVbVktfTENPTlRST0xdID0g MHg4MDsKKyAgICAgIGtleXN0YXRlW1ZLX01FTlVdID0gMHg4MDsKKyAgICAgIGtleXN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ByZXR1cm4gMDsKKyAgZXZlbnQtPnVDaGFyLkFzY2lpQ2hhciA9IGFuc2lf Y29kZVswXTsKKyAgcmV0dXJuIGlzZGVhZDsKK30KKwordm9pZAordzMyX3N5c19yaW5nX2Jl bGwgKHN0cnVjdCBmcmFtZSAqZikKK3sKKyAgaWYgKHNvdW5kX3R5cGUgPT0gMHhGRkZGRkZG RikKKyAgICB7CisgICAgICBCZWVwICg2NjYsIDEwMCk7CisgICAgfQorICBlbHNlIGlmIChz b3VuZF90eXBlID09IE1CX0VNQUNTX1NJTEVOVCkKKyAgICB7CisgICAgICAvKiBEbyBub3Ro aW5nLiAgKi8KKyAgICB9CisgIGVsc2UKKyAgICBNZXNzYWdlQmVlcCAoc291bmRfdHlwZSk7 Cit9CisKKwwKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKgogCQkJICAgIEluaXRpYWxpemF0aW9uCiAg KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKiovCkBAIC03MTA1LDEwICs3NDY1LDEwIEBACiAKICAgZGVmc3Vi ciAoJlNmaWxlX3N5c3RlbV9pbmZvKTsKICAgZGVmc3ViciAoJlNkZWZhdWx0X3ByaW50ZXJf bmFtZSk7CisgIGRlZnN1YnIgKCZTc2V0X21lc3NhZ2VfYmVlcCk7CiAKICAgY2hlY2tfd2lu ZG93X3N5c3RlbV9mdW5jID0gY2hlY2tfdzMyOwogCi0KICAgaG91cmdsYXNzX3RpbWVyID0g MDsKICAgaG91cmdsYXNzX2h3bmQgPSBOVUxMOwogCkBAIC03MTIzLDcgKzc0ODMsOSBAQAog ICBzdGF0aWNwcm8gKCZsYXN0X3Nob3dfdGlwX2FyZ3MpOwogCiAgIGRlZnN1YnIgKCZTeF9m aWxlX2RpYWxvZyk7CisjaWZkZWYgV0lORE9XU05UCiAgIGRlZnN1YnIgKCZT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AoJm1zZyk7CisgICAgICAgIGNvbnRpbnVlOworICAgICAgfQorCisg ICAgICB0ICgiR290IFdNX0VNQUNTX0NMSVBCT0FSRF9EQVRBIGxQYXJhbToleCB3UGFyYW06 JXgiLAorICAgICAgICAgbXNnLmxQYXJhbSwgbXNnLndQYXJhbSk7CisKKyAgICAgIGlmICht c2cud1BhcmFtKSB7CisgICAgICAgIFNldENsaXBib2FyZERhdGEgKChVSU5UKW1zZy5sUGFy YW0sIChIR0xPQkFMKW1zZy53UGFyYW0pOworICAgICAgICBHbG9iYWxGcmVlICgoSEdMT0JB TCltc2cud1BhcmFtKTsKKyAgICAgIH0gZWxzZSB7CisgICAgICAgIGJyZWFrOworICAgICAg fQorICAgIH0KK30KKworc3RhdGljIHZvaWQKK2NsaXBib2FyZF9sb3N0X2NiIChzdHJ1Y3Qg YXRpbWVyKiBpZ25vcmVkKQoreworICBMaXNwX09iamVjdCBhcmdzWzJdOworICBhcmdzWzBd ID0gUXczMl9sb3N0X3NlbGVjdGlvbl9mdW5jdGlvbnM7CisgIGFyZ3NbMV0gPSBRQ0xJUEJP QVJEOworICBydW5faG9va193aXRoX2FyZ3MgKDIsIGFyZ3MsIEZmdW5jYWxsKTsKK30KIAog c3RhdGljIExSRVNVTFQgQ0FMTEJBQ0sKIG93bmVyX2NhbGxiYWNrIChIV05EIHdpbiwgVUlO VCBtc2csIFdQQVJBTSB3cCwgTFBBUkFNIGxwKQogeworICB0ICgib3duZXJfY2FsbGJhY2si KTsKKwogICBzd2l0Y2ggKG1zZykKICAgICB7CisgICAgY2FzZSBXTV9FTUFDU19DTElQQk9B UkRfREFUQToKKyAgICAgIE9OVFJBQ0UgKGZwcmludGYgKHN0ZGVyciwgIldNX0VNQUNTX0NM SVBCT0FSRF9EQVRBXG4iKSk7CisgICAgICAvKiBJZ25vcmUgb3V0LW9mLWNvbnRleHQgZGF0 YSBtZXNzYWdlcy4gKi8KKyAgICAgIHJldHVybiAwOworCisgICAgY2FzZSBXTV9FTUFD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AjaW5jbHVkZSAiZm9udC5oIgpAQCAtMTg4LDYgKzE5NSwxMSBAQAog c3RhdGljIGludCBpbnB1dF9zaWduYWxfY291bnQ7CiAjZW5kaWYKIAorI2lmZGVmIFVTRV9X MzJfU0VMRUNUCitpbnQgdzMyX2V2dF9waXBlWzJdID0geyAtMSwgLTEgfTsKK0hBTkRMRSB3 MzJfZXZ0X3dyaXRlOworI2VuZGlmIC8qIFVTRV9XMzJfU0VMRUNUICovCisKIC8qIEtleWJv YXJkIGNvZGUgcGFnZSAtIG1heSBiZSBjaGFuZ2VkIGJ5IGxhbmd1YWdlLWNoYW5nZSBldmVu dHMuICAqLwogc3RhdGljIGludCBrZXlib2FyZF9jb2RlcGFnZTsKIApAQCAtNDA1NywxMiAr NDA2OSwyNyBAQAogICAgICAgc3RydWN0IGlucHV0X2V2ZW50IGluZXY7CiAgICAgICBpbnQg ZG9faGVscCA9IDA7CiAKKyAgICAgIC8qIERlYlByaW50ICgoInczMl9yZWFkX3NvY2tldDog JXMgdGltZToldVxuIiwgKi8KKyAgICAgIC8qICAgICAgICAgICAgdzMyX25hbWVfb2ZfbWVz c2FnZSAobXNnLm1zZy5tZXNzYWdlKSwgKi8KKyAgICAgIC8qICAgICAgICAgICAgbXNnLm1z Zy50aW1lKSk7ICovCisKICAgICAgIEVWRU5UX0lOSVQgKGluZXYpOwogICAgICAgaW5ldi5r aW5kID0gTk9fRVZFTlQ7CiAgICAgICBpbmV2LmFyZyA9IFFuaWw7CiAKICAgICAgIHN3aXRj aCAobXNnLm1zZy5tZXNzYWdlKQogCXsKKyAgICAgICAgY2FzZSBXTV9FTUFDU19NVF9DQUxM OgorICAgICAgICAgIHsKKyAgICAgICAgICAgIEVNQUNTX1RJTUUgaW50ZXJ2YWw7CisgICAg ICAgICAgICB2b2lkKiBkYXRhOworCisgICAgICAgICAgICBFTUFDU19TRVRfU0VDU19VU0VD UyAoaW50ZXJ2YWwsIDAsIDApOworICAgICAgICAgICAgbWVtY3B5ICgmZGF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GZkcywgdGltZW91dCk7CisgIH0KKworICBtb2RpZmllZF9yZWFkZmRzID0g KnJlYWRmZHM7CisgIEZEX1NFVCAodzMyX2V2dF9waXBlWzBdLCAgJm1vZGlmaWVkX3JlYWRm ZHMpOworICBuZmRzID0gc2VsZWN0IChtYXggKG5mZHMsIHczMl9ldnRfcGlwZVswXSArIDEp LAorICAgICAgICAgICAgICAgICAmbW9kaWZpZWRfcmVhZGZkcywgd3JpdGVmZHMsIGV4Y2Vw dGZkcywgdGltZW91dCk7CisgIGlmIChuZmRzIDwgMSkgeworICAgIHJldHVybiBuZmRzOwor ICB9CisKKyAgaWYgKEZEX0lTU0VUICh3MzJfZXZ0X3BpcGVbMF0sICZtb2RpZmllZF9yZWFk ZmRzKSkgeworICAgIEZEX0NMUiAodzMyX2V2dF9waXBlWzBdLCAmbW9kaWZpZWRfcmVhZGZk cyk7CisgICAgcmVhZCAodzMyX2V2dF9waXBlWzBdLCAmYnVmLCBzaXplb2YoYnVmKSk7Cisg IH0KKworICAqcmVhZGZkcyA9IG1vZGlmaWVkX3JlYWRmZHM7CisgIHJldHVybiBuZmRzOwor fQorCisKKyNlbmRpZiAvKiBVU0VfVzMyX1NFTEVDVCAqLworCiAMCiAvKiBTZXQgdXAgdXNl IG9mIFczMi4gICovCiAKQEAgLTYyNzUsNiArNjMzOCwxNSBAQAogCXNldF91c2VyX21vZGVs IChMIkdOVS5FbWFjcyIpOwogICAgIH0KIAorI2lmZGVmIFVTRV9XMzJfU0VMRUNUCisgIGlm IChwaXBlICh3MzJfZXZ0X3BpcGUpKSB7CisgICAgZmF0YWwgKCJwaXBlOiAlcyIsIHN0cmVy cm9yIChlcnJubykpOworICB9CisgIGZjbnRsICh3MzJfZXZ0X3BpcGVbMF0sIEZfU0VURkQs IEZEX0NMT0VYRUMpOworICBmY250bCAodzMyX2V2dF9waXBlWzFdLCBGX1NFVEZELCBGRF9D TE9FWEVDKTsKKyAgdzMyX2V2dF93cml0ZSA9IChIQU5ETEUpZ2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2V4dGVybiB2b2lkIGluaXRpYWxpemVfZnJhbWVfbWVu dWJhciAoc3RydWN0IGZyYW1lICopOworZXh0ZXJuIHZvaWQgeF9mcmVlX2ZyYW1lX3Jlc291 cmNlcyAoc3RydWN0IGZyYW1lICopOworZXh0ZXJuIHZvaWQgeF93bV9zZXRfc2l6ZV9oaW50 IChzdHJ1Y3QgZnJhbWUgKiwgbG9uZywgaW50KTsKK2V4dGVybiB2b2lkIHhfcmVhbF9wb3Np dGlvbnMgKHN0cnVjdCBmcmFtZSAqLCBpbnQgKiwgaW50ICopOworCisvKiB3MzJpbmV2dC5j ICovCitleHRlcm4gaW50IHczMl9rYmRfcGF0Y2hfa2V5IChLRVlfRVZFTlRfUkVDT1JEICpl dmVudCk7CitleHRlcm4gaW50IHczMl9rYmRfbW9kc190b19lbWFjcyAoRFdPUkQgbW9kcywg V09SRCBrZXkpOworCiAKIAwKICNkZWZpbmUgUElYX1RZUEUgQ09MT1JSRUYKQEAgLTU3Niw3 ICs2MTQsOCBAQAogI2RlZmluZSBXTV9FTUFDU19ISURFX0NBUkVUICAgICAgICAgICAgKFdN X0VNQUNTX1NUQVJUICsgMTgpCiAjZGVmaW5lIFdNX0VNQUNTX1NFVENVUlNPUiAgICAgICAg ICAgICAoV01fRU1BQ1NfU1RBUlQgKyAxOSkKICNkZWZpbmUgV01fRU1BQ1NfUEFJTlQgICAg ICAgICAgICAgICAgIChXTV9FTUFDU19TVEFSVCArIDIwKQotI2RlZmluZSBXTV9FTUFDU19F TkQgICAgICAgICAgICAgICAgICAgKFdNX0VNQUNTX1NUQVJUICsgMjEpCisjZGVmaW5lIFdN X0VNQUNTX01UX0NBTEwgICAgICAgICAgICAgICAoV01fRU1BQ1NfU1RBUlQgKyAyMSkKKyNk ZWZpbmUgV01fRU1BQ1NfRU5EICAgICAgICAgICAgICAgICAgIChXTV9FTUFDU19TVEFSVCAr IDIyKQogCiAjZGVmaW5lIFdORF9GT05UV0lEVEhfSU5ERVggICAgKDApCiAjZ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ZCwgc28gdGhhdAogICAg ICBibG9ja2luZyBzeXN0ZW0gY2FsbHMgY2FuIGJlIGludGVycnVwdGVkLiAgV2UgbWFrZSBp dCBhIG1hbnVhbApAQCAtMjQxLDYgKzI1NCw0NyBAQAogICByZXR1cm4gKGJSZXQpOwogfQog CitleHRlcm4gY2hhciAqIHczMl9zdHJlcnJvciAoaW50IGVycm9yX25vKTsKKworLyogVGVs bCB3YWl0ZXJzIHRoYXQgd2UgaGF2ZSBpbnB1dCBhdmFpbGFibGUuICBDYWxsIHdpdGggbG9j aworICogaGVsZC4gICovCitzdGF0aWMgdm9pZAorbm90aWZ5X21zZ19yZWFkeSAodm9pZCkK K3sKKyAgU2V0RXZlbnQgKGlucHV0X2F2YWlsYWJsZSk7CisgIAorI2lmZGVmIFVTRV9XMzJf U0VMRUNUCisgIHsKKyAgICAvKiBTaWduYWwgbWFpbiB0aHJlYWQgdGhhdCBhbiBldmVudCBp cyByZWFkeS4gIFVzZSBwdXJlIFdpbjMyIHRvCisgICAgICogZG8gaXQgc28gYXMgbm90IHRv IHF1aWNrZW4gdGhlIHdyYXRoIG9mIHRoZSB1bmRlZmluZWQKKyAgICAgKiBiZWhhdmlvciBD eWd3aW4gZ29kcy4gIFVzZSBvdmVybGFwcGVkIElPIGJlY2F1c2UgQ3lnd2luCisgICAgICog Y3JlYXRlcyBwaXBlcyBhcyBvdmVybGFwcGVkIGZpbGVzIGluIG9yZGVyIHRvIHNlbGVjdCBv bgorICAgICAqIHRoZW0uICAqLworICAgICAgCisgICAgY2hhciBidWYgPSAnXDAnOworICAg IERXT1JEIG5yX3dyaXR0ZW47CisgICAgT1ZFUkxBUFBFRCBvcDsKKyAgICBzdGF0aWMgSEFO RExFIGV2ID0gTlVMTDsKKyAgICBCT09MIHN0YXR1czsKKworICAgIGlmIChldiA9PSBOVUxM KSB7CisgICAgICBldiA9IENyZWF0ZUV2ZW50IChOVUxMLCBUUlVFIC8qbWFudWFsLXJlc2V0 Ki8sIEZBTFNFLCB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804060304030308040007-- --------------enig1348E8AE1F367C1AE159F713 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk4jd+UACgkQ17c2LVA10Vta+wCgmqTtCZAB7OZaNghH+KohquO6 Va4AoOHJvApNoMdCPjn0Ko5+OoI3VFvj =bWoq -----END PGP SIGNATURE----- --------------enig1348E8AE1F367C1AE159F713--