/* ---------------------------------------------------------------------- */ #define ns__aproc0 "::aproc" static void c__aproc0(int x, int y, int has_z, int z) { } static int tcl__aproc0(ClientData cd, Tcl_Interp *interp, Tcl_Size oc, Tcl_Obj *CONST ov[]) { int _x; int _y; int _has_z = 0; int _z; int idx_; int argc_; if ((oc < 3) || (4 < oc)) { Tcl_WrongNumArgs(interp, 1, ov, "x y ?z?"); return TCL_ERROR; } /* (int x) - - -- --- ----- -------- */ { if (Tcl_GetIntFromObj(interp, ov[1], &_x) != TCL_OK) return TCL_ERROR; } /* (int y) - - -- --- ----- -------- */ { if (Tcl_GetIntFromObj(interp, ov[2], &_y) != TCL_OK) return TCL_ERROR; } idx_ = 3; argc_ = oc - 3; /* (int z, optional, default -1) - - -- --- ----- -------- */ if (argc_ > 0) { { if (Tcl_GetIntFromObj(interp, ov[idx_], &_z) != TCL_OK) return TCL_ERROR; } _has_z = 1; } else { _z = -1; } /* Call - - -- --- ----- -------- */ c__aproc0(_x, _y, _has_z, _z); /* (void return) - - -- --- ----- -------- */ return TCL_OK; }