AmigaLib

From Freepascal Amiga wiki
Revision as of 22:58, 18 January 2016 by Molly (Talk | contribs) (AmigaLib Table: update (current) function unit locations for target AROS column) (still needs verification against trunk))

Jump to: navigation, search

Introduction

Unit amigalib is a unit that has its origin in Classic Amiga amiga_lib headers.


The Problem

Functions declared inside unit AmigaLib are primarily dictated by their c counter part on the underlying platform (plus some additional helpful routines that we can use ?).

On Classic there are c headers for amiga_lib, on AROS there are the alib headers, while on MorphOS we have something similar also using alib headers.

As usual, none of the available c headers offer any kind of unification, making a big mess of things when attempting to transfer to Pascal. AROS alib complicate things even further because alib was heavily expanded there, overlapping most of the functions declared in classic Amiga unit sysvartags.

Since (currently) none of the available AmigaLib units contain all function implementations, there is room to toy around a little and attempting to organize the big messy pile.

In order to do so, you can find a very large table, that contains all functions declared in their c counterparts that originates from their c-headers and which theoretically all belong to unit AmigaLib. The fact that some functions are not available on all supported platforms does not really matter as much.

The goal of the table is to provide information on where the functions originate from, and be able to decide into which Pascal unit they need to end up.

Note that implementing all functions inside the same unit poses the same difficulties encountered with classic Amiga unit sysvartags. There are some questions that requires answering before able to continue with this unit (See Below).

AmigaLib Table

In the table below the left subtable contains the original c location, while the right subtable displays the pascal unit location in which the function (is) located).

