projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SCO ACS part 2 (ESC[12m) apparently puts the top half of CP437 into
[u/mdw/putty]
/
mac
/
mac.c
diff --git
a/mac/mac.c
b/mac/mac.c
index
0abb337
..
89cbc1d
100644
(file)
--- a/
mac/mac.c
+++ b/
mac/mac.c
@@
-1,4
+1,4
@@
-/* $Id: mac.c,v 1.1
0 2002/12/30 18:21:17
ben Exp $ */
+/* $Id: mac.c,v 1.1
2 2002/12/31 01:40:14
ben Exp $ */
/*
* Copyright (c) 1999 Ben Harris
* All rights reserved.
/*
* Copyright (c) 1999 Ben Harris
* All rights reserved.
@@
-40,6
+40,7
@@
#include <Devices.h>
#include <DiskInit.h>
#include <Gestalt.h>
#include <Devices.h>
#include <DiskInit.h>
#include <Gestalt.h>
+#include <LowMem.h>
#include <Resources.h>
#include <Script.h>
#include <TextCommon.h>
#include <Resources.h>
#include <Script.h>
#include <TextCommon.h>
@@
-174,6
+175,17
@@
static void mac_startup(void) {
windows.about = NULL;
windows.licence = NULL;
windows.about = NULL;
windows.licence = NULL;
+ {
+ short vol;
+ long dirid;
+
+ /* Set the default directory for loading and saving settings. */
+ /* XXX Should we create it? */
+ if (get_session_dir(FALSE, &vol, &dirid) == noErr) {
+ LMSetSFSaveDisk(-vol);
+ LMSetCurDirStore(dirid);
+ }
+ }
init_ucs();
}
init_ucs();
}
@@
-268,6
+280,9
@@
static void mac_contentclick(WindowPtr window, EventRecord *event) {
break;
}
break;
break;
}
break;
+ case wSettings:
+ mac_clickdlg(window, event);
+ break;
}
}
}
}
@@
-288,6
+303,9
@@
static void mac_activatewindow(WindowPtr window, EventRecord *event) {
case wTerminal:
mac_activateterm(window, active);
break;
case wTerminal:
mac_activateterm(window, active);
break;
+ case wSettings:
+ mac_activatedlg(window, event);
+ break;
case wAbout:
mac_activateabout(window, event);
break;
case wAbout:
mac_activateabout(window, event);
break;
@@
-314,6
+332,7
@@
static void mac_updatewindow(WindowPtr window) {
mac_updateterm(window);
break;
case wAbout:
mac_updateterm(window);
break;
case wAbout:
+ case wSettings:
BeginUpdate(window);
UpdateDialog(window, window->visRgn);
EndUpdate(window);
BeginUpdate(window);
UpdateDialog(window, window->visRgn);
EndUpdate(window);
@@
-351,6
+370,7
@@
static void mac_updatelicence(WindowPtr window)
*/
static int mac_windowtype(WindowPtr window) {
int kind;
*/
static int mac_windowtype(WindowPtr window) {
int kind;
+ long refcon;
if (window == NULL)
return wNone;
if (window == NULL)
return wNone;
@@
-359,7
+379,11
@@
static int mac_windowtype(WindowPtr window) {
return wDA;
if (GetWVariant(window) == zoomDocProc)
return wTerminal;
return wDA;
if (GetWVariant(window) == zoomDocProc)
return wTerminal;
- return GetWRefCon(window);
+ refcon = GetWRefCon(window);
+ if (refcon < 1024)
+ return refcon;
+ else
+ return wSettings;
}
/*
}
/*