Article View: comp.std.c
Article #4856mapping a C structure
From: Owen Townsend
Date: Sun, 03 Mar 1996 20:45
Date: Sun, 03 Mar 1996 20:45
15 lines
1180 bytes
1180 bytes
Does anybody have a program to calculate byte displacements for all fields within a C structure ? I am assisting mainframe COBOL users to convert to Unix Micro Focus COBOL & 1 user is trying to modify his COBOL COPY book to match the new C structure in his ALLTAX payroll package. I already have a utility 'cobmap' that maps out COBOL copy books. If I could find a Cmap utility, I could then compare the byte displacements & total records size to confirm correct conversion. If I have to I could probably write a Cmap but it would save time if somebody knows of one. It would not have to be very rigorous. Would have to provide for UNIONs, structure alignments (4 byte & 8 byte boundaries). My user's machine is an HP, but my own is a PC using SCO Unix. Thanks, Owen Townsend, owent@wimsey.bc.ca
Technical Details
Message-ID:
<4hd0db$89l@wolfe.wimsey.com>Path:
arc1-ca.pugleaf.net!in2.uu.net!van-bc!vanbc!owentShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in2.uu.net!van-bc!vanbc!owent From: owent@vanbc.wimsey.com (Owen Townsend) Newsgroups: comp.std.c Subject: mapping a C structure Date: 3 Mar 1996 20:45:30 GMT Organization: Wimsey Information Services Message-ID: <4hd0db$89l@wolfe.wimsey.com> NNTP-Posting-Host: vanbc.wimsey.com Keywords: C structure layout map X-Newsreader: TIN [version 1.2 PL2]