- <b>function</b> <FONT COLOR=red><A NAME="ref_95_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Make_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_95_23" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_23">Args</A></FONT> : System.Address) <b>return</b> System.Address
- <b>is</b>
- <FONT COLOR=green><EM>-- Actually args is a double indirected pointer to the arguments</EM></FONT>
- <FONT COLOR=green><EM>-- of a C variable argument list. In theory it is now quite</EM></FONT>
- <FONT COLOR=green><EM>-- complicated to write portable routine that reads the arguments,</EM></FONT>
- <FONT COLOR=green><EM>-- because one has to know the growth direction of the stack and</EM></FONT>
- <FONT COLOR=green><EM>-- the sizes of the individual arguments.</EM></FONT>
- <FONT COLOR=green><EM>-- Fortunately we are only interested in the first argument (#0),</EM></FONT>
- <FONT COLOR=green><EM>-- we know its size and for the first arg we don't care about</EM></FONT>
- <FONT COLOR=green><EM>-- into which stack direction we have to proceed. We simply</EM></FONT>
- <FONT COLOR=green><EM>-- resolve the double indirection and thats it.</EM></FONT>
- <b>type</b> <FONT COLOR=red><A NAME="ref_106_12">V</A></FONT> <b>is</b> <b>access</b> <b>all</b> System.Address;
- <b>function</b> To_Access <b>is</b> <b>new</b> Ada.Unchecked_Conversion (System.Address,
- <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_106_12">V</A>);
- <b>begin</b>
- <b>return</b> To_Access (To_Access (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_23">Args</A>).<b>all</b>).<b>all</b>;
- <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Make_Arg</A>;
-
- <b>function</b> <FONT COLOR=red><A NAME="ref_113_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_113_23" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_23">Usr</A></FONT> : System.Address) <b>return</b> System.Address