From owner-svn-src-all@FreeBSD.ORG Thu Aug 21 19:42:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C218557; Thu, 21 Aug 2014 19:42:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 370F03ECC; Thu, 21 Aug 2014 19:42:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7LJgP4e049142; Thu, 21 Aug 2014 19:42:25 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7LJgO2p049137; Thu, 21 Aug 2014 19:42:24 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408211942.s7LJgO2p049137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 21 Aug 2014 19:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270293 - in head/sys/dev/vt: . font X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2014 19:42:25 -0000 Author: dumbbell Date: Thu Aug 21 19:42:24 2014 New Revision: 270293 URL: http://svnweb.freebsd.org/changeset/base/270293 Log: vt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor" At the same time, "w" and "h" members are now called "width" and "height". The goal is to have a more "public" structure, because it will soon be passed as argument to a new callback, replacing vd_bitbltchr_t. MFC after: 1 week Modified: head/sys/dev/vt/font/vt_mouse_cursor.c head/sys/dev/vt/vt.h head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 19:42:03 2014 (r270292) +++ head/sys/dev/vt/font/vt_mouse_cursor.c Thu Aug 21 19:42:24 2014 (r270293) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef SC_NO_CUTPASTE -struct mouse_cursor vt_default_mouse_pointer = { +struct vt_mouse_cursor vt_default_mouse_pointer = { .map = { 0x00, /* "__ " */ 0x40, /* "_*_ " */ @@ -64,7 +64,7 @@ struct mouse_cursor vt_default_mouse_poi 0x0f, /* " ____" */ 0x0f, /* " ____" */ }, - .w = 8, - .h = 13, + .width = 8, + .height = 13, }; #endif Modified: head/sys/dev/vt/vt.h ============================================================================== --- head/sys/dev/vt/vt.h Thu Aug 21 19:42:03 2014 (r270292) +++ head/sys/dev/vt/vt.h Thu Aug 21 19:42:24 2014 (r270293) @@ -284,6 +284,15 @@ struct vt_window { * (VDF_TEXTMODE). */ +#ifndef SC_NO_CUTPASTE +struct vt_mouse_cursor { + uint8_t map[64 * 64 / 8]; + uint8_t mask[64 * 64 / 8]; + uint8_t width; + uint8_t height; +}; +#endif + typedef int vd_init_t(struct vt_device *vd); typedef int vd_probe_t(struct vt_device *vd); typedef void vd_postswitch_t(struct vt_device *vd); @@ -377,15 +386,6 @@ struct vt_font { unsigned int vf_refcount; }; -#ifndef SC_NO_CUTPASTE -struct mouse_cursor { - uint8_t map[64 * 64 / 8]; - uint8_t mask[64 * 64 / 8]; - uint8_t w; - uint8_t h; -}; -#endif - const uint8_t *vtfont_lookup(const struct vt_font *vf, term_char_t c); struct vt_font *vtfont_ref(struct vt_font *vf); void vtfont_unref(struct vt_font *vf); Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Aug 21 19:42:03 2014 (r270292) +++ head/sys/dev/vt/vt_core.c Thu Aug 21 19:42:24 2014 (r270293) @@ -134,7 +134,7 @@ extern unsigned char vt_logo_image[]; /* Font. */ extern struct vt_font vt_font_default; #ifndef SC_NO_CUTPASTE -extern struct mouse_cursor vt_default_mouse_pointer; +extern struct vt_mouse_cursor vt_default_mouse_pointer; #endif static int signal_vt_rel(struct vt_window *); @@ -853,7 +853,7 @@ vt_flush(struct vt_device *vd) term_pos_t size; term_char_t *r; #ifndef SC_NO_CUTPASTE - struct mouse_cursor *cursor; + struct vt_mouse_cursor *cursor; int bpl, h, w; #endif @@ -940,13 +940,15 @@ vt_flush(struct vt_device *vd) #ifndef SC_NO_CUTPASTE if (cursor != NULL) { - bpl = (cursor->w + 7) >> 3; /* Bytes per source line. */ - w = cursor->w; - h = cursor->h; + bpl = (cursor->width + 7) >> 3; /* Bytes per source line. */ + w = cursor->width; + h = cursor->height; - if ((vd->vd_mx + cursor->w) > (size.tp_col * vf->vf_width)) + if ((vd->vd_mx + cursor->width) > + (size.tp_col * vf->vf_width)) w = (size.tp_col * vf->vf_width) - vd->vd_mx - 1; - if ((vd->vd_my + cursor->h) > (size.tp_row * vf->vf_height)) + if ((vd->vd_my + cursor->height) > + (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; vd->vd_driver->vd_bitbltchr(vd, cursor->map, cursor->mask, bpl,