#include "nsd.h"Defines | |
| #define | SET_DYNAMIC 'd' |
| #define | SET_STATIC 't' |
| #define | SET_SHARED_DYNAMIC 's' |
| #define | SET_SHARED_STATIC 'p' |
| #define | IS_DYNAMIC(id) (*(id) == SET_DYNAMIC || *(id) == SET_SHARED_DYNAMIC) |
| #define | IS_SHARED(id) (*(id) == SET_SHARED_DYNAMIC || *(id) == SET_SHARED_STATIC) |
Functions | |
| int | Ns_TclEnterSet (Tcl_Interp *interp, Ns_Set *set, int flags) |
| Ns_Set * | Ns_TclGetSet (Tcl_Interp *interp, char *id) |
| int | Ns_TclGetSet2 (Tcl_Interp *interp, char *id, Ns_Set **setPtr) |
| int | Ns_TclFreeSet (Tcl_Interp *interp, char *id) |
| int | NsTclSetObjCmd (ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv) |
| int | NsTclParseHeaderCmd (ClientData arg, Tcl_Interp *interp, int argc, char **argv) |
| #define IS_DYNAMIC | ( | id | ) | (*(id) == SET_DYNAMIC || *(id) == SET_SHARED_DYNAMIC) |
| #define IS_SHARED | ( | id | ) | (*(id) == SET_SHARED_DYNAMIC || *(id) == SET_SHARED_STATIC) |
| #define SET_DYNAMIC 'd' |
The following represent the valid combinations of NS_TCL_SET flags
| #define SET_SHARED_DYNAMIC 's' |
| #define SET_SHARED_STATIC 'p' |
| #define SET_STATIC 't' |
| int Ns_TclEnterSet | ( | Tcl_Interp * | interp, | |
| Ns_Set * | set, | |||
| int | flags | |||
| ) |
----------------------------------------------------------------------
Ns_TclEnterSet --
Give this Tcl interpreter access to an existing Ns_Set.
Results: TCL_OK or TCL_ERROR.
Side effects: A pointer to the Ns_Set is added to the interpreter's list of sets; a new handle is generated and appended to interp result.
----------------------------------------------------------------------
| int Ns_TclFreeSet | ( | Tcl_Interp * | interp, | |
| char * | id | |||
| ) |
----------------------------------------------------------------------
Ns_TclFreeSet --
Free a set id, and if own by Tcl, the underlying Ns_Set.
Results: NS_OK/NS_ERROR.
Side effects: Will free the set matching the passed-in set id, and all of its associated data.
----------------------------------------------------------------------
| Ns_Set* Ns_TclGetSet | ( | Tcl_Interp * | interp, | |
| char * | id | |||
| ) |
----------------------------------------------------------------------
Ns_TclGetSet --
Given a Tcl ns_set handle, return a pointer to the Ns_Set.
Results: An Ns_Set pointer, or NULL if error.
Side effects: None.
----------------------------------------------------------------------
| int Ns_TclGetSet2 | ( | Tcl_Interp * | interp, | |
| char * | id, | |||
| Ns_Set ** | setPtr | |||
| ) |
----------------------------------------------------------------------
Ns_TclGetSet2 --
Like Ns_TclGetSet, but sends errors to the tcl interp.
Results: TCL result.
Side effects: None.
----------------------------------------------------------------------
| int NsTclParseHeaderCmd | ( | ClientData | arg, | |
| Tcl_Interp * | interp, | |||
| int | argc, | |||
| char ** | argv | |||
| ) |
----------------------------------------------------------------------
NsTclParseHeaderCmd --
This wraps Ns_ParseHeader.
Results: Tcl result.
Side effects: Parse an HTTP header and add it to an existing set; see Ns_ParseHeader.
----------------------------------------------------------------------
| int NsTclSetObjCmd | ( | ClientData | arg, | |
| Tcl_Interp * | interp, | |||
| int | objc, | |||
| Tcl_Obj ** | objv | |||
| ) |
----------------------------------------------------------------------
NsTclSetObjCmd --
Implelments ns_set.
Results: Tcl result.
Side effects: See docs.
----------------------------------------------------------------------
The following commands create new sets.
All futher commands require a valid set.
These commands require only the set.
These commands require a set and string key.
These commands require a set and key/value index.
These commands require a set, key, and value.
These commands require two sets.
1.5.1