branch : pmacs2
This commit is contained in:
moculus 2008-10-13 05:24:12 +00:00
parent 993d6f8269
commit e65626904e
1 changed files with 4 additions and 1 deletions

View File

@ -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