From f78977bda68606d792b8ef4e08f48d1b2fc438a7 Mon Sep 17 00:00:00 2001 From: dillo Date: Thu, 31 Oct 2002 12:14:39 +0000 Subject: remove patches no longer needed after last update --- games/frotz/patches/patch-ab | 20 --------- games/frotz/patches/patch-ac | 99 -------------------------------------------- games/frotz/patches/patch-ad | 11 ----- 3 files changed, 130 deletions(-) delete mode 100644 games/frotz/patches/patch-ab delete mode 100644 games/frotz/patches/patch-ac delete mode 100644 games/frotz/patches/patch-ad (limited to 'games/frotz') diff --git a/games/frotz/patches/patch-ab b/games/frotz/patches/patch-ab deleted file mode 100644 index ad4ff6ea9e5..00000000000 --- a/games/frotz/patches/patch-ab +++ /dev/null @@ -1,20 +0,0 @@ -$NetBSD: patch-ab,v 1.1 2002/03/25 18:23:37 wiz Exp $ - ---- ux_input.c.orig Wed Feb 20 00:15:36 2002 -+++ ux_input.c -@@ -146,6 +146,7 @@ - return ZC_TIME_OUT; - else - continue; -+#if 0 - case 0: - /* Zero is the character code returned by curses when the - user types Ctrl-@ (or Ctrl-Space). It is also -@@ -153,6 +154,7 @@ - must not return a bogus timeout to the program. - */ - continue; -+#endif - - /* Screen decluttering. */ - case MOD_CTRL ^ 'L': case MOD_CTRL ^ 'R': diff --git a/games/frotz/patches/patch-ac b/games/frotz/patches/patch-ac deleted file mode 100644 index f7308fbe261..00000000000 --- a/games/frotz/patches/patch-ac +++ /dev/null @@ -1,99 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2002/06/29 01:48:53 kristerw Exp $ ---- ux_audio_oss.c.orig Wed Nov 22 07:31:17 2000 -+++ ux_audio_oss.c Sat Jun 29 03:25:37 2002 -@@ -86,12 +86,37 @@ - - static void play_sound(int volume, int repeats) { - struct sigaction sa; -+ int format = AFMT_U8; -+ int channels = 1; - -- dsp_fd = open("/dev/dsp", O_WRONLY); -+ dsp_fd = open(SOUND_DEV, O_WRONLY); - if (dsp_fd < 0) { -- perror("/dev/dsp"); -+ perror(SOUND_DEV); - _exit(1); - } -+ -+ /* This section of code fixes the nasty problem of samples -+ * being played with pops and scratches when used with a -+ * non-Linux system implementing OSS sound. -+ */ -+ if (ioctl(dsp_fd, SNDCTL_DSP_SETFMT, &format) == -1) { -+ perror(SOUND_DEV); -+ exit(1); -+ } -+ if (format != AFMT_U8) { -+ fprintf(stderr, "bad sound format\n"); -+ exit(1); -+ } -+ if (ioctl(dsp_fd, SNDCTL_DSP_CHANNELS, &channels) == -1) { -+ perror(SOUND_DEV); -+ exit(1); -+ } -+ if (channels != 1) { -+ fprintf(stderr, "bad channels\n"); -+ exit(1); -+ } -+ /* End sound fix from Torbjorn Andersson */ -+ - ioctl(dsp_fd, SNDCTL_DSP_SPEED, &sample_rate); - - if (volume != 255) { -@@ -177,6 +202,7 @@ - char *filename; - const char *basename, *dotpos; - int namelen; -+ int read_length; - - if (sound_buffer != NULL && current_num == number) - return; -@@ -211,27 +237,38 @@ - fgetc(samples); fgetc(samples); - sound_length = fgetc(samples) << 8; - sound_length |= fgetc(samples); -+ sound_buffer = NULL; - -+ if (sound_length > 0) { - sound_buffer = malloc(sound_length); -- if (! sound_buffer) { -+ if (!sound_buffer) { - perror("malloc"); - return; - } -- -- if (sound_length < 0 || -- fread(sound_buffer, 1, sound_length, samples) < sound_length) { -- if (feof(samples)) -- fprintf(stderr, "%s: premature EOF\n", filename); -- else { -+ read_length = fread(sound_buffer, 1, sound_length, samples); -+ if (read_length < sound_length) { -+ if (feof(samples)) { -+ /* -+ * One of the Sherlock samples trigger this for me, so let's make it -+ * a non-fatal error. -+ */ -+ sound_buffer = realloc(sound_buffer, read_length); -+ if (! sound_buffer) { -+ perror("realloc"); -+ return; -+ } -+ sound_length = read_length; -+ } else { - errno = ferror(samples); - perror(filename); -- } - free(sound_buffer); - sound_buffer = NULL; - } -- -+ } -+ } - current_num = number; - }/* os_prepare_sample */ -+ - - static void sigchld_handler(int signal) { - int status; diff --git a/games/frotz/patches/patch-ad b/games/frotz/patches/patch-ad deleted file mode 100644 index b4c4bbddd40..00000000000 --- a/games/frotz/patches/patch-ad +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2002/06/29 01:48:53 kristerw Exp $ ---- ux_init.c.orig Wed Feb 20 05:26:21 2002 -+++ ux_init.c Sat Jun 29 03:25:37 2002 -@@ -51,6 +51,7 @@ - #define INFORMATION "\ - - An interpreter for all Infocom and other Z-Machine games.\n\ - Complies with standard 1.0 of Graham Nelson's specification.\n\ -+Special NetBSD version. Patched so that sound works with the OSS driver.\n\ - \n\ - Syntax: frotz [options] story-file\n\ - \n\ -- cgit v1.2.3