Article View: gnu.gcc.help
Article #51122fixincludes - has one been written in perl?
From: Nigel Metheringham
Date: Fri, 02 Jul 1993 15:05
Date: Fri, 02 Jul 1993 15:05
25 lines
1586 bytes
1586 bytes
Hi, Has anyone rewritten fixincludes into perl. This would seem like an ideal application for perl - if you were smart you should be able to read each include file completely into memory (include files are generally small compared to available core), hit with the required modifications, keeping track if any "took", and if there were modifications blast the whole thing out in one print statement. The entire set of ops for each file ought to take less time than the current technique of starting up a new egrep, let alone the time taken by sed if that is required. As you can guess I have played with this slightly but am hitting a few problems with handling the wierd and wonderful shell and sed scripts - I shifted almost everything to perl a while back so the translation is tricky! Nigel. -- # Nigel Metheringham -- (NeXT) EMail: nigelm@ohm.york.ac.uk # # System Administrator, Electronics Dept, University of York # # York YO1 5DD. Phone: +44 904 432374, Fax: +44 904 432335 #
Technical Details
Message-ID:
<1993Jul2.150545.29353@ohm.york.ac.uk>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!agate!doc.ic.ac.uk!uknet!yorkohm!nigelmShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,2911deb9b1f894c4,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-07-02 10:52:34 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!agate!doc.ic.ac.uk!uknet!yorkohm!nigelm From: nigelm@ohm.york.ac.uk (Nigel Metheringham) Subject: fixincludes - has one been written in perl? Message-ID: <1993Jul2.150545.29353@ohm.york.ac.uk> Organization: Electronics Department, University of York, UK Date: Fri, 2 Jul 93 15:05:45 GMT Lines: 26