Mail Archives: djgpp/1998/10/10/13:26:31
thanks for all your help guys, I really appreciate it.
so there's no way of actually telling the program to open a file and use a
certain endianness to read or write to it then. I know that e.g. in
matlab when you are using their fopen the syntax is:
fopen("filename","permission","architechture")
where "permission" is equal to mode in DJGPP, and "architecture"
determines the endianess of the file, so that everytime you read/write to
that specific file the data gets saved in the selected format.
Right now I swap the bytes after I read them or before I write them, but
it is becoming more complicated to do so as the program evolves, I'm
starting to wonder how complicated is it to overload the fopen in DJGPP to
include a syntax similar to the one I mentioned above ? I haven't even
started looking at the source for fopen so I have really no idea what I
would be getting myself into. Would this be a reasonable way of
simplyfying my code or am I opening myself up for more trouble ?
unfortunately I have to conform to an outside requirement of
reading/writing in big endian since some of the files that I am using are
created with a program that I have no control over and belive it or not
was designed to conform to the old pascal OS way of storing data even
though it runs under DOS/win3.1. Otherwise I would not have this problem
at all.
Siggi
- Raw text -