From owner-freebsd-ports Thu Nov 2 14: 4:22 2000 Delivered-To: freebsd-ports@freebsd.org Received: from newmail.netbistro.com (newmail.netbistro.com [204.239.167.35]) by hub.freebsd.org (Postfix) with SMTP id 1AA5D37B4C5 for ; Thu, 2 Nov 2000 14:04:19 -0800 (PST) Received: (qmail 24104 invoked by uid 1020); 2 Nov 2000 22:04:18 -0000 Date: Thu, 2 Nov 2000 14:04:18 -0800 (PST) From: Jon Simola X-Sender: jon@newmail.netbistro.com To: freebsd-ports@freebsd.org Subject: ports/converters/fconv fix Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Note: I've already sent this to chris@FreeBSD.org, the listed maintainer, but I'm curious about feedback on this as there's a couple other little bugs I'm looking to fix. I was having a problem with fconv and calling it using a path with multiple slashes. IE, running ./mac2bsd file.in file.out or, if mac2bsd was in the path mac2bsd file.in file.out Would work fine, but /usr/local/bin/mac2bsd file.in file.out would just open the input and output files, but then die parsing the multiple slashes in arg[0] while figuring out what program it was being run as (and what to do from there). This patch fixes that. Sorry if I went through the wrong channels to submit this, I figured filing a PR would be a bit much for such a simple fix. *** fconv.c.orig Mon May 3 12:09:54 1999 --- fconv.c Wed Nov 1 23:37:45 2000 *************** *** 114,124 **** } /* Now determine the program to use */ ! tprg = strchr(prg, '/'); ! ! if (tprg != NULL) ! if ((tprg += 1) != NULL) prg = tprg; TEST(dos2bsd, bsd2dos, mac2bsd, bsd2mac); if (mode == -1) --- 114,126 ---- } /* Now determine the program to use */ ! tprg = prg; ! do { ! if (*tprg == '/') prg = tprg; + tprg++; + } while (*tprg != '\0'); + prg++; TEST(dos2bsd, bsd2dos, mac2bsd, bsd2mac); if (mode == -1) --- Jon Simola | "In the near future - corporate networks Systems Administrator | reach out to the stars, electrons and light ABC Communications | flow throughout the universe." -- GITS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message