home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / online / source / c / compilers / Tickle-4.0.sit.hqx / Tickle-4.0 / src / tclMac.h < prev    next >
Text File  |  1993-11-18  |  4KB  |  134 lines

  1. /*
  2. ** This source code was written by Tim Endres
  3. ** Email: time@ice.com.
  4. ** USMail: 8840 Main Street, Whitmore Lake, MI  48189
  5. **
  6. ** Some portions of this application utilize sources
  7. ** that are copyrighted by ICE Engineering, Inc., and
  8. ** ICE Engineering retains all rights to those sources.
  9. **
  10. ** Neither ICE Engineering, Inc., nor Tim Endres, 
  11. ** warrants this source code for any reason, and neither
  12. ** party assumes any responsbility for the use of these
  13. ** sources, libraries, or applications. The user of these
  14. ** sources and binaries assumes all responsbilities for
  15. ** any resulting consequences.
  16. */
  17.  
  18. #ifdef TCL_MAJOR_VERSION
  19. #    define Tcl_UnixError    Tcl_PosixError
  20. #else
  21. #    define TclSetEnv        tcl_setenv
  22. #endif
  23.  
  24. #define kSysFolderTag         "SYSTEM_FOLDER"
  25. #define kSystemVersionTag    "SYSTEM_VERSION"
  26. #define kMachineNameTag        "MACHINE_NAME"
  27. #define kLoginnameTag         "LOGIN"
  28. #define kTempFolderTag         "TEMP"
  29. #define kAppleMenuFolderTag "APPLE_MENU_FOLDER"
  30. #define kCPFolderTag         "CP_FOLDER"
  31. #define kDeskFolderTag         "DESK_FOLDER"
  32. #define kExtFolderTag         "EXT_FOLDER"
  33. #define kPrefFolderTag         "PREF_FOLDER"
  34. #define kPrintMonFolderTag     "PRINT_MON_FOLDER"
  35. #define kShTrashFolderTag     "SHARED_TRASH_FOLDER"
  36. #define kTrashFolderTag     "TRASH_FOLDER"
  37. #define kStartUpFolderTag     "START_UP_FOLDER"
  38. #define kApplicationDirTag     "APPDIR"
  39. #define kAppFileNameTag        "APPNAME"
  40. #define kDefaultDirTag         "PWD"
  41. #define kHomeDirTag            "HOME"
  42. #define kDirPathTag            "PATH"
  43.  
  44. #ifndef TRUE
  45. #    define TRUE        1
  46. #endif
  47. #ifndef FALSE
  48. #    define FALSE    0
  49. #endif
  50.  
  51. #ifdef macintosh
  52.     /*
  53.     ** Difference between Mac and Unix times
  54.     */
  55. #    define TIMEDIFF    0x7c25b080
  56. #endif
  57.  
  58. /*
  59. ** This is *very* gross!
  60. ** These macros only apply in the commands:
  61. **     ls
  62. **     echo
  63. **
  64. ** Because Think_C did not adopt the sane translations
  65. ** provided by MPW, you have inconsistant behavior between
  66. ** normal CR delimited text windows, and the stupid NL
  67. ** delimited Console Window (Think's shell environment).
  68. ** Therefore, we need to define the line delimiter for
  69. ** the application. If you are putting data into a CR
  70. ** delimited window, and you're in ThinkC, you will need
  71. ** to define this as "\r". If you are in ThinkC and using
  72. ** the console window, then use "\n". If you are using
  73. ** MPW, then it is "\n" no matter what the environment.
  74. */
  75. #ifdef THINK_C
  76. #    ifdef TCLAPPL
  77. #        define SHELL_LINE_SEPER_STR        "\r"
  78. #        define SHELL_LINE_SEPER_CHAR    '\r'
  79. #    else
  80. #        define SHELL_LINE_SEPER_STR        "\n"
  81. #        define SHELL_LINE_SEPER_CHAR    '\n'
  82. #    endif
  83. #else
  84. #    define SHELL_LINE_SEPER_STR            "\n"
  85. #    define SHELL_LINE_SEPER_CHAR        '\n'
  86. #endif
  87.  
  88.  
  89. #ifdef ALLOCATE_GLOBALS
  90.  
  91. #define ALLOC_CLASS
  92. #define ALLOC_INIT(def)        = def
  93. #define ALLOC_ARRAY(asize)    [asize]
  94.  
  95. #else
  96.  
  97. #define ALLOC_CLASS            extern
  98. #define ALLOC_INIT(def)
  99. #define ALLOC_ARRAY(asize)    []
  100.  
  101. #endif
  102.  
  103. ALLOC_CLASS    char        *custom_name        ALLOC_INIT("tcl");
  104. ALLOC_CLASS    char        *custom_longname    ALLOC_INIT("tickle");
  105.  
  106. ALLOC_CLASS    int            patchlevel
  107. #ifdef TCL_PATCH_LEVEL
  108.                                             ALLOC_INIT( TCL_PATCH_LEVEL );
  109. #else
  110.                                             ALLOC_INIT(0);
  111. #endif
  112. ALLOC_CLASS    char        *tcl_version
  113. #ifdef TCL_VERSION
  114.                                             ALLOC_INIT(TCL_VERSION);
  115. #else
  116.                                             ALLOC_INIT("7.0");
  117. #endif
  118.  
  119.  
  120. #define SFSaveDisk        (* (short *) 0x0214)
  121. #define CurDirStore        (* (long *)  0x0398)
  122.  
  123. typedef int            (*TCLPFI)();
  124.  
  125. extern int            tcl_handle_output();
  126.  
  127. Handle                tcl_Houtput_sethdl();
  128. extern TCLPFI        Tcl_SetPrintProcedure();
  129. extern TCLPFI        Tcl_GetPrintProcedure();
  130. extern int            tcl_dev_null_output();
  131. extern int            tcl_handle_output();
  132.  
  133. extern int            _tclmac_user_interrupt_;
  134.