#include "nsd.h"Data Structures | |
| struct | AdpCache |
| struct | Page |
| struct | Objs |
| struct | InterpPage |
Functions | |
| int | NsAdpEval (NsInterp *itPtr, int objc, Tcl_Obj *objv[], int flags, char *resvar) |
| int | NsAdpSource (NsInterp *itPtr, int objc, Tcl_Obj *objv[], int flags, char *resvar) |
| int | NsAdpInclude (NsInterp *itPtr, int objc, Tcl_Obj *objv[], char *file, Ns_Time *ttlPtr) |
| void | NsAdpInit (NsInterp *itPtr) |
| void | NsAdpFree (NsInterp *itPtr) |
| void | NsAdpReset (NsInterp *itPtr) |
| int | NsAdpDebug (NsInterp *itPtr, char *host, char *port, char *procs) |
| int | NsTclAdpStatsCmd (ClientData arg, Tcl_Interp *interp, int argc, char **argv) |
| void | NsAdpLogError (NsInterp *itPtr) |
| int NsAdpDebug | ( | NsInterp * | itPtr, | |
| char * | host, | |||
| char * | port, | |||
| char * | procs | |||
| ) |
----------------------------------------------------------------------
NsAdpDebug --
Initialize the debugger by calling the debug init proc with the hostname and port of the debugger and a pattern of procs to auto-instrument.
Results: TCL_OK if debugger initialized, TCL_ERROR otherwise.
Side effects: Interp is marked for delete on next deallocation.
----------------------------------------------------------------------
Link the ADP output buffer result to a global variable which can be monitored with a variable watch.
| int NsAdpEval | ( | NsInterp * | itPtr, | |
| int | objc, | |||
| Tcl_Obj * | objv[], | |||
| int | flags, | |||
| char * | resvar | |||
| ) |
----------------------------------------------------------------------
NsAdpEval, NsAdpSource --
Evaluate an ADP string or file and return the output as the interp result.
Results: A standard Tcl result.
Side effects: Variable named by resvar, if any, is updated with results of Tcl interp before being replaced with ADP output.
----------------------------------------------------------------------
| void NsAdpFree | ( | NsInterp * | itPtr | ) |
| int NsAdpInclude | ( | NsInterp * | itPtr, | |
| int | objc, | |||
| Tcl_Obj * | objv[], | |||
| char * | file, | |||
| Ns_Time * | ttlPtr | |||
| ) |
----------------------------------------------------------------------
NsAdpInclude --
Evaluate an ADP file, utilizing per-thread byte-code pages.
Results: A standard Tcl result.
Side effects: Output is either left in current ADP buffer.
----------------------------------------------------------------------
If an ADP execution is already active, use the current output buffer. Otherwise, use the top-level buffer in the ADP struct.
| void NsAdpInit | ( | NsInterp * | itPtr | ) |
----------------------------------------------------------------------
NsAdpInit, NsAdpFree --
Initialize or free the NsInterp ADP data structures.
Results: None.
Side effects: None.
----------------------------------------------------------------------
| void NsAdpLogError | ( | NsInterp * | itPtr | ) |
----------------------------------------------------------------------
NsAdpLogError --
Log an ADP error, possibly invoking the log handling ADP file if configured.
Results: None.
Side effects: Depends on log handler.
----------------------------------------------------------------------
NB: Avoid truncating multi-byte UTF-8 character.
| void NsAdpReset | ( | NsInterp * | itPtr | ) |
----------------------------------------------------------------------
NsAdpReset --
Reset the NsInterp ADP data structures for the next execution request.
Results: None.
Side effects: None.
----------------------------------------------------------------------
| int NsAdpSource | ( | NsInterp * | itPtr, | |
| int | objc, | |||
| Tcl_Obj * | objv[], | |||
| int | flags, | |||
| char * | resvar | |||
| ) |
| int NsTclAdpStatsCmd | ( | ClientData | arg, | |
| Tcl_Interp * | interp, | |||
| int | argc, | |||
| char ** | argv | |||
| ) |
----------------------------------------------------------------------
NsTclAdpStatsCmd --
Implement the ns_adp_stats command to return stats on cached ADP pages.
Results: Standard Tcl result.
Side effects: None.
----------------------------------------------------------------------
1.5.1