From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: stop using P_, __P in header files Date: Mon, 5 Jul 2010 01:58:26 +0200 Message-ID: References: <4C2DB1E0.7010305@swipnet.se> <83aaqa9ml7.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e6d56670c40ec6048a98994c X-Trace: dough.gmane.org 1278288210 8481 80.91.229.12 (5 Jul 2010 00:03:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Jul 2010 00:03:30 +0000 (UTC) Cc: Eli Zaretskii , =?UTF-8?Q?Jan_Dj=C3=A4rv?= , emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 05 02:03:25 2010 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.69) (envelope-from ) id 1OVZ5n-00031S-Iu for ged-emacs-devel@m.gmane.org; Mon, 05 Jul 2010 02:03:23 +0200 Original-Received: from localhost ([127.0.0.1]:43971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVZ5k-0001DR-CJ for ged-emacs-devel@m.gmane.org; Sun, 04 Jul 2010 19:59:20 -0400 Original-Received: from [140.186.70.92] (port=38113 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVZ5U-0001DL-C5 for emacs-devel@gnu.org; Sun, 04 Jul 2010 19:59:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVZ5N-0007ql-C1 for emacs-devel@gnu.org; Sun, 04 Jul 2010 19:59:04 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:36250) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVZ5D-0007pm-Is; Sun, 04 Jul 2010 19:58:48 -0400 Original-Received: by bwz9 with SMTP id 9so3144180bwz.0 for ; Sun, 04 Jul 2010 16:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=LsJbyCh0Y7zzGTo8/qq57ABj/6UzVZgD5yckEGuoL9c=; b=WTHIvid44/Us9+8WWNxonVqYLs0g0p0A8LDAjvNnUY6beQD9YA6q38ia351tNf5AD2 rcVZsnVttaikdFWZVy5xNa23jaCBVl1upu++MvwUHC53QjSiAn0D6qv5u0c8oX9wvER4 l7ZwMS/MPtX01EtCZ5zTHRScHUqrPlrz5Wa4E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=OQqpbYpSmBxFkZ4RHeXgbVLRQCpTpc9w+DZkzEvbmEbdaO2LcWvtp0/lAyPGiPA21X HhjenD0n1C1OvGkNSEZDiv9mxeSV+mSX2rzRD4v4axbUHxyugDQN6pZWYtZeF0A2vH8E U39qKr2PqKccfBkQExk36whO9xpkZ6Req+DKE= Original-Received: by 10.204.85.89 with SMTP id n25mr1768053bkl.105.1278287926266; Sun, 04 Jul 2010 16:58:46 -0700 (PDT) Original-Received: by 10.204.53.204 with HTTP; Sun, 4 Jul 2010 16:58:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:126772 Archived-At: --0016e6d56670c40ec6048a98994c Content-Type: text/plain; charset=UTF-8 On Sun, Jul 4, 2010 at 21:16, Dan Nicolaescu wrote: > Here's the diff with the not checked in standard C conversion changes > for: buffer.c cm.c eval.c image.c keyboard.c process.c term.c vm-limit.c xdisp.c > Help getting these checked in would be appreciated. This patch includes your original changes for buffer.c, keyboard.c, process.c and xdisp.c, plus a few fixes. With them, they compile correctly on my system. Could you please check whether they cause any trouble in your setup? Juanma --0016e6d56670c40ec6048a98994c Content-Type: text/x-patch; charset=US-ASCII; name="rem1.diff" Content-Disposition: attachment; filename="rem1.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gb8jjff01 PT09IG1vZGlmaWVkIGZpbGUgJ3NyYy9idWZmZXIuYycNCi0tLSBzcmMvYnVmZmVyLmMJMjAxMC0w Ny0wMiAxMjoxOTo1MyArMDAwMA0KKysrIHNyYy9idWZmZXIuYwkyMDEwLTA3LTA0IDIyOjQxOjA2 ICswMDAwDQpAQCAtMTgwLDggKzE4MCw3IEBADQogLyogTGlzcF9PYmplY3QgUWxpc3BfbW9kZSwg VmNoZWNrX3N5bWJvbDsgKi8NCiANCiB2b2lkDQotbnNiZXJyb3IgKHNwZWMpDQotICAgICBMaXNw X09iamVjdCBzcGVjOw0KK25zYmVycm9yIChMaXNwX09iamVjdCBzcGVjKQ0KIHsNCiAgIGlmIChT VFJJTkdQIChzcGVjKSkNCiAgICAgZXJyb3IgKCJObyBidWZmZXIgbmFtZWQgJXMiLCBTREFUQSAo c3BlYykpOw0KQEAgLTI0OCw5ICsyNDcsNyBAQA0KICAgIGFuZCBkb24ndCBldmVyIFFVSVQuICAq Lw0KIA0KIHN0YXRpYyBMaXNwX09iamVjdA0KLWFzc29jX2lnbm9yZV90ZXh0X3Byb3BlcnRpZXMg KGtleSwgbGlzdCkNCi0gICAgIHJlZ2lzdGVyIExpc3BfT2JqZWN0IGtleTsNCi0gICAgIExpc3Bf T2JqZWN0IGxpc3Q7DQorYXNzb2NfaWdub3JlX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RoZSB1c2VyIHJlamVjdGVkIGl0LiAgKi8NCiANCiBM aXNwX09iamVjdA0KLXJlYWRfY2hhciAoY29tbWFuZGZsYWcsIG5tYXBzLCBtYXBzLCBwcmV2X2V2 ZW50LCB1c2VkX21vdXNlX21lbnUsIGVuZF90aW1lKQ0KLSAgICAgaW50IGNvbW1hbmRmbGFnOw0K LSAgICAgaW50IG5tYXBzOw0KLSAgICAgTGlzcF9PYmplY3QgKm1hcHM7DQotICAgICBMaXNwX09i amVjdCBwcmV2X2V2ZW50Ow0KLSAgICAgaW50ICp1c2VkX21vdXNlX21lbnU7DQotICAgICBFTUFD U19USU1FICplbmRfdGltZTsNCityZWFkX2NoYXIgKGludCBjb21tYW5kZmxhZywgaW50IG5tYXBz LCBMaXNwX09iamVjdCAqbWFwcywgTGlzcF9PYmplY3QgcHJldl9ldmVudCwgaW50ICp1c2VkX21v dXNlX21lbnUsIHN0cnVjdCB0aW1ldmFsICplbmRfdGltZSkNCiB7DQogICB2b2xhdGlsZSBMaXNw X09iamVjdCBjOw0KICAgaW50IGNvdW50LCBqbXBjb3VudDsNCkBAIC0zMzExLDggKzMyNzksNyBA QA0KICAgIFJlY29yZCBpdCBmb3IgZWNob2luZywgZm9yIHRoaXMtY29tbWFuZC1rZXlzLCBhbmQg c28gb24uICAqLw0KIA0KIHN0YXRpYyB2b2lkDQotcmVjb3JkX21lbnVfa2V5IChjKQ0KLSAgICAg TGlzcF9PYmplY3QgYzsNCityZWNvcmRfbWVudV9rZXkgKExpc3BfT2JqZWN0IGMpDQogew0KICAg LyogV2lwZSB0aGUgZWNobyBhcmVhLiAgKi8NCiAgIGNsZWFyX21lc3NhZ2UgKDEsIDApOw0KQEAg LTMzNDYsOCArMzMxMyw3IEBADQogLyogUmV0dXJuIDEgaWYgc2hvdWxkIHJlY29nbml6ZSBDIGFz ICJ0aGUgaGVscCBjaGFyYWN0ZXIiLiAgKi8NCiANCiBpbnQNCi1oZWxwX2NoYXJfcCAoYykNCi0g ICAgIEx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