What happened to Amiga Lib?

5 posts / 0 new
Last post
hypex
hypex's picture
Offline
Last seen: 1 week 4 days ago
Joined: 2011-09-09 16:20
What happened to Amiga Lib?

So I've been using Amiga lib for years in OS4 but some parts are obviously missing. In fact, right now I'm not even sure where to find what functions are even in it. It has no include file and no doc in the SDK. It used to contain some extra Cx functions but they appear to be missing. Well, for me they don't work. ArgString() is working but when I tried using HotKey() I got a linker error about CxBase missing. Does it use it a custom name for the Commodities base? Where is the info for Amiga lib?

msteed
msteed's picture
Offline
Last seen: 2 months 2 weeks ago
Joined: 2022-01-18 08:34
Re: What happened to Amiga Lib?

AmigaLib is still part of the SDK (as of 54.16), though many of the AmigaLib functions are now part of other libraries and may have been removed from AmigaLib itself.

amiga_lib.doc is in there with the rest of the autodocs, though it hasn't been updated since 2001 and still references functions that aren't actually part of it anymore. alib_protos.h and alib_stdio_protos.h are both found in include/clib; that's where you'll find what is actually still in AmigaLib or not.

HotKey() is still there (I used it in PassPocket). It uses commodities.library and so of course that library needs to be open. That's where CxBase comes from.

hypex
hypex's picture
Offline
Last seen: 1 week 4 days ago
Joined: 2011-09-09 16:20
Re: What happened to Amiga Lib?

Thanks for the info. Would you believe I actually did a search of the SDK and didn't see anything? Nothing apart from the clib libamiga.

I like to use the SDK browser but for some reason it can miss docs. So if something is missing I tend to look directly from the browser in the docs. I did not see an amiga_lib.doc in the docs and should be in main docs and not Local docs or somewhere else. :-?

I'm used to these functions from AmigaE since they were ported over. But since I used C on OS4 wasn't I using all the ones I had been using in E for some reason. The error also gives the hint. I had been using CommoditiesBase to store the library but apparently this is incorrect. Amiga lib needs CxBase. I did make up an ICx define to save time. But it's weird that the interface is ICommodties but the base is CxBase. Huh?

The info in the wiki also contradicts. They say all the Amiga lib functions are obsolete and cannot be used any more. But then they list an example that uses them! Not only that but they retrofit the code to things the hard way! This is backwards. I think this needs cleaning up. Clearly there is nothing wrong with using Amiga lib and they need to update it. The functions are still needed and relevant.

https://wiki.amigaos.net/wiki/Commodities_Exchange_Library

jabirulo
jabirulo's picture
Offline
Last seen: 3 days 22 hours ago
Joined: 2013-05-30 00:53
Re: What happened to Amiga Lib?

alib_protos.h
...
/* Commodities functions in amiga.lib|libamiga.a (V36 and higher only) */
VOID ArgArrayDone( VOID );
STRPTR *ArgArrayInit( LONG argc, CONST_STRPTR *argv );
LONG ArgInt( CONST_STRPTR *tt, CONST_STRPTR entry, LONG defaultval );
STRPTR ArgString( CONST_STRPTR *tt, CONST_STRPTR entry,
CONST_STRPTR defaultstring );
CxObj *HotKey( CONST_STRPTR description, struct MsgPort *port, LONG id );
struct InputEvent *InvertString( CONST_STRPTR str, CONST struct KeyMap *km );
VOID FreeIEvents( struct InputEvent *events );
...

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P

hypex
hypex's picture
Offline
Last seen: 1 week 4 days ago
Joined: 2011-09-09 16:20
Re: What happened to Amiga Lib?

So changed my base to be called CxBase and it fixed that up. But there is no matching CxIFace so it looks out of place. Right now solving some type issues with as my types mismatch and getting warnings.

Log in or register to post comments