List of amiga lib functions and their location/status (c/Pascal) per platform
Function OS3.x AROS MorphOS OS3.x AROS MorphOS Remark(s)
ACrypt amiga_lib alib alib n/i amigalib n/i
AddAmigaguideHost amigaguide alib systemvartags n/a
AddAppIcon workbench alib n/i workbench
AddAppMenuItem workbench alib systemvartags workbench
AddAppWindow workbench alib systemvartags workbench
AddAppWindowDropZone workbench alib n/i workbench
AllocAslRequestTags asl alib systemvartags
AllocDosObjectTags dos alib systemvartags amigados
AllocNamedObject utility alib systemvartags utility
AllocSpriteData graphics alib systemvartags agraphics
AndRectRect n/a alib n/a agraphics
AddTOF amiga_lib n/i alib n/i n/i n/i
afp amiga_lib n/i alib n/i n/i n/i
ArgArrayDone amiga_lib alib alib n/i amigalib n/i
ArgArrayInit amiga_lib alib alib n/i amigalib n/i
ArgInt amiga_lib alib alib n/i amigalib n/i
ArgString amiga_lib alib alib n/i amigalib n/i
ArosInquire n/a alib n/a n/a amigalib n/a
arnd amiga_lib n/i alib n/i n/i n/i
AslRequestTags asl alib systemvartags
asmallocpooled n/a alib n/a n/a amigalib
asmcreatepool n/a alib n/a n/a amigalib
asmdeletepool n/a alib n/a n/a amigalib
asmfreepooled n/a alib n/a n/a amigalib
BeginIO amiga_lib alib alib amigalib amigalib n/i
BestCModeIDTags n/a alib cybergraphics cybergraphics
BestModeID graphics alib systemvartags agraphics
BuildEasyRequest intuition alib n/i intuition
CallHook amiga_lib alib alib n/i amigalib/utility n/i
CallHookA amiga_lib alib alib n/i amigalib n/i
ChangeExtSprite graphics alib systemvartags agraphics
CheckRexxMsg amiga_lib alib alib n/i amigalib n/i
CloseWorkbenchObject workbench alib n/i workbench
CoerceMethod amiga_lib alib alib n/i amigalib/intuition n/i
CoerceMethodA amiga_lib alib alib amigalib amigalib/intuition n/i
CopyRegion n/a alib n/a n/a amigalib/agraphics
CreateExtIO amiga_lib alib alib amigalib amigalib n/i
CreateGadget gadtools alib systemvartags n/i
CreateMenus gadtools alib systemvartags n/i
CreateNewProcTags dos alib systemvartags amigados
CreatePort amiga_lib alib alib amigalib amigalib n/i
CreateStdIO amiga_lib alib alib amigalib amigalib n/i
CreateTask amiga_lib alib alib amigalib amigalib n/i
CxCustom amiga_lib commodities amigalib amigalib n/i
CxDebug amiga_lib commodities amigalib amigalib n/i
CxFilter amiga_lib commodities amigalib amigalib n/i
CxSender amiga_lib commodoties amigalib amigalib n/i
CxSignal amiga_lib commodities amigalib amigalib n/i
CxTranslate amiga_lib commodities amigalib amigalib n/i
dbf amiga_lib n/i alib n/i n/i n/i
DISPATCHERARG n/a n/a n/a n/a n/a amigalib/purple
DeleteExtIO amiga_lib alib alib amigalib amigalib n/i
DeletePort amiga_lib alib alib amigalib amigalib n/i
DeleteStdIO amiga_lib alib alib amigalib amigalib n/i
DeleteTask amiga_lib alib alib amigalib amigalib n/i
DoDTMethod datatypes alib n/i datatypes
DoGadgetMethod intuition alib n/i
DoMethod amiga_lib alib alib n/i amigalib amigalib
DoMethodA amiga_lib alib alib amigalib amigalib amigalib
DoSuperMethod amiga_lib alib alib n/i amigalib amigalib
DoSuperMethodA amiga_lib alib alib amigalib amigalib amigalib
DoSuperNew n/a alib alib n/a amigalib n/i
DoTimer n/a n/a alib n/a n/a
DrawBevelBox gadtools alib systemvartags n/i
EasyRequest intuition alib n/i intuition
ErrorOutput n/a alib n/a amigalib
ExtendFontTags graphics alib systemvartags agraphics
FastRand amiga_lib alib alib n/i amigalib n/i
fpa amiga_lib n/a alib n/i n/i n/i
fpbcd n/a n/a alib n/a n/a
fprintf amiga_lib alib n/i n/i
FreeIEvents amiga_lib alib alib amigalib amigalib n/i
fwritef n/a alib n/i n/i n/i
GetDTAttrs datatypes alib systemvartags datatypes
GetExtSprite graphics alib systemvartags agraphics
GetRexxVar amiga_lib alib alib n/i amigalib n/i
GetRPAttrs graphics alib systemvartags agraphics
GetVisualInfo gadtools alib systemvartags n/i
GT_GetGadgetAttrs gadtools alib systemvartags n/i
GT_SetGadgetAttrs gadtools alib systemvartags n/i
HookEntry amiga_lib alib alib amigalib amigalib/purple amigalib/purple
HotKey amiga_lib alib alib n/i amigalib n/i
InvertString amiga_lib alib alib n/i amigalib n/i
InvertStringForward n/a alib n/a amigalib
LayoutMenuItems gadtools alib systemvartags n/i
LayoutMenus gadtools alib systemvartags n/i
LibAllocAligned n/a alib n/a amigalib
LibAllocPooled amiga_lib alib alib n/i amigalib n/i
LibCreatePool amiga_lib alib alib n/i amigalib n/i
LibDeletePool amiga_lib alib alib n/i amigalib n/i
LibFreePooled amiga_lib alib alib n/i amigalib n/i
LockBitmapTags n/a alib cybergraphics cybergraphics/purple
MakeDirAll n/a n/a alib n/a n/a
MakeWorkbenchObjectVisible workbench alib n/i workbench
MergeSortList n/a alib n/a n/i
NewDTObject datatypes alib systemvartags datatypes
NewList amiga_lib alib alib amigalib amigalib/exec n/i
NewLoadSegTags dos alib systemvartags amigados
NewObject intuition alib systemvartags intuition
NewRawDoFmt n/a alib n/a n/i
NewRectRegion n/a alib n/a amigalib/agraphics
ObtainBestPen graphics alib systemvartags agraphics
ObtainInfo bullet alib systemvartags n/a
OpenAmigaGuide amigaguide alib systemvartags n/a
OpenAmigaGuideAsync amigaguide alib systemvartags n/a
OpenCatalog locale alib systemvartags locale
OpenMakeDir n/a n/a alib n/a n/a
OpenScreenTags intuition alib systemvartags intuition
OpenWindowTags intuition alib systemvartags intuition
OpenWorkbenchObject workbench alib n/i workbench
printf amiga_lib alib amigalib n/i n/i
RangeRand amiga_lib alib alib n/i amigalib n/i
RefreshDTObject datatypes alib systemvartags datatypes
RefreshDTObjects n/a alib n/a n/i
ReleaseInfo bullet alib systemvartags n/a
RemTOF amiga_lib n/a alib n/i n/i n/i
RemoveAmigaGuideHost amigaguide alib systemvartags n/a
SelectErrorOutput n/a alib n/a amigalib
SendAmigaGuideCmd amigaguide alib systemvartags n/a
SendAmigaGuideContext amigaguide alib systemvartags n/a
SetAmigaGuideAttrs amigaguide alib systemvartags n/a
SetAmigaGuideContext amigaguide alib systemvartags n/a
SetAttrs intuition alib n/i
SetDTAttrs datatypes alib systemvartags datatypes
SetGadgetAttrs intuition alib systemvartags intuition
SetInfo bullet alib systemvartags n/a
SetRexxVar amiga_lib alib alib n/i amigalib n/i
SetRPAttrs graphics alib systemvartags agraphics
SetSuperAttrs amiga_lib alib n/i amigalib/intuition n/i
SetSuperAttrsA alib alib amigalib amigalib/purple n/i
SetWindowPointer intuition alib n/i intuition
sprintf amiga_lib alib libc? n/i n/i n/i
strdup amiga_lib alib libc? n/i n/i n/i
SystemTags dos alib systemvartags amigados
TimeDelay amiga_lib alib alib n/i amigalib n/i
UnlockBitmapTags n/a alib cybergraphics cybergraphics/purple
VideoControlTags graphics alib systemvartags agraphics
waitbeam n/a n/a alib n/a n/a n/i
WorkbenchControl workbench alib n/i workbench

legend:

red = unimplemented
red + n/a = unimplemented, no other implementation available (e.g. no c, no pascal meaning implement from scratch).
blue = implemented, untested
purple = difficulty, discuss first
Green = implemented, tested, and having correct (pascal) location mentioned

Questions