Deleted Added
full compact
syscons.c (3201) syscons.c (3258)
1/*-
2 * Copyright (c) 1992-1994 S�ren Schmidt
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz and Don Ahn.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
1/*-
2 * Copyright (c) 1992-1994 S�ren Schmidt
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz and Don Ahn.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * $Id: syscons.c,v 1.59 1994/09/29 08:29:21 sos Exp $
38 * $Id: syscons.c,v 1.60 1994/09/29 15:49:09 ache Exp $
39 */
40
41#include "sc.h"
42
43#if NSC > 0
44
45#include <sys/param.h>
46#include <sys/systm.h>

--- 12 unchanged lines hidden (view full) ---

59#include <machine/psl.h>
60#include <machine/frame.h>
61#include <machine/pc/display.h>
62#include <i386/isa/isa.h>
63#include <i386/isa/isa_device.h>
64#include <i386/isa/timerreg.h>
65#include <i386/isa/kbdtables.h>
66#include <i386/i386/cons.h>
39 */
40
41#include "sc.h"
42
43#if NSC > 0
44
45#include <sys/param.h>
46#include <sys/systm.h>

--- 12 unchanged lines hidden (view full) ---

59#include <machine/psl.h>
60#include <machine/frame.h>
61#include <machine/pc/display.h>
62#include <i386/isa/isa.h>
63#include <i386/isa/isa_device.h>
64#include <i386/isa/timerreg.h>
65#include <i386/isa/kbdtables.h>
66#include <i386/i386/cons.h>
67#ifdef APM
68#include <machine/apm_bios.h>
69#endif
67
68#if !defined(NCONS)
69#define NCONS 12
70#endif
71
72#if defined(HARDFONTS)
73#include <i386/isa/iso8859.font>
74#endif

--- 208 unchanged lines hidden (view full) ---

283u_short *Crtat = (u_short *)MONO_BUF;
284void consinit(void) {scinit();}
285extern char *video_mode_ptr;
286
287struct isa_driver scdriver = {
288 pcprobe, pcattach, "sc",
289};
290
70
71#if !defined(NCONS)
72#define NCONS 12
73#endif
74
75#if defined(HARDFONTS)
76#include <i386/isa/iso8859.font>
77#endif

--- 208 unchanged lines hidden (view full) ---

286u_short *Crtat = (u_short *)MONO_BUF;
287void consinit(void) {scinit();}
288extern char *video_mode_ptr;
289
290struct isa_driver scdriver = {
291 pcprobe, pcattach, "sc",
292};
293
294#ifdef APM
295static int
296pc_resume(void)
297{
298 /* when the system wakes up, modifier keys must be re-initialized */
299 shfts = ctls = alts = agrs = metas = 0;
300 return 0;
301}
302#endif /* APM */
303
291int
292pcprobe(struct isa_device *dev)
293{
294 int i, retries = 5;
295 unsigned char val;
296
297 /* Enable interrupts and keyboard controller */
298 kbd_wait();

--- 87 unchanged lines hidden (view full) ---

386 /* get cursor going */
387#if defined(FAT_CURSOR)
388 if (crtc_vga)
389 cursor_shape(console[0].cursor_start,
390 console[0].cursor_end);
391#endif
392 cursor_pos(1);
393 update_leds(console[0].status);
304int
305pcprobe(struct isa_device *dev)
306{
307 int i, retries = 5;
308 unsigned char val;
309
310 /* Enable interrupts and keyboard controller */
311 kbd_wait();

--- 87 unchanged lines hidden (view full) ---

399 /* get cursor going */
400#if defined(FAT_CURSOR)
401 if (crtc_vga)
402 cursor_shape(console[0].cursor_start,
403 console[0].cursor_end);
404#endif
405 cursor_pos(1);
406 update_leds(console[0].status);
407#ifdef APM
408 apm_resume_hook_init(pc_resume, "Syscons console", APM_MID_ORDER);
409#endif
394 return 0;
395}
396
397static struct tty
398*get_tty_ptr(dev_t dev)
399{
400 int unit = minor(dev);
401

--- 1674 unchanged lines hidden (view full) ---

2076 scp->term.cur_attr = scp->term.std_attr;
2077 scp->border = BG_BLACK;
2078 scp->cursor_start = start;
2079 scp->cursor_end = end;
2080 scp->xsize = COL;
2081 scp->ysize = ROW;
2082 scp->bell_pitch = BELL_PITCH;
2083 scp->bell_duration = BELL_DURATION;
410 return 0;
411}
412
413static struct tty
414*get_tty_ptr(dev_t dev)
415{
416 int unit = minor(dev);
417

--- 1674 unchanged lines hidden (view full) ---

2092 scp->term.cur_attr = scp->term.std_attr;
2093 scp->border = BG_BLACK;
2094 scp->cursor_start = start;
2095 scp->cursor_end = end;
2096 scp->xsize = COL;
2097 scp->ysize = ROW;
2098 scp->bell_pitch = BELL_PITCH;
2099 scp->bell_duration = BELL_DURATION;
2100#ifndef LAPTOP
2084 scp->status = NLKED;
2101 scp->status = NLKED;
2102#else
2103 scp->status = 0;
2104#endif
2085 scp->pid = 0;
2086 scp->proc = NULL;
2087 scp->smode.mode = VT_AUTO;
2088 if (i == 0) {
2089 scp->xpos = cursorat % COL;
2090 scp->ypos = cursorat / COL;
2091 scp->crt_base = Crtat;
2092 scp->crtat = crtat;

--- 331 unchanged lines hidden (view full) ---

2424 break;
2425
2426 /* NON-LOCKING KEYS */
2427 case NOP:
2428 break;
2429 case RBT:
2430 shutdown_nice();
2431 break;
2105 scp->pid = 0;
2106 scp->proc = NULL;
2107 scp->smode.mode = VT_AUTO;
2108 if (i == 0) {
2109 scp->xpos = cursorat % COL;
2110 scp->ypos = cursorat / COL;
2111 scp->crt_base = Crtat;
2112 scp->crtat = crtat;

--- 331 unchanged lines hidden (view full) ---

2444 break;
2445
2446 /* NON-LOCKING KEYS */
2447 case NOP:
2448 break;
2449 case RBT:
2450 shutdown_nice();
2451 break;
2452 case SUSP:
2453#ifdef APM
2454 apm_suspend_resume();
2455#endif /* APM */
2456 break;
2457
2432 case DBG:
2433#ifdef DDB /* try to switch to console 0 */
2434 if (cur_console->smode.mode == VT_AUTO &&
2435 console[0].smode.mode == VT_AUTO)
2436 switch_scr(0);
2437 Debugger("manual escape to debugger");
2438 return(NOKEY);
2439#else

--- 360 unchanged lines hidden ---
2458 case DBG:
2459#ifdef DDB /* try to switch to console 0 */
2460 if (cur_console->smode.mode == VT_AUTO &&
2461 console[0].smode.mode == VT_AUTO)
2462 switch_scr(0);
2463 Debugger("manual escape to debugger");
2464 return(NOKEY);
2465#else

--- 360 unchanged lines hidden ---