home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / WIN32-IO.ADS < prev    next >
Encoding:
Text File  |  1996-03-15  |  9.0 KB  |  200 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-io.ads,v $ 
  2. -- $Revision: 1.8 $ $Date: 96/03/15 12:52:23 $ $Author: stm $ 
  3. -- See end of file for Copyright (c) information.
  4.  
  5. with Win32;
  6. with Win32.Stat;
  7. with Win32.Types;
  8.  
  9. package Win32.Io is
  10.  
  11.     A_NORMAL : constant := 16#0#;                           -- io.h:73
  12.     A_RDONLY : constant := 16#1#;                           -- io.h:74
  13.     A_HIDDEN : constant := 16#2#;                           -- io.h:75
  14.     A_SYSTEM : constant := 16#4#;                           -- io.h:76
  15.     A_SUBDIR : constant := 16#10#;                          -- io.h:77
  16.     A_ARCH   : constant := 16#20#;                          -- io.h:78
  17.  
  18.     type fsize_t is new Win32.ULONG;                        -- io.h:52
  19.  
  20.     type finddata_t;                                        -- io.h:58
  21.  
  22.     type Char260 is                                         -- io.h:64
  23.         array(integer range 0..259)
  24.         of Win32.CHAR;
  25.  
  26.     type PipeEnds is array (0..1) of Win32.INT;             -- io.h:100
  27.  
  28.     type finddata_t is                                      -- io.h:58
  29.         record
  30.             attrib     : Win32.UINT;                        -- io.h:59
  31.             time_create: Win32.Types.time_t;                -- io.h:60
  32.             time_access: Win32.Types.time_t;                -- io.h:61
  33.             time_write : Win32.Types.time_t;                -- io.h:62
  34.             size       : fsize_t;                           -- io.h:63
  35.             name       : Char260;                           -- io.h:64
  36.         end record;
  37.  
  38.     function c_access(path: Win32.PCSTR;
  39.                       mode: Win32.INT)
  40.                           return Win32.INT;                 -- io.h:82
  41.  
  42.     function chmod(filename: Win32.PCSTR;
  43.                    pmode   : Win32.INT)
  44.                        return Win32.INT;                    -- io.h:83
  45.  
  46.     function chsize(handle: Win32.INT;
  47.                     size  : Win32.LONG)
  48.                         return Win32.INT;                   -- io.h:84
  49.  
  50.     function close(handle: Win32.INT) return Win32.INT;       
  51.                                                             -- io.h:85
  52.  
  53.     function commit(handle: Win32.INT) return Win32.INT;    -- io.h:86
  54.  
  55.     function creat(filename: Win32.PCSTR;
  56.                    pmode: Win32.INT)
  57.                        return Win32.INT;                    -- io.h:87
  58.  
  59.     function dup(handle: Win32.INT) return Win32.INT;       -- io.h:88
  60.  
  61.     function dup2(handle1: Win32.INT;
  62.                   handle2: Win32.INT)
  63.                       return Win32.INT;                     -- io.h:89
  64.  
  65.     function eof(handle: Win32.INT) return Win32.INT;       -- io.h:90
  66.  
  67.     function filelength(handle: Win32.INT) return Win32.LONG;
  68.                                                             -- io.h:91
  69.  
  70.     function findfirst(filespec: Win32.PSTR;
  71.                        fileinfo: access finddata_t)
  72.                            return Win32.LONG;               -- io.h:92
  73.  
  74.     function findnext(handle  : Win32.LONG;
  75.                       fileinfo: access finddata_t)
  76.                           return Win32.INT;                 -- io.h:93
  77.  
  78.     function findclose(handle: Win32.LONG) return Win32.INT;-- io.h:94
  79.  
  80.     function isatty(handle: Win32.INT) return Win32.INT;    -- io.h:95
  81.  
  82.     function locking(handle: Win32.INT;
  83.                      mode  : Win32.INT;
  84.                      nbytes: Win32.LONG)
  85.                          return Win32.INT;                  -- io.h:96
  86.  
  87.     function lseek(handle: Win32.INT;
  88.                    offset: Win32.LONG;
  89.                    origin: Win32.INT)
  90.                        return Win32.LONG;                   -- io.h:97
  91.  
  92.     function mktemp(template: Win32.PSTR) return Win32.PSTR;-- io.h:98
  93.  
  94.     function open (filename : Win32.PCSTR;
  95.                    oflag    : Win32.UINT;
  96.                    pmode    : Win32.UINT := Win32.Stat.S_IREAD)
  97.                       return Win32.INT;                     -- io.h:99
  98.  
  99.     function pipe(phandles: access PipeEnds;
  100.                   psize   : Win32.UINT;
  101.                   textmode: Win32.INT)
  102.                       return Win32.INT;                     -- io.h:100
  103.  
  104.     function read(handle: Win32.INT;
  105.                   buffer: Win32.PVOID;
  106.                   count : Win32.UINT)
  107.                       return Win32.INT;                     -- io.h:101
  108.  
  109.     function remove(path: Win32.PCSTR) 
  110.         return Win32.INT;                                   -- io.h:102
  111.  
  112.     function rename(oldname: Win32.PCSTR;
  113.                     newname: Win32.PCSTR)
  114.                         return Win32.INT;                   -- io.h:103
  115.  
  116.     function setmode(handle: Win32.INT;
  117.                      mode  : Win32.INT)
  118.                          return Win32.INT;                  -- io.h:104
  119.  
  120.     function sopen (filename : Win32.PCSTR;
  121.                     oflag    : Win32.INT;
  122.                     shflag   : Win32.INT;
  123.                     pmode    : Win32.INT := Win32.Stat.S_IREAD)
  124.                        return Win32.INT;                    -- io.h:105
  125.  
  126.     function tell(handle: Win32.INT) return Win32.LONG;     -- io.h:106
  127.  
  128.     function umask(pmode: Win32.INT) return Win32.INT;      -- io.h:107
  129.  
  130.     function unlink(filename: Win32.PCSTR) 
  131.         return Win32.INT;                                   -- io.h:108
  132.  
  133.     function write(handle: Win32.INT;
  134.                    buffer: Win32.Pcvoid;
  135.                    count : Win32.UINT)
  136.                        return Win32.INT;                    -- io.h:109
  137.  
  138.     function get_osfhandle(filehandle: Win32.INT) return Win32.LONG;
  139.                                                             -- io.h:112
  140.  
  141.     function open_osfhandle(osfhandle: Win32.LONG;
  142.                             flags    : Win32.INT)
  143.                                 return Win32.INT;           -- io.h:113
  144.  
  145. private
  146.  
  147.     pragma Convention(C, finddata_t);                       -- io.h:58
  148.  
  149.     pragma Import(C, c_access, "_access");                  -- io.h:82
  150.     pragma Import(C, chmod, "_chmod");                      -- io.h:83
  151.     pragma Import(C, chsize, "_chsize");                    -- io.h:84
  152.     pragma Import(C, close, "_close");                      -- io.h:85
  153.     pragma Import(C, commit, "_commit");                    -- io.h:86
  154.     pragma Import(C, creat, "_creat");                      -- io.h:87
  155.     pragma Import(C, dup, "_dup");                          -- io.h:88
  156.     pragma Import(C, dup2, "_dup2");                        -- io.h:89
  157.     pragma Import(C, eof, "_eof");                          -- io.h:90
  158.     pragma Import(C, filelength, "_filelength");            -- io.h:91
  159.     pragma Import(C, findfirst, "_findfirst");              -- io.h:92
  160.     pragma Import(C, findnext, "_findnext");                -- io.h:93
  161.     pragma Import(C, findclose, "_findclose");              -- io.h:94
  162.     pragma Import(C, isatty, "_isatty");                    -- io.h:95
  163.     pragma Import(C, locking, "_locking");                  -- io.h:96
  164.     pragma Import(C, lseek, "_lseek");                      -- io.h:97
  165.     pragma Import(C, mktemp, "_mktemp");                    -- io.h:98
  166.     pragma Import(C, open, "_open");                        -- io.h:99
  167.     pragma Import(C, pipe, "_pipe");                        -- io.h:100
  168.     pragma Import(C, read, "_read");                        -- io.h:101
  169.     pragma Import(C, remove, "remove");                     -- io.h:102
  170.     pragma Import(C, rename, "rename");                     -- io.h:103
  171.     pragma Import(C, setmode, "_setmode");                  -- io.h:104
  172.     pragma Import(C, sopen, "_sopen");                      -- io.h:105
  173.     pragma Import(C, tell, "_tell");                        -- io.h:106
  174.     pragma Import(C, umask, "_umask");                      -- io.h:107
  175.     pragma Import(C, unlink, "_unlink");                    -- io.h:108
  176.     pragma Import(C, write, "_write");                      -- io.h:109
  177.     pragma Import(C, get_osfhandle, "_get_osfhandle");      -- io.h:112
  178.     pragma Import(C, open_osfhandle, "_open_osfhandle");    -- io.h:113
  179.  
  180. -------------------------------------------------------------------------------
  181. --
  182. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  183. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  184. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  185. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  186. -- the accuracy and the use of this file.  This file may be used, copied,
  187. -- modified and distributed only by licensees of Microsoft Corporation's
  188. -- WIN32 Software Development Kit in accordance with the terms of the 
  189. -- licensee's End-User License Agreement for Microsoft Software for the
  190. -- WIN32 Development Kit.
  191. --
  192. -- Copyright (c) Intermetrics, Inc. 1995
  193. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  194. -- Microsoft is a registered trademark and Windows and Windows NT are
  195. -- trademarks of Microsoft Corporation.
  196. --
  197. -------------------------------------------------------------------------------
  198.  
  199. end Win32.Io;
  200.