Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Functions | Variables
MacInstallWizard.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <TextUtils.h>
#include <Resources.h>
#include <LowMem.h>
#include <ToolUtils.h>
#include <Sound.h>
#include <Gestalt.h>
#include <Balloons.h>
#include <Folders.h>
#include <Lists.h>
#include <Navigation.h>
#include <MacTypes.h>
#include <PLStringFuncs.h>
#include <Icons.h>
#include <Appearance.h>
#include "FullPath.h"
#include "MoreFilesExtras.h"
#include "IterateDirectory.h"
#include "Threads.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  XPISpec
struct  _errTableEnt
struct  InstComp
struct  SetupType
struct  RunApp
struct  LegacyCheck
struct  SiteSelector
struct  Redirect
struct  Config
struct  Options
struct  LicWin
struct  WelcWin
struct  SetupTypeWin
struct  CompWin
struct  TermWin
struct  InstWiz
struct  InstINIRes
struct  _conn

Defines

#define ERR_CHECK(_funcCall)
#define ERR_CHECK_MSG(_funcCall, _rv, _msg)
#define ERR_CHECK_RET(_funcCall, _rv)
#define UNIFY_CHAR_CODE(_targetUint32, _src1char, _src2char, _src3char, _src4char)
#define INVERT_HIGHLIGHT(_rectPtr)
#define NUM_WINS   5
#define kLicenseID   0 /* window object ids */
#define kWelcomeID   1
#define kSetupTypeID   2
#define kComponentsID   3
#define kAdditionsID   4
#define kTerminalID   5
#define kMIWMagic   0x0F00BAA0
#define NGINST   1 /* event handling modes */
#define SDI   2
#define MY_EOF   '\0' /* parser constants */
#define MAC_EOL   '\r'
#define WIN_EOL   '\n'
#define START_SECTION   '['
#define END_SECTION   ']'
#define KV_DELIM   '='
#define kTempFolder   "\pTemp NSInstall"
#define kViewerFolder   "\p:viewer"
#define kScrollBarPad   3 /* constants */
#define kTxtRectPad   5
#define kInterWidgetPad   12
#define kScrollBarWidth   16
#define kScrollAmount   11
#define kNumLicScrns   4
#define kNumWelcMsgs   3
#define kNumWelcScrns   4
#define kMaxSetupTypes   4
#define kMaxComponents   64
#define kMaxNumKeys   16
#define kKeyMaxLen   128
#define kValueMaxLen   512
#define kSNameMaxLen   128 /* v--- for KV_DELIM char */
#define kSectionMaxLen   (kKeyMaxLen+1+kValueMaxLen)*kMaxNumKeys
#define kArchiveMaxLen   64
#define kGenIDIFileSize   2048
#define kEnableControl   0
#define kDisableControl   255
#define kNotSelected   0
#define kSelected   1
#define kNotInSetupType   0
#define kInSetupType   1
#define kDependeeOff   0
#define kDependeeOn   1
#define kInvalidCompIdx   -999
#define kMaxCoreFiles   256
#define kMaxProgUnits   100.0
#define kMaxRunApps   32
#define kMaxLegacyChecks   32
#define kMaxSites   32
#define kMaxGlobalURLs   5 /* end constants */
#define rRootWin   128 /* widget rsrc ids */
#define rBackBtn   129
#define rNextBtn   130
#define rCancelBtn   174
#define rNSLogo   140
#define rNSLogoBox   130
#define rLogoImgWell   170
#define rLicBox   131
#define rLicScrollBar   132
#define rWelcMsgTextbox   171
#define rReadmeBtn   133
#define rInstType   140
#define rInstDescBox   141
#define rDestLocBox   142
#define rDestLoc   143
#define rCompListBox   150 /* note: overriden use for list and rect */
#define rCompDescBox   151
#define rCheckboxLDEF   128
#define rStartMsgBox   160
#define rAllProgBar   161
#define rPerXPIProgBar   162
#define rSiteSelector   163
#define rSiteSelMsg   179
#define rSaveCheckbox   164
#define rSaveBitsMsgBox   165
#define rProxySettgBtn   175
#define rDLSettingsGB   178
#define rDLProgBar   180
#define rLabDloading   181
#define rLabFrom   182
#define rLabTo   183
#define rLabRate   184
#define rLabTimeLeft   185
#define rGrayPixPattern   128
#define rAlrtDelOldInst   150
#define rAlrtOS85Reqd   160
#define rAlrtError   170
#define rWarnLessSpace   180
#define rDlgProxySettg   140
#define rMBar   128 /* menu rsrc ids */
#define mApple   150
#define iAbout   1
#define mFile   151
#define iQuit   1
#define mEdit   152
#define iUndo   1
#define iCut   3
#define iCopy   4
#define iPaste   5
#define iClear   6
#define rAboutBox   128
#define rStringList   140
#define sConfigFName   1
#define sInstallFName   2
#define sTempIDIName   3
#define sConfigIDIName   4
#define sInstModules   5
#define rTitleStrList   170
#define sNSInstTitle   1
#define rParseKeys   141 /* parse keys in config.ini */
#define sGeneral   1
#define sRunMode   2
#define sProductName   3
#define sProgFolderName   4
#define sProgFoldPath   5
#define sDefaultType   6
#define sShowDlg   7
#define sTitle   8
#define sMsg0   9
#define sMsg1   10
#define sMsg2   11
#define rIndices   142 /* integer indices in string form (0-9) */
#define rIDIKeys   143
#define sFile   1
#define sDesc   2
#define sSDNSInstall   3 /* used when pasring INI */
#define sCoreFile   4
#define sCoreDir   5
#define sNoAds   6
#define sSilent   7
#define sExecution   8
#define sConfirmInstall   9
#define sTrue   10
#define sFalse   11
#define sNSInstall   12 /* used when generating IDI */
#define sWelcDlg   12
#define sReadmeFilename   32
#define sReadmeApp   33
#define sLicDlg   14
#define sLicFile   15
#define sSetupTypeDlg   16
#define sSetupType   17
#define sDescShort   18
#define sDescLong   19
#define sC   20
#define sCompDlg   21
#define sAddDlg   48
#define sComponent   22
#define sArchive   23
#define sInstSize   24
#define sAttributes   25
#define sURL   26
#define sServerPath   45
#define sDependee   31
#define sRandomInstall   34
#define sRunApp   35
#define sTargetApp   36
#define sTargetDoc   37
#define sLegacyCheck   38
#define sFilename   39
#define sSubfolder   49
#define sVersion   40
#define sMessage   41
#define sSiteSelector   42
#define sIdentifier   50
#define sDomain   43
#define sDescription   44
#define sRedirect   46
#define sSubpath   51
#define sTermDlg   27
#define sSELECTED   28
#define sINVISIBLE   29
#define sLAUNCHAPP   30
#define sADDITIONAL   47
#define sDOWNLOAD_ONLY   52 /* end parse keys */
#define rErrorList   144 /* errors */
#define eErrorMessage   1
#define eErr1   2
#define eErr2   3
#define eErr3   4
#define eParam   5
#define eMem   6
#define eParseFailed   7
#define eLoadLib   8
#define eUnknownDlgID   9
#define eSpawn   10
#define eMenuHdl   11
#define eCfgRead   12
#define eDownload   13
#define eInstRead   6
#define eDLFailed   14
#define instErrsNum   13 /* number of the install.ini errors */
#define rInstList   145
#define sInstGeneral   1
#define sNsTitle   2
#define sMoTitle   3
#define sBackBtn   4
#define sNextBtn   5
#define sCancel   6
#define sDeclineBtn   7
#define sAcceptBtn   8
#define sInstallBtn   9
#define sLicenseFName   10
#define sReadme   11
#define sInstLocTitle   12
#define sSelectFolder   13
#define sOnDisk   14
#define sInFolder   15
#define sCompDescTitle   16
#define sFolderDlgMsg   17
#define sDiskSpcAvail   18
#define sDiskSpcNeeded   19
#define sKilobytes   20
#define sExtracting   21
#define sInstalling   22
#define sFileSp   23
#define sSpOfSp   24
#define sProcessing   25
#define sProxySettings   26
#define sProxyDlg   27
#define sProxyHost   28
#define sProxyPort   29
#define sProxyUsername   30
#define sProxyPassword   31
#define sOKBtn   32
#define sDLSettings   33
#define sSiteSelMsg   34
#define sLabDloading   35
#define sLabFrom   36
#define sLabTo   37
#define sLabRate   38
#define sTimeLeft   39
#define sDownloadKB   40
#define sDeleteBtn   41
#define sQuitBtn   42
#define sSpaceMsg1   43
#define sSpaceMsg2   44
#define sSpaceMsg3   45
#define sPauseBtn   46
#define sResumeBtn   47
#define sValidating   48
#define sExecuting   49
#define instKeysNum   49 /* number of installer.ini keys */
#define rInstMenuList   146
#define sMenuGeneral   1
#define sMenuAboutNs   2
#define sMenuAboutMo   3
#define sMenuFile   4
#define sMenuQuit   5
#define sMenuQuitHot   6
#define sMenuEdit   7
#define sMenuUndo   8
#define sMenuUndoHot   9
#define sMenuCut   10
#define sMenuCutHot   11
#define sMenuCopy   12
#define sMenuCopyHot   13
#define sMenuPaste   14
#define sMenuPasteHot   15
#define sMenuClear   16
#define sMenuClearHot   17
#define instMenuNum   17
#define TYPE_UNDEF   0
#define TYPE_PROXY   1
#define TYPE_HTTP   2
#define TYPE_FTP   3
#define kNumDLFields   4

Typedefs

typedef struct XPISpec XPISpec
typedef struct _errTableEnt ErrTableEnt
typedef struct InstComp InstComp
typedef struct SetupType SetupType
typedef struct RunApp RunApp
typedef struct LegacyCheck LegacyCheck
typedef struct SiteSelector SiteSelector
typedef struct Redirect Redirect
typedef struct Config Config
typedef struct Options Options
typedef struct LicWin LicWin
typedef struct WelcWin WelcWin
typedef struct SetupTypeWin SetupTypeWin
typedef struct CompWin CompWin
typedef struct TermWin TermWin
typedef struct InstWiz InstWiz
typedef struct InstINIRes InstINIRes
typedef struct _conn CONN

Enumerations

enum  InstallState {
  eInstallNotStarted = 0, eDownloading, ePaused, eResuming,
  eExtracting, eInstalling
}

Functions

void main (void)
 main()
Boolean VerifyEnv (void)
void Init (void)
 Initializes global ft2 and fontcatalog instances.
void InitControlsObject (void)
OSErr GetCWD (long *outDirID, short *outVRefNum)
void InitOptObject (void)
void InitManagers (void)
void CleanTemp (void)
pascal void CheckIfXPI (const CInfoPBRec *const, Boolean *, void *)
void MakeMenus (void)
void MainEventLoop (void)
void MainEventLoopPass ()
int BreathFunc ()
void ErrorHandler (short, Str255)
Boolean LookupErrorMsg (short code, Str255 msg)
void Shutdown (void)
 Releases global ft2 and fontcatalog instances.
void ParseConfig (void)
void ParseInstall (void)
Boolean ReadINIFile (int, char **)
OSErr PopulateInstallKeys (char *)
Boolean GetResourcedString (Str255, int, int)
OSErr PopulateGeneralKeys (char *)
OSErr PopulateLicWinKeys (char *)
OSErr PopulateWelcWinKeys (char *)
OSErr PopulateSetupTypeWinKeys (char *)
OSErr PopulateCompWinKeys (char *)
OSErr PopulateTermWinKeys (char *)
OSErr PopulateIDIKeys (char *)
OSErr PopulateMiscKeys (char *)
OSErr MapDependees (void)
Boolean RandomSelect (long)
short GetComponentIndex (Handle)
Boolean FillKeyValueForIDIKey (short, Handle, char *)
Boolean FillKeyValueUsingResID (short, short, Handle, char *)
Boolean FillKeyValueUsingSLID (short, short, short, Handle, char *)
Boolean FillKeyValueSecNameKeyID (short, char *, short, Handle, char *)
Boolean FillKeyValueUsingName (char *, char *, Handle, char *)
Boolean FindKeyValue (const char *, const char *, const char *, char *)
Boolean GetNextSection (char **, char *, char *)
Boolean GetNextKeyVal (char **, char *, char *)
unsigned char * CToPascal (char *)
char * PascalToC (unsigned char *)
void CopyPascalStrToC (ConstStr255Param srcPString, char *dest)
OSErr ReadSystemErrors (const char *instText)
void HandleNextEvent (EventRecord *)
void HandleMouseDown (EventRecord *)
void HandleKeyDown (EventRecord *)
void HandleMenuChoice (SInt32)
void HandleUpdateEvt (EventRecord *)
void HandleActivateEvt (EventRecord *)
void HandleOSEvt (EventRecord *)
void React2InContent (EventRecord *, WindowPtr)
Boolean DidUserCancel (EventRecord *)
void ShowLicenseWin (void)
void InLicenseContent (EventRecord *, WindowPtr)
void EnableLicenseWin (void)
void DisableLicenseWin (void)
void InitLicTxt (void)
void ShowTxt (void)
void ShowLogo (Boolean)
void InitScrollBar (ControlHandle)
pascal void DoScrollProc (ControlHandle, short)
void CalcChange (ControlHandle, short *)
void ShowNavButtons (unsigned char *, unsigned char *)
void EnableNavButtons (void)
void DisableNavButtons (void)
void ShowWelcomeWin (void)
void ShowWelcomeMsg (void)
void InWelcomeContent (EventRecord *, WindowPtr)
void ShowCancelButton (void)
void ShowReadmeButton (void)
void ShowReadme (void)
void EnableWelcomeWin (void)
void DisableWelcomeWin (void)
OSErr LaunchAppOpeningDoc (Boolean, FSSpec *, ProcessSerialNumber *, FSSpec *, unsigned short, unsigned short)
OSErr FindAppUsingSig (OSType, FSSpec *, Boolean *, ProcessSerialNumber *)
OSErr FindRunningAppBySignature (OSType, FSSpec *, ProcessSerialNumber *)
static OSErr VolHasDesktopDB (short, Boolean *)
static OSErr FindAppOnVolume (OSType, short, FSSpec *)
OSErr GetSysVolume (short *)
OSErr GetIndVolume (short, short *)
OSErr GetLastModDateTime (const FSSpec *, unsigned long *)
void InitNewMenu (void)
void ShowSetupTypeWin (void)
void ShowSetupDescTxt (void)
void GetAllVInfo (unsigned char **, short *)
pascal void OurNavEventFunction (NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, NavCallBackUserData callBackUD)
void InsertCompList (int instChoice)
void DrawDiskNFolder (short, unsigned char *)
void DrawDiskSpaceMsgs (short)
char * DiskSpaceNeeded (void)
void ClearDiskSpaceMsgs (void)
char * ltoa (long)
short pstrcmp (unsigned char *, unsigned char *)
unsigned char * pstrcpy (unsigned char *, unsigned char *)
unsigned char * pstrcat (unsigned char *, unsigned char *)
void InSetupTypeContent (EventRecord *, WindowPtr)
Boolean LegacyFileCheck (short, long)
int CompareVersion (Handle, FSSpecPtr)
Boolean VerifyDiskSpace (void)
void EnableSetupTypeWin (void)
void DisableSetupTypeWin (void)
void strtran (char *, const char *, const char *)
void ShowComponentsWin (void)
Boolean PopulateCompInfo (void)
void UpdateCompWin (void)
void InComponentsContent (EventRecord *, WindowPtr)
short GetCompRow (int)
void SetOptInfo (Boolean)
void InitRowHighlight (int)
void UpdateRowHighlight (Point)
void UpdateLongDesc (int)
void ResolveDependees (int, int)
void UpdateRefCount (int, int)
void EnableComponentsWin (void)
void DisableComponentsWin (void)
void ShowAdditionsWin (void)
Boolean AddPopulateCompInfo (void)
void InAdditionsContent (EventRecord *, WindowPtr)
void UpdateAdditionsWin (void)
short AddGetCompRow (int)
void AddSetOptInfo (Boolean)
void AddInitRowHighlight (int)
void AddUpdateRowHighlight (Point)
void AddUpdateLongDesc (int)
void EnableAdditionsWin (void)
void DisableAdditionsWin (void)
void ShowTerminalWin (void)
short GetRectFromRes (Rect *, short)
void BeginInstall (void)
void my_c2pstrcpy (const char *, Str255)
void InTerminalContent (EventRecord *, WindowPtr)
void UpdateTerminalWin (void)
void OpenProxySettings (void)
Boolean SpawnSDThread (ThreadEntryProcPtr, ThreadID *)
void ClearDownloadSettings (void)
void ClearSaveBitsMsg (void)
void EnableTerminalWin (void)
void DisableTerminalWin (void)
void SetupPauseResumeButtons (void)
void SetPausedState (void)
void SetResumedState (void)
void DisablePauseAndResume ()
pascal voidInstall (void *)
long ComputeTotalDLSize (void)
short DownloadXPIs (short, long)
short DownloadFile (Handle, long, Handle, int, int, CONN *)
OSErr DLMarkerSetCurrent (char *)
OSErr DLMarkerGetCurrent (int *, int *)
OSErr DLMarkerDelete (void)
int GetResPos (InstComp *)
OSErr GetInstallerModules (short *, long *)
OSErr GetIndexFromName (char *, int *, int *)
int ParseFTPURL (char *, char **, char **)
void CompressToFit (char *, char *, int)
float ComputeRate (int, time_t, time_t)
int DLProgressCB (int, int)
void IfRemoveOldCore (short, long)
Boolean GenerateIDIFromOpt (Str255, long, short, FSSpec *)
void AddKeyToIDI (short, Handle, char *)
Boolean ExistArchives (short, long)
Boolean CheckConn (char *URL, int type, CONN *myConn, Boolean force)
OSErr ExistsXPI (int)
void LaunchApps (short, long)
void RunApps (void)
void DeleteXPIs (short, long)
void InitDLProgControls (Boolean onlyLabels)
void ClearDLProgControls (Boolean onlyLabels)
void InitProgressBar (void)
Boolean CRCCheckDownloadedArchives (Handle dlPath, short dlPathLen, int count)
Boolean IsArchiveFile (char *path)
OSErr ExtractCoreFile (short, long, short, long)
void WhackDirectories (char *)
OSErr InflateFiles (void *, void *, short, long)
OSErr AppleSingleDecode (FSSpecPtr, FSSpecPtr)
void ResolveDirs (char *, char *)
OSErr DirCreateRecursive (char *)
OSErr ForceMoveFile (short, long, ConstStr255Param, long)
OSErr CleanupExtractedFiles (short, long)
OSErr RunAllXPIs (short xpiVRefNum, long xpiDirID, short vRefNum, long dirID)
pascal void FrameGreyButton (Rect *buttonFrame)
void SetFrameGreyButtonColor (short color)

