From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c1f101e666189cda,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-23 08:50:24 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: claude.riendeau@cae.com (Claude Riendeau) Newsgroups: comp.lang.ada Subject: Converting application from BIG ENDIAN to LITTLE ENDIAN machine Date: 23 Apr 2004 08:50:23 -0700 Organization: http://groups.google.com Message-ID: <89219f7f.0404230750.12f64b28@posting.google.com> NNTP-Posting-Host: 142.39.200.201 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1082735424 12174 127.0.0.1 (23 Apr 2004 15:50:24 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 23 Apr 2004 15:50:24 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:7426 Date: 2004-04-23T08:50:23-07:00 List-Id: Hello I'm new to ADA and this is probably a classical. I have to have this large application that was programmed for a BIG ENDIAN machine to run on a LITTLE ENDIAN machine. I need to reorder all the records BIT definitions (at 0 range 3 .. 12), and I have 10000+ lines of code to convert. I'd like to automate this. I planned to parse the source code and reorder the BIT fields myself, but most of them contains constants, sizeof statements and mathematical operations. I wondered if it would be possible to stop the ADA compiler in mid course where the compiler definitions would be resolved, parse the intermediate file with my BIT reordering application, than let the compiler continue its job. This would be like modifying a C preprocessor output. I use RATIONAL ADA WINDOWS compiler. Does someone knows how to have this compiler generate intermediate files? Does someone has a better approach to this problem?