00001 /* vcommands.h */ 00002 00003 #ifndef VCOMMANDS_H 00004 #define VCOMMANDS_H 00005 00006 #include <tcl.h> 00007 #include "tk.h" 00008 00009 struct command_entry { 00010 char *name; 00011 Tcl_CmdProc *proc; 00012 ClientData clientData; 00013 Tcl_CmdDeleteProc *delProc; 00014 }; 00015 00016 extern command_entry v_commands[]; 00017 00018 /* 00019 * create tcl/tk commands 00020 */ 00021 00022 void v_create_commands(command_entry commands[]); 00023 00024 /* 00025 * helper functions for implementing tcl/tk commands 00026 */ 00027 00028 int v_parse_firstarg(Tcl_Interp *interp, int argc, char *argv[], 00029 char *firstargs[]); 00030 void v_wrong_argc(Tcl_Interp *interp); 00031 void v_warning(Tcl_Interp *interp); 00032 void v_warning(char *msg ...); 00033 void v_error(int return_code, char *msg); 00034 00035 #endif