Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2014 14:16:10 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271465 - head/sys/dev/vt
Message-ID:  <201409121416.s8CEGA5r064898@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Fri Sep 12 14:16:10 2014
New Revision: 271465
URL: http://svnweb.freebsd.org/changeset/base/271465

Log:
  Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
  (forgetted in last commit)
  
  Reviewed by:	dumbbell (as D755)
  MFC after:	1 week

Modified:
  head/sys/dev/vt/vt.h

Modified: head/sys/dev/vt/vt.h
==============================================================================
--- head/sys/dev/vt/vt.h	Fri Sep 12 14:14:50 2014	(r271464)
+++ head/sys/dev/vt/vt.h	Fri Sep 12 14:16:10 2014	(r271465)
@@ -113,11 +113,17 @@ typedef unsigned int 	vt_axis_t;
 struct vt_mouse_cursor;
 #endif
 
+struct vt_pastebuf {
+	term_char_t		*vpb_buf;	/* Copy-paste buffer. */
+	unsigned int		 vpb_bufsz;	/* Buffer size. */
+	unsigned int		 vpb_len;	/* Length of a last selection. */
+};
+
 struct vt_device {
 	struct vt_window	*vd_windows[VT_MAXWINDOWS]; /* (c) Windows. */
 	struct vt_window	*vd_curwindow;	/* (d) Current window. */
 	struct vt_window	*vd_savedwindow;/* (?) Saved for suspend. */
-	struct vt_window	*vd_markedwin;	/* (?) Copy/paste buf owner. */
+	struct vt_pastebuf	 vd_pastebuf;	/* (?) Copy/paste buf. */
 	const struct vt_driver	*vd_driver;	/* (c) Graphics driver. */
 	void			*vd_softc;	/* (u) Driver data. */
 #ifndef SC_NO_CUTPASTE
@@ -151,6 +157,10 @@ struct vt_device {
 	unsigned int		 vd_unit;	/* (c) Device unit. */
 };
 
+#define	VD_PASTEBUF(vd)	((vd)->vd_pastebuf.vpb_buf)
+#define	VD_PASTEBUFSZ(vd)	((vd)->vd_pastebuf.vpb_bufsz)
+#define	VD_PASTEBUFLEN(vd)	((vd)->vd_pastebuf.vpb_len)
+
 /*
  * Per-window terminal screen buffer.
  *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409121416.s8CEGA5r064898>