Lines Matching refs:finfo
299 struct curl_fileinfo *finfo) in ftp_pl_insert_finfo() argument
309 char *str = finfo->b_data; in ftp_pl_insert_finfo()
310 finfo->filename = str + parser->offsets.filename; in ftp_pl_insert_finfo()
311 finfo->strings.group = parser->offsets.group ? in ftp_pl_insert_finfo()
313 finfo->strings.perm = parser->offsets.perm ? in ftp_pl_insert_finfo()
315 finfo->strings.target = parser->offsets.symlink_target ? in ftp_pl_insert_finfo()
317 finfo->strings.time = str + parser->offsets.time; in ftp_pl_insert_finfo()
318 finfo->strings.user = parser->offsets.user ? in ftp_pl_insert_finfo()
328 finfo->filename) == 0) { in ftp_pl_insert_finfo()
330 if((finfo->filetype == CURLFILETYPE_SYMLINK) && finfo->strings.target && in ftp_pl_insert_finfo()
331 (strstr(finfo->strings.target, " -> "))) { in ftp_pl_insert_finfo()
340 if(!Curl_llist_insert_next(llist, llist->tail, finfo)) { in ftp_pl_insert_finfo()
341 Curl_fileinfo_dtor(NULL, finfo); in ftp_pl_insert_finfo()
347 Curl_fileinfo_dtor(NULL, finfo); in ftp_pl_insert_finfo()
361 struct curl_fileinfo *finfo; in Curl_ftp_parselist() local
400 finfo = parser->file_data; in Curl_ftp_parselist()
401 finfo->b_data[finfo->b_used++] = c; in Curl_ftp_parselist()
403 if(finfo->b_used >= finfo->b_size - 1) { in Curl_ftp_parselist()
405 char *tmp = realloc(finfo->b_data, in Curl_ftp_parselist()
406 finfo->b_size + FTP_BUFFER_ALLOCSIZE); in Curl_ftp_parselist()
408 finfo->b_size += FTP_BUFFER_ALLOCSIZE; in Curl_ftp_parselist()
409 finfo->b_data = tmp; in Curl_ftp_parselist()
433 finfo->b_used = 0; in Curl_ftp_parselist()
441 finfo->b_used--; in Curl_ftp_parselist()
444 finfo->b_data[parser->item_length - 1] = 0; in Curl_ftp_parselist()
445 if(strncmp("total ", finfo->b_data, 6) == 0) { in Curl_ftp_parselist()
446 char *endptr = finfo->b_data+6; in Curl_ftp_parselist()
459 finfo->b_used = 0; in Curl_ftp_parselist()
473 finfo->filetype = CURLFILETYPE_FILE; in Curl_ftp_parselist()
476 finfo->filetype = CURLFILETYPE_DIRECTORY; in Curl_ftp_parselist()
479 finfo->filetype = CURLFILETYPE_SYMLINK; in Curl_ftp_parselist()
482 finfo->filetype = CURLFILETYPE_NAMEDPIPE; in Curl_ftp_parselist()
485 finfo->filetype = CURLFILETYPE_SOCKET; in Curl_ftp_parselist()
488 finfo->filetype = CURLFILETYPE_DEVICE_CHAR; in Curl_ftp_parselist()
491 finfo->filetype = CURLFILETYPE_DEVICE_BLOCK; in Curl_ftp_parselist()
494 finfo->filetype = CURLFILETYPE_DOOR; in Curl_ftp_parselist()
518 finfo->b_data[10] = 0; /* terminate permissions */ in Curl_ftp_parselist()
519 perm = ftp_pl_get_permission(finfo->b_data + parser->item_offset); in Curl_ftp_parselist()
538 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
553 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
554 hlinks = strtol(finfo->b_data + parser->item_offset, &p, 10); in Curl_ftp_parselist()
575 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
583 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
597 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
605 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
620 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
635 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
636 fsize = curlx_strtoofft(finfo->b_data+parser->item_offset, &p, 10); in Curl_ftp_parselist()
659 parser->item_offset = finfo->b_used -1; in Curl_ftp_parselist()
716 finfo->b_data[parser->item_offset + parser->item_length -1] = 0; in Curl_ftp_parselist()
718 if(ftp_pl_gettime(parser, finfo->b_data + parser->item_offset)) { in Curl_ftp_parselist()
721 if(finfo->filetype == CURLFILETYPE_SYMLINK) { in Curl_ftp_parselist()
741 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
753 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
756 result = ftp_pl_insert_finfo(conn, finfo); in Curl_ftp_parselist()
765 finfo->b_data[parser->item_offset + parser->item_length] = 0; in Curl_ftp_parselist()
768 result = ftp_pl_insert_finfo(conn, finfo); in Curl_ftp_parselist()
785 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
831 finfo->b_data[parser->item_offset + parser->item_length - 4] = 0; in Curl_ftp_parselist()
847 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
862 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
864 result = ftp_pl_insert_finfo(conn, finfo); in Curl_ftp_parselist()
874 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
876 result = ftp_pl_insert_finfo(conn, finfo); in Curl_ftp_parselist()
928 finfo->b_data[parser->item_offset + parser->item_length -1] = 0; in Curl_ftp_parselist()
947 parser->item_offset = finfo->b_used - 1; in Curl_ftp_parselist()
955 finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; in Curl_ftp_parselist()
956 if(strcmp("<DIR>", finfo->b_data + parser->item_offset) == 0) { in Curl_ftp_parselist()
957 finfo->filetype = CURLFILETYPE_DIRECTORY; in Curl_ftp_parselist()
958 finfo->size = 0; in Curl_ftp_parselist()
962 finfo->size = curlx_strtoofft(finfo->b_data + in Curl_ftp_parselist()
966 if(finfo->size == CURL_OFF_T_MAX || in Curl_ftp_parselist()
967 finfo->size == CURL_OFF_T_MIN) { in Curl_ftp_parselist()
994 parser->item_offset = finfo->b_used -1; in Curl_ftp_parselist()
1003 finfo->b_data[finfo->b_used - 1] = 0; in Curl_ftp_parselist()
1007 finfo->b_data[finfo->b_used - 1] = 0; in Curl_ftp_parselist()
1009 result = ftp_pl_insert_finfo(conn, finfo); in Curl_ftp_parselist()
1021 result = ftp_pl_insert_finfo(conn, finfo); in Curl_ftp_parselist()