Un-break vt(4) for {powerpc,powerpc64,sparc64} LINT kernel builds

The {powerpc,powerpc64,sparc64} LINT kernel builds fail with this error:

    sys/dev/vt/vt_buf.c:198: warning: 'vtbuf_htw' defined but not used

Move vtbuf_htw() inside the '#if SC_NO_CUTPASTE' block where it belongs, and
put it in the proper order.

This fixes the immedate issue w/ vt(4), but all three then fail on different
issues.

Reviewed by:	emaste


git-svn-id: svn+ssh://svn.freebsd.org/base/head@313777 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
rpokala 2017-02-15 17:33:03 +00:00
parent 5af6cfdaa4
commit 4331508487

View File

@ -55,10 +55,10 @@ static MALLOC_DEFINE(M_VTBUF, "vtbuf", "vt buffer");
} while (0)
#ifndef SC_NO_CUTPASTE
static int vtbuf_htw(const struct vt_buf *vb, int row);
static int vtbuf_wth(const struct vt_buf *vb, int row);
static int vtbuf_in_this_range(int begin, int test, int end, int sz);
#endif
static int vtbuf_htw(const struct vt_buf *vb, int row);
/*
* line4
@ -161,6 +161,21 @@ vthistory_getpos(const struct vt_buf *vb, unsigned int *offset)
}
#ifndef SC_NO_CUTPASTE /* Only mouse support use it now. */
/* Translate history row to current view row number. */
static int
vtbuf_htw(const struct vt_buf *vb, int row)
{
/*
* total 1000 rows.
* History offset roffset winrow
* 205 200 ((205 - 200 + 1000) % 1000) = 5
* 90 990 ((90 - 990 + 1000) % 1000) = 100
*/
return ((row - vb->vb_roffset + vb->vb_history_size) %
vb->vb_history_size);
}
/* Translate current view row number to history row. */
static int
vtbuf_wth(const struct vt_buf *vb, int row)
@ -192,21 +207,6 @@ vtbuf_in_this_range(int begin, int test, int end, int sz)
}
#endif
/* Translate history row to current view row number. */
static int
vtbuf_htw(const struct vt_buf *vb, int row)
{
/*
* total 1000 rows.
* History offset roffset winrow
* 205 200 ((205 - 200 + 1000) % 1000) = 5
* 90 990 ((90 - 990 + 1000) % 1000) = 100
*/
return ((row - vb->vb_roffset + vb->vb_history_size) %
vb->vb_history_size);
}
int
vtbuf_iscursor(const struct vt_buf *vb, int row, int col)
{