[vox-tech] macro arguments in C

Mark K. Kim vox-tech@lists.lugod.org
Thu, 17 Oct 2002 17:32:22 -0700 (PDT)


On Thu, 17 Oct 2002, Peter Jay Salzman wrote:

> very sneaky.  i'm definitely going to store this one away in my bag of
> tricks!  thanks for explaining the "if".  i wouldn't have thought of
> that.
>
> did you figure this out?  or is there a book of sneaky tricks that this
> came from?

About 10 minutes of scratching my head.  Do you think I can get a patent
on it? :)

==8<--
> > >    - Your die() function had a problem.  The line
> > >
> > >          vfprintf(stderr, "   %s\n", args);
>
> yeah, this was one of those things where i realized that after i sent
> out the email, but didn't want to reply to my own post to correct it.
> oh well.  it could've saved me 10 minutes of trying to figure it out.
> but it was 10 minutes worth spending.  :)

I'm not that familiar with variable arguments so it took me a while to
figure out this bug.  I learned a few things in the process.  Thanks! :)

-Mark

--
Mark K. Kim
http://www.cbreak.org/
PGP key available upon request.