
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37


목차
● 목적
● 실행환경
● 실행화면
● 소스
● 실행환경
● 실행화면
● 소스
본문내용
iRemoteIdent;
extern char *cgiContentType;
extern char *cgiAccept;
extern char *cgiUserAgent;
/* The number of bytes of data received.
Note that if the submission is a form submission
the library will read and parse all the information
directly from cgiIn; the programmer need not do so. */
extern int cgiContentLength;
/* Pointer to CGI output. The cgiHeader functions should be used
first to output the mime headers; the output HTML
page, GIF image or other web document should then be written
to cgiOut by the programmer. */
extern FILE *cgiOut;
/* Pointer to CGI input. In 99% of cases, the programmer will NOT
need this. However, in some applications, things other than
forms are posted to the server, in which case this file may
be read from in order to retrieve the contents. */
extern FILE *cgiIn;
/* Possible return codes from the cgiForm family of functions (see below). */
typedef enum {
cgiFormSuccess,
cgiFormTruncated,
cgiFormBadType,
cgiFormEmpty,
cgiFormNotFound,
cgiFormConstrained,
cgiFormNoSuchChoice,
cgiFormMemory
} cgiFormResultType;
/* These functions are used to retrieve form data. See
cgic.html for documentation. */
extern cgiFormResultType cgiFormString(
char *name, char *result, int max);
extern cgiFormResultType cgiFormStringNoNewlines(
char *name, char *result, int max);
extern cgiFormResultType cgiFormStringSpaceNeeded(
char *name, int *length);
extern cgiFormResultType cgiFormStringMultiple(
char *name, char ***ptrToStringArray);
extern void cgiStringArrayFree(char **stringArray);
extern cgiFormResultType cgiFormInteger(
char *name, int *result, int defaultV);
extern cgiFormResultType cgiFormIntegerBounded(
char *name, int *result, int min, int max, int defaultV);
extern cgiFormResultType cgiFormDouble(
char *name, double *result, double defaultV);
extern cgiFormResultType cgiFormDoubleBounded(
char *name, double *result, double min, double max, double defaultV);
extern cgiFormResultType cgiFormSelectSingle(
char *name, char **choicesText, int choicesTotal,
int *result, int defaultV);
extern cgiFormResultType cgiFormSelectMultiple(
char *name, char **choicesText, int choicesTotal,
int *result, int *invalid);
extern cgiFormResultType cgiFormCheckboxSingle(
char *name);
extern cgiFormResultType cgiFormCheckboxMultiple(
char *name, char **valuesText, int valuesTotal,
int *result, int *invalid);
extern cgiFormResultType cgiFormRadio(
char *name, char **valuesText, int valuesTotal,
int *result, int defaultV);
extern void cgiHeaderLocation(char *redirectUrl);
extern void cgiHeaderStatus(int status, char *statusMessage);
extern void cgiHeaderContentType(char *mimeType);
#ifndef NO_SYSTEM
extern int cgiSaferSystem(char *command);
#endif /* NO_SYSTEM */
typedef enum {
cgiEnvironmentIO,
cgiEnvironmentMemory,
cgiEnvironmentSuccess
} cgiEnvironmentResultType;
extern cgiEnvironmentResultType cgiWriteEnvironment(char *filename);
extern cgiEnvironmentResultType cgiReadEnvironment(char *filename);
extern int cgiMain();
#endif /* CGI_C */
extern char *cgiContentType;
extern char *cgiAccept;
extern char *cgiUserAgent;
/* The number of bytes of data received.
Note that if the submission is a form submission
the library will read and parse all the information
directly from cgiIn; the programmer need not do so. */
extern int cgiContentLength;
/* Pointer to CGI output. The cgiHeader functions should be used
first to output the mime headers; the output HTML
page, GIF image or other web document should then be written
to cgiOut by the programmer. */
extern FILE *cgiOut;
/* Pointer to CGI input. In 99% of cases, the programmer will NOT
need this. However, in some applications, things other than
forms are posted to the server, in which case this file may
be read from in order to retrieve the contents. */
extern FILE *cgiIn;
/* Possible return codes from the cgiForm family of functions (see below). */
typedef enum {
cgiFormSuccess,
cgiFormTruncated,
cgiFormBadType,
cgiFormEmpty,
cgiFormNotFound,
cgiFormConstrained,
cgiFormNoSuchChoice,
cgiFormMemory
} cgiFormResultType;
/* These functions are used to retrieve form data. See
cgic.html for documentation. */
extern cgiFormResultType cgiFormString(
char *name, char *result, int max);
extern cgiFormResultType cgiFormStringNoNewlines(
char *name, char *result, int max);
extern cgiFormResultType cgiFormStringSpaceNeeded(
char *name, int *length);
extern cgiFormResultType cgiFormStringMultiple(
char *name, char ***ptrToStringArray);
extern void cgiStringArrayFree(char **stringArray);
extern cgiFormResultType cgiFormInteger(
char *name, int *result, int defaultV);
extern cgiFormResultType cgiFormIntegerBounded(
char *name, int *result, int min, int max, int defaultV);
extern cgiFormResultType cgiFormDouble(
char *name, double *result, double defaultV);
extern cgiFormResultType cgiFormDoubleBounded(
char *name, double *result, double min, double max, double defaultV);
extern cgiFormResultType cgiFormSelectSingle(
char *name, char **choicesText, int choicesTotal,
int *result, int defaultV);
extern cgiFormResultType cgiFormSelectMultiple(
char *name, char **choicesText, int choicesTotal,
int *result, int *invalid);
extern cgiFormResultType cgiFormCheckboxSingle(
char *name);
extern cgiFormResultType cgiFormCheckboxMultiple(
char *name, char **valuesText, int valuesTotal,
int *result, int *invalid);
extern cgiFormResultType cgiFormRadio(
char *name, char **valuesText, int valuesTotal,
int *result, int defaultV);
extern void cgiHeaderLocation(char *redirectUrl);
extern void cgiHeaderStatus(int status, char *statusMessage);
extern void cgiHeaderContentType(char *mimeType);
#ifndef NO_SYSTEM
extern int cgiSaferSystem(char *command);
#endif /* NO_SYSTEM */
typedef enum {
cgiEnvironmentIO,
cgiEnvironmentMemory,
cgiEnvironmentSuccess
} cgiEnvironmentResultType;
extern cgiEnvironmentResultType cgiWriteEnvironment(char *filename);
extern cgiEnvironmentResultType cgiReadEnvironment(char *filename);
extern int cgiMain();
#endif /* CGI_C */
소개글