- Adapted indenation to new agreed upon system

- Added support for second generation scriptcontext based counter
This commit is contained in:
koennecke
2009-02-13 09:00:03 +00:00
parent a3dcad2bfa
commit 91d4af0541
405 changed files with 88101 additions and 88173 deletions

View File

@ -14,51 +14,48 @@ would appreciate credit if this program or parts of it are used.
char *Dbg_DefaultCmdName = "debug";
/*ARGSUSED*/
static int
App_DebugCmd(clientData, interp, argc, argv)
/*ARGSUSED*/ static int App_DebugCmd(clientData, interp, argc, argv)
ClientData clientData;
Tcl_Interp *interp;
int argc;
char **argv;
{
int now = 0; /* soon if 0, now if 1 */
int now = 0; /* soon if 0, now if 1 */
if (argc > 3) goto usage;
if (argc > 3)
goto usage;
argv++;
argv++;
while (*argv) {
if (0 == strcmp(*argv,"-now")) {
now = 1;
argv++;
}
else break;
}
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;
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;
}
int
Dbg_Init(interp)
int Dbg_Init(interp)
Tcl_Interp *interp;
{
Tcl_CreateCommand(interp,Dbg_DefaultCmdName,App_DebugCmd,
(ClientData)0,(void (*)())0);
return TCL_OK;
Tcl_CreateCommand(interp, Dbg_DefaultCmdName, App_DebugCmd,
(ClientData) 0, (void (*)()) 0);
return TCL_OK;
}