Date: Fri, 3 Nov 2000 09:06:31 +0200 From: Peter Pentchev <roam@orbitel.bg> To: Jon Simola <jon@abccom.bc.ca> Cc: freebsd-ports@freebsd.org Subject: Re: ports/converters/fconv fix Message-ID: <20001103090631.A323@ringworld.oblivion.bg> In-Reply-To: <Pine.BSF.3.96.1001102135918.20170K-100000@newmail.netbistro.com>; from jon@abccom.bc.ca on Thu, Nov 02, 2000 at 02:04:18PM -0800 References: <Pine.BSF.3.96.1001102135918.20170K-100000@newmail.netbistro.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Actually, wouldn't it be easier to just replace strchr() with strrchr()? :) G'luck, Peter -- "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation. On Thu, Nov 02, 2000 at 02:04:18PM -0800, Jon Simola wrote: > > 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 <jon@abccom.bc.ca> | "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 > 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?20001103090631.A323>