{**********************************************************************
{*
{* BusyBox -- Version 3.0  (Main Program)
{*
{* Copyright (c)
{* Apple Computer, Inc.  1986-1989
{* All Rights Reserved.
{*
{* This file contains the busybox program.
{*
{**********************************************************************}
{$R-}

program BusyBox;

USES 
        types,
        gsos,
        Quickdraw,
        fonts,
        memory,
        IntMath,
        events,
        prodos,
        locator,
        controls,
        windows,
        lists,
        scrap,
        lineedit,
        dialogs,
        menus,
        desk,
        STDFile,
        QDAUX, 
        print,
        miscTool,
        resources,
        

        uGlobals,  { HodgePodge Code Units }
        uUtils,
        uWindow,
        uMenu,
        uEvent;

var
    InitRef : ref;      { This holds the reference to the startstop record }


BEGIN  { of MAIN program BusyBox }

    { Init our globals. }
    InitGlobals;

	MyMemoryID := MMStartup;			{ Start up & get ID from the Memory Manager }
	TLStartUp;							{ Start up the tool locator }

										{ Startup the tools using the new toolbox call }
	InitRef := StartupTools(MyMemoryID,RefIsResource,ref(1));
    if _toolErr = 0 then	{ note: usage of _toolErr may vary between compilers }
        begin
            SetUpMenus;     { Set up menus }
            SetupWindows;
            InitCursor;     { Make cursor show ready }
            MainEvent;      { Use application }
        end;

    { Let the toolbox shutdown the tools. }
    ShutDownTools(RefIsHandle,InitRef);
	TLShutDown;				{ Shut down the tool locator }

END.   { of MAIN program BusyBox }
