| 1 |
/* ---------------------------------------------------------------------- */ |
| 2 |
|
| 3 |
#define ns__aproc0 "::aproc" |
| 4 |
#ifndef CRITCL_list_obj_2 |
| 5 |
#define CRITCL_list_obj_2 |
| 6 |
#ifndef CRITCL_list |
| 7 |
#define CRITCL_list |
| 8 |
|
| 9 |
typedef struct critcl_list { |
| 10 |
Tcl_Obj* o; |
| 11 |
Tcl_Obj* const* v; |
| 12 |
Tcl_Size c; |
| 13 |
} critcl_list; |
| 14 |
|
| 15 |
#endif /* CRITCL_list _________ */ |
| 16 |
|
| 17 |
#endif /* CRITCL_list_obj_2 _________ */ |
| 18 |
|
| 19 |
static void c__aproc0(critcl_list x) |
| 20 |
{ |
| 21 |
|
| 22 |
} |
| 23 |
|
| 24 |
static int |
| 25 |
tcl__aproc0(ClientData cd, Tcl_Interp *interp, Tcl_Size oc, Tcl_Obj *CONST ov[]) |
| 26 |
{ |
| 27 |
critcl_list _x; |
| 28 |
|
| 29 |
if (oc != 2) { |
| 30 |
Tcl_WrongNumArgs(interp, 1, ov, "x"); |
| 31 |
return TCL_ERROR; |
| 32 |
} |
| 33 |
|
| 34 |
/* (list_obj_2 x) - - -- --- ----- -------- */ |
| 35 |
{ |
| 36 |
{ |
| 37 |
if (Tcl_ListObjGetElements (interp, ov[1], /* OK tcl9 */ |
| 38 |
&(_x.c), (Tcl_Obj***) &(_x.v)) != TCL_OK) return TCL_ERROR; |
| 39 |
_x.o = ov[1]; } |
| 40 |
/* Size check, assert (length (list) == 2) */ |
| 41 |
if (_x.c != 2) { |
| 42 |
Tcl_AppendResult (interp, "Expected a list of 2", NULL); |
| 43 |
return TCL_ERROR; |
| 44 |
} } |
| 45 |
|
| 46 |
/* Call - - -- --- ----- -------- */ |
| 47 |
c__aproc0(_x); |
| 48 |
|
| 49 |
/* (void return) - - -- --- ----- -------- */ |
| 50 |
return TCL_OK; |
| 51 |
} |