AmigaLib

From Freepascal Amiga wiki
Revision as of 00:10, 15 January 2016 by Molly (talk | contribs) (→‎AmigaLib Table: Fill some entries)
Jump to navigation Jump to 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
DeleteStdIO
DeleteTask
DoDTMethod
DoGadgetMethod
DoMethod
DoMethodA
DoSuperMethod
DoSuperMethodA
DoSuperNew
DoTimer
DrawBevelBox
EasyRequest
ErrorOutput
ExtendFontTags
FastRand
fpa
fpbcd
fprintf
FreeIEvents
fwritef
GetDTAttrs
GetExtSprite
GetRexxVar
GetRPAttrs
GetVisualInfo
GT_GetGadgetAttrs
GT_SetGadgetAttrs
HookEntry
HotKey
InvertString
InvertStringForward
LayoutMenuItems
LayoutMenus
LibAllocAligned
LibAllocPooled
LibCreatePool
LibDeletePool
LibFreePooled
LockBitmapTags
MakeDirAll
MakeWorkbenchObjectVisible
MergeSortList
NewDTObject
NewList
NewLoadSegTags
NewObject
NewRawDoFmt
NewRectRegion
ObtainBestPen
ObtainInfo
OpenAmigaGuide
OpenAmigaGuideAsync
OpenCatalog
OpenMakeDir
OpenScreenTags
OpenWindowTags
OpenWorkbenchObject
printf
RangeRand
RefreshDTObject
RefreshDTObjects
ReleaseInfo
RemTOF
RemoveAmigaGuideHost
SelectErrorOutput
SendAmigaGuideCmd
SendAmigaGuideContext
SetAmigaGuideAttrs
SetAmigaGuideContext
SetAttrs
SetDTAttrs
SetGadgetAttrs
SetInfo
SetRexxVar
SetRPAttrs
SetSuperAttrs
SetSuperAttrsA
SetWindowPointer
sprintf
strdup
SystemTags
TimeDelay
UnlockBitmapTags
VideoControlTags
waitbeam
WorkbenchControl

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