split only until minimum CB size
replace getline with simple implementation (MinGW has no getline)