Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 May 1999 11:05:22 +0200
From:      Alexander Langer <alex@cichlids.com>
To:        ports@freebsd.org
Cc:        clkao@cirx.org
Subject:   dagrap-0.3 Port improvement
Message-ID:  <19990508110522.A3892@cichlids.cichlids.com>

next in thread | raw e-mail | index | archive | help
Hello!

dagrab saves files with names it gets from the cddb servers.
Often there are names as "Interpret / Title", so it can't save.
I suggest the following patch (
$portsdir/audio/dagrab/patches/patch-ab) that converts '/' into '-' in
filenames.

I've also mailed the author of dagrab, but the portscollection applies
a freebsd patch, so the dagrab.c files are not the same.
This is a patch from the freebsd-patched version to my version.

Alex

--- dagrab.c-without	Sat May  8 11:04:52 1999
+++ dagrab.c	Sat May  8 11:06:42 1999
@@ -608,7 +608,7 @@
 	struct Wavefile header;
 	int fd,bytes,i,n,q,space;
 	int bcount, sc, missing, speed = 0, ldp, now;
-
+	char *slashp;
 	if(tn<tl->min || tn>tl->max) return (-1);
 	space = ((tl->starts[tn-tl->min+1]-tl->starts[tn-tl->min]) * 
 			CD_FRAMESIZE_RAW) >> opt_mono;
@@ -623,6 +623,7 @@
 	else printf("Dumping track %d: lba%7d to lba%7d (needs %d MB)\n",tn,
 			tl->starts[tn-tl->min],tl->starts[tn-tl->min+1]-1, space>>20);
 	tn-=tl->min;
+        for(slashp = nam; slashp = strchr(slashp, '/'); slashp++) *slashp = '-';
 	if ((fd=open(nam,O_TRUNC|O_CREAT|O_WRONLY|O_APPEND))==-1){
 		fprintf(stderr,"%s: error opening wave file %s\n",progname,nam);
 		exit(1);

-- 
************** I doubt, therefore I might be. **************
*** Send email to <pgp-keys@cichlids.com> to get PGP-Key ***


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990508110522.A3892>