![Netscape ENTERPRISE SERVER 6.1 Manual Download Page 140](http://html1.mh-extra.com/html/netscape/enterprise-server-6-1/enterprise-server-6-1_manual_1674653140.webp)
NSAPI Functions (in Alphabetical Order)
140
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
C
CALLOC
The
CALLOC
macro is a platform-independent substitute for the C library routine
calloc
. It allocates
num*size
bytes from the request’s memory pool. If pooled
memory has been disabled in the configuration file (with the
pool-init
built-in
SAF),
PERM_CALLOC
and
CALLOC
both obtain their memory from the system heap.
Syntax
void *CALLOC(int num, int size)
Returns
A void pointer to a block of memory.
Parameters
int num
is the number of elements to allocate.
int size
is the size in bytes of each element.
Example
/* Allocate space for an array of 100 char pointers */
char *name;
name = (char *) CALLOC(100, sizeof(char *));
See also
FREE, REALLOC, STRDUP, PERM_MALLOC, PERM_FREE, PERM_REALLOC,
PERM_STRDUP
cinfo_find
The
cinfo_find()
function uses the MIME types information to find the type,
encoding, and/or language based on the extension(s) of the Universal Resource
Identifier (URI) or local file name. Use this information to send headers
(
rq->srvhdrs
) to the client indicating the
content-type
,
content-encoding
, and
content-language
of the data it will be receiving from the server.
The name used is everything after the last slash (/) or the whole string if no slash is
found. File name extensions are not case-sensitive. The name may contain multiple
extensions separated by period (.) to indicate type, encoding, or language. For
example, the URI
a/b/filename.jp.txt.zip
could represent a Japanese
language, text/plain type, zip encoded file.
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...