Lines Matching refs:form

213   struct FormInfo *first_form, *current_form, *form = NULL;  in FormAdd()  local
367 form = AddFormInfo(fname, NULL, current_form); in FormAdd()
368 if(!form) { in FormAdd()
373 form->value_alloc = TRUE; in FormAdd()
374 current_form = form; in FormAdd()
375 form = NULL; in FormAdd()
456 form = AddFormInfo(NULL, type, current_form); in FormAdd()
457 if(!form) { in FormAdd()
462 form->contenttype_alloc = TRUE; in FormAdd()
463 current_form = form; in FormAdd()
464 form = NULL; in FormAdd()
553 for(form = first_form; in FormAdd()
554 form != NULL; in FormAdd()
555 form = form->more) { in FormAdd()
556 if(((!form->name || !form->value) && !post) || in FormAdd()
557 ( (form->contentslength) && in FormAdd()
558 (form->flags & HTTPPOST_FILENAME) ) || in FormAdd()
559 ( (form->flags & HTTPPOST_FILENAME) && in FormAdd()
560 (form->flags & HTTPPOST_PTRCONTENTS) ) || in FormAdd()
562 ( (!form->buffer) && in FormAdd()
563 (form->flags & HTTPPOST_BUFFER) && in FormAdd()
564 (form->flags & HTTPPOST_PTRBUFFER) ) || in FormAdd()
566 ( (form->flags & HTTPPOST_READFILE) && in FormAdd()
567 (form->flags & HTTPPOST_PTRCONTENTS) ) in FormAdd()
572 if(((form->flags & HTTPPOST_FILENAME) || in FormAdd()
573 (form->flags & HTTPPOST_BUFFER)) && in FormAdd()
574 !form->contenttype) { in FormAdd()
575 char *f = (form->flags & HTTPPOST_BUFFER) ? in FormAdd()
576 form->showfilename : form->value; in FormAdd()
585 form->contenttype = strdup(type); in FormAdd()
586 if(!form->contenttype) { in FormAdd()
590 form->contenttype_alloc = TRUE; in FormAdd()
592 if(form->name && form->namelength) { in FormAdd()
595 for(i = 0; i < form->namelength; i++) in FormAdd()
596 if(!form->name[i]) { in FormAdd()
603 if(!(form->flags & HTTPPOST_PTRNAME) && in FormAdd()
604 (form == first_form) ) { in FormAdd()
607 if(form->name) { in FormAdd()
609 form->name = Curl_memdup0(form->name, form->namelength ? in FormAdd()
610 form->namelength : in FormAdd()
611 strlen(form->name)); in FormAdd()
613 if(!form->name) { in FormAdd()
617 form->name_alloc = TRUE; in FormAdd()
619 if(!(form->flags & (HTTPPOST_FILENAME | HTTPPOST_READFILE | in FormAdd()
621 HTTPPOST_CALLBACK)) && form->value) { in FormAdd()
623 size_t clen = (size_t) form->contentslength; in FormAdd()
625 clen = strlen(form->value) + 1; in FormAdd()
627 form->value = Curl_memdup(form->value, clen); in FormAdd()
629 if(!form->value) { in FormAdd()
633 form->value_alloc = TRUE; in FormAdd()
635 post = AddHttpPost(form->name, form->namelength, in FormAdd()
636 form->value, form->contentslength, in FormAdd()
637 form->buffer, form->bufferlength, in FormAdd()
638 form->contenttype, form->flags, in FormAdd()
639 form->contentheader, form->showfilename, in FormAdd()
640 form->userp, in FormAdd()
649 if(form->contenttype) in FormAdd()
650 prevtype = form->contenttype; in FormAdd()
657 for(ptr = form; ptr != NULL; ptr = ptr->more) { in FormAdd()
715 int curl_formget(struct curl_httppost *form, void *arg, in curl_formget() argument
722 result = Curl_getformdata(NULL, &toppart, form, NULL); in curl_formget()
749 void curl_formfree(struct curl_httppost *form) in curl_formfree() argument
753 if(!form) in curl_formfree()
758 next = form->next; /* the following form line */ in curl_formfree()
761 curl_formfree(form->more); in curl_formfree()
763 if(!(form->flags & HTTPPOST_PTRNAME)) in curl_formfree()
764 free(form->name); /* free the name */ in curl_formfree()
765 if(!(form->flags & in curl_formfree()
768 free(form->contents); /* free the contents */ in curl_formfree()
769 free(form->contenttype); /* free the content type */ in curl_formfree()
770 free(form->showfilename); /* free the faked filename */ in curl_formfree()
771 free(form); /* free the struct */ in curl_formfree()
772 form = next; in curl_formfree()
773 } while(form); /* continue */ in curl_formfree()
823 curl_mime *form = NULL; in Curl_getformdata() local
832 form = curl_mime_init(data); in Curl_getformdata()
833 if(!form) in Curl_getformdata()
837 result = curl_mime_subparts(finalform, form); in Curl_getformdata()
842 curl_mime *multipart = form; in Curl_getformdata()
844 part = curl_mime_addpart(form); in Curl_getformdata()
947 int curl_formget(struct curl_httppost *form, void *arg, in curl_formget() argument
950 (void) form; in curl_formget()
956 void curl_formfree(struct curl_httppost *form) in curl_formfree() argument
958 (void)form; in curl_formfree()