Anuradha wrote:
We attempted reading them bit by bit . We attempted giving 'packed' before records. We attempted giving --pack-struct . The last gave compilation errors and the first and the second are not all that simple to incorporate in the code because there are many types with records within records within records within records... Is there no way out other than to (vastly) change the code? BTW, Is implementation of the alignment-size-indication($Z) planned?
Please do not toppost - the result has been to lose all the context here.
Simply write one routine, whose purpose is to input that record (or a sequence of them) from the file. Write the routine in terms of sequential bytes. If you want to maintain backward compatibility write a corresponding output routine. You will have subroutines to take a particular sequence of bytes and convert to a particular type.
In general portable files should not be written as binary.