I HEKKIN LOVE C
void get_listings_SMALLDATABASE(char_t* listmap, uint64_t fsz, STRING2D_T* taglist, listing_draft_t* RETURN_LISTINGS){
for (uint64_t base = 0; base != -1; base = strpos(listmap,"\nPostID=",base,fsz)){
char* listing_tags = substr_stringdelims(listmap,"TagList=","\nPostingTime=",base,fsz);
if (listing_fits_tags(listing_tags,taglist) == FALSE){
memfree(listing_tags,strlen(listing_tags));
continue;
}
char* post_time_unix_sec = substr_stringdelims(bigstr,"PostingTime=","\nLISTINGEND",base,fsz);
listing_draft_t newdraft ={
.post_time_unix_sec = strtoll(post_time_unix_sec,NULLPTR,0),
.binary_id = substr_stringdelims(listmap,"","\nTitle=",base,fsz);
};
new_draft_overtakes(&newdraft,RETURN_LISTINGS);
memfree(listing_tags,1+strlen(listing_tags));
memfree(post_time_unix_sec,1+strlen(post_time_unix_sec));
memfree(binary_id,1+strlen(binary_id));
}
print_listing_ids(RETURN_LISTINGS);
}