Main Page   Compound List   File List   Header Files   Sources   Compound Members   File Members  

smpcgi.c File Reference

Simple CGI - implementation. More...


Functions

int CGIEntrance (rpCgiPtr CgiRequest)
Call this function at the beginning of every installed CGI procedure. More...

void CGIExit ()
Call this function at the end of every installed CGI procedure. More...

int size ()
This funtion returns the number of tags of a form. More...

FormItem far* getFirstTag ()
This functions returns a far pointer to the first tag. More...

FormItem far* getNextTag ()
This functions returns a far pointer to the next tag of a form. More...

FormItem far* getTagAt (int tag)
With this function you can get a far pointer of a tag of your choice. More...


Variables

FormItem far* tags [100]
int allTags
int cgientrance
 nextTagCounter


Detailed Description

Simple CGI - implementation.

Author(s):
Christian Decker (cdecker@teco.edu)

Development System: Turbo C++ 3.0

Licence: GPL

This lib is an extention to the CGIAPI. It gives you the possibility for easy handling form data, the so called tags.

This Lib contains very easy functions for reading the values of a tag of a form.

See also:
http://www.beck-ip.com/ , http://www.teco.edu/~cdecker/ , cdecker@teco.edu

Definition in file smpcgi.c.


Function Documentation

int CGIEntrance (rpCgiPtr CgiRequest)

Call this function at the beginning of every installed CGI procedure.

It parses the arguments and alloc memory.

Parameters:
CgiRequest   this is a far pointer to the environment comming with a call of the CGI procedure
Returns:
returns not equal 0 if all gone fine, equal 0 otherwise
See also:
CGIInstall() for how to install a CGI procedure

Definition at line 29 of file smpcgi.c.

void CGIExit ()

Call this function at the end of every installed CGI procedure.

It cleans up the memory which was allocated for the tags.

Returns:
returns not equal 0 if all gone fine, equal 0 otherwise
See also:
CGIInstall() for how to install a CGI procedure

Definition at line 100 of file smpcgi.c.

int size ()

This funtion returns the number of tags of a form.

Returns:
returns the number of tags

Definition at line 115 of file smpcgi.c.

FormItem far * getFirstTag ()

This functions returns a far pointer to the first tag.

The tag is handled as a FormItem structure. You can access values like name and the belonging value by the members of this struct.

Returns:
returns a far pointer to the first tag or if there's no tag NULL
See also:
FormItem

Definition at line 120 of file smpcgi.c.

FormItem far * getNextTag ()

This functions returns a far pointer to the next tag of a form.

It has a internal counter for determining the next tag. If you call this function before getFirstTag() then you'll get a far pointer to the first tag. Access the the values by the members of the FormItem struct.

Returns:
returns a a far pointer to the next tag or NULL if no next tag is available
See also:
FormItem

Definition at line 132 of file smpcgi.c.

FormItem far * getTagAt (int tag)

With this function you can get a far pointer of a tag of your choice.

Parameters:
tag   the choosen tag - it's limit between 0..size()
Returns:
returns a far pointer to the choosen tag or NULL if tag is invalid
See also:
FormItem

Definition at line 152 of file smpcgi.c.


Variable Documentation

FormItem far* tags[100] [static]

Definition at line 24 of file smpcgi.c.

int allTags [static]

Definition at line 25 of file smpcgi.c.

int cgientrance [static]

Definition at line 26 of file smpcgi.c.

nextTagCounter [static]

Definition at line 27 of file smpcgi.c.


Generated at Fri Jun 9 21:00:19 2000 for CGIAPI by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999