about summary refs log tree commit diff
path: root/mshow.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-08-31 17:30:17 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-08-31 17:30:17 +0200
commit66d0eff12fdf31e520493e7c2accb95410dcaec2 (patch)
treef67b59076967ec441daaf7e7c40c1d502a9136bd /mshow.c
parentdfe09a7c5e3a2273f963d53432ef1686b34547db (diff)
downloadmblaze-66d0eff12fdf31e520493e7c2accb95410dcaec2.tar.gz
mblaze-66d0eff12fdf31e520493e7c2accb95410dcaec2.tar.xz
mblaze-66d0eff12fdf31e520493e7c2accb95410dcaec2.zip
style
Diffstat (limited to 'mshow.c')
-rw-r--r--mshow.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/mshow.c b/mshow.c
index c431108..d71fe44 100644
--- a/mshow.c
+++ b/mshow.c
@@ -96,7 +96,7 @@ print_u8recode(char *body, size_t bodylen, char *srcenc)
 			final_char = bufptr[-1];
 		}
 
-		if (r != (size_t)-1) {	// done, flush iconv
+		if (r != (size_t)-1) {  // done, flush iconv
 			bufptr = buf;
 			buflen = sizeof buf;
 			r = iconv(ic, 0, 0, &bufptr, &buflen);
@@ -338,7 +338,7 @@ choose_alternative(struct message *msg, int depth)
 blaze822_mime_action
 reply_mime(int depth, struct message *msg, char *body, size_t bodylen)
 {
-	(void) depth;
+	(void)depth;
 
 	char *ct = blaze822_hdr(msg, "content-type");
 	char *mt = mimetype(ct);
@@ -367,7 +367,7 @@ reply_mime(int depth, struct message *msg, char *body, size_t bodylen)
 blaze822_mime_action
 list_mime(int depth, struct message *msg, char *body, size_t bodylen)
 {
-	(void) body;
+	(void)body;
 
 	char *ct = blaze822_hdr(msg, "content-type");
 	if (!ct)
@@ -443,7 +443,7 @@ writefile(char *name, char *buf, ssize_t len)
 blaze822_mime_action
 extract_mime(int depth, struct message *msg, char *body, size_t bodylen)
 {
-	(void) depth;
+	(void)depth;
 
 	char *filename = mime_filename(msg);
 
@@ -499,7 +499,7 @@ extract_mime(int depth, struct message *msg, char *body, size_t bodylen)
 					writefile(bufptr, body, bodylen);
 				}
 			} else if (filename &&
-				   fnmatch(a, filename, FNM_PATHNAME) == 0) {
+			    fnmatch(a, filename, FNM_PATHNAME) == 0) {
 				// extract by name
 				if (extract_stdout) {
 					if (rflag) {
@@ -558,7 +558,7 @@ print_date_header(char *v)
 
 	printf("Date: ");
 	print_ascii(v, strlen(v));
-	
+
 	time_t t = blaze822_date(v);
 	if (t == -1) {
 		printf(" (invalid)");
@@ -574,57 +574,57 @@ print_date_header(char *v)
 		else if (d > 60) l = 'm';
 		else l = 's';
 		int p = 3;
-		
+
 		int z;
-		switch(l) {
+		switch (l) {
 		case 'y':
 			z = d / (60*60*24*7*52);
 			d = d % (60*60*24*7*52);
 			if (z > 0) {
-				printf("%d year%s", z, z>1 ? "s" : "");
+				printf("%d year%s", z, z > 1 ? "s" : "");
 				if (!--p) break;
 				printf(", ");
 			}
-			/* FALL THROUGH */
+		/* FALL THROUGH */
 		case 'w':
 			z = d / (60*60*24*7);
 			d = d % (60*60*24*7);
 			if (z > 0) {
-				printf("%d week%s", z, z>1 ? "s" : "");
+				printf("%d week%s", z, z > 1 ? "s" : "");
 				if (!--p) break;
 				printf(", ");
 			}
-			/* FALL THROUGH */
+		/* FALL THROUGH */
 		case 'd':
 			z = d / (60*60*24);
 			d = d % (60*60*24);
 			if (z > 0) {
-				printf("%d day%s", z, z>1 ? "s" : "");
+				printf("%d day%s", z, z > 1 ? "s" : "");
 				if (!--p) break;
 				printf(", ");
 			}
-			/* FALL THROUGH */
+		/* FALL THROUGH */
 		case 'h':
 			z = d / (60*60);
 			d = d % (60*60);
 			if (z > 0) {
-				printf("%d hour%s", z, z>1 ? "s" : "");
+				printf("%d hour%s", z, z > 1 ? "s" : "");
 				if (!--p) break;
 				printf(", ");
 			}
-			/* FALL THROUGH */
+		/* FALL THROUGH */
 		case 'm':
 			z = d / (60);
 			d = d % (60);
 			if (z > 0) {
-				printf("%d minute%s", z, z>1 ? "s" : "");
+				printf("%d minute%s", z, z > 1 ? "s" : "");
 				if (!--p) break;
 				printf(", ");
 			}
-			/* FALL THROUGH */
+		/* FALL THROUGH */
 		case 's':
 			z = d;
-			printf("%d second%s", z, z>1 ? "s" : "");
+			printf("%d second%s", z, z > 1 ? "s" : "");
 		}
 
 		if (t < now)
@@ -728,7 +728,7 @@ main(int argc, char *argv[])
 
 	int c;
 	while ((c = getopt(argc, argv, "h:A:qrtHLNx:O:Rn")) != -1)
-		switch(c) {
+		switch (c) {
 		case 'h': hflag = optarg; break;
 		case 'A': Aflag = optarg; break;
 		case 'q': qflag = 1; break;