dfa0b61997-01-21Fredrik Hübinette (Hubbe) /*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/
24ddc71998-03-28Henrik Grubbström (Grubba) /*
1f21332000-07-28Fredrik Hübinette (Hubbe)  * $Id: module_support.h,v 1.7 2000/07/28 17:16:55 hubbe Exp $
24ddc71998-03-28Henrik Grubbström (Grubba)  */
dfa0b61997-01-21Fredrik Hübinette (Hubbe) #ifndef MODULE_SUPPORT_H #include <stdarg.h>
c9c1c51997-09-11Henrik Grubbström (Grubba) enum error_type { ERR_NONE, ERR_TOO_FEW, ERR_TOO_MANY, ERR_BAD_ARG }; struct expect_result { enum error_type error_type; int argno; /* Which argument was it */ unsigned INT32 expected; /* What type was expected */ TYPE_T got; /* What type did we actually receive */ };
1f21332000-07-28Fredrik Hübinette (Hubbe)  /* Prototypes begin here */ PMOD_EXPORT int check_args(int args, ...); PMOD_EXPORT void check_all_args(const char *fnname, int args, ... );
dfa0b61997-01-21Fredrik Hübinette (Hubbe) int va_get_args(struct svalue *s, INT32 num_args, char *fmt,
fdd2291997-01-27Fredrik Hübinette (Hubbe)  va_list ap);
1f21332000-07-28Fredrik Hübinette (Hubbe) PMOD_EXPORT int get_args(struct svalue *s,
dfa0b61997-01-21Fredrik Hübinette (Hubbe)  INT32 num_args, char *fmt, ...);
1f21332000-07-28Fredrik Hübinette (Hubbe) PMOD_EXPORT void get_all_args(char *fname, INT32 args, char *format, ... );
dfa0b61997-01-21Fredrik Hübinette (Hubbe) /* Prototypes end here */ #endif