View | Details | Raw Unified | Return to bug 64715
Collapse All | Expand All

(-)/usr/ports/audio/mpc/Makefile (-1 / +1 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	mpc
8
PORTNAME=	mpc
9
PORTVERSION=	0.10.0
9
PORTVERSION=	0.10.2
10
CATEGORIES=	audio ipv6
10
CATEGORIES=	audio ipv6
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=	musicpd
12
MASTER_SITE_SUBDIR=	musicpd
(-)/usr/ports/audio/mpc/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
MD5 (mpc-0.10.0.tar.gz) = 59e9d1af5644140857132e6b9ebad57e
1
MD5 (mpc-0.10.2.tar.gz) = 3ca8b537d164897a376fd1abcd5514d1
2
SIZE (mpc-0.10.0.tar.gz) = 212562
2
SIZE (mpc-0.10.2.tar.gz) = 209538
(-)/usr/ports/audio/mpc/files/patch-src-command.c (-64 lines)
Lines 1-64 Link Here
1
--- src/command.c	Wed Mar  3 19:05:02 2004
2
+++ src/command.c	Wed Mar  3 19:05:47 2004
3
@@ -243,16 +243,23 @@
4
 int cmd_seek ( int argc, char ** argv, mpd_Connection * conn )
5
 {
6
 	mpd_Status * status = mpd_getStatus(conn);
7
+	char * arg = argv[0];
8
+	int seekmode;
9
+	char * test;
10
+	int seekchange;
11
+	char * last_char;
12
+	int sec;
13
+	float perc;
14
+	int seekto;
15
+
16
 	my_finishCommand(conn);
17
 	if(status->state==MPD_STATUS_STATE_STOP)
18
 		DIE("not currently playing\n");
19
 
20
-	char * arg = argv[0];
21
-
22
 	if(!strlen(arg))
23
 		DIE("\"%s\" is not a positive number\n", arg);
24
 
25
-	int seekmode = Absolute;
26
+	seekmode = Absolute;
27
 
28
 	if(arg[0] == '+') {
29
 		seekmode = RelForward;
30
@@ -262,15 +269,13 @@
31
 		arg++;
32
 	}
33
 
34
-	char * test;
35
-	int seekchange;
36
 
37
-	char * last_char = &arg[strlen(arg)-1];
38
+	last_char = &arg[strlen(arg)-1];
39
 	if(*last_char == 's') {
40
 		/* absolute seek (in seconds) */
41
 
42
 		*last_char = '\0'; /* chop off the s */
43
-		int sec = strtol(arg,&test,10); /* get the # of seconds */
44
+		sec = strtol(arg,&test,10); /* get the # of seconds */
45
 
46
 		if(*test!='\0' || sec<0)
47
 			DIE("\"%s\" is not a positive number\n", arg);
48
@@ -280,14 +285,14 @@
49
 	} else {
50
 		/* percent seek */
51
 
52
-		float perc = strtod(arg,&test);
53
+		perc = strtod(arg,&test);
54
 		if(*test!='\0' || perc<0 || perc>100)
55
 			DIE("\"%s\" is not an number between 0 and 100\n",arg);
56
 
57
 		seekchange = perc*status->totalTime/100+0.5;
58
 	}
59
 
60
-	int seekto = calculate_seek(status->elapsedTime, seekchange, seekmode);
61
+	seekto = calculate_seek(status->elapsedTime, seekchange, seekmode);
62
 
63
 	if(seekto > status->totalTime)
64
 		DIE("seek amount would seek past the end of the song\n");

Return to bug 64715