rpms/aumix/FC-6 aumix-fix-crackrock.patch, 1.1, 1.2 aumix.spec, 1.2, 1.3

Gabriel L. Somlo (somlo) fedora-extras-commits at redhat.com
Fri Dec 15 19:18:35 UTC 2006


Author: somlo

Update of /cvs/extras/rpms/aumix/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20757/FC-6

Modified Files:
	aumix-fix-crackrock.patch aumix.spec 
Log Message:
reworked crackrock patch to eliminate regression bug (bugzilla #219736)


aumix-fix-crackrock.patch:

Index: aumix-fix-crackrock.patch
===================================================================
RCS file: /cvs/extras/rpms/aumix/FC-6/aumix-fix-crackrock.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- aumix-fix-crackrock.patch	13 Nov 2006 14:46:33 -0000	1.1
+++ aumix-fix-crackrock.patch	15 Dec 2006 19:18:05 -0000	1.2
@@ -1,6 +1,9 @@
---- src/common.c.fix-crackrock	Thu Dec 23 12:48:25 2004
-+++ src/common.c	Thu Dec 23 12:51:59 2004
-@@ -19,6 +19,7 @@
+diff -NarU5 aumix-2.8.orig/src/common.c aumix-2.8/src/common.c
+--- aumix-2.8.orig/src/common.c	2006-12-15 12:47:06.000000000 -0500
++++ aumix-2.8/src/common.c	2006-12-15 14:17:06.000000000 -0500
+@@ -17,10 +17,11 @@
+  * You should have received a copy of the GNU General Public License along with
+  * aumix; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
   * Suite 330, Boston, MA 02111-1307, USA.
   */
  
@@ -8,7 +11,11 @@
  #include "common.h"
  #ifdef HAVE_CURSES
  #include "curses.h"
-@@ -612,17 +612,16 @@
+ #include "gpm-xterm.h"
+ #endif				/* HAVE_CURSES */
+@@ -621,32 +622,33 @@
+ }
+ 
  int             SetShowNoninter(int dev)
  {
  /* Change or display settings from the command line. */
@@ -16,7 +23,8 @@
 +	char           *devstr;
  	int             change = 0, tmp, left, right;
  	/* Increase or decrease levels, optionally by a number. */
- 	if (!strncmp(optarg, "+", 1) || !strncmp(optarg, "-", 1)) {
+-	if (!strncmp(optarg, "+", 1) || !strncmp(optarg, "-", 1)) {
++	if ((*optarg == '+') || (*optarg == '-')) {
  		ErrorExitWarn(ReadLevel(dev, &tmp), 'e');
  		right = tmp >> 8;	/* I'll take the high byte, */
  		left = tmp & 0xFF;	/* and you take the low byte. */
@@ -24,9 +32,34 @@
 -		change = 1;	/* For compatibility with versions 1.15 to 1.17, assume one if no number was given. */
 -		if (atoi(&dest))
 -			change = atoi(&dest);
+-		if (*optarg == '+') {	/* increase */
+-			right += change;
+-			left += change;
+-			right = (right > MAXLEVEL) ? MAXLEVEL : right;
+-			left = (left > MAXLEVEL) ? MAXLEVEL : left;
+-		} else {	/* decrease */
+-			left -= change;
+-			right -= change;
+-			left = (left < 0) ? 0 : left;
+-			right = (right < 0) ? 0 : right;
++
 +		change = (int) strtol(optarg, NULL, 10);
-+		if (errno)
-+			change = 1;	/* For compatibility with versions 1.15 to 1.17, assume one if no number was given. */
- 		if (*optarg == '+') {	/* increase */
- 			right += change;
- 			left += change;
++		if (change == 0 && *(optarg + 1) != '0') {
++			/* For compat. w. 1.15 - 1.17:
++			   assume 1 unless 0 given explicitly */
++			change = (*optarg == '+') ? 1 : -1;
+ 		}
++
++		right += change;
++		left += change;
++
++		if (right < 0) right = 0;
++		if (left < 0) left = 0;
++		if (right > MAXLEVEL) right = MAXLEVEL;
++		if (left > MAXLEVEL) left = MAXLEVEL;
++
+ 		tmp = left + (right << 8);
+ 		ErrorExitWarn(WriteLevel(dev, tmp), 'e');	/* Try to write new settings to the mixer. */
+ 		return 0;
+ 	}
+ 	if ((*optarg == 'R') || (*optarg == 'P')) {


Index: aumix.spec
===================================================================
RCS file: /cvs/extras/rpms/aumix/FC-6/aumix.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- aumix.spec	16 Nov 2006 20:17:33 -0000	1.2
+++ aumix.spec	15 Dec 2006 19:18:05 -0000	1.3
@@ -1,6 +1,6 @@
 Name: aumix
 Version: 2.8
-Release: 10%{?dist}
+Release: 11%{?dist}
 Summary: Audio mixer based on ncurses
 License: GPL
 Group: Applications/Multimedia
@@ -22,7 +22,7 @@
 %patch0 -p1
 %patch1 -p0
 %patch2 -p0
-%patch3 -p0
+%patch3 -p1
 %patch4 -p0
 
 %build
@@ -48,6 +48,9 @@
 %{_datadir}/aumix
 
 %changelog
+* Fri Dec 15 2006 Gabriel L. Somlo <somlo at cmu.edu> 2.8-11
+- reworked crackrock patch to eliminate regression bug (bugzilla #219736)
+
 * Thu Nov 16 2006 Gabriel L. Somlo <somlo at cmu.edu> 2.8-10
 - bumped rel. to 10, to stop buildsys complaining about conflicts w. old FC3 package
 




More information about the scm-commits mailing list