From owner-p4-projects@FreeBSD.ORG Mon May 16 05:49:43 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7601216A4D1; Mon, 16 May 2005 05:49:43 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 381A216A4CE for ; Mon, 16 May 2005 05:49:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DCFA43D3F for ; Mon, 16 May 2005 05:49:43 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4G5nhLV065919 for ; Mon, 16 May 2005 05:49:43 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4G5ngpv065916 for perforce@freebsd.org; Mon, 16 May 2005 05:49:42 GMT (envelope-from marcel@freebsd.org) Date: Mon, 16 May 2005 05:49:42 GMT Message-Id: <200505160549.j4G5ngpv065916@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 77033 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2005 05:49:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=77033 Change 77033 by marcel@marcel_nfs on 2005/05/16 05:49:17 Hook up the terminal emulator bits. It compiles, but that's about it. Time to flesh this out now that the low-level console (output) works. Affected files ... .. //depot/projects/tty/sys/conf/files#29 edit .. //depot/projects/tty/sys/dev/vtc/vtc_te.h#2 edit .. //depot/projects/tty/sys/dev/vtc/vtc_te_if.m#2 edit .. //depot/projects/tty/sys/dev/vtc/vtc_te_vt102.c#2 edit Differences ... ==== //depot/projects/tty/sys/conf/files#29 (text+ko) ==== @@ -919,6 +919,9 @@ dev/vtc/vtc_core.c optional vtc dev/vtc/vtc_font.c optional vtc dev/vtc/vtc_logo.c optional vtc +dev/vtc/vtc_te.c optional vtc +dev/vtc/vtc_te_if.m optional vtc +dev/vtc/vtc_te_vt102.c optional vtc dev/vtc/hw/gmch/gmch.c optional gmch vtc dev/vtc/hw/gmch/gmch_bus_pci.c optional gmch vtc pci dev/vtc/hw/vga/vga.c optional vga vtc ==== //depot/projects/tty/sys/dev/vtc/vtc_te.h#2 (text+ko) ==== @@ -41,4 +41,9 @@ struct vtc_te_class *sc_class; }; +/* + * TE support functions. + */ +int vtc_te_bell(struct vtc_te_softc *); + #endif /* !_DEV_VTC_TE_H_ */ ==== //depot/projects/tty/sys/dev/vtc/vtc_te_if.m#2 (text+ko) ==== @@ -25,9 +25,10 @@ # # $FreeBSD$ -#include #include #include +#include + #include # The VTC Terminal Emulator (TE) interface. @@ -37,5 +38,5 @@ # write() - write to the terminal METHOD int write { struct vtc_te_softc *this; - wchar_t unicode; + __wchar_t unicode; }; ==== //depot/projects/tty/sys/dev/vtc/vtc_te_vt102.c#2 (text+ko) ==== @@ -29,6 +29,9 @@ #include #include +#include + +#include #include "vtc_te_if.h" @@ -44,13 +47,19 @@ char cbuf[16]; }; -static int vt102_write(struct vtc_te_softc *, wchar_t); +static int vt102_write(struct vtc_te_softc *, __wchar_t); -static kobj_method_t vtc_te_vt102_methods[] = { +static kobj_method_t vt102_methods[] = { KOBJMETHOD(vtc_te_write, vt102_write), { 0, 0 } }; +struct vtc_te_class vt102_class = { + "vt102 class", + vt102_methods, + sizeof(struct vt102_softc), +}; + static int vt102_answerback(struct vt102_softc *vt102) { @@ -58,18 +67,12 @@ } static int -vt102_bell(struct vt102_softc *vt102) +vt102_print(struct vt102_softc *vt102, __wchar_t wc) { return (0); } static int -vt102_print(struct vt102_softc *vt102, wchar_t wc) -{ - return (0); -} - -static int vt102_ctlchr(struct vt102_softc *vt102, char cc) { int error = 0; @@ -79,7 +82,7 @@ error = vt102_answerback(vt102); break; case 0x07: /* BEL */ - error = vt102_bell(vt102); + error = vtc_te_bell(&vt102->base); break; case 0x08: /* BS */ break; @@ -124,7 +127,7 @@ } static int -vt102_write(struct vtc_te_softc *sc, wchar_t wc) +vt102_write(struct vtc_te_softc *sc, __wchar_t wc) { struct vt102_softc *vt102 = (struct vt102_softc *)sc; int error; @@ -153,7 +156,7 @@ return (0); /* Save the character. Is there a maximum for the control string? */ - vt102->cstr[vt102->count++] = (char)wc; + vt102->cbuf[vt102->count++] = (char)wc; /* That's it for intermediate characters. */ if (wc <= 0x2F) @@ -177,6 +180,6 @@ error = vt102_escape(vt102); else error = vt102_control(vt102); - vt102->state == C_NORMAL; + vt102->state = S_NORMAL; return (error); }