WTF. Don't cast to int before calling search_buf. This should fix searching large files.
Fix debug print.
Kill this giant super-indented else statement.
Fix crash when aborting regex search of large files.
Add test cases for a big file.