Re: "One is free to go back and edit the void *'s", alternatively one can post-process the EDCDSECT output with a pattern-matching script (awk, perl, etc.) to more-or-less generically adjust all the things EDCDSECT can't properly resolve. BTDT. Interesting exercise.
Peter -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Charles Mills Sent: Tuesday, February 25, 2020 12:27 PM To: [email protected] Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ? Huh? Void * specifically says "foo points to something but I won't say what" so no, you can't reference members of something you have not specified. It is equivalent to assembler FOO DS A. A of what? Who knows. If you say myStruct * foo then yes you can say foo->myStructMember. Or you can say "at this moment foo points to myStruct and code (myStruct *)foo->myStructMember Continuing the assembler analogy, myStruct * foo is roughly equivalent to assembler L Rn,FOO/USING MYSTRUCT,Rn . Assembler is a terrible starting point, except considering what the problem was. The problem was "we have a bunch of new C development and lots of tables already defined in assembler." So the correct tool is an assembler to C converter. By starting from the SYSADATA output as EDCDSECT does, you leave messy problems like line continuation, syntax errors and macro expansion to the assembler. > How can you generate the type in the declarator? EDCDSECT cannot. Generates lots of void *'s. Not the best approach, but it is the best tool we have for user DSECT to C header conversion (not counting Peter's tool, which is not available for user DSECTs). One is free to go back and edit the void *'s. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Monday, February 24, 2020 5:35 PM To: [email protected] Subject: Re: Convert a Metal C control block mapping to Assembler DSECT ? On Tue, 25 Feb 2020 00:58:26 +0000, Seymour J Metz <[email protected]> wrote: >FSVO typed. > >void * foo > So I can't do "foo -> member", but must "(type *) foo-> member". Ugh! ---------------------------------------------------------------------- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
