";
$tempstring="";
$lineLength=0;
continue;
} else {
fseek($fp,$currentLoc);
}
}
$tempstring = $tempstring.$curChar;
$lineLength++;
if($lineLength>=$preferredLineLength) {
$curLoc = ftell($fp);
$difference = $curLoc - $spaceLoc;
if ($difference == 0) {
$tempstring = $tempstring."
\n";
print "$tempstring";
$tempstring="";
$lineLength=0;
continue;
} else if($difference<20){ /* if the difference is bigger than twenty, sod that, the line will be stupidly far wrapped*/
$tempstring = substr($tempstring, 0, (strlen($tempstring)-$difference))."
\n";
print "$tempstring";
$tempstring="";
$lineLength=0;
fseek($fp, $spaceLoc);
} else if ($difference >= 20) {
print "$tempstring -
";
$tempstring="";
$lineLength=0;
}
}
}
print "$tempstring
"; ?>