Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2000 23:58:59 -0800 (PST)
From:      Jon Simola <jon@abccom.bc.ca>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        freebsd-ports@freebsd.org, chris@freebsd.org
Subject:   Re: ports/converters/fconv fix
Message-ID:  <Pine.BSF.3.96.1001102233859.20170O-100000@newmail.netbistro.com>
In-Reply-To: <20001103090631.A323@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 3 Nov 2000, Peter Pentchev wrote:

> Actually, wouldn't it be easier to just replace strchr() with strrchr()? :)

Yep, and after looking at my fix for a while I didn't even manage to get it
right. Apologies for the waste of time, and thanks for pointing out the
trivial fix. 

This would be the correct patch:

--- fconv.c.orig        Mon May  3 12:09:54 1999
+++ fconv.c     Thu Nov  2 23:42:12 2000
@@ -114,7 +114,7 @@
        }
 
        /* Now determine the program to use */
-       tprg = strchr(prg, '/');
+       tprg = strrchr(prg, '/');
 
        if (tprg != NULL)
                if ((tprg += 1) != NULL)


---
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1001102233859.20170O-100000>