Variables

WindowPtr gWPtr
short gCurrWin
InstWizgControls
InstINIResgStrings
Boolean gDone
Boolean gInstallStarted

Class Documentation

struct XPISpec

Definition at line 427 of file MacInstallWizard.h.

Collaboration diagram for XPISpec:
Class Members
FSSpecPtr FSp
struct XPISpec * next
struct _errTableEnt

Definition at line 432 of file MacInstallWizard.h.

Class Members
Str255 msg
short num
struct InstComp

Definition at line 438 of file MacInstallWizard.h.

Class Members
Boolean additional
Handle archive
short dep
Handle depName
Boolean dirty
Boolean download_only
Boolean highlighted
Boolean invisible
Boolean launchapp
Handle longDesc
short numDeps
short refcnt
Boolean selected
Handle shortDesc
long size
struct SetupType

Definition at line 467 of file MacInstallWizard.h.

Class Members
short comp
Handle longDesc
short numComps
Handle shortDesc
struct RunApp

Definition at line 474 of file MacInstallWizard.h.

Class Members
Handle targetApp
Handle targetDoc
struct LegacyCheck

Definition at line 479 of file MacInstallWizard.h.

Class Members
Handle filename
Handle message
Handle subfolder
Handle version
struct SiteSelector

Definition at line 486 of file MacInstallWizard.h.

Class Members
Handle desc
Handle domain
Handle id
struct Redirect

Definition at line 492 of file MacInstallWizard.h.

Class Members
Handle desc
Handle subpath
struct Config

Definition at line 497 of file MacInstallWizard.h.

Collaboration diagram for Config:
Class Members
RunApp apps
Boolean bAdditionsExist
Boolean bReadme
LegacyCheck checks
InstComp comp
Handle confirmInstall
Handle coreDir
Handle coreFile
Handle execution
Handle globalURL
Handle licFileName
Handle noAds
short numComps
short numGlobalURLs
long numLegacyChecks
long numRunApps
short numSetupTypes
short numSites
Handle readmeApp
Handle readmeFile
Redirect redirect
Handle saveBitsMsg
Handle selAddMsg
Handle selCompMsg
Handle silent
SiteSelector site
SetupType st
Handle startMsg
Handle targetSubfolder
Handle welcMsg
struct Options

Definition at line 557 of file MacInstallWizard.h.

Class Members
short compSelected
long dirID
unsigned char * folder
short instChoice
short numCompSelected
char * proxyHost
char * proxyPassword
char * proxyPort
char * proxyUsername
Boolean saveBits
short siteChoice
short vRefNum
struct LicWin

Definition at line 581 of file MacInstallWizard.h.

Class Members
ControlHandle licBox
TEHandle licTxt
ControlHandle scrollBar
struct WelcWin

Definition at line 587 of file MacInstallWizard.h.

Class Members
ControlHandle readmeButton
ControlHandle welcMsgCntl
struct SetupTypeWin

Definition at line 592 of file MacInstallWizard.h.

Class Members
ControlHandle destLoc
ControlHandle destLocBox
ControlHandle instDescBox
TEHandle instDescTxt
ControlHandle instType
struct CompWin

Definition at line 600 of file MacInstallWizard.h.

Class Members
ControlHandle compDescBox
TEHandle compDescTxt
ListHandle compList
Rect compListBox
ControlHandle selCompMsg
struct TermWin

Definition at line 608 of file MacInstallWizard.h.

Class Members
ControlHandle allProgressBar
TEHandle allProgressMsg
ControlHandle dlLabels
ControlHandle dlProgressBar
TEHandle dlProgressMsgs
ControlHandle dlSettingsGB
ControlHandle proxySettingsBtn
ControlHandle saveBitsCheckbox
TEHandle saveBitsMsg
Rect saveBitsMsgBox
ControlHandle siteSelector
ControlHandle siteSelMsg
TEHandle startMsg
Rect startMsgBox
ControlHandle xpiProgressBar
TEHandle xpiProgressMsg
struct InstWiz

Definition at line 641 of file MacInstallWizard.h.

Collaboration diagram for InstWiz:
Class Members
CompWin * aw
ControlHandle backB
ControlHandle cancelB
Config * cfg
CompWin * cw
LicWin * lw
ControlHandle nextB
Options * opt
int resPos
InstallState state
SetupTypeWin * stw
TermWin * tw
WelcWin * ww
struct InstINIRes

Definition at line 667 of file MacInstallWizard.h.

Class Members
Str255 iErr
Str255 iKey
Str255 iMenu
struct _conn

Definition at line 88 of file nsXIEngine.h.

Class Members
void * conn
unsigned char type
char * URL

Define Documentation

#define eCfgRead   12

Definition at line 342 of file MacInstallWizard.h.

#define eDLFailed   14

Definition at line 345 of file MacInstallWizard.h.

#define eDownload   13

Definition at line 343 of file MacInstallWizard.h.

#define eErr1   2

Definition at line 332 of file MacInstallWizard.h.

#define eErr2   3

Definition at line 333 of file MacInstallWizard.h.

#define eErr3   4

Definition at line 334 of file MacInstallWizard.h.

Definition at line 331 of file MacInstallWizard.h.

#define eInstRead   6

Definition at line 344 of file MacInstallWizard.h.

#define eLoadLib   8

Definition at line 338 of file MacInstallWizard.h.

#define eMem   6

Definition at line 336 of file MacInstallWizard.h.

#define eMenuHdl   11

Definition at line 341 of file MacInstallWizard.h.

#define END_SECTION   ']'

Definition at line 135 of file MacInstallWizard.h.

#define eParam   5

Definition at line 335 of file MacInstallWizard.h.

Definition at line 337 of file MacInstallWizard.h.

#define ERR_CHECK (   _funcCall)
Value:
err = _funcCall;                          \
if (err)                                         \
{                                                       \
    ErrorHandler(err, nil);         \
    return;                     \
}

Definition at line 79 of file MacInstallWizard.h.

#define ERR_CHECK_MSG (   _funcCall,
  _rv,
  _msg 
)
Value:
err = _funcCall;                \
if (err)                        \
{                               \
    ErrorHandler(err, _msg);            \
       return _rv;                                      \
}

Definition at line 87 of file MacInstallWizard.h.

#define ERR_CHECK_RET (   _funcCall,
  _rv 
)
Value:
err = _funcCall;                                        \
if (err)                                                       \
{                                                                     \
    ErrorHandler(err, nil);                 \
       return _rv;                                             \
}

Definition at line 95 of file MacInstallWizard.h.

#define eSpawn   10

Definition at line 340 of file MacInstallWizard.h.

Definition at line 339 of file MacInstallWizard.h.

#define iAbout   1

Definition at line 228 of file MacInstallWizard.h.

#define iClear   6

Definition at line 236 of file MacInstallWizard.h.

#define iCopy   4

Definition at line 234 of file MacInstallWizard.h.

#define iCut   3

Definition at line 233 of file MacInstallWizard.h.

#define instErrsNum   13 /* number of the install.ini errors */

Definition at line 347 of file MacInstallWizard.h.

#define instKeysNum   49 /* number of installer.ini keys */

Definition at line 400 of file MacInstallWizard.h.

#define instMenuNum   17

Definition at line 421 of file MacInstallWizard.h.

#define INVERT_HIGHLIGHT (   _rectPtr)
Value:
hiliteVal = LMGetHiliteMode();  \
            BitClr(&hiliteVal, pHiliteBit); \
            LMSetHiliteMode(hiliteVal);     \
            InvertRect(_rectPtr);

Definition at line 111 of file MacInstallWizard.h.

#define iPaste   5

Definition at line 235 of file MacInstallWizard.h.

#define iQuit   1

Definition at line 230 of file MacInstallWizard.h.

#define iUndo   1

Definition at line 232 of file MacInstallWizard.h.

Definition at line 123 of file MacInstallWizard.h.

Definition at line 158 of file MacInstallWizard.h.

Definition at line 122 of file MacInstallWizard.h.

Definition at line 166 of file MacInstallWizard.h.

Definition at line 167 of file MacInstallWizard.h.

Definition at line 161 of file MacInstallWizard.h.

Definition at line 160 of file MacInstallWizard.h.

#define kGenIDIFileSize   2048

Definition at line 159 of file MacInstallWizard.h.

Definition at line 165 of file MacInstallWizard.h.

Definition at line 143 of file MacInstallWizard.h.

#define kInvalidCompIdx   -999

Definition at line 168 of file MacInstallWizard.h.

#define kKeyMaxLen   128

Definition at line 154 of file MacInstallWizard.h.

#define kLicenseID   0 /* window object ids */

Definition at line 119 of file MacInstallWizard.h.

Definition at line 152 of file MacInstallWizard.h.

#define kMaxCoreFiles   256

Definition at line 169 of file MacInstallWizard.h.

#define kMaxGlobalURLs   5 /* end constants */

Definition at line 174 of file MacInstallWizard.h.

Definition at line 172 of file MacInstallWizard.h.

#define kMaxNumKeys   16

Definition at line 153 of file MacInstallWizard.h.

#define kMaxProgUnits   100.0

Definition at line 170 of file MacInstallWizard.h.

#define kMaxRunApps   32

Definition at line 171 of file MacInstallWizard.h.

Definition at line 151 of file MacInstallWizard.h.

#define kMaxSites   32

Definition at line 173 of file MacInstallWizard.h.

#define kMIWMagic   0x0F00BAA0

Definition at line 126 of file MacInstallWizard.h.

Definition at line 164 of file MacInstallWizard.h.

Definition at line 162 of file MacInstallWizard.h.

Definition at line 949 of file MacInstallWizard.h.

Definition at line 147 of file MacInstallWizard.h.

Definition at line 148 of file MacInstallWizard.h.

Definition at line 149 of file MacInstallWizard.h.

Definition at line 145 of file MacInstallWizard.h.

#define kScrollBarPad   3 /* constants */

Definition at line 141 of file MacInstallWizard.h.

Definition at line 144 of file MacInstallWizard.h.

Definition at line 157 of file MacInstallWizard.h.

#define kSelected   1

Definition at line 163 of file MacInstallWizard.h.

Definition at line 121 of file MacInstallWizard.h.

#define kSNameMaxLen   128 /* v--- for KV_DELIM char */

Definition at line 156 of file MacInstallWizard.h.

#define kTempFolder   "\pTemp NSInstall"

Definition at line 138 of file MacInstallWizard.h.

Definition at line 124 of file MacInstallWizard.h.

Definition at line 142 of file MacInstallWizard.h.

#define KV_DELIM   '='

Definition at line 136 of file MacInstallWizard.h.

#define kValueMaxLen   512

Definition at line 155 of file MacInstallWizard.h.

#define kViewerFolder   "\p:viewer"

Definition at line 139 of file MacInstallWizard.h.

#define kWelcomeID   1

Definition at line 120 of file MacInstallWizard.h.

#define MAC_EOL   '\r'

Definition at line 132 of file MacInstallWizard.h.

#define mApple   150

Definition at line 227 of file MacInstallWizard.h.

#define mEdit   152

Definition at line 231 of file MacInstallWizard.h.

#define mFile   151

Definition at line 229 of file MacInstallWizard.h.

#define MY_EOF   '\0' /* parser constants */

Definition at line 131 of file MacInstallWizard.h.

#define NGINST   1 /* event handling modes */

Definition at line 128 of file MacInstallWizard.h.

#define NUM_WINS   5

Definition at line 118 of file MacInstallWizard.h.

#define rAboutBox   128

Definition at line 238 of file MacInstallWizard.h.

#define rAllProgBar   161

Definition at line 202 of file MacInstallWizard.h.

Definition at line 219 of file MacInstallWizard.h.

#define rAlrtError   170

Definition at line 221 of file MacInstallWizard.h.

#define rAlrtOS85Reqd   160

Definition at line 220 of file MacInstallWizard.h.

#define rBackBtn   129

Definition at line 178 of file MacInstallWizard.h.

#define rCancelBtn   174

Definition at line 180 of file MacInstallWizard.h.

#define rCheckboxLDEF   128

Definition at line 199 of file MacInstallWizard.h.

#define rCompDescBox   151

Definition at line 197 of file MacInstallWizard.h.

#define rCompListBox   150 /* note: overriden use for list and rect */

Definition at line 196 of file MacInstallWizard.h.

#define rDestLoc   143

Definition at line 194 of file MacInstallWizard.h.

#define rDestLocBox   142

Definition at line 193 of file MacInstallWizard.h.

Definition at line 223 of file MacInstallWizard.h.

#define rDLProgBar   180

Definition at line 210 of file MacInstallWizard.h.

#define rDLSettingsGB   178

Definition at line 209 of file MacInstallWizard.h.

#define rErrorList   144 /* errors */

Definition at line 330 of file MacInstallWizard.h.

Definition at line 217 of file MacInstallWizard.h.

#define rIDIKeys   143

Definition at line 267 of file MacInstallWizard.h.

#define rIndices   142 /* integer indices in string form (0-9) */

Definition at line 264 of file MacInstallWizard.h.

#define rInstDescBox   141

Definition at line 192 of file MacInstallWizard.h.

#define rInstList   145

Definition at line 349 of file MacInstallWizard.h.

#define rInstMenuList   146

Definition at line 402 of file MacInstallWizard.h.

#define rInstType   140

Definition at line 191 of file MacInstallWizard.h.

#define rLabDloading   181

Definition at line 211 of file MacInstallWizard.h.

#define rLabFrom   182

Definition at line 212 of file MacInstallWizard.h.

#define rLabRate   184

Definition at line 214 of file MacInstallWizard.h.

#define rLabTimeLeft   185

Definition at line 215 of file MacInstallWizard.h.

#define rLabTo   183

Definition at line 213 of file MacInstallWizard.h.

#define rLicBox   131

Definition at line 185 of file MacInstallWizard.h.

#define rLicScrollBar   132

Definition at line 186 of file MacInstallWizard.h.

#define rLogoImgWell   170

Definition at line 183 of file MacInstallWizard.h.

#define rMBar   128 /* menu rsrc ids */

Definition at line 226 of file MacInstallWizard.h.

#define rNextBtn   130

Definition at line 179 of file MacInstallWizard.h.

#define rNSLogo   140

Definition at line 181 of file MacInstallWizard.h.

#define rNSLogoBox   130

Definition at line 182 of file MacInstallWizard.h.

#define rParseKeys   141 /* parse keys in config.ini */

Definition at line 251 of file MacInstallWizard.h.

Definition at line 203 of file MacInstallWizard.h.

Definition at line 208 of file MacInstallWizard.h.

#define rReadmeBtn   133

Definition at line 189 of file MacInstallWizard.h.

#define rRootWin   128 /* widget rsrc ids */

Definition at line 177 of file MacInstallWizard.h.

Definition at line 207 of file MacInstallWizard.h.

#define rSaveCheckbox   164

Definition at line 206 of file MacInstallWizard.h.

#define rSiteSelector   163

Definition at line 204 of file MacInstallWizard.h.

#define rSiteSelMsg   179

Definition at line 205 of file MacInstallWizard.h.

#define rStartMsgBox   160

Definition at line 201 of file MacInstallWizard.h.

#define rStringList   140

Definition at line 240 of file MacInstallWizard.h.

#define rTitleStrList   170

Definition at line 247 of file MacInstallWizard.h.

Definition at line 222 of file MacInstallWizard.h.

Definition at line 188 of file MacInstallWizard.h.

#define sAcceptBtn   8

Definition at line 357 of file MacInstallWizard.h.

#define sAddDlg   48

Definition at line 295 of file MacInstallWizard.h.

#define sADDITIONAL   47

Definition at line 327 of file MacInstallWizard.h.

#define sArchive   23

Definition at line 297 of file MacInstallWizard.h.

#define sAttributes   25

Definition at line 299 of file MacInstallWizard.h.

#define sBackBtn   4

Definition at line 353 of file MacInstallWizard.h.

#define sC   20

Definition at line 292 of file MacInstallWizard.h.

#define sCancel   6

Definition at line 355 of file MacInstallWizard.h.

Definition at line 365 of file MacInstallWizard.h.

#define sCompDlg   21

Definition at line 294 of file MacInstallWizard.h.

#define sComponent   22

Definition at line 296 of file MacInstallWizard.h.

Definition at line 241 of file MacInstallWizard.h.

Definition at line 244 of file MacInstallWizard.h.

Definition at line 276 of file MacInstallWizard.h.

#define sCoreDir   5

Definition at line 272 of file MacInstallWizard.h.

#define sCoreFile   4

Definition at line 271 of file MacInstallWizard.h.

Definition at line 356 of file MacInstallWizard.h.

Definition at line 257 of file MacInstallWizard.h.

#define sDeleteBtn   41

Definition at line 390 of file MacInstallWizard.h.

#define sDependee   31

Definition at line 302 of file MacInstallWizard.h.

#define sDesc   2

Definition at line 269 of file MacInstallWizard.h.

#define sDescLong   19

Definition at line 291 of file MacInstallWizard.h.

#define sDescription   44

Definition at line 318 of file MacInstallWizard.h.

#define sDescShort   18

Definition at line 290 of file MacInstallWizard.h.

#define SDI   2

Definition at line 129 of file MacInstallWizard.h.

Definition at line 367 of file MacInstallWizard.h.

