Annotation of os2sdk/startup/msdos.h, revision 1.1.1.1

1.1       root        1: /***
                      2: *msdos.h - MS-DOS definitions for C runtime
                      3: *
                      4: *   Copyright (c) 1987, Microsoft Corporation.  All rights reserved.
                      5: *
                      6: *Purpose:
                      7: *   The file contains the MS-DOS definitions (function request numbers,
                      8: *   flags, etc.) used by the C runtime.
                      9: *   [Internal]
                     10: *
                     11: *******************************************************************************/
                     12: 
                     13: /* __osfile flag values for DOS file handles */
                     14: 
                     15: #define FOPEN           0x01    /* file handle open */
                     16: #define FEOFLAG         0x02    /* end of file has been encountered */
                     17: #define FCRLF           0x04    /* CR-LF across read buffer (in text mode) */
                     18: #define FPIPE           0x08    /* file handle refers to a pipe */
                     19: #define FRDONLY         0x10    /* file handle associated with read only file */
                     20: #define FAPPEND         0x20    /* file handle opened O_APPEND */
                     21: #define FDEV            0x40    /* file handle refers to device */
                     22: #define FTEXT           0x80    /* file handle is in text mode */
                     23: 
                     24: #define DOS_kill        0x00    /* terminate */
                     25: #define DOS_echoread    0x01    /* read keyboard and echo */
                     26: #define DOS_display     0x02    /* display character */
                     27: #define DOS_auxinput    0x03    /* auxiliary input */
                     28: #define DOS_auxoutput   0x04    /* auxiliary output */
                     29: #define DOS_print       0x05    /* print character */
                     30: #define DOS_conio       0x06    /* direct console i/o */
                     31: #define DOS_coninput    0x07    /* direct console input */
                     32: #define DOS_readkbd     0x08    /* read keyboard */
                     33: #define DOS_message     0x09    /* display string */
                     34: #define DOS_bufkbdin    0x0a    /* buffered keyboard input */
                     35: #define DOS_kbdstatus   0x0b    /* check keyboard status */
                     36: #define DOS_flshread    0x0c    /* flush buffer and read keyboard */
                     37: #define DOS_diskreset   0x0d    /* disk reset */
                     38: #define DOS_selectdisk  0x0e    /* select default disk */
                     39: #define DOS_fcbopen     0x0f    /* open file with fcb */
                     40: #define DOS_fcbclose    0x10    /* close file with fcb */
                     41: #define DOS_fcbfirst    0x11    /* search for first entry with fcb */
                     42: #define DOS_fcbnext     0x12    /* search for next entry with fcb */
                     43: #define DOS_fcbdelete   0x13    /* delete file with fcb */
                     44: #define DOS_fcbsread    0x14    /* sequential read with fcb */
                     45: #define DOS_fcbswrite   0x15    /* sequential write with fcb */
                     46: #define DOS_fcbcreate   0x16    /* create file with fcb */
                     47: #define DOS_fcbrename   0x17    /* rename file with fcb */
                     48: #define DOS_currentd    0x19    /* current default disk */
                     49: #define DOS_setDMA      0x1a    /* set DMA */
                     50: #define DOS_fcbrread    0x21    /* random read with fcb */
                     51: #define DOS_fcbrwrite   0x22    /* random write with fcb */
                     52: #define DOS_fcbsize     0x23    /* file size with fcb */
                     53: #define DOS_fcbsetrec   0x24    /* set relative record with fcb */
                     54: #define DOS_setvector   0x25    /* set interrupt vector */
                     55: #define DOS_fcbbread    0x27    /* random block read with fcb */
                     56: #define DOS_fcbbwrite   0x28    /* random block write with fcb */
                     57: #define DOS_fcbparse    0x29    /* parse file name with fcb */
                     58: #define DOS_getdate     0x2a    /* get date */
                     59: #define DOS_setdate     0x2b    /* set date */
                     60: #define DOS_gettime     0x2c    /* get time */
                     61: #define DOS_settime     0x2d    /* set time */
                     62: #define DOS_verify      0x2e    /* set/reset verify flag */
                     63: #define DOS_getDMA      0x2f    /* get DMA */
                     64: #define DOS_version     0x30    /* get version number */
                     65: #define DOS_keep        0x31    /* keep process */
                     66: #define DOS_cntlc       0x33    /* Cntl-C check */
                     67: #define DOS_getvector   0x35    /* get interrupt vector */
                     68: #define DOS_getdskspc   0x36    /* get disk free space */
                     69: #define DOS_country     0x38    /* get country dependent info */
                     70: #define DOS_mkdir       0x39    /* make subdirectory */
                     71: #define DOS_rmdir       0x3a    /* remove subdirectory */
                     72: #define DOS_chdir       0x3b    /* change subdirectory */
                     73: #define DOS_create      0x3c    /* create pathname */
                     74: #define DOS_open        0x3d    /* open pathname */
                     75: #define DOS_close       0x3e    /* close file handle */
                     76: #define DOS_read        0x3f    /* read from file handle */
                     77: #define DOS_write       0x40    /* write from file handle */
                     78: #define DOS_delete      0x41    /* delete pathname */
                     79: #define DOS_lseek       0x42    /* move file pointer */
                     80: #define DOS_filemode    0x43    /* get/set attributes of pathname */
                     81: #define DOS_ioctl       0x44    /* ioctl for devices */
                     82: #define DOS_dup         0x45    /* duplicate file handle */
                     83: #define DOS_forcedup    0x46    /* force duplicate file handle */
                     84: #define DOS_curdir      0x47    /* get current directory */
                     85: #define DOS_allocmem    0x48    /* allocate memory block */
                     86: #define DOS_freemem     0x49    /* free memory block */
                     87: #define DOS_setmem      0x4a    /* set size of memory block */
                     88: #define DOS_exec        0x4b    /* load and execute program */
                     89: #define DOS_terminate   0x4c    /* terminate process with errorcode */
                     90: #define DOS_wait        0x4d    /* get child process return code */
                     91: #define DOS_findfirst   0x4e    /* find first file match */
                     92: #define DOS_findnext    0x4f    /* find next file match */
                     93: #define DOS_getverify   0x54    /* return current verify flag */
                     94: #define DOS_rename      0x56    /* rename pathname */
                     95: #define DOS_filedate    0x57    /* get/set file handle date/time */
                     96: #define DOS_locking     0x5C    /* file record locking/unlocking */
                     97: #define DOS_sleep       0x89    /* delay process execution */
                     98: 
                     99: /* DOS errno values for setting __doserrno in C routines */
                    100: 
                    101: #define E_ifunc     1   /* invalid function code */
                    102: #define E_nofile    2   /* file not found */
                    103: #define E_nopath    3   /* path not found */
                    104: #define E_toomany   4   /* too many open files */
                    105: #define E_access    5   /* access denied */
                    106: #define E_ihandle   6   /* invalid handle */
                    107: #define E_arena     7   /* arena trashed */
                    108: #define E_nomem     8   /* not enough memory */
                    109: #define E_iblock    9   /* invalid block */
                    110: #define E_badenv    10  /* bad environment */
                    111: #define E_badfmt    11  /* bad format */
                    112: #define E_iaccess   12  /* invalid access code */
                    113: #define E_idata     13  /* invalid data */
                    114: #define E_unknown   14  /* ??? unknown error ??? */
                    115: #define E_idrive    15  /* invalid drive */
                    116: #define E_curdir    16  /* current directory */
                    117: #define E_difdev    17  /* not same device */
                    118: #define E_nomore    18  /* no more files */
                    119: #define E_maxerr2   19  /* unknown error - Version 2.0 */
                    120: #define E_sharerr   32  /* sharing violation */
                    121: #define E_lockerr   33  /* locking violation */
                    122: #define E_maxerr3   34  /* unknown error - Version 3.0 */
                    123: 
                    124: /* DOS file attributes */
                    125: 
                    126: #define A_RO    0x1     /* read only */
                    127: #define A_H     0x2     /* hidden */
                    128: #define A_S     0x4     /* system */
                    129: #define A_V     0x8     /* volume id */
                    130: #define A_D     0x10    /* directory */
                    131: #define A_A     0x20    /* archive */
                    132: 
                    133: #define A_MOD   (A_RO+A_H+A_S+A_A)      /* changeable attributes */

unix.superglobalmegacorp.com

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