#include <stdlib.h>
#include <tclInt.h>

int 
resolve_cmd (Tcl_Interp *interp, CONST char *name, 
  Tcl_Namespace *context, int flags, Tcl_Command *rPtr) {

 printf ("resolve cmd: %s\n", name);

 return TCL_CONTINUE;
}


int main (int argc, char *argv[]) {
 Tcl_Interp *interp;

 Tcl_FindExecutable (argv[0]);

 interp = Tcl_CreateInterp ();

 if (TCL_OK != Tcl_Init (interp))
  return EXIT_FAILURE;

 Tcl_AddInterpResolvers (interp, "funfun", resolve_cmd, NULL, NULL);

 Tcl_Eval (interp, "foo:bar");

 return EXIT_SUCCESS;
}
