Commit:d1bd6137093c00f14bf93ed0fa60434578f17876 (browse)
Parent:2add3945e0628832881898b6a3d41d2470b6ff24
Author:kvik <kvik@a-b.xyz>
Date:Sat Apr 25 13:42:36 CES 2020
Message:
Remove pointless getmouse() wrapper

samterm/io.c => samterm/io.c
@@ -48,13 +48,6 @@
 }
 
 void
-getmouse(void)
-{
-	if(readmouse(mousectl) < 0)
-		panic("mouse");
-}
-
-void
 mouseunblock(void)
 {
 	got &= ~(1<<RMouse);
@@ -69,7 +62,8 @@
 int
 button(int but)
 {
-	getmouse();
+	if(readmouse(mousectl) < 0)
+		panic("mouse");
 	return mousep->buttons&(1<<(but-1));
 }
 

samterm/samterm.h => samterm/samterm.h
@@ -100,7 +100,6 @@
 void	outcmd(void);
 void	rinit(Rasp*);
 void	startnewfile(int, Text*);
-void	getmouse(void);
 void	mouseunblock(void);
 void	kbdblock(void);
 void	extstart(void);
@@ -161,7 +160,6 @@
 void	flushtyping(int);
 void	dumperrmsg(int, int, int, int);
 int	screensize(int*,int*);
-void	getmouse(void);
 Rectangle inflatepoint(Point);
 Rectangle	defaultrect(void);
 int	promptrect(Rectangle*);