adpcmds.c File Reference

#include "nsd.h"

Functions

int NsTclAdpIdentObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpCtlObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpCompressObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpEvalObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpSafeEvalObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpIncludeObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpParseObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpAppendObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpPutsObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpDirObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpReturnObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpBreakObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpAbortObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpTellObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpTruncObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpDumpObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpArgcObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpArgvObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpBindArgsObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpExceptionObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpFlushObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpCloseObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpStreamObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsTclAdpDebugCmd (ClientData arg, Tcl_Interp *interp, int argc, char **argv)
int NsTclAdpMimeTypeObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
int NsAdpAppend (NsInterp *itPtr, char *buf, int len)

Function Documentation

int NsAdpAppend ( NsInterp itPtr,
char *  buf,
int  len 
)

----------------------------------------------------------------------

NsAdpAppend --

Append content to the ADP output buffer, flushing the content if necessary.

Results: TCL_ERROR if append and/or flush failed, TCL_OK otherwise.

Side effects: Will set ADP error flag and leave an error message in the interp on flush failure.

----------------------------------------------------------------------

int NsTclAdpAbortObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

int NsTclAdpAppendObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpAppendObjCmd, NsTclAdpPutsObjCmd --

Process the ns_adp_append and ns_adp_puts commands to append output.

Results: A standard Tcl result.

Side effects: Output buffer is extended with given text, including a newline with ns_adp_puts.

----------------------------------------------------------------------

int NsTclAdpArgcObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpArgcObjCmd --

Process the Tcl ns_adp_args commands to return the number of arguments in the current ADP frame.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpArgvObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpArgvObjCmd --

Process the Tcl ns_adp_args commands to return an argument (or the entire list of arguments) within the current ADP frame.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpBindArgsObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpBindArgsObjCmd --

Process the Tcl ns_adp_bind_args commands to copy arguements from the current frame into local variables.

Results: A standard Tcl result.

Side effects: One or more local variables are created.

----------------------------------------------------------------------

int NsTclAdpBreakObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

int NsTclAdpCloseObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

int NsTclAdpCompressObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpCompressObjCmd --

Process the Tcl ns_adp_compress command to enable on-the-fly gzip compression of ADP response.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpCtlObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpCtlObjCmd --

ADP processing control.

Results: A standard Tcl result.

Side effects: Depends on subcommand.

----------------------------------------------------------------------

Query or update an ADP option.

int NsTclAdpDebugCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  argc,
char **  argv 
)

----------------------------------------------------------------------

NsTclAdpDebugCmd --

Process the Tcl ns_adp_debug command to connect to the TclPro debugger if not already connected.

Results: A standard Tcl result.

Side effects: See comments for DebugInit().

----------------------------------------------------------------------

int NsTclAdpDirObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpDirObjCmd --

Process the Tcl ns_adp_dir command to return the current ADP directory.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpDumpObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpDumpObjCmd --

Process the Tcl ns_adp_dump commands to return the entire text of the output buffer.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpEvalObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpEvalObjCmd, NsTclAdpSafeEvalObjCmd --

(Safe) Evaluate an ADP string.

Results: A standard Tcl result.

Side effects: Page string is parsed and evaluated at current Tcl level in a new ADP call frame.

----------------------------------------------------------------------

int NsTclAdpExceptionObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpExcepetionObjCmd --

Process the Tcl ns_adp_exception commands to return the current exception state, ok, abort, or break.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpFlushObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

int NsTclAdpIdentObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpIdentObjCmd --

Set RCS/CVS ident string for current file.

Results: A standard Tcl result.

Side effects: Depends on subcommand.

----------------------------------------------------------------------

int NsTclAdpIncludeObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpIncludeObjCmd --

Process the Tcl _ns_adp_include commands to evaluate an ADP.

Results: A standard Tcl result.

Side effects: File evaluated with output going to ADP buffer.

----------------------------------------------------------------------

In cache refresh mode, append include command to the output buffer. It will be compiled into the cached result.

int NsTclAdpMimeTypeObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpMimeTypeCmd --

Process the ns_adp_mimetype command to set or get the mime type returned upon completion of the parsed file.

Results: A standard Tcl result.

Side effects: Potentially updates the mime type for this adp page.

----------------------------------------------------------------------

int NsTclAdpParseObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpParseObjCmd --

Process the ns_adp_parse command to evaluate strings or ADP files at the current call frame level.

Results: A standard Tcl result.

Side effects: ADP string or file output is return as Tcl result.

----------------------------------------------------------------------

Check the adp field in the nsInterp, and construct any support Also, set the cwd.

int NsTclAdpPutsObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

int NsTclAdpReturnObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpReturnObjCmd, NsTclAdpBreakObjCmd, NsTclAdpAbortObjCmd --

Process the Tcl ns_adp_return, ns_adp_break and ns_adp_abort commands to halt page generation.

Results: A standard Tcl result.

Side effects: Break or abort exception is noted and will be handled in AdpProc.

----------------------------------------------------------------------

int NsTclAdpSafeEvalObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

int NsTclAdpStreamObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpStreamObjCmd --

Set ADP buffer size to 0, forcing all content to be sent to the client immediately on each append.

Results: A standard Tcl result.

Side effects: See NsTclAdpFlushObjCmd.

----------------------------------------------------------------------

int NsTclAdpTellObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpTellObjCmd --

Process the Tcl ns_adp_tell commands to return the current offset within the output buffer.

Results: A standard Tcl result.

Side effects: None.

----------------------------------------------------------------------

int NsTclAdpTruncObjCmd ( ClientData  arg,
Tcl_Interp *  interp,
int  objc,
Tcl_Obj **  objv 
)

----------------------------------------------------------------------

NsTclAdpTruncObjCmd --

Process the Tcl ns_adp_trunc commands to truncate the output buffer to the given length.

Results: A standard Tcl result.

Side effects: Output buffer is truncated.

----------------------------------------------------------------------


Generated on Tue Sep 4 19:58:55 2007 by  doxygen 1.5.1