AmigaLib

From Freepascal Amiga wiki
Revision as of 17:25, 16 January 2016 by Molly (Talk | contribs) (AmigaLib Table: fill some more additional entries)

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 workbench
AddAppMenuItem workbench alib systemvartags
AddAppWindow workbench alib systemvartags
AddAppWindowDropZone workbench alib
AllocAslRequestTags asl alib systemvartags
AllocDosObjectTags dos alib systemvartags
AllocNamedObject utility alib systemvartags
AllocSpriteData graphics alib systemvartags
AndRectRect n/a alib n/a
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 n/i n/a
arnd amiga_lib n/i alib n/i n/i n/i
AslRequestTags asl alib systemvartags
asmallocpooled n/a alib n/a
asmcreatepool n/a alib n/a
asmdeletepool n/a alib n/a
asmfreepooled n/a alib n/a
BeginIO amiga_lib alib alib amigalib amigalib n/i
BestCModeIDTags n/a alib
BestModeID graphics alib systemvartags
BuildEasyRequest intuition alib
CallHook amiga_lib alib alib n/i amigalib n/i
CallHookA amiga_lib alib alib n/i amigalib n/i
ChangeExtSprite graphics alib systemvartags
CheckRexxMsg amiga_lib alib alib n/i amigalib n/i
CloseWorkbenchObject workbench alib
CoerceMethod amiga_lib alib alib n/i amigalib n/i
CoerceMethodA amiga_lib alib alib amigalib amigalib n/i
CopyRegion n/a alib n/a
CreateExtIO amiga_lib alib alib amigalib amigalib n/i
CreateGadget gadtools alib
CreateMenus gadtools alib systemvartags
CreateNewProcTags dos alib systemvartags
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
DoGadgetMethod intuition alib
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
DoTimer n/a n/a alib
DrawBevelBox gadtools alib systemvartags
EasyRequest intuition alib
ErrorOutput n/a alib
ExtendFontTags graphics alib systemvartags
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
fprintf amiga_lib alib
FreeIEvents amiga_lib alib alib amigalib amigalib n/i
fwritef n/a alib n/i n/i n/i
GetDTAttrs datatypes alib
GetExtSprite graphics alib
GetRexxVar amiga_lib alib alib n/i amigalib n/i
GetRPAttrs graphics alib
GetVisualInfo gadtools alib
GT_GetGadgetAttrs gadtools alib
GT_SetGadgetAttrs gadtools alib
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
LayoutMenus gadtools alib
LibAllocAligned n/a alib n/i
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
MakeDirAll n/a n/a alib
MakeWorkbenchObjectVisible workbench alib
MergeSortList n/a alib
NewDTObject datatypes alib
NewList amiga_lib alib alib amigalib amigalib n/i
NewLoadSegTags dos alib
NewObject intuition alib
NewRawDoFmt n/a alib
NewRectRegion n/a alib
ObtainBestPen graphics alib
ObtainInfo bullet alib
OpenAmigaGuide amigaguide alib n/a
OpenAmigaGuideAsync amigaguide alib n/a
OpenCatalog locale alib
OpenMakeDir n/a n/a alib
OpenScreenTags intuition alib
OpenWindowTags intuition alib
OpenWorkbenchObject workbench alib
printf amiga_lib alib amigalib n/i n/i
RangeRand amiga_lib alib alib n/i amigalib n/i
RefreshDTObject datatypes alib
RefreshDTObjects n/a alib
ReleaseInfo bullet alib
RemTOF amiga_lib n/a alib n/i n/i n/i
RemoveAmigaGuideHost amigaguide alib
SelectErrorOutput n/a alib
SendAmigaGuideCmd amigaguide alib
SendAmigaGuideContext amigaguide alib
SetAmigaGuideAttrs amigaguide alib
SetAmigaGuideContext amigaguide alib
SetAttrs intuition alib
SetDTAttrs datatypes alib
SetGadgetAttrs intuition alib
SetInfo bullet alib
SetRexxVar amiga_lib alib alib n/i amigalib n/i
SetRPAttrs graphics alib
SetSuperAttrs amiga_lib alib n/i amigalib n/i
SetSuperAttrsA alib alib amigalib amigalib/purple n/i
SetWindowPointer intuition alib
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
TimeDelay amiga_lib alib alib n/i amigalib n/i
UnlockBitmapTags n/a alib n/a n/i
VideoControlTags graphics alib
waitbeam n/a n/a alib n/i n/i n/i
WorkbenchControl workbench alib


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