annotate 3rdparty/packages/uemacs/uemain4.c @ 2822:4ffb283f6233 lwtools-port

Forgot to add to makefile
author Boisy Pitre <boisy.pitre@nuance.com>
date Wed, 22 May 2013 17:04:29 -0500
parents 48c646212b1c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
995
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
1 /*
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
2 * This program is in public domain; written by Dave G. Conroy.
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
3 * This file contains the main driving routine, and some keyboard processing
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
4 * code, for the MicroEMACS screen editor.
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
5 *
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
6 * REVISION HISTORY:
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
7 *
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
8 * 1.0 Steve Wilhite, 30-Nov-85
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
9 * - Removed the old LK201 and VT100 logic. Added code to support the
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
10 * DEC Rainbow keyboard (which is a LK201 layout) using the the Level
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
11 * 1 Console In ROM INT. See "rainbow.h" for the function key definitions
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
12 *
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
13 * 2.0 George Jones, 12-Dec-85
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
14 * - Ported to Amiga.
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
15 */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
16 #include <stdio.h>
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
17 #include "ueed.h"
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
18 #ifdef VMS
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
19 #include <ssdef.h>
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
20 #define GOOD (SS$_NORMAL)
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
21 #endif
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
22
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
23 #ifndef GOOD
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
24 #define GOOD 0
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
25 #endif
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
26
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
27 #define MAIN1 1
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
28 #include "uemain.h"
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
29
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
30 /*
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
31 * Initialize all of the buffers and windows. The buffer name is passed down
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
32 * as an argument, because the main routine may have been told to read in a
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
33 * file by default, and we want the buffer name to be right.
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
34 */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
35 edinit(bname)
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
36 char bname[];
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
37 {
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
38 register BUFFER *bp;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
39 register WINDOW *wp;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
40
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
41 bp = bfind(bname, TRUE, 0); /* First buffer */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
42 blistp = bfind("[List]", TRUE, BFTEMP); /* Buffer list buffer */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
43 wp = (WINDOW *) malloc(sizeof(WINDOW)); /* First window */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
44 if (bp==NULL || wp==NULL || blistp==NULL)
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
45 exit(1);
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
46 curbp = bp; /* Make this current */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
47 wheadp = wp;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
48 curwp = wp;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
49 wp->w_bufp = bp;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
50 bp->b_nwnd = 1; /* Displayed. */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
51 wp->w_linep = bp->b_linep;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
52 wp->w_dotp = bp->b_linep;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
53 wp->w_wndp = /* Initialize window */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
54 wp->w_doto =
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
55 wp->w_markp =
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
56 wp->w_marko =
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
57 wp->w_toprow =
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
58 wp->w_force = 0;
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
59 wp->w_ntrows = term.t_nrow-1; /* "-1" for mode line. */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
60 wp->w_flag = WFMODE|WFHARD; /* Full. */
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
61 }
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
62
48c646212b1c 'microEMACS' for OS-9.
roug
parents:
diff changeset
63