Re: ignoring arguments is portable?



Joshua N Pritikin <vishnu pobox com> writes:
foo.c:
  void f(gint ok)
  { g_print("%d\n"); }

bar.c:
  extern void f(gint, gint, gint, gint);
  void g()
  { f(1,2,3,4); }

Can i do this?

The reason i'm asking is that i still can't reliably predict which arguments
are delivered by a given signal.  However, i'm usually only interested
in the first or second argument so maybe i can ignore the rest?  It works
on i386-linux.  :-)


Yes, this is pretty portable.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]