mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Now initialises enough to be able to generate fatal errors.
[originally from svn r43]
This commit is contained in:
parent
90d4bdc508
commit
fadb1e0f54
52
mac.c
Normal file
52
mac.c
Normal file
@ -0,0 +1,52 @@
|
||||
/* $Id: mac.c,v 1.1.2.1 1999/02/19 21:35:12 ben Exp $ */
|
||||
/*
|
||||
* mac.c -- miscellaneous Mac-specific routines
|
||||
*/
|
||||
|
||||
#include <MacTypes.h>
|
||||
#include <Quickdraw.h>
|
||||
#include <Fonts.h>
|
||||
#include <MacWindows.h>
|
||||
#include <Menus.h>
|
||||
#include <TextEdit.h>
|
||||
#include <Dialogs.h>
|
||||
|
||||
#include <stdlib.h> /* putty.h needs size_t */
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "putty.h"
|
||||
|
||||
QDGlobals qd;
|
||||
|
||||
int cold = 1;
|
||||
|
||||
int main (int argc, char **argv) {
|
||||
/* Init QuickDraw */
|
||||
InitGraf(&qd.thePort);
|
||||
/* Init Font Manager */
|
||||
InitFonts();
|
||||
/* Init Window Manager */
|
||||
InitWindows();
|
||||
/* Init Menu Manager */
|
||||
InitMenus();
|
||||
/* Init TextEdit */
|
||||
TEInit();
|
||||
/* Init Dialog Manager */
|
||||
InitDialogs(nil);
|
||||
InitCursor();
|
||||
cold = 0;
|
||||
fatalbox("Init complete");
|
||||
}
|
||||
|
||||
void fatalbox(const char *fmt, ...) {
|
||||
va_list ap;
|
||||
Str255 stuff;
|
||||
|
||||
va_start(ap, fmt);
|
||||
/* We'd like stuff to be a Pascal string */
|
||||
stuff[0] = vsprintf((char *)(&stuff[1]), fmt, ap);
|
||||
va_end(ap);
|
||||
ParamText(stuff, NULL, NULL, NULL);
|
||||
StopAlert(128, nil);
|
||||
exit(1);
|
||||
}
|
Loading…
Reference in New Issue
Block a user