Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.4 KiB

  1. /* -----------------------------------------------------------------------------
  2. * See the LICENSE file for information on copyright, usage and redistribution
  3. * of SWIG, and the README file for authors - http://www.swig.org/release.html.
  4. *
  5. * mactclinit.c
  6. * ----------------------------------------------------------------------------- */
  7. /*
  8. * tclMacAppInit.c --
  9. *
  10. * Provides a version of the Tcl_AppInit procedure for the example shell.
  11. *
  12. * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
  13. * Copyright (c) 1995-1997 Sun Microsystems, Inc.
  14. *
  15. * See the file "license.terms" for information on usage and redistribution
  16. * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  17. *
  18. * SCCS: @(#) tclMacAppInit.c 1.17 97/01/21 18:13:34
  19. */
  20. #include "tcl.h"
  21. #include "tclInt.h"
  22. #include "tclMacInt.h"
  23. #if defined(THINK_C)
  24. # include <console.h>
  25. #elif defined(__MWERKS__)
  26. # include <SIOUX.h>
  27. short InstallConsole _ANSI_ARGS_((short fd));
  28. #endif
  29. /*
  30. *----------------------------------------------------------------------
  31. *
  32. * MacintoshInit --
  33. *
  34. * This procedure calls initalization routines to set up a simple
  35. * console on a Macintosh. This is necessary as the Mac doesn't
  36. * have a stdout & stderr by default.
  37. *
  38. * Results:
  39. * Returns TCL_OK if everything went fine. If it didn't the
  40. * application should probably fail.
  41. *
  42. * Side effects:
  43. * Inits the appropiate console package.
  44. *
  45. *----------------------------------------------------------------------
  46. */
  47. #ifdef __cplusplus
  48. extern "C"
  49. #endif
  50. extern int
  51. MacintoshInit()
  52. {
  53. #if defined(THINK_C)
  54. /* Set options for Think C console package */
  55. /* The console package calls the Mac init calls */
  56. console_options.pause_atexit = 0;
  57. console_options.title = "\pTcl Interpreter";
  58. #elif defined(__MWERKS__)
  59. /* Set options for CodeWarrior SIOUX package */
  60. SIOUXSettings.autocloseonquit = true;
  61. SIOUXSettings.showstatusline = true;
  62. SIOUXSettings.asktosaveonclose = false;
  63. InstallConsole(0);
  64. SIOUXSetTitle("\pTcl Interpreter");
  65. #elif defined(applec)
  66. /* Init packages used by MPW SIOW package */
  67. InitGraf((Ptr)&qd.thePort);
  68. InitFonts();
  69. InitWindows();
  70. InitMenus();
  71. TEInit();
  72. InitDialogs(nil);
  73. InitCursor();
  74. #endif
  75. TclMacSetEventProc((TclMacConvertEventPtr) SIOUXHandleOneEvent);
  76. /* No problems with initialization */
  77. return TCL_OK;
  78. }