jw@sics.se (Johan Widen) (06/21/88)
Here is a patch for mg release 2a. The patch is useful for those who have
only one drive (me!). You may have noticed that mg insists on accessing the
Workbench disk during startup. This is because it mucks around with disk
fonts, even if CHANGE_FONT is undefined.
I have also included a small fix. bcopy was called with the arguments
reversed.
*** :ttyio.c.old Sun Jun 19 11:34:33 1988
--- ttyio.c Tue Jun 21 00:32:37 1988
***************
*** 27,33 ****
--- 27,35 ----
#include <graphics/gfxbase.h>
#include <intuition/intuition.h>
#include <intuition/intuitionbase.h>
+ #ifdef CHANGE_FONT
#include <libraries/diskfont.h>
+ #endif
#undef TRUE /* avoid redefinition messages */
#undef FALSE
***************
*** 51,57 ****
--- 53,61 ----
extern int OpenConsole();
extern char *OpenLibrary();
extern struct Window *OpenWindow();
+ #ifdef CHANGE_FONT
extern struct TextFont *OpenDiskFont();
+ #endif
extern LONG RectFill();
extern LONG ReplyMsg();
extern LONG RawKeyConvert();
***************
*** 119,125 ****
--- 123,131 ----
extern struct IntuitionBase *IntuitionBase;
extern struct GfxBase *GfxBase;
+ #ifdef CHANGE_FONT
ULONG DiskfontBase;
+ #endif
/*
* Intuition window and menu variables. MG gets used a lot, because it
***************
*** 275,283 ****
--- 281,291 ----
if (IntuitionBase == NULL)
cleanup();
+ #ifdef CHANGE_FONT
DiskfontBase = (ULONG) OpenLibrary("diskfont.library", 0L);
if (DiskfontBase == NULL)
cleanup();
+ #endif
/* Get our screen and font, then figure out if we can go borderless
*/
***************
*** 283,289 ****
--- 291,301 ----
*/
if ((EmS = wbscreen()) == NULL)
cleanup();
+ #ifdef CHANGE_FONT
EmFont = OpenDiskFont(EmS->Font);
+ #else
+ EmFont = OpenFont(EmS->Font);
+ #endif
if ((EmS->Width >= ((INIT_COLS * EmFont->tf_XSize) + LR_BORDER)) &&
(EmS->Height >= ((INIT_ROWS * EmFont->tf_YSize) + TB_BORDER)))
borderless = FALSE;
***************
*** 295,301 ****
last_left = MG.LeftEdge = 0;
last_top = MG.TopEdge = 0;
! bcopy(outbuf,"\x9b0 p", 4); /* preload cursor off sequence */
obuf = outbuf + 4;
}
--- 307,313 ----
last_left = MG.LeftEdge = 0;
last_top = MG.TopEdge = 0;
! strcpy(outbuf, "\x9b0 p"); /* preload cursor off sequence */
obuf = outbuf + 4;
}
***************
*** 433,439 ****
--- 445,453 ----
if (EmacsMenu) DisposeMenus(EmacsMenu);
#endif
if (EmFont) CloseFont(EmFont);
+ #ifdef CHANGE_FONT
if (DiskfontBase) CloseLibrary(DiskfontBase);
+ #endif
if (IntuitionBase) CloseLibrary(IntuitionBase);
if (GfxBase) CloseLibrary(GfxBase);
}
--
Johan Widen
SICS, PO Box 1263, S-164 28 KISTA, SWEDEN
Tel: +46 8 752 15 32 Ttx: 812 61 54 SICS S Fax: +46 8 751 72 30
Internet: jw@sics.se or {mcvax,munnari,ukc,unido}!enea!sics.se!jw