From e65626904e3c7e8c9073098e11a183d0514692a8 Mon Sep 17 00:00:00 2001 From: moculus Date: Mon, 13 Oct 2008 05:24:12 +0000 Subject: [PATCH] --HG-- branch : pmacs2 --- buffer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/buffer.py b/buffer.py index 0125422..aaa23e6 100644 --- a/buffer.py +++ b/buffer.py @@ -603,7 +603,7 @@ class FileBuffer(Buffer): self.nl = self._detect_nl_type(data) data = self.read_filter(data) data = data.replace("\t", " ") - for i in range(0, min(len(data), 8)): + for i in range(0, min(len(data), 128)): if data[i] not in string.printable: raise BinaryDataException, "binary files are not supported" #FIXME: this is horrible...but maybe not as horrible as using tabs?? @@ -677,6 +677,9 @@ class Binary32Buffer(FileBuffer): def __init__(self, path, name=None): '''fb = FileBuffer(path)''' FileBuffer.__init__(self, path, name) + #self.rawdata = [] + def _detect_nl_type(self, data): + return '\n' def cursorx_to_datax(self, cy, cx): bytespace = 2 + self.bytepad groupspace = bytespace * self.groupsize - self.bytepad + self.grouppad