📄 dbg_cmd.c
字号:
/* Dbg_cmd.c - Tcl Debugger default command, used if app writer wants a quick and reasonable default.Written by: Don Libes, NIST, 3/23/93Design and implementation of this program was paid for by U.S. taxdollars. Therefore it is public domain. However, the author and NISTwould appreciate credit if this program or parts of it are used.*/#include "tclInt.h"#include "tcldbg.h"char *Dbg_DefaultCmdName = "debug";/*ARGSUSED*/static intApp_DebugCmd(clientData, interp, argc, argv)ClientData clientData;Tcl_Interp *interp;int argc;char **argv;{ int now = 0; /* soon if 0, now if 1 */ if (argc > 3) goto usage; argv++; while (*argv) { if (0 == strcmp(*argv,"-now")) { now = 1; argv++; } else break; } if (!*argv) { if (now) { Dbg_On(interp,1); } else { goto usage; } } else if (0 == strcmp(*argv,"0")) { Dbg_Off(interp); } else { Dbg_On(interp,now); } return(TCL_OK); usage: interp->result = "usage: [[-now] 1|0]"; return TCL_ERROR;}/* Tcl's load command looks for this by default due to the name of the library.*/intTcldbg_Init(interp)Tcl_Interp *interp;{ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) { return TCL_ERROR; } if (Tcl_PkgProvide(interp, "Dbg", DBG_VERSION) != TCL_OK) { return TCL_ERROR; } Tcl_CreateCommand(interp,Dbg_DefaultCmdName,App_DebugCmd, (ClientData)0,(void (*)())0); return TCL_OK; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -