From: Rui Guo Date: Sat, 6 Jun 2009 07:48:04 +0000 (+0800) Subject: Correct the vararg related definition. X-Git-Url: https://repo.or.cz/w/screen-lua.git/commitdiff_plain/87bf69bb4d3da6f534dfbf9cd4c586060f4798bb Correct the vararg related definition. --- diff --git a/src/script.c b/src/script.c index 1b9a728..1ff127b 100644 --- a/src/script.c +++ b/src/script.c @@ -219,7 +219,9 @@ trigger_sevent(struct script_event *ev, VA_DOTS) params = ev->params; while (chain) { + VA_START(va, ev); res = chain->dispatcher(chain->handler, params, va); + VA_END(va); if (res) break; } diff --git a/src/script.h b/src/script.h index 6b990de..2a23e83 100644 --- a/src/script.h +++ b/src/script.h @@ -60,7 +60,7 @@ struct listener * The return value is significant: * a non-zero value will stop further * notification to the rest of the chain.*/ - int (*dispatcher) __P((void *handler, char *params, VA_DOTS)); + int (*dispatcher) __P((void *handler, char *params, va_list va)); /* smaller means higher privilege.*/ int priv;