# along with wfpl; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-function read_whole_file($name) {
- $fd = fopen($name, 'r');
- if($fd === false) {
- die("Failed to read file: '$name'");
- }
- $file_data = fread($fd, filesize($name));
- fclose($fd);
- return $file_data;
-}
-
function unix_newlines($str) {
$str = str_replace("\r\n", "\n", $str);
return str_replace("\r", "\n", $str);