Browse Source

palmunits: change the obsolete dispatcher wrappers to syscalls, batch 1

git-svn-id: trunk@36893 -
Károly Balogh 8 years ago
parent
commit
8920d35c41

+ 14 - 121
packages/palmunits/src/connectionmgr.pp

@@ -403,29 +403,30 @@ const
  * New  Connection Mgr API
  * New  Connection Mgr API
  ***********************************************************************)
  ***********************************************************************)
 
 
-function CncProfileSettingGet(profileId: CncProfileID; paramId: UInt16; paramBufferP: Pointer; var ioParamSizeP: UInt16): Err;
+function CncProfileSettingGet(profileId: CncProfileID; paramId: UInt16; paramBufferP: Pointer; var ioParamSizeP: UInt16): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileSettingGet;
 
 
-function CncProfileSettingSet(iProfileId: CncProfileID; paramId: UInt16; const paramBufferP: Pointer; paramSize: UInt16): Err;
+function CncProfileSettingSet(iProfileId: CncProfileID; paramId: UInt16; const paramBufferP: Pointer; paramSize: UInt16): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileSettingSet;
 
 
-function CncProfileSetCurrent(profileId: CncProfileID): Err;
+function CncProfileSetCurrent(profileId: CncProfileID): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileSetCurrent;
 
 
-function CncProfileGetCurrent(var profileIdP: CncProfileID): Err;
+function CncProfileGetCurrent(var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileGetCurrent;
 
 
-function CncProfileGetIDFromName(const profileNameP: PChar; var profileIdP: CncProfileID): Err;
+function CncProfileGetIDFromName(const profileNameP: PChar; var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileGetIDFromName;
 
 
-function CncProfileCreate(var profileIdP: CncProfileID): Err;
+function CncProfileCreate(var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileCreate;
 
 
-function CncProfileDelete(profileId: CncProfileID): Err;
+function CncProfileDelete(profileId: CncProfileID): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileDelete;
 
 
-function CncProfileGetIDFromIndex(index: UInt16; var profileIdP: CncProfileID): Err;
+function CncProfileGetIDFromIndex(index: UInt16; var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileGetIDFromIndex;
 
 
-function CncProfileGetIndex(profileId: CncProfileID; var indexP: UInt16): Err;
+function CncProfileGetIndex(profileId: CncProfileID; var indexP: UInt16): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileGetIndex;
 
 
-function CncProfileCount(var profilesCountP: UInt16): Err;
+function CncProfileCount(var profilesCountP: UInt16): Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileCount;
 
 
-function CncProfileOpenDB: Err;
+function CncProfileOpenDB: Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileOpenDB;
+
+function CncProfileCloseDB: Err; syscall sysTrapCncMgrDispatch, sysTrapCncMgrProfileCloseDB;
 
 
-function CncProfileCloseDB: Err;
 
 
 (***********************************************************************
 (***********************************************************************
  * Old  Connection Mgr API, For compatibility only
  * Old  Connection Mgr API, For compatibility only
@@ -457,115 +458,7 @@ function CncAddProfile(name: PChar; port, baud: UInt32; volum, handShake: UInt16
 
 
 function CncDeleteProfile(const name: PChar): Err; syscall sysTrapCncDeleteProfile;
 function CncDeleteProfile(const name: PChar): Err; syscall sysTrapCncDeleteProfile;
 
 
-implementation
 
 
-function __CncProfileSettingGet(profileId: CncProfileID; paramId: UInt16; paramBufferP: Pointer; var ioParamSizeP: UInt16): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileSettingSet(iProfileId: CncProfileID; paramId: UInt16; const paramBufferP: Pointer; paramSize: UInt16): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileSetCurrent(profileId: CncProfileID): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileGetCurrent(var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileGetIDFromName(const profileNameP: PChar; var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileCreate(var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileDelete(profileId: CncProfileID): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileGetIDFromIndex(index: UInt16; var profileIdP: CncProfileID): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileGetIndex(profileId: CncProfileID; var indexP: UInt16): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileCount(var profilesCountP: UInt16): Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileOpenDB: Err; syscall sysTrapCncMgrDispatch;
-function __CncProfileCloseDB: Err; syscall sysTrapCncMgrDispatch;
-
-function CncProfileSettingGet(profileId: CncProfileID; paramId: UInt16; paramBufferP: Pointer; var ioParamSizeP: UInt16): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileSettingGet, D2
- end;
- CncProfileSettingGet := __CncProfileSettingGet(profileId, paramId, paramBufferP, ioParamSizeP);
-end;
-
-function CncProfileSettingSet(iProfileId: CncProfileID; paramId: UInt16; const paramBufferP: Pointer; paramSize: UInt16): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileSettingSet, D2
- end;
- CncProfileSettingSet := __CncProfileSettingSet(iProfileId, paramId, paramBufferP, paramSize);
-end;
-
-function CncProfileSetCurrent(profileId: CncProfileID): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileSetCurrent, D2
- end;
- CncProfileSetCurrent := __CncProfileSetCurrent(profileId);
-end;
-
-function CncProfileGetCurrent(var profileIdP: CncProfileID): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileGetCurrent, D2;
- end;
- CncProfileGetCurrent := __CncProfileGetCurrent(profileIdP);
-end;
-
-function CncProfileGetIDFromName(const profileNameP: PChar; var profileIdP: CncProfileID): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileGetIDFromName, D2;
- end;
- CncProfileGetIDFromName := __CncProfileGetIDFromName(profileNameP, profileIdP);
-end;
-
-function CncProfileCreate(var profileIdP: CncProfileID): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileCreate, D2;
- end;
- CncProfileCreate := __CncProfileCreate(profileIdP);
-end;
-
-function CncProfileDelete(profileId: CncProfileID): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileDelete, D2;
- end;
- CncProfileDelete := __CncProfileDelete(profileId);
-end;
-
-function CncProfileGetIDFromIndex(index: UInt16; var profileIdP: CncProfileID): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileGetIDFromIndex, D2;
- end;
- CncProfileGetIDFromIndex := __CncProfileGetIDFromIndex(index, profileIdP);
-end;
-
-function CncProfileGetIndex(profileId: CncProfileID; var indexP: UInt16): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileGetIndex, D2;
- end;
- CncProfileGetIndex := __CncProfileGetIndex(profileID, indexP);
-end;
-
-function CncProfileCount(var profilesCountP: UInt16): Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileCount, D2
- end;
- CncProfileCount := __CncProfileCount(profilesCountP);
-end;
-
-function CncProfileOpenDB: Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileOpenDB, D2;
- end;
- CncProfileOpenDB := __CncProfileOpenDB;
-end;
-
-function CncProfileCloseDB: Err;
-begin
- asm
-  move.l #sysTrapCncMgrProfileCloseDB, D2;
- end;
- CnCProfileCloseDB := __CncProfileCloseDB;
-end;
+implementation
 
 
 end.
 end.

+ 13 - 121
packages/palmunits/src/expansionmgr.pp

@@ -108,130 +108,22 @@ const
   expSlotEnumerate_     = 10;
   expSlotEnumerate_     = 10;
   expCardGetSerialPort_ = 11;
   expCardGetSerialPort_ = 11;
   expMaxSelector        = expCardGetSerialPort_;
   expMaxSelector        = expCardGetSerialPort_;
-function ExpInit: Err;
-function ExpSlotDriverInstall(dbCreator: UInt32; var slotLibRefNumP: UInt16): Err;
-function ExpSlotDriverRemove(slotLibRefNum: UInt16): Err;
-function ExpSlotLibFind(slotRefNum: UInt16; var slotLibRefNum: UInt16): Err;
-function ExpSlotRegister(slotLibRefNum: UInt16; var slotRefNum: UInt16): Err;
-function ExpSlotUnregister(slotRefNum: UInt16): Err;
-function ExpCardInserted(slotRefNum: UInt16): Err;
-function ExpCardRemoved(slotRefNum: UInt16): Err;
-function ExpCardPresent(slotRefNum: UInt16): Err;
-function ExpCardInfo(slotRefNum: UInt16; var infoP: ExpCardInfoType): Err;
-function ExpSlotEnumerate(var slotRefNumP: UInt16; var slotIteratorP: UInt32): Err;
-function ExpCardGetSerialPort(slotRefNum: UInt16; var portP: UInt32): Err;
 
 
-implementation
-(**)
-function __ExpInit: Err; syscall sysTrapExpansionMgr;
-function __ExpSlotDriverInstall(dbCreator: UInt32; var slotLibRefNumP: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpSlotDriverRemove(slotLibRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpSlotLibFind(slotRefNum: UInt16; var slotLibRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpSlotRegister(slotLibRefNum: UInt16; var slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpSlotUnregister(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpCardInserted(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpCardRemoved(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpCardPresent(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr;
-function __ExpCardInfo(slotRefNum: UInt16; var infoP: ExpCardInfoType): Err; syscall sysTrapExpansionMgr;
-function __ExpSlotEnumerate(var slotRefNumP: UInt16; var slotIteratorP: UInt32): Err; syscall sysTrapExpansionMgr;
-function __ExpCardGetSerialPort(slotRefNum: UInt16; var portP: UInt32): Err; syscall sysTrapExpansionMgr;
-(**)
-
-function ExpInit: Err;
-begin
- asm
-  move.l #expInit_,D2;
- end;
- ExpInit := __ExpInit;
-end;
-
-function ExpSlotDriverInstall(dbCreator: UInt32; var slotLibRefNumP: UInt16): Err;
-begin
- asm
-  move.l #expSlotDriverInstall_,D2;
- end;
- ExpSlotDriverInstall := __ExpSlotDriverInstall(dbCreator, slotLibRefNumP);
-end;
-
-function ExpSlotDriverRemove(slotLibRefNum: UInt16): Err;
-begin
- asm
-  move.l #expSlotDriverRemove_,D2;
- end;
- ExpSlotDriverRemove := __ExpSlotDriverRemove(slotLibRefNum);
-end;
-
-function ExpSlotLibFind(slotRefNum: UInt16; var slotLibRefNum: UInt16): Err;
-begin
- asm
-  move.l #expSlotLibFind_,D2;
- end;
- ExpSlotLibFind := __ExpSlotLibFind(slotRefNum, slotLibRefNum);
-end;
-
-function ExpSlotRegister(slotLibRefNum: UInt16; var slotRefNum: UInt16): Err;
-begin
- asm
-  move.l #expSlotRegister_,D2;
- end;
- ExpSlotRegister := __ExpSlotRegister(slotLibRefNum, slotRefNum);
-end;
+function ExpInit: Err; syscall sysTrapExpansionMgr, expInit_;
+function ExpSlotDriverInstall(dbCreator: UInt32; var slotLibRefNumP: UInt16): Err; syscall sysTrapExpansionMgr, expSlotDriverInstall_;
+function ExpSlotDriverRemove(slotLibRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expSlotDriverRemove_;
+function ExpSlotLibFind(slotRefNum: UInt16; var slotLibRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expSlotLibFind_;
+function ExpSlotRegister(slotLibRefNum: UInt16; var slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expSlotRegister_;
+function ExpSlotUnregister(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expSlotUnregister_;
+function ExpCardInserted(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expCardInserted_;
+function ExpCardRemoved(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expCardRemoved_;
+function ExpCardPresent(slotRefNum: UInt16): Err; syscall sysTrapExpansionMgr, expCardPresent_;
+function ExpCardInfo(slotRefNum: UInt16; var infoP: ExpCardInfoType): Err; syscall sysTrapExpansionMgr, expCardInfo_;
+function ExpSlotEnumerate(var slotRefNumP: UInt16; var slotIteratorP: UInt32): Err; syscall sysTrapExpansionMgr, expSlotEnumerate_;
+function ExpCardGetSerialPort(slotRefNum: UInt16; var portP: UInt32): Err; syscall sysTrapExpansionMgr, expCardGetSerialPort_;
 
 
-function ExpSlotUnregister(slotRefNum: UInt16): Err;
-begin
- asm
-  move.l #expSlotUnregister_,D2;
- end;
- ExpSlotUnregister := __ExpSlotUnregister(slotRefNum);
-end;
 
 
-function ExpCardInserted(slotRefNum: UInt16): Err;
-begin
- asm
-  move.l #expCardInserted_,D2;
- end;
- ExpCardInserted := __ExpCardInserted(slotRefNum);
-end;
-
-function ExpCardRemoved(slotRefNum: UInt16): Err;
-begin
- asm
-  move.l #expCardRemoved_,D2;
- end;
- ExpCardRemoved := __ExpCardRemoved(slotRefNum);
-end;
-
-function ExpCardPresent(slotRefNum: UInt16): Err;
-begin
- asm
-  move.l #expCardPresent_,D2;
- end;
- ExpCardPresent := __ExpCardPresent(slotRefNum);
-end;
-
-function ExpCardInfo(slotRefNum: UInt16; var infoP: ExpCardInfoType): Err;
-begin
- asm
-  move.l #expCardInfo_,D2;
- end;
- ExpCardInfo := __ExpCardInfo(slotRefNum, infoP);
-end;
-
-function ExpSlotEnumerate(var slotRefNumP: UInt16; var slotIteratorP: UInt32): Err;
-begin
- asm
-  move.l #expSlotEnumerate_,D2;
- end;
- ExpSlotEnumerate := __ExpSlotEnumerate(slotRefNumP, slotIteratorP);
-end;
-
-function ExpCardGetSerialPort(slotRefNum: UInt16; var portP: UInt32): Err;
-begin
- asm
-  move.l #expCardGetSerialPort_,D2;
- end;
- ExpCardGetSerialPort := __ExpCardGetSerialPort(slotRefNum, portP);
-end;
+implementation
 
 
 
 
 end.
 end.

+ 3 - 21
packages/palmunits/src/intlmgr.pp

@@ -103,31 +103,13 @@ type
 
 
 // Return back the address of the routine indicated by <inSelector>. If
 // Return back the address of the routine indicated by <inSelector>. If
 // <inSelector> isn't a valid routine selector, return back NULL.
 // <inSelector> isn't a valid routine selector, return back NULL.
-function IntlGetRoutineAddress(inSelector: IntlSelector): Pointer;
+function IntlGetRoutineAddress(inSelector: IntlSelector): Pointer; syscall sysTrapIntlDispatch, intlIntlGetRoutineAddress;
 
 
 // Set the address of the international mgr routine indicated by <iSelector>
 // Set the address of the international mgr routine indicated by <iSelector>
 // to be <iProcPtr>. If <iSelector> isn't valid, return an error.
 // to be <iProcPtr>. If <iSelector> isn't valid, return an error.
-function IntlSetRoutineAddress(iSelector: IntlSelector; iProcPtr: Pointer): Err;
+function IntlSetRoutineAddress(iSelector: IntlSelector; iProcPtr: Pointer): Err; syscall sysTrapIntlDispatch, intlIntlSetRoutineAddress;
 
 
-implementation
 
 
-function __IntlGetRoutineAddress(inSelector: IntlSelector): Pointer; syscall sysTrapIntlDispatch;
-function __IntlSetRoutineAddress(iSelector: IntlSelector; iProcPtr: Pointer): Err; syscall sysTrapIntlDispatch;
-
-function IntlGetRoutineAddress(inSelector: IntlSelector): Pointer;
-begin
- asm
-  move.l #intlIntlGetRoutineAddress, D2;
- end;
- IntlGetRoutineAddress := __IntlGetRoutineAddress(inSelector);
-end;
-
-function IntlSetRoutineAddress(iSelector: IntlSelector; iProcPtr: Pointer): Err;
-begin
- asm
-  move.l #intlIntlSetRoutineAddress, D2;
- end;
- IntlSetRoutineAddress := __IntlSetRoutineAddress(iSelector, iProcPtr);
-end;
+implementation
 
 
 end.
 end.

+ 4 - 34
packages/palmunits/src/localemgr.pp

@@ -187,12 +187,12 @@ type
 
 
 // Return the number of known locales (maximum locale index + 1).
 // Return the number of known locales (maximum locale index + 1).
 
 
-function LmGetNumLocales: UInt16; // syscall sysTrapLmDispatch, lmGetNumLocales_;
+function LmGetNumLocales: UInt16; syscall sysTrapLmDispatch, lmGetNumLocales_;
 
 
 // Convert <iLocale> to <oLocaleIndex> by locating it within the set of known
 // Convert <iLocale> to <oLocaleIndex> by locating it within the set of known
 // locales.
 // locales.
 
 
-function LmLocaleToIndex({const} var iLocale: LmLocaleType; var oLocaleIndex: UInt16): Err; // syscall sysTrapLmDispatch, lmLocaleToIndex_;
+function LmLocaleToIndex({const} var iLocale: LmLocaleType; var oLocaleIndex: UInt16): Err; syscall sysTrapLmDispatch, lmLocaleToIndex_;
 
 
 // Return in <oValue> the setting identified by <iChoice> which is appropriate for
 // Return in <oValue> the setting identified by <iChoice> which is appropriate for
 // the locale identified by <iLocaleIndex>.  Return lmErrSettingDataOverflow if the
 // the locale identified by <iLocaleIndex>.  Return lmErrSettingDataOverflow if the
@@ -200,39 +200,9 @@ function LmLocaleToIndex({const} var iLocale: LmLocaleType; var oLocaleIndex: UI
 // error if <iValueSize> is larger than the data for a fixed-size setting.
 // error if <iValueSize> is larger than the data for a fixed-size setting.
 
 
 function LmGetLocaleSetting(iLocaleIndex: UInt16; iChoice: LmLocaleSettingChoice;
 function LmGetLocaleSetting(iLocaleIndex: UInt16; iChoice: LmLocaleSettingChoice;
-                            oValue: Pointer; iValueSize: UInt16): Err; // syscall sysTrapLmDispatch, lmGetLocaleSetting_;
+                            oValue: Pointer; iValueSize: UInt16): Err; syscall sysTrapLmDispatch, lmGetLocaleSetting_;
 
 
-implementation
-
-function __LmGetNumLocales: UInt16; syscall sysTrapLmDispatch;
-function __LmLocaleToIndex(var iLocale: LmLocaleType; var oLocaleIndex: UInt16): Err; syscall SysTrapLmDispatch;
-function __LmGetLocaleSetting(iLocaleIndex: UInt16; iChoice: LmLocaleSettingChoice;
-                              oValue: Pointer; iValueSize: UInt16): Err;  syscall sysTrapLmDispatch;
-
-{$WARNING d2 register is trashed!}
-function LmGetNumLocales: UInt16; // syscall sysTrapLmDispatch, lmGetNumLocales_;
-begin
- asm
-  move.l #lmGetNumLocales_, d2
- end;
- LmGetNumLocales := __LmGetNumLocales;
-end;
-
-function LmLocaleToIndex({const} var iLocale: LmLocaleType; var oLocaleIndex: UInt16): Err; // syscall sysTrapLmDispatch, lmLocaleToIndex_;
-begin
- asm
-  move.l #lmLocaleToIndex_, d2
- end;
- LmLocaleToIndex := __LmLocaleToIndex(iLocale, oLocaleIndex);
-end;
 
 
-function LmGetLocaleSetting(iLocaleIndex: UInt16; iChoice: LmLocaleSettingChoice;
-                            oValue: Pointer; iValueSize: UInt16): Err; // syscall sysTrapLmDispatch, lmGetLocaleSetting_;
-begin
- asm
-  move.l #lmGetLocaleSetting_, d2
- end;
- LmGetLocaleSetting := __LmGetLocaleSetting(iLocaleIndex, iChoice, oValue, iValueSize);
-end;
+implementation
 
 
 end.
 end.

+ 9 - 84
packages/palmunits/src/overlaymgr.pp

@@ -143,18 +143,18 @@ type
 // buffer must be at least dmDBNameLength bytes.
 // buffer must be at least dmDBNameLength bytes.
 
 
 function OmLocaleToOverlayDBName(const baseDBName: PChar; {const} var targetLocale: LmLocaleType;
 function OmLocaleToOverlayDBName(const baseDBName: PChar; {const} var targetLocale: LmLocaleType;
-                                 overlayDBName: PChar): Err;
+                                 overlayDBName: PChar): Err; syscall sysTrapOmDispatch, omLocaleToOverlayDBName_;
 
 
 // Given the name of an overlay database in <overlayDBName>, return back
 // Given the name of an overlay database in <overlayDBName>, return back
 // the overlay in overlayLocale. If the name isn't an overlay name,
 // the overlay in overlayLocale. If the name isn't an overlay name,
 // return omErrBadOverlayDBName.
 // return omErrBadOverlayDBName.
 
 
-function OmOverlayDBNameToLocale(const overlayDBName: PChar; var overlayLocale: LmLocaleType): Err;
+function OmOverlayDBNameToLocale(const overlayDBName: PChar; var overlayLocale: LmLocaleType): Err; syscall sysTrapOmDispatch, omOverlayDBNameToLocale_;
 
 
 // Return the current locale in <currentLocale>. This may not be the same as
 // Return the current locale in <currentLocale>. This may not be the same as
 // the system locale, which will take effect after the next reset.
 // the system locale, which will take effect after the next reset.
 
 
-procedure OmGetCurrentLocale(var currentLocale: LmLocaleType);
+procedure OmGetCurrentLocale(var currentLocale: LmLocaleType); syscall sysTrapOmDispatch, omGetCurrentLocale_;
 
 
 // Return the nth valid system locale in <theLocale>. Indexes are zero-based,
 // Return the nth valid system locale in <theLocale>. Indexes are zero-based,
 // and omErrInvalidLocaleIndex will be returned if <localeIndex> is out of
 // and omErrInvalidLocaleIndex will be returned if <localeIndex> is out of
@@ -162,24 +162,24 @@ procedure OmGetCurrentLocale(var currentLocale: LmLocaleType);
 // later, since OmGetIndexedLocale can be slow on ROMs with more than few
 // later, since OmGetIndexedLocale can be slow on ROMs with more than few
 // valid system locales.
 // valid system locales.
 
 
-function OmGetIndexedLocale(localeIndex: UInt16; var theLocale: LmLocaleType): Err;
+function OmGetIndexedLocale(localeIndex: UInt16; var theLocale: LmLocaleType): Err; syscall sysTrapOmDispatch, omGetIndexedLocale_;
 
 
 // Return the system locale in <systemLocale>. This may not be the same as
 // Return the system locale in <systemLocale>. This may not be the same as
 // the current locale. WARNING!!! This routine should only be used in very
 // the current locale. WARNING!!! This routine should only be used in very
 // special situations; typically OmGetCurrentLocale should be used to determine
 // special situations; typically OmGetCurrentLocale should be used to determine
 // the "active" locale.
 // the "active" locale.
 
 
-procedure OmGetSystemLocale(var systemLocale: LmLocaleType);
+procedure OmGetSystemLocale(var systemLocale: LmLocaleType); syscall sysTrapOmDispatch, omGetSystemLocale_;
 
 
 //  Set the post-reset system locale to be <systemLocale>. Return omErrInvalidLocale if
 //  Set the post-reset system locale to be <systemLocale>. Return omErrInvalidLocale if
 // the passed locale doesnմ correspond to a valid System.prc overlay.
 // the passed locale doesnմ correspond to a valid System.prc overlay.
 
 
-function OmSetSystemLocale({const} var systemLocale: LmLocaleType): Err;
+function OmSetSystemLocale({const} var systemLocale: LmLocaleType): Err; syscall sysTrapOmDispatch, omSetSystemLocale_;
 
 
 // Return back the address of the routine indicated by <inSelector>. If
 // Return back the address of the routine indicated by <inSelector>. If
 // <inSelector> isn't a valid routine selector, return back NULL.
 // <inSelector> isn't a valid routine selector, return back NULL.
 
 
-function OmGetRoutineAddress(inSelector: OmSelector): Pointer;
+function OmGetRoutineAddress(inSelector: OmSelector): Pointer; syscall sysTrapOmDispatch, omGetRoutineAddress_;
 
 
 // NEW in 4.0. Return back the next valid system locale in <oLocaleP>. The first
 // NEW in 4.0. Return back the next valid system locale in <oLocaleP>. The first
 // time the routine is called, <iNewSearch> must be true. When there are no more
 // time the routine is called, <iNewSearch> must be true. When there are no more
@@ -187,84 +187,9 @@ function OmGetRoutineAddress(inSelector: OmSelector): Pointer;
 // should be used in place of OmGetIndexedLocale on Palm OS 4.0 or later, since
 // should be used in place of OmGetIndexedLocale on Palm OS 4.0 or later, since
 // it's much faster.
 // it's much faster.
 
 
-function OmGetNextSystemLocale(iNewSearch: Boolean; var ioStateInfoP: OmSearchStateType; var oLocaleP: LmLocaleType): Err;
+function OmGetNextSystemLocale(iNewSearch: Boolean; var ioStateInfoP: OmSearchStateType; var oLocaleP: LmLocaleType): Err; syscall sysTrapOmDispatch, omGetNextSystemLocale_;
 
 
-implementation
-
-function __OmLocaleToOverlayDBName(const baseDBName: PChar; {const} var targetLocale: LmLocaleType;
-                                 overlayDBName: PChar): Err; syscall sysTrapOmDispatch;
-function __OmOverlayDBNameToLocale(const overlayDBName: PChar; var overlayLocale: LmLocaleType): Err; syscall sysTrapOmDispatch;
-procedure __OmGetCurrentLocale(var currentLocale: LmLocaleType); syscall sysTrapOmDispatch;
-function __OmGetIndexedLocale(localeIndex: UInt16; var theLocale: LmLocaleType): Err; syscall sysTrapOmDispatch;
-procedure __OmGetSystemLocale(var systemLocale: LmLocaleType); syscall sysTrapOmDispatch;
-function __OmSetSystemLocale({const} var systemLocale: LmLocaleType): Err; syscall sysTrapOmDispatch;
-function __OmGetRoutineAddress(inSelector: OmSelector): Pointer; syscall sysTrapOmDispatch;
-function __OmGetNextSystemLocale(iNewSearch: Boolean; var ioStateInfoP: OmSearchStateType; var oLocaleP: LmLocaleType): Err; syscall sysTrapOmDispatch;
-
-function OmLocaleToOverlayDBName(const baseDBName: PChar; var targetLocale: LmLocaleType;
-                                 overlayDBName: PChar): Err;
-begin
- asm
-  move.l #omLocaleToOverlayDBName_,D2;
- end;
- OmLocaleToOverlayDBName := __OmLocaleToOverlayDBName(baseDBName, targetLocale, overlayDBName);
-end;
-
-function OmOverlayDBNameToLocale(const overlayDBName: PChar; var overlayLocale: LmLocaleType): Err;
-begin
- asm
-  move.l #omOverlayDBNameToLocale_,D2;
- end;
- OmOverlayDBNameToLocale := __OmOverlayDBNameToLocale(overlayDBName, overlayLocale);
-end;
-
-procedure OmGetCurrentLocale(var currentLocale: LmLocaleType);
-begin
- asm
-  move.l #omGetCurrentLocale_,D2;
- end;
- __OmGetCurrentLocale(currentLocale);
-end;
-
-function OmGetIndexedLocale(localeIndex: UInt16; var theLocale: LmLocaleType): Err;
-begin
- asm
-  move.l #omGetIndexedLocale_,D2;
- end;
- OmGetIndexedLocale := __OmGetIndexedLocale(localeIndex, theLocale);
-end;
-
-procedure OmGetSystemLocale(var systemLocale: LmLocaleType);
-begin
- asm
-  move.l #omGetSystemLocale_,D2;
- end;
- __OmGetSystemLocale(systemLocale);
-end;
-
-function OmSetSystemLocale(var systemLocale: LmLocaleType): Err;
-begin
- asm
-  move.l #omSetSystemLocale_,D2;
- end;
- OmSetSystemLocale := __OmSetSystemLocale(systemLocale);
-end;
-
-function OmGetRoutineAddress(inSelector: OmSelector): Pointer;
-begin
- asm
-  move.l #omGetRoutineAddress_,D2;
- end;
- OmGetRoutineAddress := __OmGetRoutineAddress(inSelector);
-end;
-
-function OmGetNextSystemLocale(iNewSearch: Boolean; var ioStateInfoP: OmSearchStateType; var oLocaleP: LmLocaleType): Err;
-begin
- asm
-  move.l #omGetNextSystemLocale_,D2;
- end;
- OmGetNextSystemLocale := __OmGetNextSystemLocale(iNewSearch, ioStateInfoP, oLocaleP);
-end;
 
 
+implementation
 
 
 end.
 end.

+ 29 - 269
packages/palmunits/src/serialmgr.pp

@@ -282,277 +282,37 @@ const
   sysSerialCustomControl = Succ(sysSerialOpenBkgndV4);
   sysSerialCustomControl = Succ(sysSerialOpenBkgndV4);
 // Used by SerialMgrDispatch.c
 // Used by SerialMgrDispatch.c
   maxSerialSelector = sysSerialCustomControl;
   maxSerialSelector = sysSerialCustomControl;
-function SerialMgrInstall: Err;
-function SrmOpen(port, baud: UInt32; var newPortIdP: UInt16): Err;
-function SrmExtOpen(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err;
-function SrmExtOpenBackground(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err;
-function SrmOpenBackground(port, baud: UInt32; var newPortIdP: UInt16): Err;
-function SrmClose(portId: UInt16): Err;
-function SrmSleep: Err;
-function SrmWake: Err;
-function SrmGetDeviceCount(var numOfDevicesP: UInt16): Err;
-function SrmGetDeviceInfo(deviceID: UInt32; var deviceInfoP: DeviceInfoType): Err;
-function SrmGetStatus(portId: UInt16; var statusFieldP: UInt32; var lineErrsP: UInt16): Err;
-function SrmClearErr(portId: UInt16): Err;
-function SrmControl(portId, op: UInt16; valueP: Pointer; var valueLenP: UInt16): Err;
-function SrmCustomControl(portId, opCode: UInt16; creator: UInt32; valueP: Pointer; var valueLenP: UInt16): Err;
-function SrmSend(portId: UInt16; const bufP: Pointer; count: UInt32; var errP: Err): UInt32;
-function SrmSendWait(portId: UInt16): Err;
-function SrmSendCheck(portId: UInt16; var numBytesP: UInt32): Err;
-function SrmSendFlush(portId: UInt16): Err;
-function SrmReceive(portId: UInt16; rcvBufP: Pointer; count: UInt32; timeout: Int32; var errP: Err): UInt32;
-function SrmReceiveWait(portId: UInt16; bytes: UInt32; timeout: Int32): Err;
-function SrmReceiveCheck(portId: UInt16; var numBytesP: UInt32): Err;
-function SrmReceiveFlush(portId: UInt16; timeout: Int32): Err;
-function SrmSetReceiveBuffer(portId: UInt16; bufP: Pointer; bufSize: UInt16): Err;
-function SrmReceiveWindowOpen(portId: UInt16; var bufPP: UInt8Ptr; var sizeP: UInt32): Err;
-function SrmReceiveWindowClose(portId: UInt16; bytesPulled: UInt32): Err;
-function SrmSetWakeupHandler(portId: UInt16; procP: WakeupHandlerProcPtr; refCon: UInt32): Err;
-function SrmPrimeWakeupHandler(portId: UInt16; minBytes: UInt16): Err;
-//procedure SrmSelectorErrPrv(UInt16 serialSelector);  // used only by SerialMgrDispatch.c
-implementation
-
-function __SerialMgrInstall: Err; syscall sysTrapSerialDispatch;
-function __SrmOpen(port, baud: UInt32; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmExtOpen(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmExtOpenBackground(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmOpenBackground(port, baud: UInt32; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmClose(portId: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmSleep: Err; syscall sysTrapSerialDispatch;
-function __SrmWake: Err; syscall sysTrapSerialDispatch;
-function __SrmGetDeviceCount(var numOfDevicesP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmGetDeviceInfo(deviceID: UInt32; var deviceInfoP: DeviceInfoType): Err; syscall sysTrapSerialDispatch;
-function __SrmGetStatus(portId: UInt16; var statusFieldP: UInt32; var lineErrsP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmClearErr(portId: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmControl(portId, op: UInt16; valueP: Pointer; var valueLenP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmCustomControl(portId, opCode: UInt16; creator: UInt32; valueP: Pointer; var valueLenP: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmSend(portId: UInt16; const bufP: Pointer; count: UInt32; var errP: Err): UInt32; syscall sysTrapSerialDispatch;
-function __SrmSendWait(portId: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmSendCheck(portId: UInt16; var numBytesP: UInt32): Err; syscall sysTrapSerialDispatch;
-function __SrmSendFlush(portId: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmReceive(portId: UInt16; rcvBufP: Pointer; count: UInt32; timeout: Int32; var errP: Err): UInt32; syscall sysTrapSerialDispatch;
-function __SrmReceiveWait(portId: UInt16; bytes: UInt32; timeout: Int32): Err; syscall sysTrapSerialDispatch;
-function __SrmReceiveCheck(portId: UInt16; var numBytesP: UInt32): Err; syscall sysTrapSerialDispatch;
-function __SrmReceiveFlush(portId: UInt16; timeout: Int32): Err; syscall sysTrapSerialDispatch;
-function __SrmSetReceiveBuffer(portId: UInt16; bufP: Pointer; bufSize: UInt16): Err; syscall sysTrapSerialDispatch;
-function __SrmReceiveWindowOpen(portId: UInt16; var bufPP: UInt8Ptr; var sizeP: UInt32): Err; syscall sysTrapSerialDispatch;
-function __SrmReceiveWindowClose(portId: UInt16; bytesPulled: UInt32): Err; syscall sysTrapSerialDispatch;
-function __SrmSetWakeupHandler(portId: UInt16; procP: WakeupHandlerProcPtr; refCon: UInt32): Err; syscall sysTrapSerialDispatch;
-function __SrmPrimeWakeupHandler(portId: UInt16; minBytes: UInt16): Err; syscall sysTrapSerialDispatch;
-
-function SerialMgrInstall: Err;
-begin
- asm
-  move.l #sysSerialInstall,D2;
- end;
- SerialMgrInstall := __SerialMgrInstall;
-end;
-
-function SrmOpen(port, baud: UInt32; var newPortIdP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialOpen,D2;
- end;
- SrmOpen := __SrmOpen(port, baud, newPortIdP);
-end;
-
-function SrmExtOpen(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialOpenV4,D2;
- end;
- SrmExtOpen := __SrmExtOpen(port, configP, configSize, newPortIdP);
-end;
-
-function SrmExtOpenBackground(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialOpenBkgndV4,D2;
- end;
- SrmExtOpenBackground := __SrmExtOpenBackground(port, configP, configSize, newPortIdP);
-end;
-function SrmOpenBackground(port, baud: UInt32; var newPortIdP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialOpenBkgnd,D2;
- end;
- SrmOpenBackground := __SrmOpenBackground(port, baud, newPortIdP);
-end;
-
-function SrmClose(portId: UInt16): Err;
-begin
- asm
-  move.l #sysSerialClose,D2;
- end;
- SrmClose := __SrmClose(portId);
-end;
-
-function SrmSleep: Err;
-begin
- asm
-  move.l #sysSerialSleep,D2;
- end;
- SrmSleep := __SrmSleep;
-end;
-
-function SrmWake: Err;
-begin
- asm
-  move.l #sysSerialWake,D2;
- end;
- SrmWake := __SrmWake;
-end;
-
-function SrmGetDeviceCount(var numOfDevicesP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialGetDeviceCount,D2;
- end;
- SrmGetDeviceCount := __SrmGetDeviceCount(numOfDevicesP);
-end;
-
-function SrmGetDeviceInfo(deviceID: UInt32; var deviceInfoP: DeviceInfoType): Err;
-begin
- asm
-  move.l #sysSerialGetDeviceInfo,D2;
- end;
- SrmGetDeviceInfo := __SrmGetDeviceInfo(deviceID, deviceInfoP);
-end;
-
-function SrmGetStatus(portId: UInt16; var statusFieldP: UInt32; var lineErrsP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialGetStatus,D2;
- end;
- SrmGetStatus := __SrmGetStatus(portId, statusFieldP, lineErrsP);
-end;
-
-function SrmClearErr(portId: UInt16): Err;
-begin
- asm
-  move.l #sysSerialClearErr,D2;
- end;
- SrmClearErr := __SrmClearErr(portId);
-end;
 
 
-function SrmControl(portId, op: UInt16; valueP: Pointer; var valueLenP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialControl,D2;
- end;
- SrmControl := __SrmControl(portId, op, valueP, valueLenP);
-end;
+function SerialMgrInstall: Err; syscall sysTrapSerialDispatch, sysSerialInstall;
+function SrmOpen(port, baud: UInt32; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialOpen;
+function SrmExtOpen(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialOpenV4;
+function SrmExtOpenBackground(port: UInt32; var configP: SrmOpenConfigType; configSize: UInt16; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialOpenBkgndV4;
+function SrmOpenBackground(port, baud: UInt32; var newPortIdP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialOpenBkgnd;
+function SrmClose(portId: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialClose;
+function SrmSleep: Err; syscall sysTrapSerialDispatch, sysSerialSleep;
+function SrmWake: Err; syscall sysTrapSerialDispatch, sysSerialWake;
+function SrmGetDeviceCount(var numOfDevicesP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialGetDeviceCount;
+function SrmGetDeviceInfo(deviceID: UInt32; var deviceInfoP: DeviceInfoType): Err; syscall sysTrapSerialDispatch, sysSerialGetDeviceInfo;
+function SrmGetStatus(portId: UInt16; var statusFieldP: UInt32; var lineErrsP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialGetStatus;
+function SrmClearErr(portId: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialClearErr;
+function SrmControl(portId, op: UInt16; valueP: Pointer; var valueLenP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialControl;
+function SrmCustomControl(portId, opCode: UInt16; creator: UInt32; valueP: Pointer; var valueLenP: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialCustomControl;
+function SrmSend(portId: UInt16; const bufP: Pointer; count: UInt32; var errP: Err): UInt32; syscall sysTrapSerialDispatch, sysSerialSend;
+function SrmSendWait(portId: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialSendWait;
+function SrmSendCheck(portId: UInt16; var numBytesP: UInt32): Err; syscall sysTrapSerialDispatch, sysSerialSendCheck;
+function SrmSendFlush(portId: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialSendFlush;
+function SrmReceive(portId: UInt16; rcvBufP: Pointer; count: UInt32; timeout: Int32; var errP: Err): UInt32; syscall sysTrapSerialDispatch, sysSerialReceive;
+function SrmReceiveWait(portId: UInt16; bytes: UInt32; timeout: Int32): Err; syscall sysTrapSerialDispatch, sysSerialReceiveWait;
+function SrmReceiveCheck(portId: UInt16; var numBytesP: UInt32): Err; syscall sysTrapSerialDispatch, sysSerialReceiveCheck;
+function SrmReceiveFlush(portId: UInt16; timeout: Int32): Err; syscall sysTrapSerialDispatch, sysSerialReceiveFlush;
+function SrmSetReceiveBuffer(portId: UInt16; bufP: Pointer; bufSize: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialSetRcvBuffer;
+function SrmReceiveWindowOpen(portId: UInt16; var bufPP: UInt8Ptr; var sizeP: UInt32): Err; syscall sysTrapSerialDispatch, sysSerialRcvWindowOpen;
+function SrmReceiveWindowClose(portId: UInt16; bytesPulled: UInt32): Err; syscall sysTrapSerialDispatch, sysSerialRcvWindowClose;
+function SrmSetWakeupHandler(portId: UInt16; procP: WakeupHandlerProcPtr; refCon: UInt32): Err; syscall sysTrapSerialDispatch, sysSerialSetWakeupHandler;
+function SrmPrimeWakeupHandler(portId: UInt16; minBytes: UInt16): Err; syscall sysTrapSerialDispatch, sysSerialPrimeWakeupHandler;
 
 
-function SrmCustomControl(portId, opCode: UInt16; creator: UInt32; valueP: Pointer; var valueLenP: UInt16): Err;
-begin
- asm
-  move.l #sysSerialCustomControl,D2;
- end;
- SrmCustomControl := __SrmCustomControl(portId, opCode, creator, valueP, valueLenP);
-end;
-
-function SrmSend(portId: UInt16; const bufP: Pointer; count: UInt32; var errP: Err): UInt32;
-begin
- asm
-  move.l #sysSerialSend,D2;
- end;
- SrmSend := __SrmSend(portId, bufP, count, errP);
-end;
-
-function SrmSendWait(portId: UInt16): Err;
-begin
- asm
-  move.l #sysSerialSendWait,D2;
- end;
- SrmSendwait := __SrmSendwait(portId);
-end;
-
-function SrmSendCheck(portId: UInt16; var numBytesP: UInt32): Err;
-begin
- asm
-  move.l #sysSerialSendCheck,D2;
- end;
- SrmSendCheck := __SrmSendCheck(portId, numBytesP);
-end;
-
-function SrmSendFlush(portId: UInt16): Err;
-begin
- asm
-  move.l #sysSerialSendFlush,D2;
- end;
- SrmSendFlush := __SrmSendFlush(portId);
-end;
-
-function SrmReceive(portId: UInt16; rcvBufP: Pointer; count: UInt32; timeout: Int32; var errP: Err): UInt32;
-begin
- asm
-  move.l #sysSerialReceive,D2;
- end;
- SrmReceive := __SrmReceive(portId, rcvBufP, count, timeout, errP);
-end;
-
-function SrmReceiveWait(portId: UInt16; bytes: UInt32; timeout: Int32): Err;
-begin
- asm
-  move.l #sysSerialReceiveWait,D2;
- end;
- SrmReceiveWait := __SrmReceiveWait(portId, bytes, timeout);
-end;
-
-function SrmReceiveCheck(portId: UInt16; var numBytesP: UInt32): Err;
-begin
- asm
-  move.l #sysSerialReceiveCheck,D2;
- end;
- SrmReceiveCheck := __SrmReceiveCheck(portId, numBytesP);
-end;
-
-function SrmReceiveFlush(portId: UInt16; timeout: Int32): Err;
-begin
- asm
-  move.l #sysSerialReceiveFlush,D2;
- end;
- SrmReceiveFlush := __SrmReceiveFlush(portId, timeout);
-end;
-
-function SrmSetReceiveBuffer(portId: UInt16; bufP: Pointer; bufSize: UInt16): Err;
-begin
- asm
-  move.l #sysSerialSetRcvBuffer,D2;
- end;
- SrmSetReceiveBuffer := __SrmSetReceiveBuffer(portId, bufP, bufSize);
-end;
-
-function SrmReceiveWindowOpen(portId: UInt16; var bufPP: UInt8Ptr; var sizeP: UInt32): Err;
-begin
- asm
-  move.l #sysSerialRcvWindowOpen,D2;
- end;
- SrmReceiveWindowOpen := __SrmReceiveWindowOpen(portId, bufPP, sizeP);
-end;
-
-function SrmReceiveWindowClose(portId: UInt16; bytesPulled: UInt32): Err;
-begin
- asm
-  move.l #sysSerialRcvWindowClose,D2;
- end;
- SrmReceiveWindowClose := __SrmReceiveWindowClose(portId, bytesPulled);
-end;
-
-function SrmSetWakeupHandler(portId: UInt16; procP: WakeupHandlerProcPtr; refCon: UInt32): Err;
-begin
- asm
-  move.l #sysSerialSetWakeupHandler,D2;
- end;
- SrmSetWakeupHandler := __SrmSetWakeupHandler(portId, procP, refcon);
-end;
+//procedure SrmSelectorErrPrv(UInt16 serialSelector);  // used only by SerialMgrDispatch.c
 
 
-function SrmPrimeWakeupHandler(portId: UInt16; minBytes: UInt16): Err;
-begin
- asm
-  move.l #sysSerialPrimeWakeupHandler,D2;
- end;
- SrmPrimeWakeupHandler := __SrmPrimeWakeupHandler(portId, minBytes);
-end;
+implementation
 
 
 end.
 end.

+ 26 - 279
packages/palmunits/src/textmgr.pp

@@ -195,44 +195,44 @@ function TxtNextCharSize(const inText: PChar; inOffset: UInt32): UInt16;
 
 
 // Return back byte attribute (first, last, single, middle) for <inByte>.
 // Return back byte attribute (first, last, single, middle) for <inByte>.
 
 
-function TxtByteAttr(inByte: UInt8): UInt8;
+function TxtByteAttr(inByte: UInt8): UInt8; syscall sysTrapIntlDispatch, intlTxtByteAttr;
 
 
 // Return back the standard attribute bits for <inChar>.
 // Return back the standard attribute bits for <inChar>.
 
 
-function TxtCharAttr(inChar: WChar): UInt16;
+function TxtCharAttr(inChar: WChar): UInt16; syscall sysTrapIntlDispatch, intlTxtCharAttr;
 
 
 // Return back the extended attribute bits for <inChar>.
 // Return back the extended attribute bits for <inChar>.
 
 
-function TxtCharXAttr(inChar: WChar): UInt16;
+function TxtCharXAttr(inChar: WChar): UInt16; syscall sysTrapIntlDispatch, intlTxtCharXAttr;
 
 
 // Return the size (in bytes) of the character <inChar>. This represents
 // Return the size (in bytes) of the character <inChar>. This represents
 // how many bytes would be required to store the character in a string.
 // how many bytes would be required to store the character in a string.
 
 
-function TxtCharSize(inChar: WChar): UInt16;
+function TxtCharSize(inChar: WChar): UInt16; syscall sysTrapIntlDispatch, intlTxtCharSize;
 
 
 // Return the width (in pixels) of the character <inChar>. You should
 // Return the width (in pixels) of the character <inChar>. You should
 // use FntWCharWidth or FntGlueWCharWidth instead of this routine.
 // use FntWCharWidth or FntGlueWCharWidth instead of this routine.
 
 
-function TxtCharWidth(inChar: WChar): Int16;
+function TxtCharWidth(inChar: WChar): Int16; syscall sysTrapIntlDispatch, intlTxtCharWidth;
 
 
 // Load the character before offset <inOffset> in the <inText> text. Return
 // Load the character before offset <inOffset> in the <inText> text. Return
 // back the size of the character.
 // back the size of the character.
 
 
-function TxtGetPreviousChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16;
+function TxtGetPreviousChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16; syscall sysTrapIntlDispatch, intlTxtGetPreviousChar;
 
 
 // Load the character at offset <inOffset> in the <inText> text. Return
 // Load the character at offset <inOffset> in the <inText> text. Return
 // back the size of the character.
 // back the size of the character.
 
 
-function TxtGetNextChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16;
+function TxtGetNextChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16; syscall sysTrapIntlDispatch, intlTxtGetNextChar;
 
 
 // Return the character at offset <inOffset> in the <inText> text.
 // Return the character at offset <inOffset> in the <inText> text.
 
 
-function TxtGetChar(const inText: PChar; inOffset: UInt32): WChar;
+function TxtGetChar(const inText: PChar; inOffset: UInt32): WChar; syscall sysTrapIntlDispatch, intlTxtGetChar;
 
 
 // Set the character at offset <inOffset> in the <inText> text, and
 // Set the character at offset <inOffset> in the <inText> text, and
 // return back the size of the character.
 // return back the size of the character.
 
 
-function TxtSetNextChar(ioText: PChar; inOffset: UInt32; inChar: WChar): UInt16;
+function TxtSetNextChar(ioText: PChar; inOffset: UInt32; inChar: WChar): UInt16; syscall sysTrapIntlDispatch, intlTxtSetNextChar;
 
 
 // Replace the substring "^X" (where X is 0..9, as specified by <inParamNum>)
 // Replace the substring "^X" (where X is 0..9, as specified by <inParamNum>)
 // with the string <inParamStr>. If <inParamStr> is NULL then don't modify <ioStr>.
 // with the string <inParamStr>. If <inParamStr> is NULL then don't modify <ioStr>.
@@ -240,31 +240,31 @@ function TxtSetNextChar(ioText: PChar; inOffset: UInt32; inChar: WChar): UInt16;
 // excluding the terminating null. Return back the number of occurances of
 // excluding the terminating null. Return back the number of occurances of
 // the substring found in <ioStr>.
 // the substring found in <ioStr>.
 
 
-function TxtReplaceStr(ioStr: PChar; inMaxLen: UInt16; const inParamStr: PChar; inParamNum: UInt16): UInt16;
+function TxtReplaceStr(ioStr: PChar; inMaxLen: UInt16; const inParamStr: PChar; inParamNum: UInt16): UInt16; syscall sysTrapIntlDispatch, intlTxtReplaceStr;
 
 
 // Allocate a handle containing the result of substituting param0...param3
 // Allocate a handle containing the result of substituting param0...param3
 // for ^0...^3 in <inTemplate>, and return the locked result. If a parameter
 // for ^0...^3 in <inTemplate>, and return the locked result. If a parameter
 // is NULL, replace the corresponding substring in the template with "".
 // is NULL, replace the corresponding substring in the template with "".
 
 
-function TxtParamString(const inTemplate, param0, param1, param2, param3: PChar): PChar;
+function TxtParamString(const inTemplate, param0, param1, param2, param3: PChar): PChar; syscall sysTrapIntlDispatch, intlTxtParamString;
 
 
 // Return the bounds of the character at <inOffset> in the <inText>
 // Return the bounds of the character at <inOffset> in the <inText>
 // text, via the <outStart> & <outEnd> offsets, and also return the
 // text, via the <outStart> & <outEnd> offsets, and also return the
 // actual value of character at or following <inOffset>.
 // actual value of character at or following <inOffset>.
 
 
-function TxtCharBounds(const inText: PChar; inOffset: UInt32; var outStart: UInt32; var outEnd: UInt32): WChar;
+function TxtCharBounds(const inText: PChar; inOffset: UInt32; var outStart: UInt32; var outEnd: UInt32): WChar; syscall sysTrapIntlDispatch, intlTxtCharBounds;
 
 
 // Return the appropriate byte position for truncating <inText> such that it is
 // Return the appropriate byte position for truncating <inText> such that it is
 // at most <inOffset> bytes long.
 // at most <inOffset> bytes long.
 
 
-function TxtGetTruncationOffset(const inText: PChar; inOffset: UInt32): UInt32;
+function TxtGetTruncationOffset(const inText: PChar; inOffset: UInt32): UInt32; syscall sysTrapIntlDispatch, intlTxtGetTruncationOffset;
 
 
 // Search for <inTargetStr> in <inSourceStr>. If found return true and pass back
 // Search for <inTargetStr> in <inSourceStr>. If found return true and pass back
 // the found position (byte offset) in <outPos>, and the length of the matched
 // the found position (byte offset) in <outPos>, and the length of the matched
 // text in <outLength>.
 // text in <outLength>.
 
 
 function TxtFindString(const inSourceStr, inTargetStr: PChar;
 function TxtFindString(const inSourceStr, inTargetStr: PChar;
-                       var outPos: UInt32; var outLength: UInt16): Boolean;
+                       var outPos: UInt32; var outLength: UInt16): Boolean; syscall sysTrapIntlDispatch, intlTxtFindString;
 
 
 // Find the bounds of the word that contains the character at <inOffset>.
 // Find the bounds of the word that contains the character at <inOffset>.
 // Return the offsets in <*outStart> and <*outEnd>. Return true if the
 // Return the offsets in <*outStart> and <*outEnd>. Return true if the
@@ -272,39 +272,39 @@ function TxtFindString(const inSourceStr, inTargetStr: PChar;
 // in word not equal to space or punct).
 // in word not equal to space or punct).
 
 
 function TxtWordBounds(const inText: PChar; inLength, inOffset: UInt32;
 function TxtWordBounds(const inText: PChar; inLength, inOffset: UInt32;
-                       var outStart, outEnd: UInt32): Boolean;
+                       var outStart, outEnd: UInt32): Boolean; syscall sysTrapIntlDispatch, intlTxtWordBounds;
 
 
 // Return the offset of the first break position (for text wrapping) that
 // Return the offset of the first break position (for text wrapping) that
 // occurs at or before <iOffset> in <iTextP>. Note that this routine will
 // occurs at or before <iOffset> in <iTextP>. Note that this routine will
 // also add trailing spaces and a trailing linefeed to the break position,
 // also add trailing spaces and a trailing linefeed to the break position,
 // thus the result could be greater than <iOffset>.
 // thus the result could be greater than <iOffset>.
 
 
-function TxtGetWordWrapOffset(const iTextP: PChar; iOffset: UInt32): UInt32;
+function TxtGetWordWrapOffset(const iTextP: PChar; iOffset: UInt32): UInt32; syscall sysTrapIntlDispatch, intlTxtGetWordWrapOffset;
 
 
 // Return the minimum (lowest) encoding required for <inChar>. If we
 // Return the minimum (lowest) encoding required for <inChar>. If we
 // don't know about the character, return encoding_Unknown.
 // don't know about the character, return encoding_Unknown.
 
 
-function TxtCharEncoding(inChar: WChar): CharEncodingType;
+function TxtCharEncoding(inChar: WChar): CharEncodingType; syscall sysTrapIntlDispatch, intlTxtCharEncoding;
 
 
 // Return the minimum (lowest) encoding required to represent <inStr>.
 // Return the minimum (lowest) encoding required to represent <inStr>.
 // This is the maximum encoding of any character in the string, where
 // This is the maximum encoding of any character in the string, where
 // highest is unknown, and lowest is ascii.
 // highest is unknown, and lowest is ascii.
 
 
-function TxtStrEncoding(const inStr: PChar): CharEncodingType;
+function TxtStrEncoding(const inStr: PChar): CharEncodingType; syscall sysTrapIntlDispatch, intlTxtStrEncoding;
 
 
 // Return the higher (max) encoding of <a> and <b>.
 // Return the higher (max) encoding of <a> and <b>.
 
 
-function TxtMaxEncoding(a, b: CharEncodingType): CharEncodingType;
+function TxtMaxEncoding(a, b: CharEncodingType): CharEncodingType; syscall sysTrapIntlDispatch, intlTxtMaxEncoding;
 
 
 // Return a pointer to the 'standard' name for <inEncoding>. If the
 // Return a pointer to the 'standard' name for <inEncoding>. If the
 // encoding is unknown, return a pointer to an empty string.
 // encoding is unknown, return a pointer to an empty string.
 
 
-function TxtEncodingName(inEncoding: CharEncodingType): PChar;
+function TxtEncodingName(inEncoding: CharEncodingType): PChar; syscall sysTrapIntlDispatch, intlTxtEncodingName;
 
 
 // Map from a character set name <iEncodingName> to a CharEncodingType.
 // Map from a character set name <iEncodingName> to a CharEncodingType.
 // If the character set name is unknown, return charEncodingUnknown.
 // If the character set name is unknown, return charEncodingUnknown.
 
 
-function TxtNameToEncoding(const iEncodingName: PChar): CharEncodingType;
+function TxtNameToEncoding(const iEncodingName: PChar): CharEncodingType; syscall sysTrapIntlDispatch, intlTxtNameToEncoding;
 
 
 // Transliterate <inSrcLength> bytes of text found in <inSrcText>, based
 // Transliterate <inSrcLength> bytes of text found in <inSrcText>, based
 // on the requested <inOp> operation. Place the results in <outDstText>,
 // on the requested <inOp> operation. Place the results in <outDstText>,
@@ -317,7 +317,7 @@ function TxtNameToEncoding(const iEncodingName: PChar): CharEncodingType;
 // buffer in order to perform the operation.
 // buffer in order to perform the operation.
 
 
 function TxtTransliterate(const inSrcText: PChar; inSrcLength: UInt16; outDstText: PChar;
 function TxtTransliterate(const inSrcText: PChar; inSrcLength: UInt16; outDstText: PChar;
-                          var ioDstLength: UInt16; inOp: TranslitOpType): Err;
+                          var ioDstLength: UInt16; inOp: TranslitOpType): Err; syscall sysTrapIntlDispatch, intlTxtTransliterate;
 
 
 // Convert <*ioSrcBytes> of text from <srcTextP> between the <srcEncoding>
 // Convert <*ioSrcBytes> of text from <srcTextP> between the <srcEncoding>
 // and <dstEncoding> character encodings. If <dstTextP> is not NULL, write
 // and <dstEncoding> character encodings. If <dstTextP> is not NULL, write
@@ -353,12 +353,12 @@ function TxtTransliterate(const inSrcText: PChar; inSrcLength: UInt16; outDstTex
 function TxtConvertEncoding(newConversion: Boolean; var ioStateP: TxtConvertStateType;
 function TxtConvertEncoding(newConversion: Boolean; var ioStateP: TxtConvertStateType;
          const srcTextP: PChar; var ioSrcBytes: UInt16; srcEncoding: CharEncodingType;
          const srcTextP: PChar; var ioSrcBytes: UInt16; srcEncoding: CharEncodingType;
          dstTextP: PChar; var ioDstBytes: UInt16; dstEncoding: CharEncodingType;
          dstTextP: PChar; var ioDstBytes: UInt16; dstEncoding: CharEncodingType;
-         const substitutionStr: PChar; substitutionLen: UInt16): Err;
+         const substitutionStr: PChar; substitutionLen: UInt16): Err; syscall sysTrapIntlDispatch, intlTxtConvertEncoding;
 
 
 // Return true if <inChar> is a valid (drawable) character. Note that we'll
 // Return true if <inChar> is a valid (drawable) character. Note that we'll
 // return false if it is a virtual character code.
 // return false if it is a virtual character code.
 
 
-function TxtCharIsValid(inChar: WChar): Boolean;
+function TxtCharIsValid(inChar: WChar): Boolean; syscall sysTrapIntlDispatch, intlTxtCharIsValid;
 
 
 // Compare the first <s1Len> bytes of <s1> with the first <s2Len> bytes
 // Compare the first <s1Len> bytes of <s1> with the first <s2Len> bytes
 // of <s2>. Return the results of the comparison: < 0 if <s1> sorts before
 // of <s2>. Return the results of the comparison: < 0 if <s1> sorts before
@@ -369,7 +369,7 @@ function TxtCharIsValid(inChar: WChar): Boolean;
 // thus case, character size, etc. don't matter.
 // thus case, character size, etc. don't matter.
 
 
 function TxtCaselessCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
 function TxtCaselessCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
-                            const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16;
+                            const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16; syscall sysTrapIntlDispatch, intlTxtCaselessCompare;
 
 
 // Compare the first <s1Len> bytes of <s1> with the first <s2Len> bytes
 // Compare the first <s1Len> bytes of <s1> with the first <s2Len> bytes
 // of <s2>. Return the results of the comparison: < 0 if <s1> sorts before
 // of <s2>. Return the results of the comparison: < 0 if <s1> sorts before
@@ -378,265 +378,12 @@ function TxtCaselessCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt
 // (either one of which can be NULL if the match length is not needed).
 // (either one of which can be NULL if the match length is not needed).
 
 
 function TxtCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
 function TxtCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
-                    const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16;
+                    const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16; syscall sysTrapIntlDispatch, intlTxtCompare;
 
 
 implementation
 implementation
 
 
 uses Chars, SysEvent;
 uses Chars, SysEvent;
 
 
-function __TxtByteAttr(inByte: UInt8): UInt8; syscall sysTrapIntlDispatch;
-function __TxtCharAttr(inChar: WChar): UInt16; syscall sysTrapIntlDispatch;
-function __TxtCharXAttr(inChar: WChar): UInt16; syscall sysTrapIntlDispatch;
-function __TxtCharSize(inChar: WChar): UInt16; syscall sysTrapIntlDispatch;
-function __TxtCharWidth(inChar: WChar): Int16; syscall sysTrapIntlDispatch;
-function __TxtGetPreviousChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16; syscall sysTrapIntlDispatch;
-function __TxtGetNextChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16; syscall sysTrapIntlDispatch;
-function __TxtGetChar(const inText: PChar; inOffset: UInt32): WChar; syscall sysTrapIntlDispatch;
-function __TxtSetNextChar(ioText: PChar; inOffset: UInt32; inChar: WChar): UInt16; syscall sysTrapIntlDispatch;
-function __TxtReplaceStr(ioStr: PChar; inMaxLen: UInt16; const inParamStr: PChar; inParamNum: UInt16): UInt16; syscall sysTrapIntlDispatch;
-function __TxtParamString(const inTemplate, param0, param1, param2, param3: PChar): PChar; syscall sysTrapIntlDispatch;
-function __TxtCharBounds(const inText: PChar; inOffset: UInt32; var outStart: UInt32; var outEnd: UInt32): WChar; syscall sysTrapIntlDispatch;
-function __TxtGetTruncationOffset(const inText: PChar; inOffset: UInt32): UInt32; syscall sysTrapIntlDispatch;
-function __TxtFindString(const inSourceStr, inTargetStr: PChar;
-                       var outPos: UInt32; var outLength: UInt16): Boolean; syscall sysTrapIntlDispatch;
-function __TxtWordBounds(const inText: PChar; inLength, inOffset: UInt32;
-                       var outStart, outEnd: UInt32): Boolean; syscall sysTrapIntlDispatch;
-function __TxtGetWordWrapOffset(const iTextP: PChar; iOffset: UInt32): UInt32; syscall sysTrapIntlDispatch;
-function __TxtCharEncoding(inChar: WChar): CharEncodingType; syscall sysTrapIntlDispatch;
-function __TxtStrEncoding(const inStr: PChar): CharEncodingType; syscall sysTrapIntlDispatch;
-function __TxtMaxEncoding(a, b: CharEncodingType): CharEncodingType; syscall sysTrapIntlDispatch;
-function __TxtEncodingName(inEncoding: CharEncodingType): PChar; syscall sysTrapIntlDispatch;
-function __TxtNameToEncoding(const iEncodingName: PChar): CharEncodingType; syscall sysTrapIntlDispatch;
-function __TxtTransliterate(const inSrcText: PChar; inSrcLength: UInt16; outDstText: PChar;
-                          var ioDstLength: UInt16; inOp: TranslitOpType): Err; syscall sysTrapIntlDispatch;
-function __TxtConvertEncoding(newConversion: Boolean; var ioStateP: TxtConvertStateType;
-         const srcTextP: PChar; var ioSrcBytes: UInt16; srcEncoding: CharEncodingType;
-         dstTextP: PChar; var ioDstBytes: UInt16; dstEncoding: CharEncodingType;
-         const substitutionStr: PChar; substitutionLen: UInt16): Err; syscall sysTrapIntlDispatch;
-function __TxtCharIsValid(inChar: WChar): Boolean; syscall sysTrapIntlDispatch;
-
-function __TxtCaselessCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
-                            const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16; syscall sysTrapIntlDispatch;
-function __TxtCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
-                    const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16; syscall sysTrapIntlDispatch;
-
-function TxtByteAttr(inByte: UInt8): UInt8;
-begin
- asm
-  move.l #intlTxtByteAttr, D2;
- end;
- TxtByteAttr := TxtByteAttr(inByte);
-end;
-
-function TxtCharAttr(inChar: WChar): UInt16;
-begin
- asm
-  move.l #intlTxtCharAttr, D2;
- end;
- TxtCharAttr := __TxtCharAttr(inChar);
-end;
-
-function TxtCharXAttr(inChar: WChar): UInt16;
-begin
- asm
-  move.l #intlTxtCharXAttr, D2;
- end;
- TxtCharXAttr := __TxtCharXAttr(inChar);
-end;
-
-function TxtCharSize(inChar: WChar): UInt16;
-begin
- asm
-  move.l #intlTxtCharSize, D2;
- end;
- TxtCharSize := TxtCharSize(inChar);
-end;
-
-function TxtCharWidth(inChar: WChar): Int16;
-begin
- asm
-  move.l #intlTxtCharWidth, D2;
- end;
- TxtCharWidth := TxtCharWidth(inChar);
-end;
-
-function TxtGetPreviousChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16;
-begin
- asm
-  move.l #intlTxtGetPreviousChar, D2;
- end;
- TxtGetPreviousChar := __TxtGetPreviousChar(inText, inOffset, outChar);
-end;
-
-function TxtGetNextChar(const inText: PChar; inOffset: UInt32; outChar: WCharPtr): UInt16;
-begin
- asm
-  move.l #intlTxtGetNextChar, D2;
- end;
- TxtGetNextChar := __TxtGetNextChar(inText, inOffset, outChar);
-end;
-
-function TxtGetChar(const inText: PChar; inOffset: UInt32): WChar;
-begin
- asm
-  move.l #intlTxtGetChar, D2;
- end;
- TxtGetChar := __TxtGetChar(inText, inOffset);
-end;
-
-function TxtSetNextChar(ioText: PChar; inOffset: UInt32; inChar: WChar): UInt16;
-begin
- asm
-  move.l #intlTxtSetNextChar, D2;
- end;
- TxtSetNextChar := __TxtSetNextChar(ioText, inOffset, inChar);
-end;
-
-function TxtReplaceStr(ioStr: PChar; inMaxLen: UInt16; const inParamStr: PChar; inParamNum: UInt16): UInt16;
-begin
- asm
-  move.l #intlTxtReplaceStr, D2;
- end;
- TxtReplaceStr := __TxtReplaceStr(ioStr, inMaxLen, inParamStr, inParamNum);
-end;
-
-function TxtParamString(const inTemplate, param0, param1, param2, param3: PChar): PChar;
-begin
- asm
-  move.l #intlTxtParamString, D2;
- end;
- TxtParamString := __TxtParamString(inTemplate, param0, param1, param2, param3);
-end;
-
-function TxtCharBounds(const inText: PChar; inOffset: UInt32; var outStart: UInt32; var outEnd: UInt32): WChar;
-begin
- asm
-  move.l #intlTxtCharBounds, D2;
- end;
- TxtCharBounds := TxtCharBounds(inText, inOffset, outStart, outEnd);
-end;
-
-function TxtGetTruncationOffset(const inText: PChar; inOffset: UInt32): UInt32;
-begin
- asm
-  move.l #intlTxtGetTruncationOffset, D2;
- end;
- TxtGetTruncationOffset := __TxtGetTruncationOffset(inText, inOffset);
-end;
-
-function TxtFindString(const inSourceStr, inTargetStr: PChar;
-                       var outPos: UInt32; var outLength: UInt16): Boolean;
-begin
- asm
-  move.l #intlTxtFindString, D2;
- end;
- TxtFindString := TxtFindString(inSourceStr, inTargetStr, outPos, outLength);
-end;
-
-function TxtWordBounds(const inText: PChar; inLength, inOffset: UInt32;
-                       var outStart, outEnd: UInt32): Boolean;
-begin
- asm
-  move.l #intlTxtWordBounds, D2;
- end;
- TxtWordBounds := __TxtWordBounds(inText, inLength, inOffset, outStart, outEnd);
-end;
-
-function TxtGetWordWrapOffset(const iTextP: PChar; iOffset: UInt32): UInt32;
-begin
- asm
-  move.l #intlTxtGetWordWrapOffset, D2;
- end;
- TxtGetWordWrapOffset := __TxtGetWordWrapOffset(iTextP, iOffset);
-end;
-
-function TxtCharEncoding(inChar: WChar): CharEncodingType;
-begin
- asm
-  move.l #intlTxtCharEncoding, D2;
- end;
- TxtCharEncoding := __TxtCharEncoding(inChar);
-end;
-
-function TxtStrEncoding(const inStr: PChar): CharEncodingType;
-begin
- asm
-  move.l #intlTxtStrEncoding, D2;
- end;
- TxtStrEncoding := __TxtStrEncoding(inStr);
-end;
-
-function TxtMaxEncoding(a, b: CharEncodingType): CharEncodingType;
-begin
- asm
-  move.l #intlTxtMaxEncoding, D2;
- end;
- TxtMaxEncoding := __TxtMaxEncoding(a, b);
-end;
-
-function TxtEncodingName(inEncoding: CharEncodingType): PChar;
-begin
- asm
-  move.l #intlTxtEncodingName, D2;
- end;
- TxtEncodingName := __TxtEncodingName(inEncoding);
-end;
-
-function TxtNameToEncoding(const iEncodingName: PChar): CharEncodingType;
-begin
- asm
-  move.l #intlTxtNameToEncoding, D2;
- end;
- TxtNameToEncoding := __TxtNameToEncoding(iEncodingName);
-end;
-
-function TxtTransliterate(const inSrcText: PChar; inSrcLength: UInt16; outDstText: PChar;
-                          var ioDstLength: UInt16; inOp: TranslitOpType): Err;
-begin
- asm
-  move.l #intlTxtTransliterate, D2;
- end;
- TxtTransliterate := __TxtTransliterate(inSrcText, inSrcLength, outDstText, ioDstLength, inOp);
-end;
-
-function TxtConvertEncoding(newConversion: Boolean; var ioStateP: TxtConvertStateType;
-         const srcTextP: PChar; var ioSrcBytes: UInt16; srcEncoding: CharEncodingType;
-         dstTextP: PChar; var ioDstBytes: UInt16; dstEncoding: CharEncodingType;
-         const substitutionStr: PChar; substitutionLen: UInt16): Err;
-begin
- asm
-  move.l #intlTxtConvertEncoding, D2;
- end;
- TxtConvertEncoding := __TxtConvertEncoding(newConversion, ioStateP, srcTextP, ioSrcBytes,
-                                            srcEncoding, dstTextP, ioDstBytes, dstEncoding,
-                                            substitutionStr, substitutionLen);
-end;
-
-function TxtCharIsValid(inChar: WChar): Boolean;
-begin
- asm
-  move.l #intlTxtCharIsValid, D2;
- end;
- TxtCharIsValid := __TxtCharIsValid(inChar);
-end;
-
-function TxtCaselessCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
-                            const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16;
-begin
- asm
-  move.l #intlTxtCaselessCompare, D2;
- end;
- TxtCaselessCompare := __TxtCaselessCompare(s1, s1Len, s1MatchLen, s2, s2Len, s2MatchLen);
-end;
-
-function TxtCompare(const s1: PChar; s1Len: UInt16; var s1MatchLen: UInt16;
-                    const s2: PChar; s2Len: UInt16; var s2MatchLen: UInt16): Int16;
-begin
- asm
-  move.l #intlTxtCompare, D2;
- end;
- TxtCompare := __TxtCompare(s1, s1Len, s1MatchLen, s2, s2Len, s2MatchLen);
-end;
 
 
 function TxtCharIsSpace(ch: WChar): Boolean;
 function TxtCharIsSpace(ch: WChar): Boolean;
 begin
 begin

+ 3 - 21
packages/palmunits/src/textservicesmgr.pp

@@ -87,32 +87,14 @@ const
 
 
 // Return the current mode for the active FEP. The <nullParam> parameter
 // Return the current mode for the active FEP. The <nullParam> parameter
 // is unused and must be set to NULL.
 // is unused and must be set to NULL.
-function TsmGetFepMode(nullParam: Pointer): TsmFepModeType;
+function TsmGetFepMode(nullParam: Pointer): TsmFepModeType; syscall sysTrapTsmDispatch, tsmGetFepMode_;
 
 
 // Set the mode for the active FEP to be <inNewMode>. The previous mode
 // Set the mode for the active FEP to be <inNewMode>. The previous mode
 // is returned. The <nullParam> parameter is unused and must be set
 // is returned. The <nullParam> parameter is unused and must be set
 // to NULL.
 // to NULL.
-function TsmSetFepMode(nullParam: Pointer; inNewMode: TsmFepModeType): TsmFepModeType;
+function TsmSetFepMode(nullParam: Pointer; inNewMode: TsmFepModeType): TsmFepModeType; syscall sysTrapTsmDispatch, tsmSetFepMode_;
 
 
-implementation
 
 
-function __TsmGetFepMode(nullParam: Pointer): TsmFepModeType; syscall sysTrapTsmDispatch;
-function __TsmSetFepMode(nullParam: Pointer; inNewMode: TsmFepModeType): TsmFepModeType; syscall sysTrapTsmDispatch;
-
-function TsmGetFepMode(nullParam: Pointer): TsmFepModeType;
-begin
- asm
-  move.l #tsmGetFepMode_, D2;
- end;
- TsmGetFepMode := __TsmGetFepMode(nullParam);
-end;
-
-function TsmSetFepMode(nullParam: Pointer; inNewMode: TsmFepModeType): TsmFepModeType;
-begin
- asm
-  move.l #tsmSetFepMode_, D2;
- end;
- TsmSetFepMode := __TsmSetFepMode(nullParam, inNewMode);
-end;
+implementation
 
 
 end.
 end.

+ 4 - 31
packages/palmunits/src/udamgr.pp

@@ -154,44 +154,17 @@ const
 
 
 //!!! function UDAControl(var ioObject: UDAObjectType; parameter: UInt16, ...): Err; syscall sysTrapUdaMgrDispatch, sysUdaControl;
 //!!! function UDAControl(var ioObject: UDAObjectType; parameter: UInt16, ...): Err; syscall sysTrapUdaMgrDispatch, sysUdaControl;
 
 
-function UDAExchangeReaderNew(var socket: ExgSocketType): UDAReaderPtr;
+function UDAExchangeReaderNew(var socket: ExgSocketType): UDAReaderPtr; syscall sysTrapUdaMgrDispatch, sysUdaExchangeReaderNew;
 
 
-function UDAExchangeWriterNew(var socket: ExgSocketType; bufferSize: UDABufferSize): UDAWriterPtr;
+function UDAExchangeWriterNew(var socket: ExgSocketType; bufferSize: UDABufferSize): UDAWriterPtr; syscall sysTrapUdaMgrDispatch, sysUdaExchangeWriterNew;
 
 
  (***********************************************************************
  (***********************************************************************
  * Memory reader
  * Memory reader
  ************************************************************************)
  ************************************************************************)
 
 
-function UDAMemoryReaderNew(var bufferP: UInt8; bufferSizeInBytes: UDABufferSize): UDAReaderPtr;
+function UDAMemoryReaderNew(var bufferP: UInt8; bufferSizeInBytes: UDABufferSize): UDAReaderPtr; syscall sysTrapUdaMgrDispatch, sysUdaMemoryReaderNew;
 
 
-implementation
 
 
-function __UDAExchangeReaderNew(var socket: ExgSocketType): UDAReaderPtr; syscall sysTrapUdaMgrDispatch;
-function __UDAExchangeWriterNew(var socket: ExgSocketType; bufferSize: UDABufferSize): UDAWriterPtr; syscall sysTrapUdaMgrDispatch;
-function __UDAMemoryReaderNew(var bufferP: UInt8; bufferSizeInBytes: UDABufferSize): UDAReaderPtr; syscall sysTrapUdaMgrDispatch;
-
-function UDAExchangeReaderNew(var socket: ExgSocketType): UDAReaderPtr;
-begin
- asm
-  move.l #sysUdaExchangeReaderNew, D2;
- end;
- UDAExchangeReaderNew := __UDAExchangeReaderNew(socket);
-end;
-
-function UDAExchangeWriterNew(var socket: ExgSocketType; bufferSize: UDABufferSize): UDAWriterPtr;
-begin
- asm
-  move.l #sysUdaExchangeWriterNew, D2;
- end;
- UDAExchangeWriterNew := __UDAExchangeWriterNew(socket, bufferSize);
-end;
-
-function UDAMemoryReaderNew(var bufferP: UInt8; bufferSizeInBytes: UDABufferSize): UDAReaderPtr;
-begin
- asm
-  move.l #sysUdaMemoryReaderNew, D2;
- end;
- UDAMemoryReaderNew := __UDAMemoryReaderNew(bufferP, bufferSizeInBytes);
-end;
+implementation
 
 
 end.
 end.