Definition at line 368 of file MacInstallWizard.h.

#define sDLSettings   33

Definition at line 382 of file MacInstallWizard.h.

#define sDomain   43

Definition at line 317 of file MacInstallWizard.h.

#define sDOWNLOAD_ONLY   52 /* end parse keys */

Definition at line 328 of file MacInstallWizard.h.

#define sDownloadKB   40

Definition at line 389 of file MacInstallWizard.h.

#define sExecuting   49

Definition at line 398 of file MacInstallWizard.h.

#define sExecution   8

Definition at line 275 of file MacInstallWizard.h.

#define sExtracting   21

Definition at line 370 of file MacInstallWizard.h.

#define sFalse   11

Definition at line 278 of file MacInstallWizard.h.

#define sFile   1

Definition at line 268 of file MacInstallWizard.h.

#define sFilename   39

Definition at line 310 of file MacInstallWizard.h.

#define sFileSp   23

Definition at line 372 of file MacInstallWizard.h.

Definition at line 366 of file MacInstallWizard.h.

#define sGeneral   1

Definition at line 252 of file MacInstallWizard.h.

#define sIdentifier   50

Definition at line 316 of file MacInstallWizard.h.

#define sInFolder   15

Definition at line 364 of file MacInstallWizard.h.

Definition at line 358 of file MacInstallWizard.h.

Definition at line 242 of file MacInstallWizard.h.

#define sInstalling   22

Definition at line 371 of file MacInstallWizard.h.

Definition at line 350 of file MacInstallWizard.h.

Definition at line 361 of file MacInstallWizard.h.

Definition at line 245 of file MacInstallWizard.h.

#define sInstSize   24

Definition at line 298 of file MacInstallWizard.h.

#define sINVISIBLE   29

Definition at line 325 of file MacInstallWizard.h.

#define sKilobytes   20

Definition at line 369 of file MacInstallWizard.h.

#define sLabDloading   35

Definition at line 384 of file MacInstallWizard.h.

#define sLabFrom   36

Definition at line 385 of file MacInstallWizard.h.

#define sLabRate   38

Definition at line 387 of file MacInstallWizard.h.

#define sLabTo   37

Definition at line 386 of file MacInstallWizard.h.

#define sLAUNCHAPP   30

Definition at line 326 of file MacInstallWizard.h.

#define sLegacyCheck   38

Definition at line 309 of file MacInstallWizard.h.

#define sLicDlg   14

Definition at line 285 of file MacInstallWizard.h.

Definition at line 359 of file MacInstallWizard.h.

#define sLicFile   15

Definition at line 286 of file MacInstallWizard.h.

Definition at line 405 of file MacInstallWizard.h.

Definition at line 404 of file MacInstallWizard.h.

#define sMenuClear   16

Definition at line 418 of file MacInstallWizard.h.

Definition at line 419 of file MacInstallWizard.h.

#define sMenuCopy   12

Definition at line 414 of file MacInstallWizard.h.

#define sMenuCopyHot   13

Definition at line 415 of file MacInstallWizard.h.

#define sMenuCut   10

Definition at line 412 of file MacInstallWizard.h.

#define sMenuCutHot   11

Definition at line 413 of file MacInstallWizard.h.

#define sMenuEdit   7

Definition at line 409 of file MacInstallWizard.h.

#define sMenuFile   4

Definition at line 406 of file MacInstallWizard.h.

Definition at line 403 of file MacInstallWizard.h.

#define sMenuPaste   14

Definition at line 416 of file MacInstallWizard.h.

Definition at line 417 of file MacInstallWizard.h.

#define sMenuQuit   5

Definition at line 407 of file MacInstallWizard.h.

Definition at line 408 of file MacInstallWizard.h.

#define sMenuUndo   8

Definition at line 410 of file MacInstallWizard.h.

Definition at line 411 of file MacInstallWizard.h.

#define sMessage   41

Definition at line 313 of file MacInstallWizard.h.

#define sMoTitle   3

Definition at line 352 of file MacInstallWizard.h.

#define sMsg0   9

Definition at line 260 of file MacInstallWizard.h.

#define sMsg1   10

Definition at line 261 of file MacInstallWizard.h.

#define sMsg2   11

Definition at line 262 of file MacInstallWizard.h.

#define sNextBtn   5

Definition at line 354 of file MacInstallWizard.h.

#define sNoAds   6

Definition at line 273 of file MacInstallWizard.h.

#define sNSInstall   12 /* used when generating IDI */

Definition at line 279 of file MacInstallWizard.h.

Definition at line 248 of file MacInstallWizard.h.

#define sNsTitle   2

Definition at line 351 of file MacInstallWizard.h.

#define sOKBtn   32

Definition at line 381 of file MacInstallWizard.h.

#define sOnDisk   14

Definition at line 363 of file MacInstallWizard.h.

#define sPauseBtn   46

Definition at line 395 of file MacInstallWizard.h.

#define sProcessing   25

Definition at line 374 of file MacInstallWizard.h.

Definition at line 254 of file MacInstallWizard.h.

Definition at line 255 of file MacInstallWizard.h.

Definition at line 256 of file MacInstallWizard.h.

#define sProxyDlg   27

Definition at line 376 of file MacInstallWizard.h.

#define sProxyHost   28

Definition at line 377 of file MacInstallWizard.h.

Definition at line 380 of file MacInstallWizard.h.

#define sProxyPort   29

Definition at line 378 of file MacInstallWizard.h.

Definition at line 375 of file MacInstallWizard.h.

Definition at line 379 of file MacInstallWizard.h.

#define sQuitBtn   42

Definition at line 391 of file MacInstallWizard.h.

Definition at line 303 of file MacInstallWizard.h.

#define sReadme   11

Definition at line 360 of file MacInstallWizard.h.

#define sReadmeApp   33

Definition at line 283 of file MacInstallWizard.h.

Definition at line 282 of file MacInstallWizard.h.

#define sRedirect   46

Definition at line 319 of file MacInstallWizard.h.

#define sResumeBtn   47

Definition at line 396 of file MacInstallWizard.h.

#define sRunApp   35

Definition at line 305 of file MacInstallWizard.h.

#define sRunMode   2

Definition at line 253 of file MacInstallWizard.h.

#define sSDNSInstall   3 /* used when pasring INI */

Definition at line 270 of file MacInstallWizard.h.

#define sSELECTED   28

Definition at line 324 of file MacInstallWizard.h.

Definition at line 362 of file MacInstallWizard.h.

#define sServerPath   45

Definition at line 301 of file MacInstallWizard.h.

#define sSetupType   17

Definition at line 289 of file MacInstallWizard.h.

Definition at line 288 of file MacInstallWizard.h.

#define sShowDlg   7

Definition at line 258 of file MacInstallWizard.h.

#define sSilent   7

Definition at line 274 of file MacInstallWizard.h.

Definition at line 315 of file MacInstallWizard.h.

#define sSiteSelMsg   34

Definition at line 383 of file MacInstallWizard.h.

#define sSpaceMsg1   43

Definition at line 392 of file MacInstallWizard.h.

#define sSpaceMsg2   44

Definition at line 393 of file MacInstallWizard.h.

#define sSpaceMsg3   45

Definition at line 394 of file MacInstallWizard.h.

#define sSpOfSp   24

Definition at line 373 of file MacInstallWizard.h.

#define sSubfolder   49

Definition at line 311 of file MacInstallWizard.h.

#define sSubpath   51

Definition at line 320 of file MacInstallWizard.h.

#define sTargetApp   36

Definition at line 306 of file MacInstallWizard.h.

#define sTargetDoc   37

Definition at line 307 of file MacInstallWizard.h.

#define START_SECTION   '['

Definition at line 134 of file MacInstallWizard.h.

Definition at line 243 of file MacInstallWizard.h.

#define sTermDlg   27

Definition at line 322 of file MacInstallWizard.h.

#define sTimeLeft   39

Definition at line 388 of file MacInstallWizard.h.

#define sTitle   8

Definition at line 259 of file MacInstallWizard.h.

#define sTrue   10

Definition at line 277 of file MacInstallWizard.h.

#define sURL   26

Definition at line 300 of file MacInstallWizard.h.

#define sValidating   48

Definition at line 397 of file MacInstallWizard.h.

#define sVersion   40

Definition at line 312 of file MacInstallWizard.h.

#define sWelcDlg   12

Definition at line 281 of file MacInstallWizard.h.

#define TYPE_FTP   3

Definition at line 879 of file MacInstallWizard.h.

#define TYPE_HTTP   2

Definition at line 878 of file MacInstallWizard.h.

#define TYPE_PROXY   1

Definition at line 877 of file MacInstallWizard.h.

#define TYPE_UNDEF   0

Definition at line 876 of file MacInstallWizard.h.

#define UNIFY_CHAR_CODE (   _targetUint32,
  _src1char,
  _src2char,
  _src3char,
  _src4char 
)
Value:
_targetUint32 =                                                                 \
    ( (unsigned long)                                                               \
    (((unsigned long)((_src1char & 0x000000FF) << 24)                               \
    | (unsigned long)((_src2char & 0x000000FF) << 16)                               \
    | (unsigned long)((_src3char & 0x000000FF) << 8)                                \
    | (unsigned long)((_src4char & 0x000000FF)))))

Definition at line 103 of file MacInstallWizard.h.

#define WIN_EOL   '\n'

Definition at line 133 of file MacInstallWizard.h.


Typedef Documentation

typedef struct CompWin CompWin
typedef struct Config Config
typedef struct _conn CONN
typedef struct _errTableEnt ErrTableEnt
typedef struct InstComp InstComp
typedef struct InstINIRes InstINIRes
typedef struct InstWiz InstWiz
typedef struct LegacyCheck LegacyCheck
typedef struct LicWin LicWin
typedef struct Options Options
typedef struct Redirect Redirect
typedef struct RunApp RunApp
typedef struct SetupType SetupType
typedef struct SetupTypeWin SetupTypeWin
typedef struct SiteSelector SiteSelector
typedef struct TermWin TermWin
typedef struct WelcWin WelcWin
typedef struct XPISpec XPISpec

Enumeration Type Documentation

Enumerator:
eInstallNotStarted 
eDownloading 
ePaused 
eResuming 
eExtracting 
eInstalling 

Definition at line 632 of file MacInstallWizard.h.


Function Documentation

short AddGetCompRow ( int  )

Definition at line 414 of file AdditionsWin.c.

{
       short i = kInvalidCompIdx;
       
       for (i=0; i<numRows; i++)
       {
              if (rowToComp[i] == compIdx)
                     break;
       }
       
       return i;
}

Definition at line 466 of file AdditionsWin.c.

{
       Cell hlCell;
       Rect hlCellRect;
       UInt8 hiliteVal;
       int i = 0;
       
       /* reset all highlighted markers */
       for (i=0; i<numRows; i++)
       {
              gControls->cfg->comp[rowToComp[i]].highlighted = false;
       }
       
       /* highlight and set marker for row to init */
       SetPt(&hlCell, 0, row);
       LRect(&hlCellRect, hlCell, gControls->aw->compList);
       INVERT_HIGHLIGHT(&hlCellRect);     
       AddUpdateLongDesc(row);
       gControls->cfg->comp[rowToComp[row]].highlighted = true; 
}

Here is the call graph for this function:

Here is the caller graph for this function:

void AddKeyToIDI ( short  ,
Handle  ,
char *   
)

Definition at line 1389 of file InstAction.c.

