Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: endianness of wordcode



Bart Schaefer wrote:

> On Mar 23,  9:04pm, Peter Stephenson wrote:
> } Subject: endianness of wordcode
> }
> } I'm a little doubtful about the necessity of having doubled wordcode files
> } for different endianness.  [...]  I wonder whether it would be
> } better always to dump in the native format, check if the order is swapped
> } when reading, and if so swap it back on the fly.
> 
> At one point I think the wordcode files were always mmap'd, which meant
> they couldn't be unswapped.  Now that Sven has written the code to read
> the files when mmap isn't available, it should be possible to recognize
> swapped files and switch to reading them -- but it'll be a little messy,
> as swapped-ness won't be detected until after the file is mmap'd.

No, this can be decided by reading only the header, which is done
before mmap'ing a file.

I'm not sure if we want to get rid of the endianess stuff, though. The 
original request for it came because we were thinking about globally
installed wordcode files. I wasn't too hapy with that at the time, but 
*if* global wordcode files are a good idea, we should make them
contain both versions. If we don't do that people may think that the
files are mapped but they aren't, just because they are on the wrong
architecture.

(I'll come back to the other things later...)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author