shithub: riscv

Download patch

ref: 18046fd8153076782863f968db6fe1a1af0ddd2b
parent: 8c9d28f4f8ab0305689f9f1f95e137e2f20e375c
author: BurnZeZ <[email protected]>
date: Sat Mar 19 13:50:33 EDT 2016

rio: fix some spacing, slightly cleaner arg handling

--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -26,20 +26,20 @@
 void		hide(void);
 void		unhide(int);
 void		newtile(int);
-Image	*sweep(void);
-Image	*bandsize(Window*);
+Image*	sweep(void);
+Image*	bandsize(Window*);
 Image*	drag(Window*);
 void		resized(void);
 Channel	*exitchan;	/* chan(int) */
 Channel	*winclosechan; /* chan(Window*); */
-Channel *kbdchan;	/* chan(char*); */
+Channel	*kbdchan;	/* chan(char*); */
 Rectangle	viewr;
 int		threadrforkflag = 0;	/* should be RFENVG but that hides rio from plumber */
 
 void	mousethread(void*);
 void	keyboardthread(void*);
-void winclosethread(void*);
-void deletethread(void*);
+void	winclosethread(void*);
+void	deletethread(void*);
 void	initcmd(void*);
 Channel* initkbd(void);
 
@@ -138,20 +138,17 @@
 		reverse = ~0xFF;
 		break;
 	case 'f':
-		fontname = ARGF();
-		if(fontname == nil)
+		fontname = EARGF(usage());
 			usage();
 		break;
 	case 'i':
-		initstr = ARGF();
-		if(initstr == nil)
+		initstr = EARGF(usage());
 			usage();
 		break;
 	case 'k':
 		if(kbdin != nil)
 			usage();
-		kbdin = ARGF();
-		if(kbdin == nil)
+		kbdin = EARGF(usage());
 			usage();
 		break;
 	case 's':