I'll do what I want with it.
Anyway, made a start on a Mac display for the terminal emulator, and the
enumeration of the global variables that will have to die.
Oh, and the licence is now in a TEXT resource -- I just have to work out
how to display it...
[originally from svn r53]
-/* $Id: mac.c,v 1.1.2.4 1999/02/20 22:10:33 ben Exp $ */
+/* $Id: mac.c,v 1.1.2.5 1999/02/20 23:55:55 ben Exp $ */
/*
* mac.c -- miscellaneous Mac-specific routines
*/
static void mac_zoomwindow(WindowPtr, short);
static void mac_shutdown(void);
+static void mac_newsession(void);
+
int main (int argc, char **argv) {
mac_startup();
break;
case mFile:
switch (item) {
+ case iNew:
+ mac_newsession();
+ break;
case iClose:
mac_closewindow(FrontWindow());
break;
-/* $Id: macresid.h,v 1.1.2.1 1999/02/20 22:10:34 ben Exp $ */
+/* $Id: macresid.h,v 1.1.2.2 1999/02/20 23:55:55 ben Exp $ */
/*
* macresid.h -- Mac resource IDs
/* Apple menu */
#define iAbout 1
/* File menu */
-#define iClose 1
-#define iQuit 3
+#define iNew 1
+#define iClose 2
+#define iQuit 4
/* Window types (and resource IDs) */
#define wNone 0 /* Dummy value for no window */
#define GLOBAL extern
#endif
+struct session {
+ /* Display state */
+ int rows, cols, savelines;
+ int font_width, font_height;
+ int has_focus;
+ /* Buffers */
+ unsigned char inbuf[INBUF_SIZE];
+ int inbuf_head, inbuf_reap;
+ unsigned char outbuf[OUTBUF_SIZE];
+ int outbuf_head, outbuf_reap;
+ /* Emulator state */
+ int app_cursor_keys, app_keypad_keys;
+ /* Backend */
+ Backend *back;
+ /* Config that created this session */
+ Config cfg;
+}
+
GLOBAL int rows, cols, savelines;
GLOBAL int font_width, font_height;
-/* $Id: putty.r,v 1.1.2.5 1999/02/20 22:10:34 ben Exp $ */
+/* $Id: putty.r,v 1.1.2.6 1999/02/20 23:55:55 ben Exp $ */
/* PuTTY resources */
#define PICT_RezTemplateVersion 1
enabled,
"File",
{
- "Close", noicon, "W", nomark, plain,
+ "New Session" noicon, "N", nomark, plain,
+ "Close", noicon, "W", nomark, plain,
"-", noicon, nokey, nomark, plain,
- "Quit", noicon, "Q", nomark, plain,
+ "Quit", noicon, "Q", nomark, plain,
}
};
}
};
+/* Terminal window */
+
+resource 'WIND' (wTerminal, "terminal", purgeable) {
+ { 0, 0, 0, 0 },
+ zoomDocProc,
+ invisible,
+ goAway,
+ 0x0,
+ "untitled"
+ staggerParentWindowScreen
+};
+
/* "About" box */
resource 'DLOG' (wAbout, "about", purgeable) {