~habnabit/+junk/foxish

« back to all changes in this revision

Viewing changes to cgic.h

  • Committer: Aaron Gallagher
  • Date: 2009-12-09 04:04:39 UTC
  • Revision ID: habnabit@gmail.com-20091209040439-ioq92m4ef1iizyxm
Hacked cgic a bit to allow for arbitrary-length input.

Show diffs side-by-side

added added

removed removed

Lines of Context:
228
228
        of error, cgiFormSuccess otherwise. */
229
229
cgiFormResultType cgiValueEscapeData(char *data, int len);
230
230
 
 
231
typedef struct cgiFormEntryStruct {
 
232
        char *attr;
 
233
        /* value is populated for regular form fields only.
 
234
                For file uploads, it points to an empty string, and file
 
235
                upload data should be read from the file tfileName. */ 
 
236
        char *value;
 
237
        /* When fileName is not an empty string, tfileName is not null,
 
238
                and 'value' points to an empty string. */
 
239
        /* Valid for both files and regular fields; does not include
 
240
                terminating null of regular fields. */
 
241
        int valueLength;
 
242
        char *fileName; 
 
243
        char *contentType;
 
244
        /* Temporary file name for working storage of file uploads. */
 
245
        char *tfileName;
 
246
        struct cgiFormEntryStruct *next;
 
247
} cgiFormEntry;
 
248
 
 
249
cgiFormEntry *cgiFormEntryFindFirst(char *name);
 
250
 
231
251
#endif /* CGI_C */
232
252