Annotation of mstools/h/io.h, revision 1.1.1.3

1.1       root        1: /***
                      2: *io.h - declarations for low-level file handling and I/O functions
                      3: *
1.1.1.3 ! root        4: *      Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1       root        5: *
                      6: *Purpose:
                      7: *      This file contains the function declarations for the low-level
                      8: *      file handling and I/O functions.
                      9: *
                     10: ****/
                     11: 
                     12: #ifndef _INC_IO
                     13: 
1.1.1.3 ! root       14: #ifndef _POSIX_
        !            15: 
1.1       root       16: #ifdef __cplusplus
                     17: extern "C" {
                     18: #endif
                     19: 
                     20: 
1.1.1.3 ! root       21: /*
        !            22:  * Conditional macro definition for function calling type and variable type
        !            23:  * qualifiers.
        !            24:  */
        !            25: #if   ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
        !            26: 
        !            27: /*
        !            28:  * Definitions for MS C8-32 (386/486) compiler
        !            29:  */
        !            30: #define _CRTAPI1 __cdecl
        !            31: #define _CRTAPI2 __cdecl
        !            32: 
        !            33: #elif ( _MSC_VER == 600 )
        !            34: 
        !            35: /*
        !            36:  * Definitions for old MS C6-386 compiler
        !            37:  */
        !            38: #define _CRTAPI1 _cdecl
        !            39: #define _CRTAPI2 _cdecl
        !            40: #define _M_IX86  300
        !            41: 
        !            42: #else
        !            43: 
        !            44: /*
        !            45:  * Other compilers (e.g., MIPS)
        !            46:  */
        !            47: #define _CRTAPI1
        !            48: #define _CRTAPI2
        !            49: 
1.1.1.2   root       50: #endif
1.1       root       51: 
1.1.1.3 ! root       52: 
1.1       root       53: #ifndef _TIME_T_DEFINED
                     54: typedef long time_t;           /* time value */
                     55: #define _TIME_T_DEFINED        /* avoid multiple def's of time_t */
                     56: #endif
                     57: 
                     58: #ifndef _FSIZE_T_DEFINED
1.1.1.3 ! root       59: typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */
1.1       root       60: #define _FSIZE_T_DEFINED
                     61: #endif
                     62: 
                     63: #ifndef _FINDDATA_T_DEFINED
                     64: 
                     65: struct _finddata_t {
                     66:     unsigned   attrib;
1.1.1.3 ! root       67:     time_t     time_create;    /* -1 for FAT file systems */
        !            68:     time_t     time_access;    /* -1 for FAT file systems */
1.1       root       69:     time_t     time_write;
                     70:     _fsize_t   size;
                     71:     char       name[256];
                     72: };
                     73: 
                     74: #define _FINDDATA_T_DEFINED
                     75: 
                     76: #endif
                     77: 
                     78: /* File attribute constants for _findfirst() */
                     79: 
                     80: #define _A_NORMAL      0x00    /* Normal file - No read/write restrictions */
                     81: #define _A_RDONLY      0x01    /* Read only file */
                     82: #define _A_HIDDEN      0x02    /* Hidden file */
                     83: #define _A_SYSTEM      0x04    /* System file */
                     84: #define _A_SUBDIR      0x10    /* Subdirectory */
                     85: #define _A_ARCH        0x20    /* Archive file */
                     86: 
                     87: /* function prototypes */
1.1.1.3 ! root       88: 
        !            89: int _CRTAPI1 _access(const char *, int);
        !            90: int _CRTAPI1 _chmod(const char *, int);
        !            91: int _CRTAPI1 _chsize(int, long);
        !            92: int _CRTAPI1 _close(int);
        !            93: int _CRTAPI1 _commit(int);
        !            94: int _CRTAPI1 _creat(const char *, int);
        !            95: int _CRTAPI1 _dup(int);
        !            96: int _CRTAPI1 _dup2(int, int);
        !            97: int _CRTAPI1 _eof(int);
        !            98: long _CRTAPI1 _filelength(int);
        !            99: long _CRTAPI1 _findfirst(char *, struct _finddata_t *);
        !           100: int _CRTAPI1 _findnext(long, struct _finddata_t *);
        !           101: int _CRTAPI1 _findclose(long);
        !           102: int _CRTAPI1 _isatty(int);
        !           103: int _CRTAPI1 _locking(int, int, long);
        !           104: long _CRTAPI1 _lseek(int, long, int);
        !           105: char * _CRTAPI1 _mktemp(char *);
        !           106: int _CRTAPI2 _open(const char *, int, ...);
        !           107: int _CRTAPI1 _pipe(int *, unsigned int, int);
        !           108: int _CRTAPI1 _read(int, void *, unsigned int);
        !           109: int _CRTAPI1 remove(const char *);
        !           110: int _CRTAPI1 rename(const char *, const char *);
        !           111: int _CRTAPI1 _setmode(int, int);
        !           112: int _CRTAPI2 _sopen(const char *, int, int, ...);
        !           113: long _CRTAPI1 _tell(int);
        !           114: int _CRTAPI1 _umask(int);
        !           115: int _CRTAPI1 _unlink(const char *);
        !           116: int _CRTAPI1 _write(int, const void *, unsigned int);
1.1       root      117: 
                    118: 
1.1.1.3 ! root      119: long _CRTAPI1 _get_osfhandle(int);
        !           120: int _CRTAPI1 _open_osfhandle(long, int);
1.1       root      121: 
1.1.1.3 ! root      122: #if !(__STDC__ || defined(__cplusplus))
1.1       root      123: /* Non-ANSI names for compatibility */
                    124: #define access    _access
                    125: #define chmod     _chmod
                    126: #define chsize    _chsize
                    127: #define close     _close
                    128: #define creat     _creat
                    129: #define dup       _dup
                    130: #define dup2      _dup2
                    131: #define eof       _eof
                    132: #define filelength _filelength
                    133: #define isatty    _isatty
                    134: #define locking    _locking
                    135: #define lseek     _lseek
                    136: #define mktemp    _mktemp
                    137: #define open      _open
                    138: #define read      _read
                    139: #define setmode    _setmode
                    140: #define sopen     _sopen
                    141: #define tell      _tell
                    142: #define umask     _umask
                    143: #define unlink    _unlink
                    144: #define write     _write
                    145: #endif /* __STDC__ */
                    146: 
                    147: #ifdef __cplusplus
                    148: }
                    149: #endif
                    150: 
1.1.1.3 ! root      151: 
        !           152: #endif /* _POSIX_ */
        !           153: 
1.1       root      154: #define _INC_IO
                    155: #endif /* _INC_IO */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.