Note that there are some explanatory texts on larger screens.

plurals
  1. POGet error in the iffw library when trying to write chunk
    primarykey
    data
    text
    <p>When I am trying to use the <a href="http://bullet.googlecode.com/svn/trunk/Extras/iff/" rel="nofollow">EA iffw.c library</a> to write an IFF file, I can't get past the StartWGroup() call. It fails in IFFWriteBytes() because context->ckHdr.ckSize is zero. Inside IFFWriteBytes() there is an if() which checks that (size) != szNotYetKnown. (szNotYetKnown is a constant.) The <a href="http://bullet.googlecode.com/svn/trunk/Extras/iff/iffCreateTest/main.cpp" rel="nofollow">example</a> seems to indicate it should work, but I can't see how. IFFWriteBytes() returns CLIENT_ERROR because nBytes is 4 - I am trying to save a 32 bit int.</p> <p>My failing code:</p> <pre><code>outfp = fopen(outfile, "wb"); ifferr = OpenWIFF(outfp, &amp;filec, szNotYetKnown); if (ifferr) { return 2; } ifferr = StartWGroup(&amp;filec, LIST, sizeof (ID_NATAMI_FLASH), ID_NATAMI_FLASH, &amp;listc); if (ifferr) { printf("ifferr: %d\n", ifferr); return 3; } </code></pre> <p>The last fails, StartWGroup().</p> <p><em>IFF is, like XML, simple enough that I could just generate it without a library, but it would be nice to make use a of once common and well tested library.</em></p> <p><sup>Question is not really about Amiga, but this file format was popular on Amiga. By the way, did you know <a href="http://www.djvuzone.org/open/doc/DjVuFileStructure.html" rel="nofollow">DjVU</a>, <a href="http://docs.python.org/release/2.6.7/library/chunk.html" rel="nofollow">RMFF</a>, <a href="http://www.ibm.com/developerworks/power/library/pa-spec16/" rel="nofollow">AIFF, RIFF and many other formats are IFF or slight variations</a>?</sup></p> <p><strong>Update</strong>: <a href="http://netghost.narod.ru/gff/vendspec/iff/iff.txt" rel="nofollow">easy to read IFF description</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload