shithub: zuke

Download patch

ref: 7c21b87fab8b98ef1d63fb6073ee745712dde039
parent: 74e64942e26b41965b6921d40d5174eeab41b048
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Dec 28 10:12:13 EST 2020

style

--- a/mkplist.c
+++ b/mkplist.c
@@ -20,7 +20,8 @@
 static int firstiscomposer;
 static int keepfirstartist;
 
-static char *fmts[] = {
+static char *fmts[] =
+{
 	[Fmp3] = "mp3",
 	[Fogg] = "ogg",
 	[Fflac] = "flac",
@@ -62,7 +63,7 @@
 			iscomposer = strcmp(k, "TCM") == 0 || strcmp(k, "TCOM") == 0;
 			/* prefer lead performer/soloist, helps when TP2/TPE2 is the first one and is set to "VA" */
 			/* always put composer first, if available */
-			if(iscomposer || (!keepfirstartist && (strcmp(k, "TP1") == 0 || strcmp(k, "TPE1") == 0))) {
+			if(iscomposer || (!keepfirstartist && (strcmp(k, "TP1") == 0 || strcmp(k, "TPE1") == 0))){
 				if(curr->numartist > 0)
 					curr->artist[curr->numartist] = curr->artist[curr->numartist-1];
 				curr->artist[0] = strdup(v);
--- a/theme.c
+++ b/theme.c
@@ -6,7 +6,8 @@
 #include <thread.h>
 #include "theme.h"
 
-ThemeColor colors[Numcolors] = {
+ThemeColor colors[Numcolors] =
+{
 	[Dback]  = {"background", 0xe2e2e2},
 	[Dfhigh] = {"f_high",     0xffffff},
 	[Dfmed]  = {"f_med",      0x343434},
@@ -93,7 +94,7 @@
 	char *s, *v[3];
 	int i, n;
 
-	if ((in = Bopen(filename, OREAD)) != nil) {
+	if((in = Bopen(filename, OREAD)) != nil){
 		if(display->locking && !init)
 			lockdisplay(display);
 		for(;;){
@@ -131,8 +132,8 @@
 	Plumbmsg *m;
 
 	threadsetname("theme/plumb");
-	if ((f = plumbopen(themeplumb, OREAD)) >= 0) {
-		while ((m = plumbrecv(f)) != nil) {
+	if((f = plumbopen(themeplumb, OREAD)) >= 0){
+		while((m = plumbrecv(f)) != nil){
 			loadtheme(m->data, 0);
 			themechanged();
 			plumbfree(m);
--- a/zuke.c
+++ b/zuke.c
@@ -65,19 +65,24 @@
 static Lock audiolock;
 static int audioerr = 0;
 static Biobuf out;
-static char *covers[] = {"art", "folder", "cover", "Cover", "scans/CD", "Scans/Front", "Covers/Front"};
+static char *covers[] =
+{
+	"art", "folder", "cover", "Cover", "scans/CD", "Scans/Front", "Covers/Front"
+};
 
 static int Scrollwidth;
 static int Scrollheight;
 static int Coversz;
 
-static char *menu3i[] = {
+static char *menu3i[] =
+{
 	"theme",
 	"exit",
 	nil
 };
 
-static Menu menu3 = {
+static Menu menu3 =
+{
 	.item = menu3i,
 };
 
@@ -415,7 +420,7 @@
 	if((pid = rfork(RFPROC|RFFDG|RFNOTEG|RFNOMNT|RFCENVG|RFNOWAIT)) == 0){
 		dup(fd, 0); close(fd);
 		dup(p[1], 1); close(p[1]);
-		if(!debug) {
+		if(!debug){
 			dup(fd = open("/dev/null", OWRITE), 2);
 			close(fd);
 		}
@@ -898,7 +903,7 @@
 	Binit(&b, f, OREAD);
 
 	l = r = 0;
-	for(; (s = Brdline(&b, '\n')) != nil;) {
+	for(; (s = Brdline(&b, '\n')) != nil;){
 		if(strncmp(s, "master", 6) == 0 && tokenize(s, a, 3) == 3){
 			l = ol = atoi(a[1]);
 			r = or = atoi(a[2]);
@@ -913,7 +918,7 @@
 							goto end;
 						if(atoi(a[1]) != ol && atoi(a[2]) != or)
 							goto end;
-						if (l < 0 || r < 0 || l > 100 || r > 100)
+						if(l < 0 || r < 0 || l > 100 || r > 100)
 							goto end;
 						break;
 					}