Macintosh port update

Several long-awaited updates for the Macintosh port, by Dean
Luick and myself.  This set affects Mac-only files.

* Update the support for MPW compilers.
* Use new system call names provided for in the latest Apple
  Universal Headers.
* Tune up some of the includes for CodeWarrior.
* Define YY_NEVER_INTERACTIVE for the dungeon and level compilers.
* Remove pointless debugging code.
* Clean up some unterminated comments.
This commit is contained in:
kmhugo
2002-01-10 06:53:52 +00:00
parent 631df10a34
commit 87843397c3
11 changed files with 136 additions and 157 deletions

View File

@@ -288,11 +288,11 @@ ask_enable (WindowPtr wind, short item, int enable)
/* Enable or disable the appropriate item */
GetDItem(wind, item, &type, &handle, &rect);
GetDialogItem(wind, item, &type, &handle, &rect);
if (enable) type &= ~itemDisable;
else type |= itemDisable;
HiliteControl((ControlHandle)handle, enable ? 0 : 255);
SetDItem(wind, item, type, handle, &rect);
SetDialogItem(wind, item, type, handle, &rect);
return;
}
@@ -307,7 +307,7 @@ ask_redraw (WindowPtr wind, DialogItemIndex item)
/* Which item shall we redraw? */
GetDItem(wind, item, &type, &handle, &rect);
GetDialogItem(wind, item, &type, &handle, &rect);
switch (item) {
case RSRC_ASK_DEFAULT:
PenSize(3, 3);
@@ -510,8 +510,8 @@ void mac_askname ()
/* Initialize the name text item */
ask_restring(plname, str);
if (plname[0]) {
GetDItem(askdialog, RSRC_ASK_NAME, &type, &handle, &rect);
SetIText(handle, str);
GetDialogItem(askdialog, RSRC_ASK_NAME, &type, &handle, &rect);
SetDialogItemText(handle, str);
}
#if 0
{
@@ -534,8 +534,8 @@ void mac_askname ()
}
}
if (pName [0]) {
GetDItem(askdialog, RSRC_ASK_NAME, &type, &handle, &rect);
SetIText(handle, pName);
GetDialogItem(askdialog, RSRC_ASK_NAME, &type, &handle, &rect);
SetDialogItemText(handle, pName);
if (pName [0] > 2 && pName [pName [0] - 1] == '-') {
short role = (*pANR).anMenu[anRole];
char suffix = (char) pName[pName[0]],
@@ -550,7 +550,7 @@ void mac_askname ()
}
}
#endif
SelIText(askdialog, RSRC_ASK_NAME, 0, 32767);
SelectDialogItemText(askdialog, RSRC_ASK_NAME, 0, 32767);
/* Initialize the role popup menu */
if (!(askmenu[RSRC_ASK_ROLE] = NewMenu(RSRC_ASK_ROLE, "\p")))
@@ -620,8 +620,8 @@ void mac_askname ()
/* Set the redraw procedures */
for (item = RSRC_ASK_DEFAULT; item <= RSRC_ASK_MODE; item++) {
GetDItem(askdialog, item, &type, &handle, &rect);
SetDItem(askdialog, item, type, (Handle)redraw, &rect);
GetDialogItem(askdialog, item, &type, &handle, &rect);
SetDialogItem(askdialog, item, type, (Handle)redraw, &rect);
}
/* Handle dialog events */
@@ -646,7 +646,7 @@ void mac_askname ()
if (!races[++j].noun) j = 0;
} while (i != j);
if (currrace != i) {
GetDItem(askdialog, RSRC_ASK_RACE, &type, &handle, &rect);
GetDialogItem(askdialog, RSRC_ASK_RACE, &type, &handle, &rect);
InvalRect(&rect);
}
@@ -666,7 +666,7 @@ void mac_askname ()
if (++j >= ROLE_GENDERS) j = 0;
} while (i != j);
if (currgend != i) {
GetDItem(askdialog, RSRC_ASK_GEND, &type, &handle, &rect);
GetDialogItem(askdialog, RSRC_ASK_GEND, &type, &handle, &rect);
InvalRect(&rect);
}
@@ -686,7 +686,7 @@ void mac_askname ()
if (++j >= ROLE_ALIGNS) j = 0;
} while (i != j);
if (curralign != i) {
GetDItem(askdialog, RSRC_ASK_ALIGN, &type, &handle, &rect);
GetDialogItem(askdialog, RSRC_ASK_ALIGN, &type, &handle, &rect);
InvalRect(&rect);
}
@@ -694,7 +694,7 @@ void mac_askname ()
for (i = 0; roles[i].name.m; i++) {
ask_restring((currgend && roles[i].name.f) ?
roles[i].name.f : roles[i].name.m, str);
SetItem(askmenu[RSRC_ASK_ROLE], i+1, str);
SetMenuItemText(askmenu[RSRC_ASK_ROLE], i+1, str);
CheckItem(askmenu[RSRC_ASK_ROLE], i+1, currrole == i);
}
@@ -718,7 +718,7 @@ void mac_askname ()
case RSRC_ASK_ALIGN:
case RSRC_ASK_GEND:
case RSRC_ASK_MODE:
GetDItem(askdialog, item, &type, &handle, &rect);
GetDialogItem(askdialog, item, &type, &handle, &rect);
pt = *(Point *)&rect;
LocalToGlobal(&pt);
if (!!(i = PopUpMenuSelect(askmenu[item], pt.v, pt.h,
@@ -749,8 +749,8 @@ void mac_askname ()
} while ((item != RSRC_ASK_PLAY) && (item != RSRC_ASK_QUIT));
/* Process the name */
GetDItem(askdialog, RSRC_ASK_NAME, &type, &handle, &rect);
GetIText(handle, str);
GetDialogItem(askdialog, RSRC_ASK_NAME, &type, &handle, &rect);
GetDialogItemText(handle, str);
if (str[0] > PL_NSIZ-1) str[0] = PL_NSIZ-1;
BlockMove(&str[1], plname, str[0]);
plname[str[0]] = '\0';
@@ -1151,7 +1151,7 @@ askQuit()
ParamText("\pReally Quit?", "\p", "\p", "\p");
itemHit = Alert(alrtMenu_NY, (ModalFilterUPP) 0L);
ResetAlrtStage();
ResetAlertStage();
if (itemHit != bttnMenuAlertYes) {
doQuit = 0;