> Although it is more code than nothing, this hack might be what you
> want as well
>
> WCHAR *p = pluginfo.pszFunctions;
> for ( INT i=0; i<NUMBER_OF_ITEMS; i++ )
> p += Sprintf(p, L"%s%c", item.Name, i==NUMBER_OF_ITEMS-1 ?
> '\0', ',');
>
> Or, perhaps more gawdawful, assuming TRUE/FALSE are 1/0:
> WCHAR *p = pluginfo.pszFunctions;
> for ( INT i=0; i<NUMBER_OF_ITEMS; i++ )
> p += Sprintf(p, L"%s%c", item.Name, ","[i>=NUMBER_OF_ITEMS-1]);
>
>
> On Mon, Oct 5, 2009 at 10:08 AM, vefatica <> wrote:
>
>
> ---Quote---
> > On Mon, 05 Oct 2009 10:59:34 -0500, samintz <> wrote:
> >
> > |You could do this instead:
> > | * *WCHAR *p = pluginfo.pszFunctions;
> > | * *for ( INT i=0; i<NUMBER_OF_ITEMS-1; i++ )
> > | * * * p += Sprintf(p, L"%s,", item.Name);
> > | * *p += Sprintf(p, L"%s", item.Name);
> > |
> >
> > Or even,
> >
> > * *WCHAR *p = pluginfo.pszFunctions;
> > * *for ( INT i=0; i<NUMBER_OF_ITEMS; i++ )
> > * * * p += Sprintf(p, L"%s,", item.Name);
> > * **(p-1) == 0;
> >
> > But not having to bother saves 16 bytes of code (in either case).
> > --
> > *- Vince
> >
> >
> >
> >
> >
> ---End Quote---
>
>
> --
> Jim Cook
> 2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
> Next year they're Sunday.
>
>
>
>