Ahh, gotcha!
What about something like this: (?)
Code:
E void FDECL(m_unleash, (struct monst *,BOOLEAN_P));
I now understand that it would become:
E void m_unleash (struct monst *, BOOLEAN_P)
...but what does the E mean?
Also, one last question about the following code. Ignore what it's doing, my question has to do with the function declaration syntax...
Code:
#ifndef WIN32CON
/* fatal error */
/*VARARGS1*/
void
error VA_DECL(const char *,s)
char buf[BUFSZ];
VA_START(s);
VA_INIT(s, const char *);
/* error() may get called before tty is initialized */
if (iflags.window_inited) end_screen();
if (!strncmpi(windowprocs.name, "tty", 3)) {
buf[0] = '\n';
(void) vsprintf(&buf[1], s, VA_ARGS);
Strcat(buf, "\n");
msmsg(buf);
} else {
(void) vsprintf(buf, s, VA_ARGS);
Strcat(buf, "\n");
raw_printf(buf);
}
VA_END();
exit(EXIT_FAILURE);
}
#endif
VA_DECL is declared like this:
Code:
# define VA_DECL(typ1,var1) (typ1 var1, ...) { va_list the_args;
// or (depending on some #define)
# define VA_DECL(typ1,var1) (va_alist) va_dcl {\
va_list the_args; typ1 var1;
What confuses me is that the function above (void error) is that it looks like it's being started without an opening brace. Is that taken care of from the #define macro? Is the #define macro also declaring a variable? It looks like the macro needs four parameters but is only being passed in two...
Sorry for all of the questions (and code). I really, really appriciate your help!