From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0af685ebe4f62a20a70ae58d427cdaa2@smgl.fr.eu.org> To: 9fans@9fans.net From: "Mathieu" Date: Thu, 29 Jan 2009 23:47:11 +0100 In-Reply-To: <13426df10901290827k581268e6i43b213df72b666a4@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-idercxgummpsujpiozlrqrvpec" Subject: Re: [9fans] Ogg/Vorbis ported Topicbox-Message-UUID: 8eb82a3e-ead4-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. --upas-idercxgummpsujpiozlrqrvpec Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Well, a few trivial tasks could probably be automated. What comes first to my mind is the removal of the common includes for the non plan 9 headers/libs, namely string.h, stdlib.h, math.h, and stdio.h. I know this last one is in plan 9 but most of the time the plan 9 one was not the one needed as the function used were in plan 9's libc, not in stdio. I did not have to add libc.h and u.h that often, so it wouldn't have been worth being automated imho. Then I guess replacing the alloca() calls with malloc() could be done automatically but one still has to do some carefull searching to place the free()s, so I'm not sure one would gain much time with this. As with exit(), it can be replaced automatically with exits() but you still have to figure out what message you want in your exits(). Honestly, it took me more time to figure out what was wrong and how to fix it, than to actually do it. Once you have some sort of workflow set up in your mind, a few Edit lines in a guide file make the repetitive tasks go much faster. For example, since my sam-foo is weak, it took me a while to devise that: 'Edit line1,line2x/.*\n/ g/return/p', which would give me how many return there are in the function I am looking at, hence helping me not to miss any of the free() to place (without having to go through all the code). Cheers, Mathieu --upas-idercxgummpsujpiozlrqrvpec Content-Type: message/rfc822 Content-Disposition: inline Return-Path: lejatorn+caf_=lejatorn=smgl.fr.eu.org@gmail.com Received: from metal.lovetux.net (LHLO metal.lovetux.net) (91.121.138.211) by metal.lovetux.net with LMTP; Thu, 29 Jan 2009 22:36:22 +0100 (GMT+01:00) Received: from localhost (localhost.localdomain [127.0.0.1]) by metal.lovetux.net (Postfix) with ESMTP id 2CD3837C86 for ; Thu, 29 Jan 2009 22:36:22 +0100 (CET) X-Virus-Scanned: amavisd-new at metal.lovetux.net X-Spam-Flag: NO X-Spam-Score: -2.599 X-Spam-Level: X-Spam-Status: No, score=-2.599 tagged_above=-10 required=6.6 tests=[BAYES_00=-2.599] Received: from metal.lovetux.net ([127.0.0.1]) by localhost (metal.lovetux.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hD3J05rJq+Rf for ; Thu, 29 Jan 2009 22:36:19 +0100 (CET) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by metal.lovetux.net (Postfix) with ESMTP id E52C537C85 for ; Thu, 29 Jan 2009 22:36:18 +0100 (CET) Received: by ey-out-2122.google.com with SMTP id 25so33121eya.41 for ; Thu, 29 Jan 2009 13:36:10 -0800 (PST) Received: by 10.103.223.2 with SMTP id a2mr114037mur.88.1233246683778; Thu, 29 Jan 2009 08:31:23 -0800 (PST) X-Forwarded-To: lejatorn@smgl.fr.eu.org X-Forwarded-For: lejatorn@gmail.com lejatorn@smgl.fr.eu.org Delivered-To: lejatorn@gmail.com Received: by 10.103.119.4 with SMTP id w4cs196574mum; Thu, 29 Jan 2009 08:31:23 -0800 (PST) Received: by 10.65.11.17 with SMTP id o17mr103146qbi.4.1233246682412; Thu, 29 Jan 2009 08:31:22 -0800 (PST) Received: from gouda.swtch.com (gouda.swtch.com [67.207.142.3]) by mx.google.com with ESMTP id p27si1353643qbp.12.2009.01.29.08.31.21; Thu, 29 Jan 2009 08:31:22 -0800 (PST) Received-SPF: pass (google.com: domain of 9fans-bounces+lejatorn=gmail.com@9fans.net designates 67.207.142.3 as permitted sender) client-ip=67.207.142.3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of 9fans-bounces+lejatorn=gmail.com@9fans.net designates 67.207.142.3 as permitted sender) smtp.mail=9fans-bounces+lejatorn=gmail.com@9fans.net Received: from localhost ([127.0.0.1] helo=gouda.swtch.com) by gouda.swtch.com with esmtp (Exim 4.67) (envelope-from <9fans-bounces@9fans.net>) id 1LSZk5-00035P-Ox; Thu, 29 Jan 2009 16:27:49 +0000 Received: from rv-out-0708.google.com ([209.85.198.246]) by gouda.swtch.com with esmtp (Exim 4.67) (envelope-from ) id 1LSZk4-000356-0Q for 9fans@9fans.net; Thu, 29 Jan 2009 16:27:48 +0000 Received: by rv-out-0708.google.com with SMTP id f25so8239650rvb.12 for <9fans@9fans.net>; Thu, 29 Jan 2009 08:27:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.207.2 with SMTP id e2mr109868rvg.148.1233246462100; Thu, 29 Jan 2009 08:27:42 -0800 (PST) In-Reply-To: <16ff6b980901280953s17a7e041s1b605290b365b0e9@mail.gmail.com> References: <16ff6b980901280953s17a7e041s1b605290b365b0e9@mail.gmail.com> Date: Thu, 29 Jan 2009 08:27:42 -0800 Message-ID: <13426df10901290827k581268e6i43b213df72b666a4@mail.gmail.com> From: ron minnich To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Ogg/Vorbis ported X-BeenThere: 9fans@9fans.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.9fans.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces@9fans.net Errors-To: 9fans-bounces+lejatorn=gmail.com@9fans.net >>From what you learned, are there some nice general scripts that could be used to automate some of this for the next hunk of gnu-like code that comes along? Thanks for the port ... ron --upas-idercxgummpsujpiozlrqrvpec--