shithub: patch

Download patch

ref: 77536ac40b44c210f01141a3722104550a937cbe
parent: e08f7ebb67ac129e475e57f95e69617eb523846f
author: qwx <qwx@sciops.net>
date: Fri Jan 31 17:40:00 EST 2025

remove merged patches

--- a/npe-sdl-mixer
+++ /dev/null
@@ -1,82 +1,0 @@
-diff 85aac117f40895565f61eb703055a29df3c7539f uncommitted
---- a/libnpe_sdl2/mixer.c
-+++ b/libnpe_sdl2/mixer.c
-@@ -2,14 +2,8 @@
- 
- #include <SDL2/SDL_mixer.h>
- 
--int audiofd = -1;
--int musicpipe[2] = {-1, -1};
--
- static int forkerpid = -1;
--static int audiopid = -1;
- 
--void musicproc(void *);
--
- static int musicvol = 128;
- static int musicpaused = 0;
- 
-@@ -124,9 +118,6 @@
- void
- Mix_CloseAudio(void)
- {
--	if(audiopid > 0)
--		postnote(PNPROC, audiopid, "quit");
--	audiopid = -1;
- }
- 
- int
-@@ -142,11 +133,6 @@
- 		sysfatal("exec: %r\n");
- 	}
- 	waitpid();
--	pipe(musicpipe);
--	if(fork() == 0){
--		musicproc(nil);
--		sysfatal("exec musicproc: %r");
--	}
- 	return flags;
- }
- 
-@@ -209,12 +195,10 @@
- 
- 	n = loops;
- 	while(loops == -1 || n-- > 0){
--		switch(rfork(RFPROC|RFFDG)){
-+		switch(rfork(RFPROC|RFCFDG)){
- 		case 0:
--			dup(musicpipe[1], 1);
--			close(musicpipe[1]);
--			close(musicpipe[0]);
--			execl("/bin/games/midi", "midi", "-c", music->loc, nil);
-+			close(2);
-+			execl("/bin/play", "play", music->loc, nil);
- 			sysfatal("exec: %r");
- 			break;
- 		default:
-@@ -261,25 +245,4 @@
- 	if(freesrc)
- 		SDL_RWclose(src);
- 	return m;
--}
--
--void
--musicproc(void *)
--{
--	int fd;
--	static char buf[8192];
--	int n;
--
--	fd = open("/dev/audio", OWRITE);
--	if(fd < 0)
--		sysfatal("musicproc: %r");
--
--	close(musicpipe[1]);
--	threadsetname("musicproc");
--	for(;;){
--		n = read(musicpipe[0], buf, sizeof buf);
--		if(n < 0)
--			threadexits(nil);
--		write(fd, buf, n);
--	}
- }
--- a/patch-multi
+++ /dev/null
@@ -1,33 +1,0 @@
-diff d5938c597328adb8abb8785b4ac820ca0f094b6b uncommitted
---- a/sys/src/cmd/patch.c
-+++ b/sys/src/cmd/patch.c
-@@ -503,6 +503,8 @@
- 		free(c->new);
- 	}
- 	free(changed);
-+	changed = nil;
-+	nchanged = 0;
- }
- 
- void
-@@ -723,8 +725,9 @@
- 		}
- 		freepatch(p);
- 		Bterm(f);
-+		finish(ok);
- 	}else{
--		for(i = 0; i < argc; i++){
-+		for(i = 0; ok && i < argc; i++){
- 			if((f = Bopen(argv[i], OREAD)) == nil)
- 				sysfatal("open %s: %r", argv[i]);
- 			if((p = parse(f, argv[i])) == nil)
-@@ -735,8 +738,8 @@
- 			}
- 			freepatch(p);
- 			Bterm(f);
-+			finish(ok);
- 		}
- 	}
--	finish(ok);
- 	exits(nil);
- }
--- a/spit-nodraw
+++ /dev/null
@@ -1,75 +1,0 @@
-diff 0216663a6e9d723eadc6692c656dd98b2964493b uncommitted
---- a/a.h
-+++ b/a.h
-@@ -12,7 +12,7 @@
- 
- enum 
- {
--	Maxslides = 64,
-+	Maxslides = 128,
- 	Maxlines  = 16 
- };
- 
---- a/spit.c
-+++ b/spit.c
-@@ -15,6 +15,7 @@
- int			curslide;
- Image		*bol;
- Image		*bullet;
-+int			nodraw;
- 
- void
- ladd(Lines *l, char *s)
-@@ -273,6 +274,22 @@
- }
- 
- void
-+barf(void)
-+{
-+	int fd;
-+	char path[64];
-+	Image **i;
-+
-+	for(i=slides; i<slides+nslides+1; i++){
-+		snprint(path, sizeof path, "spit.%03zd.bit", i - slides);
-+		if((fd = create(path, OWRITE, 0644)) < 0)
-+			sysfatal("open: %r");
-+		writeimage(fd, *i, 0);
-+		close(fd);
-+	}
-+}
-+
-+void
- redraw(void)
- {
- 	draw(screen, screen->r, slides[curslide], nil, ZP);
-@@ -354,7 +371,7 @@
- void
- usage(void)
- {
--	fprint(2, "%s [-f font] [-F fixedfont] <filename>\n", argv0);
-+	fprint(2, "%s [-n] [-f font] [-F fixedfont] <filename>\n", argv0);
- 	exits("usage");
- }
- 
-@@ -381,6 +398,9 @@
- 	case 'F':
- 		fname = EARGF(usage());
- 		break;
-+	case 'n':
-+		nodraw = 1;
-+		break;
- 	default:
- 		usage();
- 	}ARGEND;
-@@ -408,6 +428,10 @@
- 	initstyle(tname, fname);
- 	initimages();
- 	render(f);
-+	if(nodraw){
-+		barf();
-+		threadexitsall(nil);
-+	}
- 	resize();
- 	for(;;){
- 		switch(alt(alts)){