home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / stdarg-impl.ads < prev    next >
Encoding:
Text File  |  1995-11-17  |  2.1 KB  |  63 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/xbind/stdarg-impl.ads,v $ 
  2. -- $Revision: 1.6 $ $Date: 95/06/29 16:01:31 $ $Author: mg $ 
  3.  
  4. with Interfaces.C.Pointers;
  5.  
  6. package Stdarg.Impl is
  7.  
  8.     -- *******************************************************
  9.     -- Getting arguments out of lists, for use by implementers
  10.     -- of variable-parameter functions
  11.     -- *******************************************************
  12.  
  13.     subtype Int is Interfaces.C.Int;
  14.  
  15.     type Param_Access is private;
  16.  
  17.     function Address_of_First_Arg (Args: ArgList) return Param_Access;
  18.  
  19.     function Address_of_Vararg_List (Args: ArgList) return Param_Access;
  20.  
  21.     function ArgCount (Args: ArgList) return Int;
  22.  
  23.     function "&" (Left, Right: ArgList) return ArgList;
  24.  
  25.     procedure Do_Varargs (Proc     : in System.Address;
  26.                           Nb_Args  : Int;
  27.                           Arg_Addr : Param_Access);
  28.  
  29.     function F_Varargs (Func     : in System.Address;
  30.                         Nb_Args  : Int;
  31.                         Arg_Addr : Param_Access) return Stdarg.C_Param;
  32.  
  33.     -- debugging
  34.     -- procedure Dump(Addr: Param_Access; Nb_Args  : Stdarg.Int);
  35.     -- pragma Import(C, Dump, "dump");
  36.  
  37. private
  38.  
  39.     package Arith is new Interfaces.C.Pointers(
  40.     Integer, C_Param, Stdarg.ArgVector, 0);
  41.  
  42.     type Param_Access is new Arith.Pointer;
  43.  
  44.     pragma Import(C, Do_Varargs, "do_varargs");
  45.     pragma Import(C, F_Varargs, "do_varargs");
  46.  
  47. -------------------------------------------------------------------------------
  48. --
  49. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS FURNISHED "AS IS" WITHOUT 
  50. -- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
  51. -- TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 
  52. -- PURPOSE.  The user assumes the entire risk as to the accuracy and the 
  53. -- use of this file.
  54. --
  55. -- Copyright (c) Intermetrics, Inc. 1995
  56. -- Royalty-free, unlimited, worldwide, non-exclusive use, modification, 
  57. -- reproduction and further distribution of this file is permitted.
  58. --
  59. -------------------------------------------------------------------------------
  60.  
  61.  
  62. end Stdarg.Impl;
  63.