Query: ns_adprequest
OS: debian
Section: 3aolserv
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Ns_Adp(3aolserver) AOLserver Library Procedures Ns_Adp(3aolserver) __________________________________________________________________________________________________________________________________________________NAMENs_AdpRegisterParser, Ns_AdpRequest - Create and use ADP parsersSYNOPSIS#include "ns.h" int Ns_AdpRegisterParser(char *extension, Ns_AdpParserProc *newParserProc) int Ns_AdpRequest(arg, arg) _________________________________________________________________DESCRIPTIONThese functions register new ADP parsers and run ADP requests. Ns_AdpRegisterParser(extension, newParserProc) Registers a new, named ADP parser procedure with the name given in extension. You can tie a file extension to a particular named parser in the nsd.tcl file. The newParserProc will be called when an ADP with the associated file extension needs to be parsed. If a file extension is registered as an ADP in the nsd.tcl but no parser is associated with that file extension, the default ADP parser is used. The newParserProc must accept two arguments: typedef void (Ns_AdpParserProc)(Ns_DString *out, char *in); The ADP input is pointed to by in. Your parser must process the content of in and append the parsed output to out. The output should be formatted as a series of concatenated "chunks". A chunk is a string of the format: <type character><string><null> where <type character> = 't' or 's'. A 't' means what follows is HTML and should be returned directly to the browser. An 's' means what follows is Tcl and should be evaluated. After the last chunk there should be an extra <null> character. For example, the "adp" parser will take a page like this: This is a test page<%ns_puts hi%>The end<%ns_puts bye%> And create this output: "tThis is a test page sns_puts hi tThe end sns_puts bye " Ns_AdpRequest(conn, file) Parse and evaluate an ADP file.SEE ALSOnsd(1), info(n)KEYWORDSAOLserver 4.0 Ns_Adp(3aolserver)
Related Man Pages |
---|
ns_adprequest(3aolserv) - debian |
ns_adp_append(3aolserv) - debian |
ns_adp_tell(3aolserv) - debian |
ns_adp_trunc(3aolserv) - debian |
ns_puts(3aolserv) - debian |
Similar Topics in the Unix Linux Community |
---|
Editing problem |
Awk: from two file create a mail with attached error |
Modify text file using awk |