Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

cgi.h File Reference

Go to the source code of this file.

Functions

char * url_escape (char *)
 URL encode a string of characters.

char * url_unescape (char *string, int)
 URL decode a string of characters.

int get_domain (char *address, char *login, char *domain)
 Extract the login and the domain from a given email address (login).


Detailed Description

Header file for cgi.c.

Definition in file cgi.h.


Function Documentation

int get_domain char *    address,
char *    login,
char *    domain
 

Extract the login and the domain from a given email address (login).

Parameters:
address Pointer to a zero terminated string of characters that represents the email address.
login Pointer to a memory location that will be used to store a zero terminated string of characters that is the login.
domain Pointer to a memory location that will be used to store a zero terminated string of characters that is the domain.
Returns:
Upon successful completion, the function returns the value 0. Otherwise the function returns 1, this means that the given address does not contain any character '@'.
Warning:
No test is done regarding the size of the memory chuncks pointed by login and domain. It is your responsability to allocate enough memory.

Definition at line 23 of file cgi.c.

char* url_escape char *    string
 

URL encode a string of characters.

Parameters:
string Pointer to a zero terminated string that contains the string to encode.
Returns:
The function returns a pointer to the URL encoded string. If an error occured, then the function returns NULL.
Warning:
Note that the returned string has been allocated by the function. Therefore you must free the memory.

Definition at line 50 of file cgi.c.

char* url_unescape char *    string,
int    length
 

URL decode a string of characters.

Parameters:
string Pointer to a zero terminated string that contains the string to decode.
length number of character to decode (should be the size of the string).
Returns:
The function returns a pointer to the URL decoded string. If an error occured, then the function returns NULL.
Warning:
Note that the returned string has been allocated by the function. Therefore you must free the memory.

Definition at line 112 of file cgi.c.


Generated on Thu Apr 3 16:23:44 2003 for Common_C_libraries by doxygen1.3-rc1