@thomas & chris
I try to maintain Gui4Cli, it comes with a plug-in which happens to use IFF.library.
If some wrapper could provide its functionality soon i will wait
Anyhow i want to finish the making iff.library available to PPC code as an exercice, make the examples work at least. (in that order)
Having studied the SDK i gave it a try. My try is till now not working
Here is what i did:
The 68k iff.library v23.2 archive comes with the files
http://de4.aminet.net/util/libs/iff.library-23.lha comes notably with
iff.h containg notably the function prototypes
iff_lib.fd
ifflib.doc
I have those in the
Datas:Gui4Cli/Dev/iff_library drawer
and iff.library is present in libs:
According to what we understand from the OS4 SDK, we can obtain all needed files for using this library with PPC code with the following command sequence that ise only using the files iff.h and iff_lib.fd as arguments.
Is this right ?
=== command sequence ===
13.Datas:Gui4Cli/Dev/iff_library> fd2pragma iff_lib.fd CLIB iff.h SPECIAL 112 //=> iff_lib.sfd
SourceFile: iff_lib.fd
Warning 79 in line 193 of clib file: Unknown type of argument 1 (IFFL_HANDLE) handled as int.
ResultFile: iff_lib.sfd (*)
13.Datas:Gui4Cli/Dev/iff_library> fdtrans -s iff_lib.sfd //=> iff.c
13.Datas:Gui4Cli/Dev/iff_library> fdtrans -x iff_lib.sfd //=>iff.xml
13.Datas:Gui4Cli/Dev/iff_library> idltool -c iff.xml // iff_vectors.c
13.Datas:Gui4Cli/Dev/iff_library> idltool -p iff.xml //=><proto/iff.h>
13.Datas:Gui4Cli/Dev/iff_library> idltool -n iff.xml //=> <inline4/iff.h>
13.Datas:Gui4Cli/Dev/iff_library> idltool -i iff.xml //=> <interfaces/iff.h>
13.Datas:Gui4Cli/Dev/iff_library>copy include/#? SDK:include/include_h/ ALL
13.Datas:Gui4Cli/Dev/iff_library> gcc -o iff.l.main -nostartfiles iff.c //> iff.l.main
In file included from iff.c:16:
In file included from iff.c:16:
/SDK/include/include_h/interfaces/iff.h:36: error: expected declaration specifiers or '...' before 'IFFL_HANDLE'
/SDK/include/include_h/interfaces/iff.h:37: error: expected declaration specifiers or '...' before 'IFFL_HANDLE'
/SDK/include/include_h/interfaces/iff.h:38: error: expected declaration specifiers or '...' before 'IFFL_HANDLE'
etc
Can it be that the warning in the generation of iff_lib.sfd causes all the trouble ?
How then can we avoid this ??
(°) !n iff.h we have the following line though
typedef void *IFFL_HANDLE
I noted also a difference in the documentation concerning GetColorTab() function:
LONG IFFFL_GetColorTab( IFF_HANDLE, UWORD * ) /// according to ifflib.doc
LONG IFFL_GetColorTab ( IFFL_HANDLE, WORD * ); /// according to iff.h
The examples use the UWORD form, but i am less suspicious of this as cause of the noted problems