18 #define TCL_ARGS(count_expr, help) { \
19 int count = count_expr; \
20 if (objc != count) { \
21 char* tmp = Tcl_GetStringFromObj(objv[0], NULL); \
22 printf("command %s requires %i arguments, received %i\n", \
33 const char* format, ...)
34 __attribute__ ((format (printf, 3, 4)));
40 #define TCL_RETURN_ERROR(format, args...) \
42 tcl_condition_failed(interp, objv[0], format, ## args); \
49 #define TCL_CHECK_MSG(rc, format, args...) \
51 TCL_RETURN_ERROR(format, ## args); \
57 #define TCL_CHECK(rc) { if (rc != TCL_OK) { return TCL_ERROR; }}
59 #define TCL_CONDITION(condition, format, args...) \
61 TCL_RETURN_ERROR(format, ## args); \
void tcl_condition_failed(Tcl_Interp *interp, Tcl_Obj *command, const char *format,...) __attribute__((format(printf