summaryrefslogtreecommitdiff
path: root/sys/dev/wscons
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-03-06 09:08:46 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-03-06 09:08:46 +0000
commitfb9eed9df4c585fcd983d706c08dc8838d50e2f6 (patch)
tree40d43a11d7154ece659e13ed709d7a809cfc17fe /sys/dev/wscons
parent9a35a12d5659090b9013cca0d8a856a88aea63a1 (diff)
Use 'inline' rather than _any of_ __the __other__ variants__.
ok bru@
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r--sys/dev/wscons/wsemulvar.h12
-rw-r--r--sys/dev/wscons/wsmouse.c10
-rw-r--r--sys/dev/wscons/wstpad.c24
3 files changed, 23 insertions, 23 deletions
diff --git a/sys/dev/wscons/wsemulvar.h b/sys/dev/wscons/wsemulvar.h
index 5d70a02ff9c..3d10583ebca 100644
--- a/sys/dev/wscons/wsemulvar.h
+++ b/sys/dev/wscons/wsemulvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsemulvar.h,v 1.15 2013/10/18 22:06:41 miod Exp $ */
+/* $OpenBSD: wsemulvar.h,v 1.16 2017/03/06 09:08:45 mpi Exp $ */
/* $NetBSD: wsemulvar.h,v 1.6 1999/01/17 15:46:15 drochner Exp $ */
/*
@@ -147,7 +147,7 @@ struct wsemul_abortstate {
/* start character processing, assuming cursor or jump scroll failure condition
has been taken care of */
-static __inline__ void
+static inline void
wsemul_resume_abort(struct wsemul_abortstate *was)
{
was->state = ABORT_OK;
@@ -155,13 +155,13 @@ wsemul_resume_abort(struct wsemul_abortstate *was)
}
/* register processing failure points */
-static __inline__ void
+static inline void
wsemul_abort_cursor(struct wsemul_abortstate *was)
{
was->state = ABORT_FAILED_CURSOR;
}
-static __inline__ void
+static inline void
wsemul_abort_jump_scroll(struct wsemul_abortstate *was, int lines)
{
was->state = ABORT_FAILED_JUMP_SCROLL;
@@ -169,7 +169,7 @@ wsemul_abort_jump_scroll(struct wsemul_abortstate *was, int lines)
was->lines = lines;
}
-static __inline__ void
+static inline void
wsemul_abort_other(struct wsemul_abortstate *was)
{
was->state = ABORT_FAILED_OTHER;
@@ -177,7 +177,7 @@ wsemul_abort_other(struct wsemul_abortstate *was)
}
/* initialize abortstate structure */
-static __inline__ void
+static inline void
wsemul_reset_abortstate(struct wsemul_abortstate *was)
{
was->state = ABORT_OK;
diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c
index dd401d9b741..3be0583142a 100644
--- a/sys/dev/wscons/wsmouse.c
+++ b/sys/dev/wscons/wsmouse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsmouse.c,v 1.36 2017/02/27 15:59:56 bru Exp $ */
+/* $OpenBSD: wsmouse.c,v 1.37 2017/03/06 09:08:45 mpi Exp $ */
/* $NetBSD: wsmouse.c,v 1.35 2005/02/27 00:27:52 perry Exp $ */
/*
@@ -673,7 +673,7 @@ wsmouse_position(struct device *sc, int x, int y)
}
}
-static __inline int
+static inline int
normalized_pressure(struct wsmouseinput *input, int pressure)
{
int limit = imax(input->touch.min_pressure, 1);
@@ -967,7 +967,7 @@ wsmouse_btn_sync(struct btn_state *btn, struct evq_access *evq)
/*
* Scale with a [*.12] fixed-point factor and a remainder:
*/
-static __inline int
+static inline int
scale(int val, int factor, int *rmdr)
{
val = val * factor + *rmdr;
@@ -1034,7 +1034,7 @@ wsmouse_touch_sync(struct wsmouseinput *input, struct evq_access *evq)
wsmouse_evq_put(evq, WSCONS_EVENT_TOUCH_WIDTH, touch->width);
}
-static __inline void
+static inline void
clear_sync_flags(struct wsmouseinput *input)
{
int i;
@@ -1284,7 +1284,7 @@ wsmouse_mtframe(struct device *sc, struct mtpoint *pt, int size)
}
}
-static __inline void
+static inline void
free_mt_slots(struct wsmouseinput *input)
{
int n, size;
diff --git a/sys/dev/wscons/wstpad.c b/sys/dev/wscons/wstpad.c
index 9b5d1ae7bd6..0bed5530b5d 100644
--- a/sys/dev/wscons/wstpad.c
+++ b/sys/dev/wscons/wstpad.c
@@ -207,13 +207,13 @@ static const size_t cfg_tp[] = {
* Coordinates in the wstpad struct are "normalized" device coordinates,
* the orientation is left-to-right and upward.
*/
-static __inline int
+static inline int
normalize_abs(struct axis_filter *filter, int val)
{
return (filter->inv ? filter->inv - val : val);
}
-static __inline int
+static inline int
normalize_rel(struct axis_filter *filter, int val)
{
return (filter->inv ? -val : val);
@@ -246,7 +246,7 @@ normalize_rel(struct axis_filter *filter, int val)
#define EAST(d) ((d) == 2 || (d) == 3)
#define WEST(d) ((d) == 8 || (d) == 9)
-static __inline int
+static inline int
direction(int dx, int dy, int ratio)
{
int rdy, dir = -1;
@@ -267,7 +267,7 @@ direction(int dx, int dy, int ratio)
return dir;
}
-static __inline int
+static inline int
dircmp(int dir1, int dir2)
{
int diff = abs(dir1 - dir2);
@@ -297,7 +297,7 @@ wstpad_set_direction(struct tpad_touch *t, int dx, int dy, int ratio)
* scrolling, or palm detection, pointer motion will be suppressed as long
* as it stays in that area.
*/
-static __inline u_int
+static inline u_int
edge_flags(struct wstpad *tp, int x, int y)
{
u_int flags = 0;
@@ -314,7 +314,7 @@ edge_flags(struct wstpad *tp, int x, int y)
return (flags);
}
-static __inline struct tpad_touch *
+static inline struct tpad_touch *
get_2nd_touch(struct wsmouseinput *input)
{
struct wstpad *tp = input->tp;
@@ -329,7 +329,7 @@ get_2nd_touch(struct wsmouseinput *input)
}
/* Suppress pointer motion for a short period of time. */
-static __inline void
+static inline void
set_freeze_ts(struct wstpad *tp, int sec, int ms)
{
tp->freeze_ts.tv_sec = sec;
@@ -339,7 +339,7 @@ set_freeze_ts(struct wstpad *tp, int sec, int ms)
/* Return TRUE if f2-/edge-scrolling would be valid. */
-static __inline int
+static inline int
chk_scroll_state(struct wstpad *tp)
{
if (tp->contacts != tp->prev_contacts || tp->btns || tp->btns_sync) {
@@ -433,7 +433,7 @@ wstpad_edgescroll(struct wsmouseinput *input, u_int *cmds)
wstpad_scroll(tp, dx, dy, cmds);
}
-static __inline u_int
+static inline u_int
sbtn(struct wstpad *tp, int x, int y)
{
if (y >= tp->edge.bottom)
@@ -445,7 +445,7 @@ sbtn(struct wstpad *tp, int x, int y)
return ((x < tp->edge.center ? LEFTBTN : RIGHTBTN) ^ tp->sbtnswap);
}
-static __inline u_int
+static inline u_int
top_sbtn(struct wstpad *tp, int x, int y)
{
if (y < tp->edge.top)
@@ -564,7 +564,7 @@ wstpad_cmds(struct wsmouseinput *input, struct evq_access *evq, u_int cmds)
* Set the state of touches that have ended. TOUCH_END is a transitional
* state and will be changed to TOUCH_NONE before process_input() returns.
*/
-static __inline void
+static inline void
clear_touchstates(struct wsmouseinput *input, enum touchstates state)
{
u_int touches;
@@ -933,7 +933,7 @@ wstpad_init(struct wsmouseinput *input)
*
* Cf. also Martin Guy's "Square root by abacus" method.
*/
-static __inline u_int
+static inline u_int
isqrt(u_int n)
{
u_int root, sqbit;