svn commit: r271465 - head/sys/dev/vt

Aleksandr Rybalko ray at FreeBSD.org
Fri Sep 12 14:16:10 UTC 2014


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.
  *


More information about the svn-src-all mailing list