{
       Str255 pkeybuf;
       char   *keybuf, *cval, ch;
       
       HLock(val);
       cval = *val;
       
       GetIndString(pkeybuf, rIDIKeys, key);
       keybuf = PascalToC(pkeybuf);
       ch = '\t';
       strncat(ostream, &ch, 1);                               // \t
       strncat(ostream, keybuf, strlen(keybuf)); // \t<key>
       ch = '=';
       strncat(ostream, &ch, 1);                               // \t<key>=
       strncat(ostream, cval, strlen(cval));            // \t<key>=<val>
       ch = '\r';
       strncat(ostream, &ch, 1);                               // \t<key>=<val>\r
       
       HUnlock(val);
       
       if (keybuf)
              DisposePtr(keybuf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 174 of file AdditionsWin.c.

{
       int    i;
       char   *currDesc;
       Point  currCell;
       Boolean bCellSelected = false;
       int           nextRow = 0;
       
       for (i=0; i<gControls->cfg->numComps; i++)
       {
              if (!gControls->cfg->comp[i].invisible && gControls->cfg->comp[i].additional)
              {
                     HLock(gControls->cfg->comp[i].shortDesc);
                     currDesc = *gControls->cfg->comp[i].shortDesc;
                     SetPt(&currCell, 0, nextRow);
                     rowToComp[nextRow++] = i;
                     LSetCell( currDesc, strlen(currDesc), currCell, gControls->aw->compList);
                     HUnlock(gControls->cfg->comp[i].shortDesc);
                     if (gControls->cfg->comp[i].selected == true)
                     {
                            LSetSelect(true, currCell, gControls->aw->compList);
                            bCellSelected = true;
                     }
              }
       }

       numRows = nextRow;   
       return bCellSelected;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 428 of file AdditionsWin.c.

{
       Cell          currCell;
       int                  row, beingSelected;
       Boolean       setSelected;
       
       // so we must determine the row clicked and resolve its dependees
       // bumping up their ref counts if this row is selected
       // and down if this row is unselected
       if (!bDrawingWindow)
       {
              currCell = LLastClick(gControls->aw->compList);
              row = currCell.v;
              
              // toggle from on to off or vice versa
              if (gControls->cfg->comp[rowToComp[row]].selected)
                     beingSelected = kNotSelected;
              else
                     beingSelected = kSelected;
              ResolveDependees(rowToComp[row], beingSelected); 
       }
       
       // then update the UI
       for (row = 0; row < numRows; row++)
       {
              SetPt(&currCell, 0, row);
              if (gControls->cfg->comp[rowToComp[row]].selected == kSelected)
                     setSelected = true;
              else
                     setSelected = false;
              LSetSelect(setSelected, currCell, gControls->aw->compList);
       }
       
       ClearDiskSpaceMsgs();
       DrawDiskSpaceMsgs( gControls->opt->vRefNum );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 531 of file AdditionsWin.c.

{
       Rect          viewRect;
       
       HLock((Handle)gControls->aw->compDescBox);
       SetRect(&viewRect, (*gControls->aw->compDescBox)->contrlRect.left,
                                      (*gControls->aw->compDescBox)->contrlRect.top,
                                      (*gControls->aw->compDescBox)->contrlRect.right,
                                      (*gControls->aw->compDescBox)->contrlRect.bottom);
       HUnlock((Handle)gControls->aw->compDescBox);
       viewRect.top += kInterWidgetPad;
       SetRect(&viewRect, viewRect.left + kTxtRectPad,
                                          viewRect.top + kTxtRectPad,
                                          viewRect.right - kTxtRectPad,
                                          viewRect.bottom - kTxtRectPad);
       EraseRect(&viewRect);
       
       HLock(gControls->cfg->comp[rowToComp[row]].longDesc);
       TESetText( *gControls->cfg->comp[rowToComp[row]].longDesc, 
                            strlen(*gControls->cfg->comp[rowToComp[row]].longDesc), gControls->aw->compDescTxt );
       TEUpdate( &viewRect, gControls->aw->compDescTxt );
       HUnlock(gControls->cfg->comp[rowToComp[row]].longDesc);
}

Here is the caller graph for this function:

Definition at line 488 of file AdditionsWin.c.

{
       int i, j;
       Rect currCellRect, oldCellRect;
       Cell currCell, oldCell;
       UInt8                hiliteVal;
       
       for (i=0; i<numRows; i++) 
       {
              /* note: numComps above includes invisible components */
              SetPt(&currCell, 0, i);
              LRect(&currCellRect, currCell, gControls->aw->compList);
                     
              /* mouse move landed over this cell */
              if (PtInRect( localPt, &currCellRect ))
              {
                     if (!gControls->cfg->comp[rowToComp[i]].highlighted)
                     {      
                            /* highlight this cell */
                            INVERT_HIGHLIGHT(&currCellRect);   
                            AddUpdateLongDesc(i);
                                   
                            /* unhighlight old one */
                            for (j=0; j<numRows; j++)
                            {
                                   if (gControls->cfg->comp[rowToComp[j]].highlighted)
                                   {
                                          SetPt(&oldCell, 0, j);
                                          LRect(&oldCellRect, oldCell, gControls->aw->compList);
                                                 
                                          INVERT_HIGHLIGHT(&oldCellRect);
                                          gControls->cfg->comp[rowToComp[j]].highlighted = false;
                                   }
                            }
                                   
                            /* mark this row highlighted to prevent incorrect inversion */
                            gControls->cfg->comp[rowToComp[i]].highlighted = true; 
                     }
              }
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 311 of file Deflation.c.

{
       OSErr  err = noErr;
       
       // if file is AppleSingled
       if (nsAppleSingleDecoder::IsAppleSingleFile(fd))
       {
              // decode it
              nsAppleSingleDecoder decoder(fd, outfd);
                     
              ERR_CHECK_RET(decoder.Decode(), err);
       }
       return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 434 of file TerminalWin.c.

{
    ThreadID tid;

    /* starting download first time or resume download */
    if (gControls->state == eInstallNotStarted || gControls->state == ePaused)
    {
        if (gControls->state == eInstallNotStarted)
        {
            SetupPauseResumeButtons();
            ClearDownloadSettings();
            gInstallStarted = true;
        }
        else if (gControls->state == ePaused)
            SetResumedState();

        SpawnSDThread(Install, &tid);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 420 of file MacInstallWizard.c.

{
    static int ticks = 0;
    
    ticks++;
    if ( ( ticks % 4 ) == 0 ) {
        ticks = 0;
        MainEventLoopPass();
        if ( gDone == true ) {     // this is likely because user selected Quit from the file menu
            if (gMouseRgn)
                      DisposeRgn(gMouseRgn);
               gMouseRgn = (RgnHandle) 0;
               Shutdown();
           } 
    }
    return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CalcChange ( ControlHandle  ,
short *   
)

Definition at line 462 of file LicenseWin.c.

{
       short         value, max;
       
       value = GetControlValue(theControl);      // get current value
       max = GetControlMaximum(theControl);             // and maximum value
       *amount = value - *amount;
       if (*amount < 0)
              *amount = 0;
       else if (*amount > max)
              *amount = max;
       SetControlValue(theControl, *amount);
       *amount = value - *amount;                // calculate the change
}

Here is the caller graph for this function:

Boolean CheckConn ( char *  URL,
int  type,
CONN myConn,
Boolean  force 
)

Definition at line 739 of file InstAction.c.

{
       nsFTPConn *fconn;
       nsHTTPConn *hconn;
       Boolean retval = false;

       if ( myConn->type == TYPE_UNDEF )
              retval = true;                                   // first time
       else if ( ( myConn->type != type || strcmp( URL, myConn->URL ) || force == true ) && gControls->state != ePaused) {
              retval = true;
              switch ( myConn->type ) {
              case TYPE_HTTP:
              case TYPE_PROXY:
                     hconn = (nsHTTPConn *) myConn->conn;
                     hconn->Close();
                     break;
              case TYPE_FTP:
                     fconn = (nsFTPConn *) myConn->conn;
                     fconn->Close();
                     break;
              }
       }
       
       if ( retval == true && myConn->URL != (char *) NULL )
       free( myConn->URL );

       return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

pascal void CheckIfXPI ( const CInfoPBRec *  const,
Boolean ,
void  
)

Definition at line 303 of file MacInstallWizard.c.

{
    OSErr err = noErr;
    char cFilename[256];    /* for convenience: copy the name in cpbPtr->hFileInfo */
    int len = 0;            /* for convenience: length of name string */
    FSSpecPtr currFSp;
    XPISpec *currXPI = 0, *newXPI = 0, **xpiList = 0;
    
    /* param check */
    if (!cpbPtr || !dataPtr)
        return;    
     xpiList = (XPISpec **)dataPtr;
     
    /* file detected */
    if ((cpbPtr->hFileInfo.ioFlAttrib & ioDirMask) == 0)
    {
        if (!cpbPtr->hFileInfo.ioNamePtr)
            return;
        len = *(cpbPtr->hFileInfo.ioNamePtr);            
        strncpy(cFilename, (char*)(cpbPtr->hFileInfo.ioNamePtr + 1), len);
        
        /* check suffix for ".xpi" */   
        if (0 == strncmp(".xpi", cFilename+len-4, 4))
        {
            currFSp = (FSSpecPtr) NewPtrClear(sizeof(FSSpec));
            if (!currFSp)
                return;
            err = FSMakeFSSpec(cpbPtr->hFileInfo.ioVRefNum, cpbPtr->hFileInfo.ioFlParID,
                               cpbPtr->hFileInfo.ioNamePtr, currFSp);
                               
            /* if file exists add it to deletion list */
            if (err == noErr)
            {
                currXPI = *xpiList;
                while (currXPI)
                { 
                    /* list head special case */
                    if (!currXPI->FSp)
                    {
                        newXPI = currXPI;  
                        break;
                    }
                    
                    /* more in list */
                    if (currXPI->next)
                    {
                        currXPI = currXPI->next;
                        continue;
                    }
                    /* list end so allocate new node */ 
                    else
                    {
                        newXPI = (XPISpec *) NewPtrClear(sizeof(XPISpec));
                        if (!newXPI)
                            return;  
                        currXPI->next = newXPI;
                        break;
                    }
                }
                newXPI->FSp = currFSp;
            }
            else
                DisposePtr((Ptr) currFSp);
        }
    }
    
    /* paranoia: make sure we continue iterating */
    *quitFlag = false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 247 of file MacInstallWizard.c.

{
    OSErr   err = noErr;
    short   vRefNum;
    long    dirID;
    FSSpec  viewerFSp;
    XPISpec *xpiList, *currXPI = 0, *nextXPI = 0;
#ifdef MIW_DEBUG
    Boolean isDir = false;
#endif
    
#ifndef MIW_DEBUG
    /* get "viewer" in "Temporary Items" folder */
    ERR_CHECK(FindFolder(kOnSystemDisk, kTemporaryFolderType, kCreateFolder, &vRefNum, &dirID));
    err = FSMakeFSSpec(vRefNum, dirID, kViewerFolder, &viewerFSp);
#else
    /* for DEBUG builds temp is "<currProcessVolume>:Temp NSInstall:" */
    ERR_CHECK(GetCWD(&dirID, &vRefNum));
       err = FSMakeFSSpec(vRefNum, 0, kTempFolder, &viewerFSp);
       if (err == fnfErr)
           return; /* no debug temp exists */
       err = FSpGetDirectoryID(&viewerFSp, &dirID, &isDir);
       if (err != noErr || !isDir)
           return;
    err = FSMakeFSSpec(vRefNum, dirID, kViewerFolder, &viewerFSp);
#endif
    
    /* whack the viewer folder if it exists */
    if (err == noErr)
    {
        ERR_CHECK(DeleteDirectory(viewerFSp.vRefNum, viewerFSp.parID, viewerFSp.name));
    }
    
    /* clean out the zippies (.xpi's) */
    xpiList = (XPISpec *) NewPtrClear(sizeof(XPISpec));
    if (!xpiList)
        return;
    IterateDirectory(vRefNum, dirID, "\p", 1, CheckIfXPI, (void*)&xpiList);
    
    if (xpiList)
    {
        currXPI = xpiList;
        while(currXPI)
        {
            nextXPI = currXPI->next; /* save nextXPI before we blow away currXPI */
            if (currXPI->FSp)
            {
                FSpDelete(currXPI->FSp);
                DisposePtr((Ptr)currXPI->FSp);
            }
            DisposePtr((Ptr)currXPI);
            currXPI = nextXPI;
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr CleanupExtractedFiles ( short  ,
long   
)

Definition at line 414 of file Deflation.c.

{
       OSErr         err = noErr;
       FSSpec        coreDirFSp;
       StringPtr     pcoreDir = nil;
       short         i = 0;
       
       HLock(gControls->cfg->coreDir);
       if (*gControls->cfg->coreDir != NULL && **gControls->cfg->coreDir != NULL)          
       {
              // just need to delete the core dir and its contents
              
              pcoreDir = CToPascal(*gControls->cfg->coreDir);
              err = FSMakeFSSpec(tgtVRefNum, tgtDirID, pcoreDir, &coreDirFSp);
              if (err == noErr)
              {
                     err = FSpDelete( &coreDirFSp );
              }
       
              HUnlock(gControls->cfg->coreDir);
              goto aurevoir;
       }      
              
       HUnlock(gControls->cfg->coreDir);
       
       // otherwise iterate through coreFileList deleteing each individually
       for (i=0; i<currCoreFile+1; i++)
       {
              FSpDelete( &coreFileList[i] );
       }

aurevoir:
       if (pcoreDir)
              DisposePtr((Ptr) pcoreDir); 
       return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 652 of file SetupTypeWin.c.

{
       Rect instDescBox, viewRect;
       Handle instDescRectH;
       OSErr  reserr;
       GrafPtr       oldPort;
       
       GetPort(&oldPort);
       if (gWPtr)
              SetPort(gWPtr);
       
       instDescRectH = NULL;
       instDescRectH = Get1Resource('RECT', rCompListBox);
       reserr = ResError();
       if (reserr!=noErr || !instDescRectH)
       {
              ErrorHandler(reserr, nil);
              return;
       }

       HLock(instDescRectH);
       instDescBox = (Rect) **((Rect**)instDescRectH);
       SetRect( &viewRect, instDescBox.left, instDescBox.top, 
                                          instDescBox.right, instDescBox.bottom + 14 );
       HUnlock(instDescRectH);     
       DetachResource(instDescRectH);
       DisposeHandle(instDescRectH);
                                          
       EraseRect( &viewRect );
       InvalRect( &viewRect );
       
       SetPort(oldPort);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ClearDLProgControls ( Boolean  onlyLabels)

Definition at line 1730 of file InstAction.c.

{
    Rect teRect;
    GrafPtr oldPort;
    
    GetPort(&oldPort);
    SetPort(gWPtr);
        
    for (int i = 0; i < kNumDLFields; ++i)
    {
        if (gControls->tw->dlLabels[i])
            DisposeControl(gControls->tw->dlLabels[i]);
        if (gControls->tw->dlProgressMsgs[i] && onlyLabels == false)
        {
            HLock((Handle)gControls->tw->dlProgressMsgs[i]);
            teRect = (**(gControls->tw->dlProgressMsgs[i])).viewRect;
            HUnlock((Handle)gControls->tw->dlProgressMsgs[i]);
            EraseRect(&teRect);
                        
            TEDispose(gControls->tw->dlProgressMsgs[i]);
        }
    }
    
    if (gControls->tw->dlProgressBar && onlyLabels == false)
    {
        DisposeControl(gControls->tw->dlProgressBar);
        gControls->tw->dlProgressBar = NULL;
    }
    
    SetPort(oldPort);
}

Here is the caller graph for this function:

Definition at line 646 of file TerminalWin.c.

{
    GrafPtr oldPort;
    
    GetPort(&oldPort);
    if (gWPtr)
    {
        SetPort(gWPtr);
        
        if (gControls->tw->dlSettingsGB)
            DisposeControl(gControls->tw->dlSettingsGB);
            
       if (gControls->tw->startMsg)
            EraseRect(&gControls->tw->startMsgBox);
            
       if (gControls->tw->siteSelector)
              DisposeControl(gControls->tw->siteSelector);       
        if (gControls->tw->siteSelMsg)
            DisposeControl(gControls->tw->siteSelMsg);
                     
        if (gControls->tw->saveBitsMsg)
            EraseRect(&gControls->tw->saveBitsMsgBox);
        if (gControls->tw->saveBitsCheckbox)
            DisposeControl(gControls->tw->saveBitsCheckbox);
            
        if (gControls->tw->proxySettingsBtn)
            DisposeControl(gControls->tw->proxySettingsBtn);
    }
    
    SetPort(oldPort);            
}

Here is the caller graph for this function:

Definition at line 679 of file TerminalWin.c.

{
    if (gControls->tw->saveBitsMsg)
        EraseRect(&gControls->tw->saveBitsMsgBox);
}

Here is the caller graph for this function:

int CompareVersion ( Handle  ,
FSSpecPtr   
)

Definition at line 907 of file SetupTypeWin.c.

{
       int                  diffLevel = 0, intVal;
       OSErr         err = noErr;
       short         fileRef;
       Handle        versRsrc = nil;
       char          oldRel, oldRev, oldFix, oldInternalStage, oldDevStage, oldRev_n_Fix;
       char          *newRel, *newRev, newFix[2], *newInternalStage, newDevStage, *newFix_n_DevStage;
       Ptr                  newVerCopy;
       
       /* no version supplied means show check always */
       if (!newVersion || !(*newVersion))
              return 6;
       
       /* if no valid filename then error so don't show message */
       if (!file)
              return -6;    
              
       /* get version from 'vers' res ID = 1 */         
       fileRef = FSpOpenResFile(file, fsRdPerm);
       if (fileRef == -1)
              return -9;
              
       versRsrc = Get1Resource('vers', 1);
       if (versRsrc == nil)
       {
              CloseResFile(fileRef);
              return -10;
       }
       
       // rel, rev, fix, internalStage, devStage
       HLock(versRsrc);
       oldRel = *(*versRsrc);
       oldRev_n_Fix = *((*versRsrc)+1);
       oldDevStage = *((*versRsrc)+2);
       oldInternalStage = *((*versRsrc)+3);
       HUnlock(versRsrc);
       CloseResFile(fileRef);
       
       oldRev = (oldRev_n_Fix & 0xF0) >> 4;
       oldFix =  oldRev_n_Fix & 0x0F;
       
       /* parse new version */
       HLock(newVersion);
       newVerCopy = NewPtrClear(strlen(*newVersion));
       BlockMove(*newVersion, newVerCopy, strlen(*newVersion));
       newRel = strtok(newVerCopy, ".");
       newRev = strtok(NULL, ".");
       newFix_n_DevStage = strtok(NULL, ".");
       newInternalStage = strtok(NULL, ".");
       HUnlock(newVersion);
       
       /* resolve fix and devStage 
        *(defaulting devStage to 0x80(==release) if not detected) 
        */
       newDevStage = 0x80;                              /* release */
       if (NULL != strchr(newFix_n_DevStage, 'd')) 
              newDevStage = 0x20;                              /* development */
       else if (NULL != strchr(newFix_n_DevStage, 'a'))
              newDevStage = 0x40;                              /* alpha */
       else if (NULL != strchr(newFix_n_DevStage, 'b')) 
              newDevStage = 0x60;                              /* beta */
              
       newFix[0] = *newFix_n_DevStage;
       newFix[1] = 0;
       
       /* compare 'vers' -- old version -- with supplied new version */
       intVal = atoi(newRel);
       if (oldRel < intVal)
       {
              diffLevel = 5;
              goto au_revoir;
       }
       else if (oldRel > intVal)
       {
              diffLevel = -5;
              goto au_revoir;
       }
              
       intVal = atoi(newRev);
       if (oldRev < intVal)
       {
              diffLevel = 4;
              goto au_revoir;
       }
       else if (oldRev > intVal)
       {
              diffLevel = -4;
              goto au_revoir;
       }
              
       intVal = atoi(newFix);
       if (oldFix < intVal)
       {      
              diffLevel = 3;
              goto au_revoir;
       }
       else if (oldFix > intVal)
       {
              diffLevel = -3;
              goto au_revoir;
       }
       
       intVal = atoi(newInternalStage);
       if (oldInternalStage < intVal)
       {
              diffLevel = 2;
              goto au_revoir;
       }
       else if (oldInternalStage > intVal)
       {
              diffLevel = -2;
              goto au_revoir;
       }
       
       if (oldDevStage < newDevStage)
       {
              diffLevel = 1;
              goto au_revoir;
       }
       else if (oldDevStage > newDevStage)
       {
              diffLevel = -1;
              goto au_revoir;
       }
       
       /* else they are equal */
       diffLevel = 0;

au_revoir:
       if (newVerCopy)
              DisposePtr(newVerCopy);
                     
       return diffLevel;
}

Here is the call graph for this function:

void CompressToFit ( char *  ,
char *  ,
int   
)

Definition at line 1056 of file InstAction.c.

{
    int origStrLen;
    int halfOutStrLen;
    char *lastPart; // last origStr part start

    if (!origStr || !outStr || outStrLen <= 0)
        return;
        
    origStrLen = strlen(origStr);    
    halfOutStrLen = outStrLen/2;
    lastPart = origStr + origStrLen - halfOutStrLen;
    
    // don't truncate if already less than acceptable max len
    if (origStrLen < outStrLen)
    {
        strcpy(outStr, origStr);
        *(outStr + strlen(origStr)) = 0;
        return; 
    }
    
    strncpy(outStr, origStr, halfOutStrLen);
    *(outStr + halfOutStrLen) = 0;
    strcat(outStr, "");
    strncat(outStr, lastPart, strlen(lastPart));
    *(outStr + outStrLen + 1) = 0;
}

Here is the caller graph for this function:

float ComputeRate ( int  ,
time_t  ,
time_t   
)

Definition at line 1085 of file InstAction.c.

{
    double period = difftime(endTime, startTime);
    float rate = bytes/period;
    
    rate /= 1024;  // convert from bytes/sec to KB/sec
    
    return rate;
}

Definition at line 376 of file InstAction.c.

{
    int i, compsDone, instChoice;
    long totalDLSize = 0;
    
       compsDone = 0;
       instChoice = gControls->opt->instChoice-1;
       
       // loop through 0 to kMaxComponents
       for(i=0; i<kMaxComponents; i++)
       {
              // general test: if component in setup type
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) )
              { 
                     // if custom and selected -or- not custom setup type
                     if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                              (gControls->cfg->comp[i].selected == true)) ||
                             (instChoice < gControls->cfg->numSetupTypes-1) )
                     {    
                         // XXX should this change to look at archive size instead?
                totalDLSize += gControls->cfg->comp[i].size;
                
                compsDone++;
            }
        }
              else if (compsDone >= gControls->cfg->st[instChoice].numComps)
                     break;  
    }
    
    return totalDLSize;
}
void CopyPascalStrToC ( ConstStr255Param  srcPString,
char *  dest 
)

Definition at line 1430 of file Parser.c.

{
    BlockMoveData(&srcPString[1], dest, srcPString[0]);
    dest[srcPString[0]] = '\0';
}

Here is the caller graph for this function:

Boolean CRCCheckDownloadedArchives ( Handle  dlPath,
short  dlPathLen,
int  count 
)

Definition at line 1935 of file InstAction.c.

{
    int i, len;
    Rect teRect;
    Boolean isClean;
    char buf[ 1024 ];
    char validatingBuf[ 128 ];
    Boolean indeterminateFlag = true;
       Str255 validatingStr;
       int compsDone = 0, instChoice = gControls->opt->instChoice-1;

    isClean = true;

    ClearDLProgControls(true); 
    DisablePauseAndResume();      
        
    for ( i = 1; i < kNumDLFields; i++ ) {
        HLock( (Handle) gControls->tw->dlProgressMsgs[i] );
        teRect = (**(gControls->tw->dlProgressMsgs[i])).viewRect;
        EraseRect(&teRect);
        HUnlock( (Handle) gControls->tw->dlProgressMsgs[i] );
    }
    if ( gControls->tw->dlProgressBar) {
        SetControlValue(gControls->tw->dlProgressBar, 0);
        SetControlMaximum(gControls->tw->dlProgressBar, count);
    } 

    GetResourcedString(validatingStr, rInstList, sValidating);
    strncpy( validatingBuf, (const char *) &validatingStr[1], (unsigned char) validatingStr[0] ); 
       for(i = 0; i < kMaxComponents; i++) {
           BreathFunc();
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) && 
                      gControls->cfg->comp[i].dirty == true)
              { 
                     // if custom and selected -or- not custom setup type
                     if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                              (gControls->cfg->comp[i].selected == true)) ||
                             (instChoice < gControls->cfg->numSetupTypes-1) ) {
                if (gControls->cfg->comp[i].shortDesc)
                {
                    HLock(gControls->cfg->comp[i].shortDesc);
                    if (*(gControls->cfg->comp[i].shortDesc) && gControls->tw->dlProgressMsgs[0])
                    {
                        HLock((Handle)gControls->tw->dlProgressMsgs[0]);
                        teRect = (**(gControls->tw->dlProgressMsgs[0])).viewRect;
                        HUnlock((Handle)gControls->tw->dlProgressMsgs[0]);                
                        sprintf( buf, validatingBuf, *(gControls->cfg->comp[i].shortDesc));
                        len = strlen( buf );
                        TESetText(buf, len, 
                            gControls->tw->dlProgressMsgs[0]);
                        TEUpdate(&teRect, gControls->tw->dlProgressMsgs[0]);
                    }
                    HUnlock(gControls->cfg->comp[sCurrComp].shortDesc);
                }
                   if ( gControls->cfg->comp[i].dirty == true ) {
                       HLock(dlPath);
                    HLock(gControls->cfg->comp[i].archive);
                    strncpy( buf, *dlPath, dlPathlen );
                    buf[ dlPathlen ] = '\0';
                    strcat( buf, *(gControls->cfg->comp[i].archive) );
                       HUnlock(dlPath);
                    HUnlock(gControls->cfg->comp[i].archive);
                    if (IsArchiveFile(buf) == false || VerifyArchive( buf ) == ZIP_OK) 
                        gControls->cfg->comp[i].dirty = false;
                    else
                        isClean = false;
                }
                if ( gControls->tw->dlProgressBar) {
                    SetControlValue(gControls->tw->dlProgressBar, 
                        GetControlValue(gControls->tw->dlProgressBar) + 1);
                }  
            }
        }  
    }
    
    InitDLProgControls( true );
    return isClean;
}

Here is the call graph for this function:

unsigned char* CToPascal ( char *  )

Definition at line 1397 of file Parser.c.

{
       long len;
       char* cpy;

       len = strlen(str);
       cpy = (char*)NewPtrClear(len+1);
       if (!cpy)
              return 0;
    strncpy(&cpy[1], str, len);
    if (len > 255) 
        cpy[0] = 255;
    else
        cpy[0] = len;
       return((unsigned char *)cpy);
}

Here is the caller graph for this function:

void DeleteXPIs ( short  ,
long   
)

Definition at line 1627 of file InstAction.c.

{
       int           compsDone = 0, i;
       int           instChoice = gControls->opt->instChoice - 1;
       OSErr         err = noErr;
       StringPtr     pArchiveName;
       FSSpec        fsCurr;
       
       // loop through 0 to kMaxComponents
       for(i=0; i<kMaxComponents; i++)
       {
              // general test: if component in setup type
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) )
              { 
                     // if custom and selected, or not custom setup type
                     if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                              (gControls->cfg->comp[i].selected == true)) ||
                             (instChoice < gControls->cfg->numSetupTypes-1) )
                     {
                            HLock(gControls->cfg->comp[i].archive);
                            pArchiveName = CToPascal(*gControls->cfg->comp[i].archive);
                            HUnlock(gControls->cfg->comp[i].archive);
                            
                            err = FSMakeFSSpec(vRefNum, dirID, pArchiveName, &fsCurr);
                            if (err == noErr)
                            {
                                   err = FSpDelete(&fsCurr);
#ifdef MIW_DEBUG
                                   if (err != noErr)
                                          SysBeep(10);
#endif
                            }
                            
                            if (pArchiveName)
                                   DisposePtr((Ptr)pArchiveName);
                                   
                compsDone++;
                     }
              }
        else if (compsDone >= gControls->cfg->st[instChoice].numComps)
            break;  
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean DidUserCancel ( EventRecord *  )

Definition at line 391 of file EvtHandlers.c.

{
    GrafPtr oldPort;
    Boolean bUserCancelled = false;
    Point localPt;
    Rect r;
    ControlPartCode  part;

    GetPort(&oldPort);
       SetPort(gWPtr);
       localPt = evt->where;
       GlobalToLocal(&localPt);
       
    HLock((Handle)gControls->cancelB);
       r = (**(gControls->cancelB)).contrlRect;
       HUnlock((Handle)gControls->cancelB);
       if (PtInRect(localPt, &r))
       {
           if (gControls->state == eInstallNotStarted)
           {
              part = TrackControl(gControls->cancelB, evt->where, NULL);
              if (part)
              {
                  gDone = true;  
                bUserCancelled = true;
           }
       }
       }
       
    SetPort(oldPort);
    return bUserCancelled;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr DirCreateRecursive ( char *  )

Definition at line 348 of file Deflation.c.

{
       long          count, len=strlen(path), dummyDirID;
       char          *delim = '\0', *pathpos = path, *currDir;
       OSErr         err = noErr;
       StringPtr     pCurrDir;
       FSSpec        currDirFSp;
       
       currDir = (char*) malloc(len+1);
       
       if ((delim=strchr(pathpos, ':'))!=0)             /* skip first since it's volName */
       {
              for (count=0; ((count<len)&&( (delim=strchr(pathpos, ':'))!=0) ); count++)
              {
                     currDir[0] = '\0';
                     strncpy(currDir, path, delim-path+1);
                     currDir[delim-path+1] = '\0';
              
                     pCurrDir = CToPascal(currDir);
                     if (pCurrDir && *pCurrDir > 0)
                     {
                            err = FSMakeFSSpec(0, 0, pCurrDir, &currDirFSp);
                            if (err == fnfErr)
                            {      
                                   err = FSpDirCreate(&currDirFSp, smSystemScript, &dummyDirID);
                                   if (err!=noErr) 
                                   {
                                          if (currDir)
                                                 free(currDir);
                                          if (pCurrDir)
                                                 DisposePtr((Ptr)pCurrDir);
                                          return err;
                                   }
                            }
                            
                            DisposePtr((Ptr)pCurrDir);
                            pathpos = delim+1;
                     }      
              }
       }
       
       if (currDir)
              free(currDir);
              
       return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 564 of file AdditionsWin.c.

{
       DisableNavButtons();
       
       // TO DO
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 637 of file ComponentsWin.c.

{
       DisableNavButtons();
       
       // TO DO
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 381 of file LicenseWin.c.

{
       DisableNavButtons();
       
       /*
       if(gControls->lw->licBox)          
              HiliteControl(gControls->lw->licBox, kDisableControl);
       */
       if(gControls->lw->scrollBar)
              HiliteControl(gControls->lw->scrollBar, kDisableControl);
       
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 520 of file LicenseWin.c.

{      
       if (gControls->backB)
              HiliteControl(gControls->backB, kDisableControl);
       if(gControls->nextB)
              HiliteControl(gControls->nextB, kDisableControl);

    if (gControls->cancelB)
              HiliteControl(gControls->cancelB, kDisableControl);
}

Here is the caller graph for this function:

Definition at line 796 of file TerminalWin.c.

{
    /* disable pause button  */
    if (gControls->nextB)
        HiliteControl(gControls->nextB, kDisableControl);   
    
    /* disable resume button */
    if (gControls->backB)
        HiliteControl(gControls->backB, kDisableControl);

}

Here is the caller graph for this function:

Definition at line 1100 of file SetupTypeWin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 720 of file TerminalWin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 254 of file WelcomeWin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* DiskSpaceNeeded ( void  )

Definition at line 618 of file SetupTypeWin.c.

{
       char *cSpaceNeeded;
       short i;
       long spaceNeeded = 0;
       int instChoice = gControls->opt->instChoice - 1;
       
       /* loop through all components cause they may be scattered through 
        * the array for this particular setup type 
        */
       for (i=0; i<kMaxComponents; i++)
       {      
              /* if "Custom Install" and it's selected... */
              if (gControls->opt->instChoice == gControls->cfg->numSetupTypes)
              {
                     if ((gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                            (gControls->cfg->comp[i].selected == true))
                            spaceNeeded += gControls->cfg->comp[i].size;
              }
              
              /* or not custom install but in current setup type... */
              else if (gControls->cfg->st[instChoice].comp[i] == kInSetupType)
              {
                     spaceNeeded += gControls->cfg->comp[i].size;
              }
       }
       
       cSpaceNeeded = ltoa(spaceNeeded);
       sDSNeededK = spaceNeeded;
       
       return cSpaceNeeded;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr DLMarkerDelete ( void  )

Definition at line 866 of file InstAction.c.

{
    OSErr err;
    short vRefNum = 0;
    long dirID = 0;
    FSSpec fsMarker;
    
    err = GetInstallerModules(&vRefNum, &dirID);
    if (err == noErr)
    {
        err = FSMakeFSSpec(vRefNum, dirID, kDLMarker, &fsMarker);
        if (err == noErr)
            FSpDelete(&fsMarker);
    }
    
    return noErr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr DLMarkerGetCurrent ( int ,
int  
)

Definition at line 813 of file InstAction.c.

{
    OSErr err = noErr;
    char xpiName[255];
    short vRefNum = 0;
    long dirID = 0;
    long count = 0;
    FSSpec fsMarker;
    short markerRefNum;
    
    if (!aMarkedIndex || !aCompsDone)
        return paramErr;
        
    err = GetInstallerModules(&vRefNum, &dirID);
    if (err != noErr)
        return err;
        
    // check if marker file exists
    err = FSMakeFSSpec(vRefNum, dirID, kDLMarker, &fsMarker);
    if (err == noErr)
    {
        // open for reading
        err = FSpOpenDF(&fsMarker, fsRdPerm, &markerRefNum);
        if (err != noErr)
            goto CLOSE_FILE;
            
        // get file size
        err = GetEOF(markerRefNum, &count);
        if (err != noErr)
            goto CLOSE_FILE;
            
        // read file contents
        err = FSRead(markerRefNum, &count, (void *) xpiName);
        if (err == noErr)
        {
            if (count <= 0)
                err = readErr;
            else
            {
                xpiName[count] = 0; // ensure only reading 'count' bytes
                err = GetIndexFromName(xpiName, aMarkedIndex, aCompsDone);
            }
        }
        
CLOSE_FILE:
        // close file
        FSClose(markerRefNum);
    }
    
    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr DLMarkerSetCurrent ( char *  )

Definition at line 769 of file InstAction.c.

{
    OSErr err = noErr;
    short vRefNum = 0;
    long dirID = 0;
    FSSpec fsMarker;
    short markerRefNum;
    long count = 0;
    
    if (!aXPIName)
        return paramErr;
        
    err = GetInstallerModules(&vRefNum, &dirID);
    if (err != noErr)
        return err;
        
    // check if marker file exists        
    err = FSMakeFSSpec(vRefNum, dirID, kDLMarker, &fsMarker);
    
    // delete old marker and recreate it so we truncate to 0
    if (err == noErr)
        FSpDelete(&fsMarker);

    err = FSpCreate(&fsMarker, 'ttxt', 'TEXT', smSystemScript);
    if (err != noErr)
        return err;
        
    // open data fork
    err = FSpOpenDF(&fsMarker, fsWrPerm, &markerRefNum);
    if (err != noErr)
        goto BAIL;
        
    // write xpi name into marker's data fork at offset 0    
    count = strlen(aXPIName);
    err = FSWrite(markerRefNum, &count, (void *) aXPIName);
    
BAIL:
    // close marker file
    FSClose(markerRefNum);
    
    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int DLProgressCB ( int  ,
int   
)

Definition at line 1099 of file InstAction.c.

{   
    static int yielder = 0, yieldFrequency = 8;
    int len;
    char compressedStr[kProgMsgLen + 1];  // add one for NULL termination
    char *fullPathCopy = 0; // GetFullPath doesn't null terminate
    float rate = 0;
    time_t now;
    Rect teRect;
    Str255 dlStr;
    char tmp[kKeyMaxLen];
      
    if (gControls->state == ePaused)
    {
        return nsFTPConn::E_USER_CANCEL;
    }
            
    if (aTotalFinalSize != sCurrTotalDLSize)
    {
        sCurrTotalDLSize = aTotalFinalSize;
        if (gControls->tw->dlProgressBar)
            SetControlMaximum(gControls->tw->dlProgressBar, (aTotalFinalSize/1024));
        
        // set short desc name of package being downloaded in Downloading field
        if (gControls->cfg->comp[sCurrComp].shortDesc)
        {
            HLock(gControls->cfg->comp[sCurrComp].shortDesc);
            if (*(gControls->cfg->comp[sCurrComp].shortDesc) && gControls->tw->dlProgressMsgs[0])
            {
                HLock((Handle)gControls->tw->dlProgressMsgs[0]);
                teRect = (**(gControls->tw->dlProgressMsgs[0])).viewRect;
                EraseRect(&teRect);
                HUnlock((Handle)gControls->tw->dlProgressMsgs[0]);                
 
                len = strlen(*(gControls->cfg->comp[sCurrComp].shortDesc));
                TESetText(*(gControls->cfg->comp[sCurrComp].shortDesc), len, 
                    gControls->tw->dlProgressMsgs[0]);
                TEUpdate(&teRect, gControls->tw->dlProgressMsgs[0]);
            }
            HUnlock(gControls->cfg->comp[sCurrComp].shortDesc);
        }

        // compress URL string and insert in From field
        if (sCurrURL && gControls->tw->dlProgressMsgs[1])
        {
            HLock((Handle)gControls->tw->dlProgressMsgs[1]);
            teRect = (**(gControls->tw->dlProgressMsgs[1])).viewRect;
            HUnlock((Handle)gControls->tw->dlProgressMsgs[1]);
            
            CompressToFit(sCurrURL, compressedStr, kProgMsgLen);
            TESetText(compressedStr, kProgMsgLen, gControls->tw->dlProgressMsgs[1]);
            TEUpdate(&teRect, gControls->tw->dlProgressMsgs[1]);
        }
                            
        // compress fullpath string and insert in To field
        if (sCurrFullPath)
        {
            HLock(sCurrFullPath);
            if (*sCurrFullPath && gControls->tw->dlProgressMsgs[2])
            {
                fullPathCopy = (char *)malloc(sCurrFullPathLen + 1);               
                if (fullPathCopy)
                {
                    strncpy(fullPathCopy, (*sCurrFullPath), sCurrFullPathLen);
                    *(fullPathCopy + sCurrFullPathLen) = 0;
                    
                    HLock((Handle)gControls->tw->dlProgressMsgs[2]);
                    teRect = (**(gControls->tw->dlProgressMsgs[2])).viewRect;
                    HUnlock((Handle)gControls->tw->dlProgressMsgs[2]);
                    
                    CompressToFit(fullPathCopy, compressedStr, kProgMsgLen);
                    TESetText(compressedStr, kProgMsgLen, gControls->tw->dlProgressMsgs[2]);
                    TEUpdate(&teRect, gControls->tw->dlProgressMsgs[2]);
                    
                    free(fullPathCopy);
                }                
            }
            HUnlock(sCurrFullPath);
        }
    }
        
    if (gControls->tw->dlProgressBar)
    {      
        // update rate info
        now = time(NULL);
        rate = ComputeRate(aBytesSoFar, sCurrStartTime, now);                      
        
        if ((rate < kLowRateThreshold) || ((++yielder) == yieldFrequency))
        {
            int adjustedBytesSoFar = aBytesSoFar;
            if (gControls->state == eResuming)
                adjustedBytesSoFar += gControls->resPos;
            SetControlValue(gControls->tw->dlProgressBar, (adjustedBytesSoFar/1024));
            
            // create processing string "%d KB of %d KB  (%.2f KB/sec)"
            GetResourcedString(dlStr, rInstList, sDownloadKB);
            strcpy(compressedStr, PascalToC(dlStr));
            sprintf(tmp, "%d", adjustedBytesSoFar/1024);
            strtran(compressedStr, "%d1", tmp);
            sprintf(tmp, "%d", aTotalFinalSize/1024);
            strtran(compressedStr, "%d2", tmp);
            sprintf(tmp, "%.2f", rate);
            strtran(compressedStr, "%.2f", tmp);

            HLock((Handle)gControls->tw->dlProgressMsgs[3]);
            teRect = (**(gControls->tw->dlProgressMsgs[3])).viewRect;
            HUnlock((Handle)gControls->tw->dlProgressMsgs[3]);
            
            TESetText(compressedStr, strlen(compressedStr), gControls->tw->dlProgressMsgs[3]);
            TEUpdate(&teRect, gControls->tw->dlProgressMsgs[3]);
            
            yielder = 0;   
            YieldToAnyThread();
        }
    }
    
    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

pascal void DoScrollProc ( ControlHandle  ,
short   
)

Definition at line 425 of file LicenseWin.c.

{
       short         amount;
       TEPtr         te;
       
       if ( part != 0 ) {
              switch (gCurrWin)
              {
                     case kLicenseID:                          
                            te = *(gControls->lw->licTxt);
                            break;
                     default:
                            ErrorHandler(eUnknownDlgID, nil);
                            break;
              }
              
              switch ( part ) {
                     case kControlUpButtonPart:
                     case kControlDownButtonPart:              // one line
                            amount = 1;
                            break;
                     case kControlPageUpPart:                  // one page
                     case kControlPageDownPart:
                            amount = (te->viewRect.bottom - te->viewRect.top) / kScrollAmount;
                            break;
              }
              if ( (part == kControlDownButtonPart) || (part == kControlPageDownPart) )
                     amount = -amount;
              CalcChange(theControl, &amount);
              if (amount) {
                     TEScroll(0, amount * kScrollAmount, &te);
            ShowTxt();
              }
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

short DownloadFile ( Handle  ,
long  ,
Handle  ,
int  ,
int  ,
CONN  
)

Definition at line 526 of file InstAction.c.

{
    short rv = 0;
    char *URL = 0, *proxyServerURL = 0, *destFile = 0, *destFolderCopy = 0;
    int globalURLLen, archiveLen, proxyServerURLLen;
    char *ftpHost = 0, *ftpPath = 0;
    Boolean bGetTried = false;
    Boolean isNewConn;
    
    // make URL using globalURL
    HLock(archive);
    DLMarkerSetCurrent(*archive);
    HLock(gControls->cfg->globalURL[urlIndex]);
    globalURLLen = strlen(*gControls->cfg->globalURL[urlIndex]);
    archiveLen = strlen(*archive);
    URL = (char *) malloc(globalURLLen + archiveLen + 1); // add 1 for NULL termination
    sprintf(URL, "%s%s", *gControls->cfg->globalURL[urlIndex], *archive);
    HUnlock(gControls->cfg->globalURL[urlIndex]);
    
    // set up for dl progress callback
    sCurrURL = URL;
    
    // make dest file using dest folder and archive name
    HLock(destFolder);
    destFolderCopy = (char *) malloc(destFolderLen + 1);  // GetFullPath doesn't NULL terminate
    if (! destFolderCopy)
    {    
        HUnlock(destFolder);
        return eMem;
    }
    strncpy(destFolderCopy, *destFolder, destFolderLen);
    *(destFolderCopy + destFolderLen) = 0;
    HUnlock(destFolder);
    
    destFile = (char *) malloc(destFolderLen + archiveLen + 1);
    sprintf(destFile, "%s%s", destFolderCopy, *archive);
    HUnlock(archive);
     
    UpdateControls( gWPtr, gWPtr->visRgn ); 
    ShowLogo( false );  
    // was proxy info specified?
    if (gControls->opt->proxyHost && gControls->opt->proxyPort)
    {
        nsHTTPConn *conn;
        
        // make HTTP URL with "http://proxyHost:proxyPort"
        proxyServerURLLen = strlen(kHTTP) + strlen(gControls->opt->proxyHost) + 1 + 
                            strlen(gControls->opt->proxyPort) + 1;
        proxyServerURL = (char *) calloc(proxyServerURLLen, sizeof( char ) );
        sprintf(proxyServerURL, "%s%s:%s", kHTTP, gControls->opt->proxyHost, gControls->opt->proxyPort);
         
        isNewConn = CheckConn( proxyServerURL, TYPE_PROXY, myConn, false ); // closes the old connection if any
        
        if ( isNewConn == true ) {
        
              conn = new nsHTTPConn(proxyServerURL, BreathFunc);
        
              // set proxy info: proxied URL, username, password

              conn->SetProxyInfo(URL, gControls->opt->proxyUsername, gControls->opt->proxyPassword);
        
              myConn->conn = (void *) conn;
              
              // open an HTTP connection
              rv = conn->Open();
            if ( rv == nsHTTPConn::OK ) {
              myConn->conn = (void *) conn;
              myConn->type = TYPE_PROXY;
              myConn->URL = (char *) calloc( strlen( proxyServerURL ) + 1, sizeof( char ) );
              if ( myConn->URL != (char *) NULL )
                     strcpy( myConn->URL, proxyServerURL );
           }
        } else {
              conn = (nsHTTPConn *) myConn->conn;
        }
        
        if (isNewConn ==false || rv == nsHTTPConn::OK)
        {
            sCurrStartTime = time(NULL);
            bGetTried = true;
            rv = conn->Get(DLProgressCB, destFile, resPos);
        }
    }
        
    // else do we have an HTTP URL? 
    else if (strncmp(URL, kHTTP, strlen(kHTTP)) == 0)
    {
       nsHTTPConn *conn;

        // XXX for now, the URL is always different, so we always create a new
        // connection here
        
        isNewConn = CheckConn( URL, TYPE_HTTP, myConn, false ); // closes the old connection if any
        
        if ( isNewConn == true ) {
              // open an HTTP connection
              
              conn = new nsHTTPConn(URL, BreathFunc);
        
              myConn->conn = (void *) conn;
        
              rv = conn->Open();
            if ( rv == nsHTTPConn::OK ) {
              myConn->conn = (void *) conn;
              myConn->type = TYPE_HTTP;
              myConn->URL = (char *) calloc( strlen( URL ) + 1, sizeof( char ) );
              if ( myConn->URL != (char *) NULL )
                     strcpy( myConn->URL, URL );
           }
        } else
              conn = (nsHTTPConn *) myConn->conn;
        
        if (isNewConn == false || rv == nsHTTPConn::OK)
        {
            sCurrStartTime = time(NULL);
            bGetTried = true;
            rv = conn->Get(DLProgressCB, destFile, resPos);
        }
    }
    
    // else do we have an FTP URL?
    else if (strncmp(URL, kFTP, strlen(kFTP)) == 0)
    {
        rv = ParseFTPURL(URL, &ftpHost, &ftpPath);
        if (!*ftpHost || !*ftpPath)
        {
            rv = nsHTTPConn::E_MALFORMED_URL;
        }
        else
        {
            nsFTPConn *conn;
            
            // open an FTP connection
              isNewConn = CheckConn( ftpHost, TYPE_FTP, myConn, false ); // closes the old connection if any
        
              if ( isNewConn == true ) {
              
              conn = new nsFTPConn(ftpHost, BreathFunc);
            
              rv = conn->Open();
              if ( rv == nsFTPConn::OK ) {
                     myConn->conn = (void *) conn;
                     myConn->type = TYPE_FTP;
                     myConn->URL = (char *) calloc( strlen( ftpHost ) + 1, sizeof( char ) );
                     if ( myConn->URL != (char *) NULL )
                            strcpy( myConn->URL, ftpHost );
              }
            } else 
              conn = (nsFTPConn *) myConn->conn;
              
            if (isNewConn == false || rv == nsFTPConn::OK)
            {
                sCurrStartTime = time(NULL);
                bGetTried = true;
                rv = conn->Get(ftpPath, destFile, nsFTPConn::BINARY, resPos, 1, DLProgressCB);
            }
        }
        if (ftpHost)
            free(ftpHost);
        if (ftpPath)
            free(ftpPath);
    }
        
    // else not supported so report an error
    else
        rv = nsHTTPConn::E_MALFORMED_URL;
    
    if (bGetTried && rv != 0)
    {
       // Connection was closed for us, clear out the Conn information
       
 //    myConn->type = TYPE_UNDEF;
 //    free( myConn->URL );
 //    myConn->URL = (char *) NULL;
       
        if (++urlIndex < gControls->cfg->numGlobalURLs)
            return eDLFailed;  // don't pase yet: continue trying failover URLs
            
        /* the get failed before completing; simulate pause */
        SetPausedState();
        rv = nsFTPConn::E_USER_CANCEL;
    }
    
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

short DownloadXPIs ( short  ,
long   
)

Definition at line 412 of file InstAction.c.

{
    short rv = 0;
    Handle dlPath;
    short dlPathLen = 0;
    int i, compsDone = 0, instChoice = gControls->opt->instChoice-1, resPos = 0;
    Boolean bResuming = false;
    Boolean bDone = false;
    int markedIndex = 0, currGlobalURLIndex = 0;
    CONN myConn;
    int crcPass;
    int count = 0;
    
    GetFullPath(destVRefNum, destDirID, "\p", &dlPathLen, &dlPath);
       DLMarkerGetCurrent(&markedIndex, &compsDone);
       if (markedIndex >= 0)
           resPos = GetResPos(&gControls->cfg->comp[markedIndex]);
       
       myConn.URL = (char *) NULL;
       myConn.type = TYPE_UNDEF;
       
       crcPass = 1;
       while ( bDone == false && crcPass <= MAXCRC ) {
    for ( i = 0; i < kNumDLFields; i++ ) {
        ShowControl( gControls->tw->dlLabels[i] );
    }
       for(i = 0; i < kMaxComponents; i++)
       {
              // general test: if component in setup type
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) && 
                      gControls->cfg->comp[i].dirty == true)
              { 
                     // if custom and selected -or- not custom setup type
                     if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                              (gControls->cfg->comp[i].selected == true)) ||
                             (instChoice < gControls->cfg->numSetupTypes-1) )
                     {    
                         // stat file even if index is less than markedIndex
                         // and download file if it isn't locally there;
                         // this can happen if a new setup type was selected
                         if (i < markedIndex)
                         {
                             if (noErr == ExistsXPI(i))
                                 continue;  
                         }
                         
                         count++;
                         
                         // set up vars for dl callback to use
                sCurrComp = i;
                sCurrFullPath = dlPath;
                sCurrFullPathLen = dlPathLen;
                
                // download given full path and archive name
                if (i == markedIndex && resPos > 0)
                {
                    gControls->resPos = resPos;
                    gControls->state = eResuming;
                }
TRY_DOWNLOAD:
                rv = DownloadFile(dlPath, dlPathLen, gControls->cfg->comp[i].archive, resPos, currGlobalURLIndex, &myConn);
                if (rv == nsFTPConn::E_USER_CANCEL)
                {
                    break;
                }
                if (rv != 0)
                {
                    if (++currGlobalURLIndex < gControls->cfg->numGlobalURLs)
                        goto TRY_DOWNLOAD;
                        
                    ErrorHandler(rv, nil);
                    break;
                } else
                     currGlobalURLIndex = 0;
                resPos = 0; // reset after first file was resumed in the middle 
                gControls->state = eDownloading;
                compsDone++;
            }
        }
              else if (compsDone >= gControls->cfg->st[instChoice].numComps)
                     break;  
    } // end for
    
        if ( rv != nsFTPConn::E_USER_CANCEL ) {   // XXX cancel is also paused :-)
           bDone = CRCCheckDownloadedArchives(dlPath, dlPathLen, count); 
           if ( bDone == false ) {
               compsDone = 0;
               crcPass++;   
           }
        } else {
            break;  // cancel really happened, or we paused
        }
    } // end while
 
       // clean up the Conn struct
       
       CheckConn( "", TYPE_UNDEF, &myConn, true );  
               
    if ( crcPass >= MAXCRC ) {
        ErrorHandler( eDownload, nil );  // XXX need a better error message here
        rv = eDownload;
    }
    
    if (rv == 0)
        DLMarkerDelete();
        
    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void DrawDiskNFolder ( short  ,
unsigned char *   
)

Definition at line 402 of file SetupTypeWin.c.

{
       Str255               inFolderMsg, onDiskMsg, volName;
       char                 *cstr;
       Rect                 viewRect, dlb;
       TEHandle             pathInfo;
       short                bCmp, outVRefNum;
       OSErr                err = noErr;
       FSSpec               fsTarget;
       IconRef                     icon;
       SInt16               label;
       unsigned long   free, total;
       
#define ICON_DIM 32

    dlb = (*gControls->stw->destLocBox)->contrlRect;
    SetRect(&viewRect, dlb.left+10, dlb.top+15, dlb.left+10+ICON_DIM, dlb.top+15+ICON_DIM);
   
       /* draw folder/volume icon */
       FSMakeFSSpec(gControls->opt->vRefNum, gControls->opt->dirID, "\p", &fsTarget);
       err = GetIconRefFromFile(&fsTarget, &icon, &label);
       if (err==noErr)
       {
              EraseRect(&viewRect);
              PlotIconRef(&viewRect, kAlignNone, kTransformNone, kIconServicesNormalUsageFlag, icon);
       }
       ReleaseIconRef(icon);       
       
       /* set up rect for disk and folder strings */
    SetRect(&viewRect, dlb.left+10+ICON_DIM+12, dlb.top+15, dlb.left+220, dlb.bottom-5);
    
       /* get vol and folder name */
       if ((err = HGetVInfo(vRefNum, volName, &outVRefNum, &free, &total)) == noErr)
       {      
              /* format and draw vol and disk name strings */
              TextFace(normal);
              TextSize(9);
              TextFont(applFont);
              EraseRect(&viewRect);
              pathInfo = TENew(&viewRect, &viewRect);
       
              if ( (bCmp = pstrcmp(folder, volName)) == 0)
              {
                     GetResourcedString( inFolderMsg, rInstList, sInFolder);
                     cstr = PascalToC(inFolderMsg);
                     TEInsert(cstr, strlen(cstr), pathInfo); 
                     DisposePtr(cstr);    
                            cstr = "\r\"\0";     TEInsert(cstr, strlen(cstr), pathInfo);
       
                     cstr = PascalToC(folder);
                     TEInsert(cstr, strlen(cstr), pathInfo);
                     DisposePtr(cstr);
                            cstr = "\"\r\0";     TEInsert(cstr, strlen(cstr), pathInfo);
              }
              
              GetResourcedString( onDiskMsg,   rInstList, sOnDisk);
              cstr = PascalToC(onDiskMsg);
              TEInsert(cstr, strlen(cstr), pathInfo);
              DisposePtr(cstr);
                     cstr = "\r\"\0";     TEInsert(cstr, strlen(cstr), pathInfo);
                     
              cstr = PascalToC(volName);
              TEInsert(cstr, strlen(cstr), pathInfo);
              DisposePtr(cstr);
                     cstr = "\"\0";       TEInsert(cstr, strlen(cstr), pathInfo);
                     
              TEUpdate(&viewRect, pathInfo);
              
              TextFont(systemFont);
              TextSize(12);
       }
       
       /* free mem blocks */
       TEDispose(pathInfo);

       DrawDiskSpaceMsgs(vRefNum);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void DrawDiskSpaceMsgs ( short  )

Definition at line 481 of file SetupTypeWin.c.

{
       XVolumeParam  pb;
       OSErr                err, reserr;
       short                msglen = 0;
       TEHandle             dsAvailH, dsNeededH;
       Rect                 instDescBox, viewRect;
       Handle               instDescRectH;
       Str255               msg;
       Str15                kb;
       char                 *cstr, *cmsg, *ckb, *cfreeSpace, *cSpaceNeeded;
       
       pb.ioCompletion = NULL;
       pb.ioVolIndex = 0;
       pb.ioNamePtr = NULL;
       pb.ioVRefNum = vRefNum;
       
       ERR_CHECK( PBXGetVolInfoSync(&pb) );
       sDSAvailK = U32SetU(U64Divide(pb.ioVFreeBytes, U64SetU(1024L), nil));
    
       instDescRectH = NULL;
       instDescRectH = Get1Resource('RECT', rCompListBox);
       reserr = ResError();
       if (reserr!=noErr || !instDescRectH)
       {
              ErrorHandler(reserr, nil);
              return;
       }
       
       HLock(instDescRectH);
       instDescBox = (Rect) **((Rect**)instDescRectH);
       SetRect( &viewRect, instDescBox.left, instDescBox.bottom + 2, 
                                          instDescBox.right, instDescBox.bottom + 14 );
       HUnlock(instDescRectH);     
       DetachResource(instDescRectH);
       DisposeHandle(instDescRectH); 
                                                 
       TextFace(normal);
       TextSize(9);
       TextFont(applFont);
       EraseRect(&viewRect);       
       dsAvailH = NULL;
       dsAvailH = TENew(&viewRect, &viewRect);
       if (!dsAvailH)
       {
              ErrorHandler(eMem, nil);
              return;
       }
       
       /* Get the "Disk Space Available: " string */
       GetResourcedString( msg, rInstList, sDiskSpcAvail );
       cstr = PascalToC(msg);
       msglen = strlen(cstr);
       cmsg = (char*)malloc(msglen+255);
       strncpy(cmsg, cstr, msglen);
       cmsg[msglen] = '\0';
       
       /* tack on the actual disk space in KB */
       cfreeSpace = ltoa(sDSAvailK);
       msglen += strlen(cfreeSpace);
       strcat( cmsg, cfreeSpace );
       cmsg[msglen] = '\0';
       
       /* tack on the "kilobyte" string: generally "K" but is rsrc'd */
       GetResourcedString( kb, rInstList, sKilobytes );
       ckb = PascalToC(kb);
       msglen += strlen(ckb);
       strcat( cmsg, ckb );
       cmsg[msglen] = '\0';
       
       /* draw the disk space available string */
       TEInsert( cmsg, strlen(cmsg), dsAvailH );
       TEUpdate( &viewRect, dsAvailH );
       
       /* recycle pointers */
       if (cstr)
              DisposePtr((Ptr)cstr);
       if (cmsg)
              free(cmsg);
       if (ckb)
              DisposePtr((Ptr)ckb);
       
       SetRect( &viewRect, instDescBox.right - 150, instDescBox.bottom + 2,
                                          instDescBox.right, instDescBox.bottom + 14 );
       dsNeededH = NULL;
       dsNeededH = TENew( &viewRect, &viewRect );
       if (!dsNeededH)
       {
              ErrorHandler(eMem, nil);
              return;
       }
       
       /* Get the "Disk Space Needed: " string */
       GetResourcedString( msg, rInstList, sDiskSpcNeeded );
       cstr = PascalToC(msg);
       msglen = strlen(cstr);
       cmsg = (char*)malloc(msglen+255);
       strncpy(cmsg, cstr, msglen);
       cmsg[msglen] = '\0';
       
       /* tack on space needed in KB */
       cSpaceNeeded = DiskSpaceNeeded();
       msglen += strlen(cSpaceNeeded);
       strcat( cmsg, cSpaceNeeded );
       cmsg[msglen] = '\0';
       
       /* tack on the "kilobyte" string: generally "K" but is rsrc'd */
       GetResourcedString( kb, rInstList, sKilobytes );
       ckb = PascalToC(kb);
       msglen += strlen(ckb);
       strcat( cmsg, ckb );
       cmsg[msglen] = '\0';
       
       /* draw the disk space available string */
       TEInsert( cmsg, strlen(cmsg), dsNeededH );
       TEUpdate( &viewRect, dsNeededH );
       
       if (dsAvailH)
              TEDispose(dsAvailH);
       if (dsNeededH)
              TEDispose(dsNeededH);
       
       if (ckb)
              DisposePtr((Ptr)ckb);
       if (cSpaceNeeded)
              free(cSpaceNeeded);         // malloc'd, not NewPtrClear'd
       if (cfreeSpace)
              free(cfreeSpace);
       if (cstr)
              DisposePtr((Ptr)cstr);
       if (cmsg)
              free(cmsg);
       TextFont(systemFont);
       TextSize(12);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 556 of file AdditionsWin.c.

{      
       EnableNavButtons();
       
       // TO DO
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 628 of file ComponentsWin.c.

{      
       EnableNavButtons();
       
       // TO DO
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 360 of file LicenseWin.c.

{
       GrafPtr       oldPort;
       GetPort(&oldPort);
       
       SetPort(gWPtr);
       
       EnableNavButtons();
       
       if(gControls->lw->licBox)
              HiliteControl(gControls->lw->licBox, kEnableControl);   
       if(gControls->lw->scrollBar)
              HiliteControl(gControls->lw->scrollBar, kEnableControl);                     
       
       ShowTxt();
       SetPort(oldPort);
       
       // TO DO
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 507 of file LicenseWin.c.

Here is the caller graph for this function:

Definition at line 1083 of file SetupTypeWin.c.

{
    EnableNavButtons();
       
    /* ensure 'Go Back' button is visbily disabled 
     * (since functionality is disconnected) 
     */
    if (gControls->backB)
        HiliteControl(gControls->backB, kDisableControl);
        
    if (gControls->stw->instType)
        HiliteControl(gControls->stw->instType, kEnableControl);
    if (gControls->stw->destLoc)
        HiliteControl(gControls->stw->destLoc, kEnableControl);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 686 of file TerminalWin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 244 of file WelcomeWin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ErrorHandler ( short  ,
Str255   
)

Definition at line 455 of file MacInstallWizard.c.

{
// TO DO
//            * handle a "fatality" parameter for recovery

    Str255      pErrorStr;
    Str255      pMessage, errMsg;
    char        *cErrNo = 0;
    StringPtr   pErrNo = 0;
    AlertStdAlertParamRec *alertdlg;

    // only throw up the error dialog once (since we have no fatality param)
    static Boolean bErrHandled = false;
    if (bErrHandled)
        return;
    else
        bErrHandled = true;
        
    // if install.ini read failed
    if( errCode == eInstRead )
    {
        GetIndString(pErrorStr, rStringList, errCode);
        ParamText(pErrorStr, "\p", "\p", "\p");
        StopAlert(rAlrtError, nil);
        SysBeep(10);
        gDone = true;
        return;
    }
       
    GetResourcedString(pMessage, rErrorList, eErr1);
    GetResourcedString(pErrorStr, rErrorList, eErr2);
    
    cErrNo = ltoa(errCode);
    pErrNo = CToPascal(cErrNo);
    
    if (errCode > 0)    // negative errors are definitely from the system so we don't interpret
    {
        GetResourcedString(pErrorStr, rErrorList, errCode);
        pstrcat(pMessage, pErrNo);
        pstrcat(pMessage, "\p: ");
        pstrcat(pMessage, pErrorStr);
    }
    else
    {
        GetResourcedString(pMessage, rErrorList, eErr3);
        if ( LookupErrorMsg( errCode, errMsg ) == true )
          pstrcat(pMessage, errMsg);
        else 
          pstrcat(pMessage, pErrNo);
        if ( msg[0] != 0 ) {
          pstrcat(pMessage, "\p : ");
          pstrcat(pMessage, msg);
        }
    }  
        
    alertdlg = (AlertStdAlertParamRec *)NewPtrClear(sizeof(AlertStdAlertParamRec));
    alertdlg->defaultButton = kAlertStdAlertOKButton;
    alertdlg->defaultText = (ConstStringPtr)NewPtrClear(kKeyMaxLen);
    GetResourcedString((unsigned char *)alertdlg->defaultText, rInstList, sOKBtn);
    StandardAlert(kAlertStopAlert, pMessage, nil, alertdlg, 0);
         SysBeep(10);
       
    if (cErrNo)
        free(cErrNo);
    if (pErrNo)
        DisposePtr((Ptr) pErrNo); 
        
       gDone = true;
}

Here is the call graph for this function:

Boolean ExistArchives ( short  ,
long   
)

Definition at line 1415 of file InstAction.c.

{
       int           compsDone = 0, i;
       int           instChoice = gControls->opt->instChoice - 1;
       OSErr         err = noErr;
       StringPtr     pArchiveName;
       FSSpec        fsCurr;
       Boolean              bAllExist = true;
       
       // loop through 0 to kMaxComponents
       for(i=0; i<kMaxComponents; i++)
       {
              // general test: if component in setup type
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) )
              { 
                     // if custom and selected, or not custom setup type
                     if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                              (gControls->cfg->comp[i].selected == true)) ||
                             (instChoice < gControls->cfg->numSetupTypes-1) )
                     {
                            HLock(gControls->cfg->comp[i].archive);
                            pArchiveName = CToPascal(*gControls->cfg->comp[i].archive);
                            HUnlock(gControls->cfg->comp[i].archive);
                            
                            err = FSMakeFSSpec(vRefNum, dirID, pArchiveName, &fsCurr);
                            if (err != noErr)
                            {
                                   bAllExist = false;
                                   if (pArchiveName)
                                          DisposePtr((Ptr)pArchiveName);
                                   break;
                            }
                            
                            if (pArchiveName)
                                   DisposePtr((Ptr)pArchiveName);
                     }
              }
              
              compsDone++;
       }
       
       return bAllExist;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr ExistsXPI ( int  )

Definition at line 1461 of file InstAction.c.

{
    OSErr err = noErr;
    FSSpec fsComp;
    short vRefNum = 0;
    long dirID = 0;
    Str255 pArchive;
    
    if (aIndex < 0)
        return paramErr;
        
    err = GetInstallerModules(&vRefNum, &dirID);
    if (err == noErr)
    {
        HLock(gControls->cfg->comp[aIndex].archive);
        my_c2pstrcpy(*(gControls->cfg->comp[aIndex].archive), pArchive);
        HUnlock(gControls->cfg->comp[aIndex].archive);
        err = FSMakeFSSpec(vRefNum, dirID, pArchive, &fsComp);
    }
    
    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr ExtractCoreFile ( short  ,
long  ,
short  ,
long   
)

Definition at line 71 of file Deflation.c.

{
       OSErr                err = noErr;
       StringPtr            coreFile = 0;
       UInt32          endTicks;
       short                fullPathLen = 0;
       Handle               fullPathH = 0;
       Ptr                         fullPathStr = 0;
       PRInt32                     rv = 0;
       void                 *hZip = 0, *hFind = 0;

       /* if there's a core file... */
       HLock(gControls->cfg->coreFile);
       if (*gControls->cfg->coreFile != NULL)
       {
              /* make local copy and unlock handle */
              coreFile = CToPascal(*gControls->cfg->coreFile);
              if (!coreFile)
              {
                     err = memFullErr;
                     goto cleanup;
              }
       }
       else
              return fnfErr;
       HUnlock(gControls->cfg->coreFile);
       
       ERR_CHECK_RET(GetFullPath(srcVRefNum, srcDirID, coreFile, &fullPathLen, &fullPathH), err);
       
       
       /* --- o p e n   a r c h i v e --- */
       
       /* extract the full path string from the handle so we can NULL terminate */
       HLock(fullPathH);
       fullPathStr = NewPtrClear(fullPathLen+1);
       strncat(fullPathStr, *fullPathH, fullPathLen);
       *(fullPathStr+fullPathLen) = '\0';
       
       rv = ZIP_OpenArchive( fullPathStr, &hZip );
       
       HUnlock(fullPathH);
       if (rv!=ZIP_OK) 
              goto cleanup;

       /* initialize the search */
       hFind = ZIP_FindInit( hZip, NULL ); /* null to match all files in archive */
       
       
       /* --- i n f l a t e   a l l   f i l e s --- */
       
       err = InflateFiles(hZip, hFind, tgtVRefNum, tgtDirID);
       if (err!=noErr)
              goto cleanup; /* XXX review later: this check may be pointless */
       
       
       /* --- c l o s e   a r c h i v e --- */
cleanup:

       //if (hFind)
       //     rv = ZIP_FindFree( hFind );
#ifdef MIW_DEBUG
              if (rv!=ZIP_OK) SysBeep(10);
#endif
       if (hZip)
              rv = ZIP_CloseArchive( &hZip );
#ifdef MIW_DEBUG
              if (rv!=ZIP_OK) SysBeep(10); 
#endif
       if (coreFile)
              DisposePtr((Ptr)coreFile);
       if (fullPathH)
              DisposeHandle(fullPathH);
       if (fullPathStr)
              DisposePtr(fullPathStr);

    /* pause till frag registry is updated */
    endTicks = TickCount() + 60;
    while (TickCount() < endTicks)
    {
        YieldToAnyThread();
    }
    
       return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean FillKeyValueForIDIKey ( short  ,
Handle  ,
char *   
)

Definition at line 1085 of file Parser.c.

{
       /* Fill key-value pair in IDI stringlist */
       
       return FillKeyValueUsingSLID(rIDIKeys, sSDNSInstall, keyID, dest, cfgText);
}

Here is the call graph for this function:

Boolean FillKeyValueSecNameKeyID ( short  ,
char *  ,
short  ,
Handle  ,
char *   
)

Definition at line 1118 of file Parser.c.

{
       /* Fill key-value pair using section name str and key res id */
       
       unsigned char pkey[kKeyMaxLen];
       char                 *key;
       Boolean              bFound = false;
       
       GetIndString(pkey, strListID, keyID);
       key = PascalToC(pkey);
       
       if (FillKeyValueUsingName(sectionName, key, dest, cfgText))
              bFound = true;
       
       if (key)
              DisposePtr(key);
              
       return bFound;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean FillKeyValueUsingName ( char *  ,
char *  ,
Handle  ,
char *   
)

Definition at line 1139 of file Parser.c.

{
       /* Fill key-value pair using the pascal string section name and key name */
       
       char          *value;
       Boolean              bFound = false;
       
       value = (char*) NewPtrClear(kValueMaxLen);
       if (!value)
       {
        ErrorHandler(eMem, nil);
              return false;
       }
                     
       if (FindKeyValue(cfgText, sectionName, keyName, value))
       {
              long   len = strlen(value);        
              OSErr  err;
              
              SetHandleSize(dest, len + 1);
              err = MemError();
              if (err != noErr)
              {
            ErrorHandler(err, nil);
                     return false;
              }
              
              HLock(dest);
              strcpy(*dest, value);
              HUnlock(dest);
              bFound = true;
       }
       if (value)
           DisposePtr(value);
       return bFound;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean FillKeyValueUsingResID ( short  ,
short  ,
Handle  ,
char *   
)

Definition at line 1077 of file Parser.c.

{
       /* Fill key-value pair using resIDs for the dlg/section name, and the key */
       
       return FillKeyValueUsingSLID(rParseKeys, dlgID, keyID, dest, cfgText);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean FillKeyValueUsingSLID ( short  ,
short  ,
short  ,
Handle  ,
char *   
)

Definition at line 1093 of file Parser.c.

{
       /* Fill key-value pair using stringlist ID */

       unsigned char pkey[kKeyMaxLen], psectionName[kSNameMaxLen];
       char                 *key, *sectionName;
       Boolean                     bFound = false;
       
       GetIndString(pkey, stringListID, keyID);         
       key = PascalToC(pkey);
       
       GetIndString(psectionName, stringListID, dlgID);
       sectionName = PascalToC(psectionName);
       
       if (FillKeyValueUsingName(sectionName, key, dest, cfgText))
              bFound = true;

       if(sectionName)
        DisposePtr(sectionName);
       if(key)
        DisposePtr(key);
       return bFound;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static OSErr FindAppOnVolume ( OSType  ,
short  ,
FSSpec  
) [static]
OSErr FindAppUsingSig ( OSType  ,
FSSpec ,
Boolean ,
ProcessSerialNumber *   
)

Definition at line 336 of file WelcomeWin.c.

{
       OSErr  err = noErr;
       short  sysVRefNum, vRefNum, index;
       Boolean       hasDesktopDB;

       if (running != nil) {
              err = FindRunningAppBySignature(sig, fSpec, psn);
              *running = true;
              if (err == noErr) return noErr;
              *running = false;
              if (err != procNotFound) return err;
       }
       err = GetSysVolume(&sysVRefNum);
       if (err != noErr) return err;
       vRefNum = sysVRefNum;
       index = 0;
       while (true) {
              if (index == 0 || vRefNum != sysVRefNum) {
                     err = VolHasDesktopDB(vRefNum, &hasDesktopDB);
                     if (err != noErr) return err;
                     if (hasDesktopDB) {
                            err = FindAppOnVolume(sig, vRefNum, fSpec);
                            if (err != afpItemNotFound) return err;
                     }
              }
              index++;
              err = GetIndVolume(index, &vRefNum);
              if (err == nsvErr) return fnfErr;
              if (err != noErr) return err;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean FindKeyValue ( const char *  ,
const char *  ,
const char *  ,
char *   
)

Definition at line 1179 of file Parser.c.

{
       char   *sectionName, *section, *key, *cfgPtr[1], *sectionPtr[1];

       *cfgPtr = (char*) cfg;
       
       sectionName =        (char *) NewPtrClear( kSNameMaxLen );
       section =            (char *) NewPtrClear( kSectionMaxLen ); 
       key =                (char *) NewPtrClear( kKeyMaxLen );
       if (!sectionName || !section || !key)
       {
        ErrorHandler(eMem, nil);
              return false;
       }      
    
       /* find next section   [cfgPtr moved past next section per iteration] */
    while(GetNextSection(cfgPtr, sectionName, section))
       { 
        if (strncmp(sectionName, inSectionName, strlen(inSectionName)) == 0) 
              {
                     *sectionPtr = section;
                     
                     /* find next key   [sectionPtr moved past next key per iteration] */
            while(GetNextKeyVal(sectionPtr, key, outValue))
                     {
                            if (*key && strncmp(key, inKey, strlen(inKey)) == 0)
                            {
                                   if(key) 
                        DisposePtr(key);
                                   if(sectionName) 
                        DisposePtr(sectionName);
                                   if(section) 
                        DisposePtr(section);
                                   return true;
                            }
                     }
              }
       }
    if(key) 
        DisposePtr(key);
    if(sectionName) 
        DisposePtr(sectionName);
    if(section) 
        DisposePtr(section);
       
       return false; 
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr FindRunningAppBySignature ( OSType  ,
FSSpec ,
ProcessSerialNumber *   
)

Definition at line 369 of file WelcomeWin.c.

{
       OSErr                err = noErr;
       ProcessInfoRec       info;
       FSSpec               tempFSSpec;
       
       psn->highLongOfPSN = 0;
       psn->lowLongOfPSN  = kNoProcess;
       while (true)
       {
              err = GetNextProcess(psn);
              if (err != noErr) return err;
              info.processInfoLength = sizeof(ProcessInfoRec);
              info.processName = nil;
              info.processAppSpec = &tempFSSpec;
              err = GetProcessInformation(psn, &info);
              if (err != noErr) return err;
              
              if (info.processSignature == sig)
              {
                     if (fSpec != nil)
                            *fSpec = tempFSSpec;
                     return noErr;
              }
       }
       
       return procNotFound;
}

Here is the call graph for this function:

OSErr ForceMoveFile ( short  ,
long  ,
ConstStr255Param  ,
long   
)

Definition at line 396 of file Deflation.c.

{
       OSErr  err = noErr;
       FSSpec        tmpFSp;
       
       err = CatMove(vRefNum, parID, name, newDirID, nil);
       if (err == dupFNErr)
       {
              // handle for stomping over old file
              err = FSMakeFSSpec(vRefNum, newDirID, name, &tmpFSp);
              err = FSpDelete(&tmpFSp);
              err = CatMove(vRefNum, parID, name, newDirID, nil);
       }
       
       return err;          
}

Here is the call graph for this function:

pascal void FrameGreyButton ( Rect *  buttonFrame)
Boolean GenerateIDIFromOpt ( Str255  ,
long  ,
short  ,
FSSpec  
)

Definition at line 1232 of file InstAction.c.

{
       Boolean bSuccess = true;
       OSErr  err;
       short  refNum, instChoice;
       long   count, compsDone, i;
       char   ch, buf[IDI_BUF_SIZE];
       Ptr    keybuf;
       Str255 pkeybuf;
       FSSpec fsExists;
       StringPtr     pcurrArchive = 0;
       
       err = FSMakeFSSpec(vRefNum, dirID, idiName, idiSpec);
       if ((err != noErr) && (err != fnfErr))
       {
              ErrorHandler(err, nil);
              return false;
       }
       err = FSpCreate(idiSpec, 'NSCP', 'TEXT', smSystemScript);
       if ( (err != noErr) && (err != dupFNErr))
       {
              ErrorHandler(err, nil);
              return false;
       }
       ERR_CHECK_RET(FSpOpenDF(idiSpec, fsRdWrPerm, &refNum), false);
       
       compsDone = 0;
       instChoice = gControls->opt->instChoice-1;
       
       // loop through 0 to kMaxComponents
       for(i=0; i<kMaxComponents; i++)
       {
              // general test: if component in setup type
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) )
              { 
                     // if custom and selected, or not custom setup type
                     // add file to buffer
                     if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                              (gControls->cfg->comp[i].selected == true)) ||
                             (instChoice < gControls->cfg->numSetupTypes-1) )
                     {
                            // verify that file does not exist already
                            HLock(gControls->cfg->comp[i].archive);
                            pcurrArchive = CToPascal(*gControls->cfg->comp[i].archive);
                            HUnlock(gControls->cfg->comp[i].archive);                      
                            err = FSMakeFSSpec(vRefNum, dirID, pcurrArchive, &fsExists);
                            
                            // if file doesn't exist
                            if (err == fnfErr)
                            {
                                char   fnum[12];
                                   // get file number 
                                   // fnum = ltoa(compsDone);
                                   sprintf(fnum, "%ld", compsDone);
                                   
                                memset(buf, 0, IDI_BUF_SIZE);
                                
                                   // construct through concatenation [File<num>]\r
                                   GetIndString(pkeybuf, rIDIKeys, sFile);

                                   ch = '[';
                                   strncpy(buf, &ch, 1);
                    CopyPascalStrToC(pkeybuf, buf + strlen(buf));
                                   strncat(buf, fnum, strlen(fnum));
                                   strcat(buf, "]\r");

                                   // write out \tdesc=
                                   GetIndString(pkeybuf, rIDIKeys, sDesc);
                                   ch = '\t';                                                     
                                   strncat(buf, &ch, 1);                                   // \t
                                   CopyPascalStrToC(pkeybuf, buf + strlen(buf));
                                   ch = '=';                                                      // \tdesc=
                                   strncat(buf, &ch, 1);
                            
                                   // write out gControls->cfg->comp[i].shortDesc\r
                                   HLock(gControls->cfg->comp[i].shortDesc);
                                   strncat(buf, *gControls->cfg->comp[i].shortDesc, strlen(*gControls->cfg->comp[i].shortDesc));                          
                                   HUnlock(gControls->cfg->comp[i].shortDesc);
                                   ch = '\r';
                                   strncat(buf, &ch, 1);
                              
                                   // write out \t0=                       // \t0=
                                   strcat(buf, "\t0=");
                                   
                                   // tack on URL to xpi directory         // \t0=<URL>
                                   HLock(gControls->cfg->globalURL[0]);
                                   strcat(buf, *gControls->cfg->globalURL[0]);
                                   HUnlock(gControls->cfg->globalURL[0]);
                                   
                                   // tack on 'archive\r'                  // \t0=<URL>/archive\r
                                   HLock(gControls->cfg->comp[i].archive);
                                   strncat(buf, *gControls->cfg->comp[i].archive, strlen(*gControls->cfg->comp[i].archive));
                                   HUnlock(gControls->cfg->comp[i].archive);
                                   ch = '\r';
                                   strncat(buf, &ch, 1);
                                   
                                   count = strlen(buf);
                       err = FSWrite(refNum, &count, buf);
                       
                                   if (err != noErr)
                                       goto BAIL;
                                       
                                   compsDone++;
                            }
                     }
              }
              else if (compsDone >= gControls->cfg->st[instChoice].numComps)
                     break;  
       }                    
       
       // terminate by entering Netscape Install section
       memset(buf, 0, IDI_BUF_SIZE);
       GetIndString(pkeybuf, rIDIKeys, sNSInstall);
       keybuf = PascalToC(pkeybuf);
       ch = '[';
       strncpy(buf, &ch, 1);                                   // [
       strncat(buf, keybuf, strlen(keybuf));     // [Netscape Install
       if (keybuf)
              DisposePtr(keybuf);
       
       keybuf = NewPtrClear(2);
       keybuf = "]\r";                           
       strncat(buf, keybuf, strlen(keybuf));     // [Netscape Install]\r
       if (keybuf)
              DisposePtr(keybuf);
       
       // write out \tcore_file=<filename>\r
       AddKeyToIDI( sCoreFile, gControls->cfg->coreFile, buf );
       
       // write out \tcore_dir=<dirname>\r
       AddKeyToIDI( sCoreDir, gControls->cfg->coreDir, buf );
       
       // write out \tno_ads=<boolean>\r
       AddKeyToIDI( sNoAds, gControls->cfg->noAds, buf );
       
       // write out \tsilent=<boolean>\r
       AddKeyToIDI( sSilent, gControls->cfg->silent, buf );
       
       // write out \texecution=<boolean>\r
       AddKeyToIDI( sExecution, gControls->cfg->execution, buf );
       
       // write out \tconfirm_install=<boolean>
       AddKeyToIDI( sConfirmInstall, gControls->cfg->confirmInstall, buf );
       
       // write buf to disk
       count = strlen(buf);
       ERR_CHECK_RET(FSWrite(refNum, &count, buf), false);

BAIL:  
       // close file
       ERR_CHECK_RET(FSClose(refNum), false);
       
       return bSuccess;
}

Here is the call graph for this function:

void GetAllVInfo ( unsigned char **  ,
short *   
)

Definition at line 801 of file SetupTypeWin.c.

{
       QHdrPtr                            vcbQ;
       VCB *                       currVCB;
       register short              i;
       
       vcbQ = GetVCBQHdr();
       currVCB = (VCB *)vcbQ->qHead;
       i = 0;
       while(1)
       {
              volName[i] = currVCB->vcbVN;
              /* *vRefNum[i] = currVCB->vcbVRefNum; */
              
              i++;  // since i gets incremented pre-break, count is accurate
              if (currVCB == (VCB *) vcbQ->qTail)
                     break;
              currVCB = (VCB *)currVCB->qLink;
       }
       *count = i;
}
short GetComponentIndex ( Handle  )

Definition at line 1052 of file Parser.c.

{
       int i;
       short compIdx = kInvalidCompIdx;
       
       HLock(compName);
       for (i=0; i<gControls->cfg->numComps; i++)
       {
              HLock(gControls->cfg->comp[i].shortDesc);
              if (0==strcmp(*gControls->cfg->comp[i].shortDesc, *compName))
              {
                     compIdx = i;                
                     HUnlock(gControls->cfg->comp[i].shortDesc);
                     break;
              }
              HUnlock(gControls->cfg->comp[i].shortDesc);
       }
       HUnlock(compName);
       
       return compIdx;
}

Here is the caller graph for this function:

short GetCompRow ( int  )

Definition at line 533 of file ComponentsWin.c.

{
       short i = kInvalidCompIdx;
       
       for (i=0; i<numRows; i++)
       {
              if (rowToComp[i] == compIdx)
                     break;
       }
       
       return i;
}
OSErr GetCWD ( long outDirID,
short *  outVRefNum 
)

Definition at line 144 of file MacInstallWizard.c.

{
       OSErr                       err = noErr;
       ProcessSerialNumber  psn;
       ProcessInfoRec              pInfo;
       FSSpec                      tmp;
       
       /* get cwd based on curr ps info */
       if (!(err = GetCurrentProcess(&psn))) 
       {
              pInfo.processName = nil;
              pInfo.processAppSpec = &tmp;
              pInfo.processInfoLength = (sizeof(ProcessInfoRec));
              
              if(!(err = GetProcessInformation(&psn, &pInfo)))
              {
                     *outDirID = pInfo.processAppSpec->parID;
                     *outVRefNum = pInfo.processAppSpec->vRefNum;
              }
       }
       
       return err;
}

Here is the call graph for this function:

OSErr GetIndexFromName ( char *  ,
int ,
int  
)

Definition at line 885 of file InstAction.c.

{
    OSErr err = noErr;
    int i, compsDone = 0, instChoice = gControls->opt->instChoice - 1;
    
    if (!aXPIName || !aIndex || !aCompsDone)
        return paramErr;
        
    // loop through 0 to kMaxComponents
       for(i = 0; i < kMaxComponents; i++)
       {
              // general test: if component in setup type
              if ( (gControls->cfg->st[instChoice].comp[i] == kInSetupType) &&
                      (compsDone < gControls->cfg->st[instChoice].numComps) )
              { 
            // if custom and selected -or- not custom setup type
            if ( ((instChoice == gControls->cfg->numSetupTypes-1) && 
                 (gControls->cfg->comp[i].selected == true)) ||
                 (instChoice < gControls->cfg->numSetupTypes-1) )
            {   
                HLock(gControls->cfg->comp[i].archive);
                if (strncmp(aXPIName, (*(gControls->cfg->comp[i].archive)), strlen(aXPIName)) == 0)
                {
                    HUnlock(gControls->cfg->comp[i].archive);
                    *aIndex = i;
                    *aCompsDone = compsDone;
                    break;
                }   
                else
                    HUnlock(gControls->cfg->comp[i].archive);                 
                compsDone++;
            }
        }
              else if (compsDone >= gControls->cfg->st[instChoice].numComps)
              {
                  err = userDataItemNotFound;
                     break;
           }
    }
    return err;
}

Here is the caller graph for this function:

OSErr GetIndVolume ( short  ,
short *   
)

Definition at line 481 of file WelcomeWin.c.

{
       ParamBlockRec pb;
       OSErr err = noErr;
       
       pb.volumeParam.ioCompletion = nil;
       pb.volumeParam.ioNamePtr = nil;
       pb.volumeParam.ioVolIndex = index;
       
       err = PBGetVInfoSync(&pb);
       
       *vRefNum = pb.volumeParam.ioVRefNum;
       return err;
}
OSErr GetInstallerModules ( short *  ,
long  
)

Definition at line 956 of file InstAction.c.

{
    short cwdVRefNum = 0;
    long cwdDirID = 0, imDirID = 0;
    OSErr err;
    Boolean isDir = false;
    Str255 pIMFolder;  // "Installer Modules" fodler
    
    if (!aVRefNum || !aDirID)
        return paramErr;
      
    *aVRefNum = 0;
    *aDirID = 0;
      
    err = GetCWD(&cwdDirID, &cwdVRefNum);
    if (err != noErr)
        return err;
        
    GetIndString(pIMFolder, rStringList, sInstModules);
    err = GetDirectoryID(cwdVRefNum, cwdDirID, pIMFolder, &imDirID, &isDir);
    if (err != noErr)
        return err;
        
    if (isDir)
    {
        *aVRefNum = cwdVRefNum;
        *aDirID = imDirID;
    }
    else
        return dirNFErr;
        
    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr GetLastModDateTime ( const FSSpec ,
unsigned long  
)

Definition at line 496 of file WelcomeWin.c.

{
       CInfoPBRec    pBlock;
       OSErr         err = noErr;
       
       pBlock.hFileInfo.ioNamePtr = (StringPtr)fSpec->name;
       pBlock.hFileInfo.ioVRefNum = fSpec->vRefNum;
       pBlock.hFileInfo.ioFDirIndex = 0;
       pBlock.hFileInfo.ioDirID = fSpec->parID;
       err = PBGetCatInfoSync(&pBlock);
       if (err != noErr) return err;
       *lastModDateTime = pBlock.hFileInfo.ioFlMdDat;
       return noErr;
}
Boolean GetNextKeyVal ( char **  ,
char *  ,
char *   
)

Definition at line 1320 of file Parser.c.

{
       Boolean exists = false;
       char *key, *sbuf, *val;
       long cnt;
       
       sbuf = *inSection;
       
       /* clear out extra carriage returns above next key */
       while( (*sbuf == MAC_EOL) || (*sbuf == WIN_EOL) || (*sbuf == ' ') || (*sbuf == '\t')) 
                     sbuf++;

       if (*sbuf == MY_EOF) /* no more keys */
              return false;
       
       if (*sbuf == ';') /* comment encountered */
       {
              while ((*sbuf != MAC_EOL) && (*sbuf != WIN_EOL)) /*ignore rest of line */
                     sbuf++;
              sbuf++;
       }
       
       key = outKey;
       cnt = 0;
       while((*sbuf != MAC_EOL) && (*sbuf != WIN_EOL))
       {
              if (*sbuf == KV_DELIM)
              {
                     if (key != nil) /* key not empty */
                            exists = true;
                     break;
              }
              
              if ( kKeyMaxLen-1 >= cnt++) /* prevent from falling of end of outKey buffer */
              {
                     *key = *sbuf;
                     key++; sbuf++;
              }
              else
                     sbuf++;
       }

       *key = MY_EOF; /* close string */
       sbuf++;
       
       if (exists) /* key found so now get value */
       {
              val = outVal;
              cnt = 0;
              while((*sbuf != MAC_EOL) && (*sbuf != WIN_EOL))
              {
                     if ( kValueMaxLen-1 >= cnt++) /* prevent from falling of end of outValue buffer */
                     {
                            *val = *sbuf;
                            val++; sbuf++;
                     }
                     else
                            sbuf++;
              }
       }
       *val = MY_EOF; /* close string */
       sbuf++;
       
       *inSection = sbuf; /* capture current position in section for future GetNextKeyValue() */

       if (*outKey == NULL)
              exists = false;
              
       return exists;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Boolean GetNextSection ( char **  ,
char *  ,
char *   
)

Definition at line 1229 of file Parser.c.

{
       Boolean exists = false;
       char *txt, *snbuf, *sbuf;
       long cnt;
       
       txt = *ioTxt;
       
       while (*txt != START_SECTION)
       {
              if (*txt == ';') /* comment encountered */
              {
                     while ((*txt != MAC_EOL) && (*txt != WIN_EOL)) /* ignore rest of line */
                            txt++;
              }
              
              if (*txt == MY_EOF)
                     return false;
              else
                     txt++;
       }
       
       if (*txt == START_SECTION) /* section name start */
       {
              txt++; 
              snbuf = outSectionName;
              cnt = 0;
              while (*txt != END_SECTION) /* section name end */
              {
                     if ((*txt==MAC_EOL) || (*txt==WIN_EOL)) /* incomplete section name so die */
                     {      
                            return false;
                     }
                     
                     if( kSNameMaxLen-1 >= cnt++) /* prevent falling of end of outSectionName buffer */
                     {
                            *snbuf = *txt;
                            snbuf++; txt++;
                     }
                     else
                            txt++;
              }
              *snbuf = MY_EOF;  /* close string */
              txt++; /* skip over section name end char ']' */
       }
              
       /* adminstration before section contents encountered */
       while( (*txt == MAC_EOL) || (*txt == WIN_EOL) || (*txt == ' ') || (*txt == '\t'))
       {
              txt++;
       }
       
       sbuf = outSection;
       cnt = 0;
find_contents:
       while (*txt != START_SECTION && *txt != MY_EOF) /* next section encountered */
       {
              if( kSectionMaxLen-1 >= cnt++)     /* prevent from falling of end of outSection buffer */                       
              {
                     *sbuf = *txt;
                     sbuf++; txt++;
              }
              else
                     txt++;
       }
           
    /* handle case where '[' is in key or value (i.e., for i18n)*/
    if (*txt != MY_EOF)
    {
        if (*txt == START_SECTION && 
            !(txt == *ioTxt || *(txt-1) == MAC_EOL || *(txt-1) == WIN_EOL))
        {
              if( kSectionMaxLen-1 >= cnt++)     /* prevent from falling of end of outSection buffer */                       
              {
                     *sbuf = *txt;
                     sbuf++; txt++;
              }
              else
                     txt++;
            goto find_contents;
        }
    } 
    
       *sbuf = MY_EOF;      /* close string */
       *ioTxt = txt;        /* move txt ptr to next section */
       exists = true;
       
       return exists;
}

Here is the call graph for this function:

Here is the caller graph for this function:

short GetRectFromRes ( Rect *  ,
short   
)

Definition at line 233 of file TerminalWin.c.

{
    Handle rectH;
    short reserr;
    
    if (!outRect)
        return eParam;
        
       // get rect for save bits message
       rectH = Get1Resource('RECT', inResID);
       reserr = ResError();
       if (reserr == noErr && rectH != NULL)
       {
               *outRect  = (Rect) **((Rect **)rectH);
               DisposeHandle(rectH);
    }
       else
       {
              ErrorHandler(reserr, nil);
              return reserr;
       }
       
       return 0;
}

Here is the call graph for this function:

Boolean GetResourcedString ( Str255  ,
int  ,
int   
)

Definition at line 1437 of file Parser.c.

{
       if( nList == rInstList && nIndex < instKeysNum + 1 )
       {
              pstrcpy(skey, gStrings->iKey[nIndex]);
              return true;
       }
       else if( nList == rErrorList && nIndex < instErrsNum + 1 )
       {
              pstrcpy(skey, gStrings->iErr[nIndex]);
              return true;
       }
       else if( nList == rInstMenuList && nIndex < instMenuNum + 1 )
       {
              pstrcpy(skey, gStrings->iMenu[nIndex]);
              return true;
       }
       else
              return false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 928 of file InstAction.c.

{
    OSErr err = noErr;
    int resPos = 0;
    short vRefNum = 0;
    long dirID = 0;
    Str255 pArchiveName;
    long dataSize = 0, rsrcSize = 0;
    
    if (!aComp)
        return 0;
    
    err = GetInstallerModules(&vRefNum, &dirID);
    if (err == noErr)
    {
        HLock(aComp->archive);
        my_c2pstrcpy(*(aComp->archive), pArchiveName);
        HUnlock(aComp->archive);
        
        err = GetFileSize(vRefNum, dirID, pArchiveName, &dataSize, &rsrcSize);
        if (err == noErr && dataSize > 0)
            resPos = dataSize;
    }
    
    return resPos;
}

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr GetSysVolume ( short *  )

Definition at line 474 of file WelcomeWin.c.

{
       long dir;
       
       return FindFolder(kOnSystemDisk, kSystemFolderType, false, vRefNum, &dir);
}

Here is the caller graph for this function:

void HandleActivateEvt ( EventRecord *  )

Definition at line 283 of file EvtHandlers.c.

{
       // TO DO
}

Here is the caller graph for this function:

void HandleKeyDown ( EventRecord *  )

Definition at line 121 of file EvtHandlers.c.

{
       char                 keyPressed;
       unsigned long        finalTicks;
              
       keyPressed = evt->message & charCodeMask;
#ifdef MIW_DEBUG
       if ( (keyPressed == 'z') || (keyPressed == 'Z'))
              gDone = true; // backdoor exit
#endif
       switch(keyPressed)                   //dougt: what about tab, esc, arrows, doublebyte?
       {             
              case '\r':
              case '\3':
                     if (gControls->nextB && !gInstallStarted)
                     {
                            HiliteControl(gControls->nextB, 1);
                            Delay(8, &finalTicks);
                            HiliteControl(gControls->nextB, 0);
                     }

                     switch(gCurrWin)
                     {
                case kWelcomeID:                        
                                   KillControls(gWPtr);
                                   ShowLicenseWin();
                                   return;
                            case kLicenseID:
                                   KillControls(gWPtr);
                                   ShowSetupTypeWin();
                                   return;
                            case kSetupTypeID:
                                   ClearDiskSpaceMsgs();
                                   KillControls(gWPtr); 
                                   /* treat last setup type selection as custom */
                                   if (gControls->opt->instChoice == gControls->cfg->numSetupTypes)
                                          ShowComponentsWin();
                                   else
                                          ShowTerminalWin();
                                   return;                            
                            case kComponentsID:         
                    gControls->cw->compListBox.top = 0;
                    EraseRect(&gControls->cw->compListBox);                  
                                   ClearDiskSpaceMsgs();
                                   KillControls(gWPtr);
                                   if (gControls->cfg->