home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / emulators / v9t9 / linux / sources / V9t9 / source / OSLib / MacOS.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-10-19  |  2.1 KB  |  108 lines

  1.  
  2. /*
  3.  *    Mac types
  4.  */
  5.  
  6. #include <MacTypes.h>
  7. #include <Files.h>
  8. #include <Errors.h>
  9.  
  10. #define OS_MAXNAMELEN    63
  11. #define OS_MAXVOLLEN    27
  12. #define OS_MAXPATHLEN     255
  13.  
  14. #define OS_VOLSIZE        28
  15. #define OS_NAMESIZE        64
  16. #define OS_PATHSIZE        256
  17.  
  18. #define OS_PATHSEP        ':'
  19. #define OS_CWDSTR        ":"
  20. #define OS_PDSTR        ":"
  21.  
  22. #define OS_ENVSEP        ','
  23. #define OS_ENVSEPLIST    ",;"
  24.  
  25. #define OS_IS_CASE_INSENSITIVE    1
  26. #define OS_REL_PATH_HAS_SEP        1
  27.  
  28. /*    As used by HOpen() */
  29. typedef    
  30. short                    OSRef;        /*    file ref */
  31.  
  32. typedef
  33. struct                OSPathSpec
  34. {
  35.     short     vRefNum;
  36.     long    dirID;
  37. }                    OSPathSpec;        /*  OS path specifier */
  38.  
  39. typedef
  40. struct                OSNameSpec
  41. {
  42.     Str63    name;
  43. }                    OSNameSpec;        /*  OS name specifier */
  44.  
  45. /*    As used by PBGetCatInfoSync() */
  46. typedef
  47. struct
  48. {
  49.     short            vRefNum;        /*  original volume */
  50.     long            dirID;            /*  original directory */
  51.     long            index;            /*  current index */
  52. }                    OSDirRef;        /*    directory scan ref */
  53.  
  54. /*    As used by NewHandle, etc  */
  55. typedef struct        OSHandle
  56. {
  57.     Handle        h;
  58. }                    OSHandle;
  59.  
  60. /*    As used by all I/O routines */
  61. typedef 
  62. OSErr                    OSError;        /*    error type */
  63.  
  64. /*    No-error code */
  65. #define    OS_NOERR        noErr
  66.  
  67. /*    Does OSError report error? */
  68. #define OS_ISERR(x)        ((x)!=noErr)
  69.  
  70. /*    OSError representing 'file not found' */
  71. #define OS_FNFERR        fnfErr
  72.  
  73. /*    OSError representing 'directory not found' */
  74. #define OS_DNFERR        dirNFErr
  75.  
  76. /*    OSError representing 'file is a directory' */
  77. #define OS_FIDERR        notAFileErr
  78.  
  79. /*    OSError representing 'file is not a directory' */
  80. #define OS_FNIDERR        dirNFErr
  81.  
  82. /*    OSError representing 'filename too long' */
  83. #define OS_FNTLERR        bdNamErr
  84.  
  85. /*    OSError representing 'out of memory' */
  86. #define OS_MEMERR        memFullErr
  87.  
  88. /*    OSError representing 'permission denied' */
  89. #define OS_PERMERR        permErr
  90.  
  91. /*    OSError representing 'busy' (as for handles) */
  92. #define OS_BUSYERR        memLockedErr
  93.  
  94. /*    File type code. */
  95. typedef    
  96. OSType                OSFileType;        /*    way to identify a file's type */
  97.  
  98. extern                OSFileType OS_TEXTTYPE;            /* text file */
  99.  
  100. /*    Time; a 32-bit value counting seconds since 1/1/1904. */
  101. typedef
  102. unsigned long        OSTime;
  103.  
  104. /*    Shared library access doesn't exist.  */
  105. typedef
  106. void *                OSLibrary;
  107.  
  108.