[XForms] Re: [Xforms-cvs] xforms/fdesign fd_forms.c fd_main.c fd_main.h f...
Angus Leeming
angus.leeming at btopenworld.com
Thu Nov 27 11:26:57 EST 2003
On Thursday 27 November 2003 3:41 pm, Jean-Marc Lasgouttes wrote:
> Angus> Log message: Give fdesign a -dir <destdir> option.
>
> I see you've been busy...
Well, not sooooooo busy.
> +static char const *
> +filename_only(char const * filename)
> +{
> + char const * ptr = filename + strlen(filename) - 1;
> + for (; ptr >= filename; --ptr) {
> + if (*ptr == '/')
> + return ptr+1;
> + }
> + return ptr;
> +}
> +
>
> Can't you use strrchr() here?
Yup. Thanks. Like this?
static char const *
filename_only(char const * filename)
{
char const * ptr = strrchr(filename, '/');
if (ptr)
return ptr+1;
return filename;
}
> What happens with the external convertors?
They get passed '-dir <destdir>'.
> You should also document the new switch in fdesign man page.
Granted.
Angus
More information about the Xforms
mailing list