[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_AdpParseBuffer

Overview

Parse an ADP file from a null-terminated string

Syntax

    int Ns_AdpParseBuffer(
        Ns_DString *pds, 
        Ns_Conn    *conn, 
        char       *dir, 
        char       *filename,
        char       *buffer,
        int        *fStream,
        int         fAllowStreaming,
        int         argc,
        char      **argv,
        int         fGlobal
    );

Description

This function parses an ADP from a null-terminated string. The buffer will not be added to the cache.

The pds argument is a pointer to a dstring where the output of the ADP will go.

The conn argument is the current connection.

The filename argument is used for debugging purposes. The specified filename will be given when an error is generated during processing of the ADP.

The buffer argument is the null-terminated string containing the ADP to parse.

The fStream argument is set to 1 if streaming has been turned on by the ADP and 0 if it has not.

If fAllowStreaming is 0, this function processes the ADP read from fp and writes the result to the passed in dstring (pds). If fAllowStreaming is non-zero, and the ADP contains a script that turns on streaming, the results are written directly out to the conn.

The argc argument is the number of arguments that are to be passed to the ADP.

The argv argument is a list of the argument values to be passed to the ADP.

If fGlobal is set to true, any Tcl commands run in the ADP will be run with Tcl_GlobalEval. If set to false, Tcl commands are run with Tcl_Eval.

If this call is a nested ADP evaluation (where one ADP calls another), an error will be returned if the maximum number of nested ADP evaluations, determined by the MaxCallDepth parameter, has been exceeded.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.