<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I have RTInfo module we developed years ago to parse .M3WEB. Good enough? :) But, not a solution, it is easier to write as I wrote in example I used to illustrate problem.<div><div><br></div><div>GCC not obeying packing instructions is like… GCC not working in lot of cases. For some reason, I don't believe in it.</div><div><br></div><div>Hint, gm2 is GCC based compiler. And supports very precise packing/aligning rules.</div><div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Divided by a common language</div><div><br></div><div>Dragiša Durić</div><div><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Aug 23, 2012, at 9:51 PM, Mika Nystrom wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Well I don't think Jay said that bytes couldn't be unpacked in Modula-3<br>(you can just use Word for that).<br><br>But I think the point was that a compiler back-end might not necessarily<br>obey your packing instructions?<br><br>Here's what I think you should do... it would be super useful, both to<br>you and other people in the future. And completely independent of<br>compilers.<br><br>Write a something-or-other that uses m3tk to read your RECORD type<br>spec, plus pragmas of your own choice (or comments, or auxiliary data<br>from somewhere) and then generates code using Word.T that can process<br>byte streams and return the RECORD you declared, in portable Modula-3.<br>I doubt it's very difficult. m3tk is cool!<br><br> Mika<br><br>=?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">--Apple-Mail=_8871A9FB-3130-4B36-8524-F6549A5CEC9E<br></blockquote><blockquote type="cite">Content-Type: multipart/alternative;<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>boundary="Apple-Mail=_2314A877-555E-4BDE-8112-C875A2AE5122"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--Apple-Mail=_2314A877-555E-4BDE-8112-C875A2AE5122<br></blockquote><blockquote type="cite">Content-Transfer-Encoding: quoted-printable<br></blockquote><blockquote type="cite">Content-Type: text/plain;<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>charset=windows-1250<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have a friend, working for large software company and he just recently =<br></blockquote><blockquote type="cite">ported some message router from SPARC to Linux/Intel=85 Lots of "network =<br></blockquote><blockquote type="cite">order" data, same as with my current projects. Network, communication in =<br></blockquote><blockquote type="cite">general, network order is everywhere.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Insisting on some god-given data ordering is a bit=85 What is nice word =<br></blockquote><blockquote type="cite">here? :) Outlandish? Outimeish?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This is not first time I started discussion like this here. Every single =<br></blockquote><blockquote type="cite">time Jay explains to me how Modula-3 cannot handle it. I am handling it, =<br></blockquote><blockquote type="cite">as I have shown in my example, with Modula-3 code. With a bit of effort =<br></blockquote><blockquote type="cite">I can make it almost-transparent (subfolder/platform) over various =<br></blockquote><blockquote type="cite">platforms. Of course, as I am developing a full product (not software to =<br></blockquote><blockquote type="cite">be run on arbitrary platform) I don't have to worry about too many =<br></blockquote><blockquote type="cite">platforms. One is enough here, but I still think Modula-3 can benefit, =<br></blockquote><blockquote type="cite">and a lot, if it supported explicit byte/bit ordering/packing/aligning =<br></blockquote><blockquote type="cite">pragmas.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Also, unlike GCC, pointer alignment in Modula-3 is 64bit on x86_64. It =<br></blockquote><blockquote type="cite">is 32bit in GCC, and x86_64 is totally happy with it. Wr have 64bit so =<br></blockquote><blockquote type="cite">we must write piece of software in C to be what? Compatible with API's =<br></blockquote><blockquote type="cite">all systems are compatible with without any hassle.=20<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">TIA<br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">Divided by a common language<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Dragi=9Aa Duri=E6<br></blockquote><blockquote type="cite"><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a><br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br></div></div></body></html>