From 6f66b80ea8644994bebb7e04db4292c8bcd5bcf0 Mon Sep 17 00:00:00 2001 From: armin Date: Tue, 4 Jan 2005 11:25:33 +0000 Subject: [PATCH] * rtl code cleanup, compat fixes between clib and libc --- rtl/netware/Makefile | 7 +- rtl/netware/Makefile.fpc | 4 +- rtl/netware/nwserv.pp | 17 +- rtl/netware/nwsnut.pp | 1521 +++++++++++++++++++------------------ rtl/netwlibc/Makefile | 1 + rtl/netwlibc/Makefile.fpc | 2 + rtl/netwlibc/libc.pp | 1222 +++++++++++++++-------------- rtl/netwlibc/system.pp | 47 +- rtl/netwlibc/sysutils.pp | 8 +- 9 files changed, 1496 insertions(+), 1333 deletions(-) diff --git a/rtl/netware/Makefile b/rtl/netware/Makefile index 6da2d89264..8f46fded1a 100644 --- a/rtl/netware/Makefile +++ b/rtl/netware/Makefile @@ -1,8 +1,8 @@ # -# Don't edit, this file is generated by FPCMake Version 1.1 [2004/12/20] +# Don't edit, this file is generated by FPCMake Version 1.1 [2004/12/30] # default: all -MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc +MAKEFILETARGETS=netware BSDs = freebsd netbsd openbsd darwin UNIXs = linux $(BSDs) sunos qnx LIMIT83fs = go32v2 os2 emx watcom @@ -1474,7 +1474,7 @@ winsock$(PPUEXT) : winsock.pp $(SYSTEMUNIT)$(PPUEXT) sockets$(PPUEXT) : sockets.pp netware$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \ $(INC)/sockets.inc $(INC)/socketsh.inc initc$(PPUEXT) : initc.pp $(SYSTEMUNIT)$(PPUEXT) -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) +dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) objects$(PPUEXT) : $(INC)/objects.pp $(SYSTEMUNIT)$(PPUEXT) sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \ @@ -1525,5 +1525,6 @@ keyboard$(PPUEXT) : $(INC)/keyboard.inc $(INC)/keybrdh.inc $(SYSTEMUNIT)$(PPUEXT cmem$(PPUEXT) : $(INC)/cmem.pp $(SYSTEMUNIT)$(PPUEXT) callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT) aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT) +nwsnut$(PPUEXT) : nwsnut.pp nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) override INSTALLPPUFILES+=$(IMPFILES) override CLEANPPUFILES+=$(addprefix $(COMPILER_UNITTARGETDIR)/,$(IMPFILES)) diff --git a/rtl/netware/Makefile.fpc b/rtl/netware/Makefile.fpc index 3c5cbaceb8..107b73b8fd 100644 --- a/rtl/netware/Makefile.fpc +++ b/rtl/netware/Makefile.fpc @@ -149,7 +149,7 @@ initc$(PPUEXT) : initc.pp $(SYSTEMUNIT)$(PPUEXT) # TP7 Compatible RTL Units # -dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) +dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) dos$(PPUEXT) @@ -250,6 +250,8 @@ callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT) aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT) +nwsnut$(PPUEXT) : nwsnut.pp nwserv$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) + # # Netware-.imp files need to be installed in the unit-dir # diff --git a/rtl/netware/nwserv.pp b/rtl/netware/nwserv.pp index 2fb3bb24e3..5ecda3312a 100644 --- a/rtl/netware/nwserv.pp +++ b/rtl/netware/nwserv.pp @@ -996,12 +996,14 @@ type // libc compatible scr_t = pointer; TScr = scr_t; PScr = Pscr_t; + PScreenStruct = PScr; function getch:longint; cdecl; external 'clib' name 'getch'; function getche:longint; cdecl; external 'clib' name 'getche'; function kbhit:longint; cdecl; external 'clib' name 'kbhit'; function putch(c:longint):longint; cdecl; external 'clib' name 'putch'; function ungetch(c:longint):longint; cdecl; external 'clib' name 'ungetch'; +function ungetcharacter(c:longint):longint; cdecl; external 'clib' name 'ungetch'; function cgets(buf:Pchar):Pchar; cdecl; external 'clib' name 'cgets'; function CheckIfScreenDisplayed(screenHandle,waitFlag:longint):longint; cdecl; external 'clib' name 'CheckIfScreenDisplayed'; function CheckIfScreenDisplayed(screenHandle:TScr;waitFlag:longint):longint; cdecl; external 'clib' name 'CheckIfScreenDisplayed'; @@ -1118,12 +1120,12 @@ function GetConnectionInformation (connectionNumber:word; objectName :Pchar; objectType :PWORD; objectID :Plongint; - loginTime :PBYTE):longint;cdecl;external 'clib' name 'GetConnectionInformation'; + loginTime :pointer):longint;cdecl;external 'clib' name 'GetConnectionInformation'; function GetConnectionInformation (connectionNumber:word; objectName :Pchar; var objectType :word; var objectID :longint; - var loginTime :byte):longint;cdecl;external 'clib' name 'GetConnectionInformation'; + var loginTime):longint;cdecl;external 'clib' name 'GetConnectionInformation'; function GetConnectionList(objectID,lastConnection:longint; numberOfConnections:Plongint; @@ -1965,6 +1967,10 @@ const NOTMYCOMMAND = 1; {$include npackoff.inc} +type + TRtag = longint; + PRtag = ^TRtag; + function AllocateResourceTag (NLMHandle:TNlmHandle; descriptionString:PChar; resourceType:longint):longint;cdecl;external 'clib' name 'AllocateResourceTag'; @@ -2139,6 +2145,7 @@ type var directoryNumber:longint; outPathStringP:PChar; var outPathCount:longint):longint;cdecl; + TVolumeNameString = String [17]; function FEConvertDirectoryNumber(sourceNameSpace:longint; volumeNumber:longint; @@ -2192,6 +2199,7 @@ function FEMapVolumeAndDirectoryToPath(volumeNumber,directoryNumber:longint; pat function FEMapVolumeAndDirectoryToPathForNS(volumeNumber,directoryNumber:longint; nameSpace:longint; pathString:PBYTE; pathCount:Plongint):longint;cdecl;external 'clib' name 'FEMapVolumeAndDirectoryToPathForNS'; function FEMapVolumeNumberToName(volumeNumber:longint; volumeName:PChar):longint;cdecl;external 'clib' name 'FEMapVolumeNumberToName'; +function FEMapVolumeNumberToName(volumeNumber:longint; var volumeName:TVolumeNameString):longint;cdecl;external 'clib' name 'FEMapVolumeNumberToName'; function FEQuickClose(connection,task,fileHandle:longint):longint;cdecl;external 'clib' name 'FEQuickClose'; function FEQuickFileLength(connection,handle:longint; fileSize:Plongint):longint;cdecl;external 'clib' name 'FEQuickFileLength'; function FEQuickFileLength(connection,handle:longint; var fileSize:longint):longint;cdecl;external 'clib' name 'FEQuickFileLength'; @@ -5377,7 +5385,10 @@ end. { $Log$ - Revision 1.6 2004-12-29 13:01:42 armin + Revision 1.7 2005-01-04 11:25:33 armin + * rtl code cleanup, compat fixes between clib and libc + + Revision 1.6 2004/12/29 13:01:42 armin * made commandParser more compatible between clib and libc Revision 1.5 2004/12/16 12:42:55 armin diff --git a/rtl/netware/nwsnut.pp b/rtl/netware/nwsnut.pp index 5e7f150db6..6b5f72430f 100644 --- a/rtl/netware/nwsnut.pp +++ b/rtl/netware/nwsnut.pp @@ -2,15 +2,15 @@ $Id$ This file is part of the Free Pascal run time library for Netware. - Copyright (c) 1999-2003 by the Free Pascal development team. - + Copyright (c) 1999-2005 by the Free Pascal development team. + See the file COPYING.FPC, included in this distribution, for details about the copyright. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - + **********************************************************************} unit nwsnut; @@ -18,39 +18,24 @@ unit nwsnut; interface {$mode objfpc} +{$if defined (netware_clib)} +uses nwserv; +{$else} +uses libc; +{$endif} + +{$PACKRECORDS C} const External_library='nwsnut'; - Type - PLongint = ^Longint; - PSmallInt = ^SmallInt; - PByte = ^Byte; - PPByte = ^PByte; - PWord = ^Word; - PDWord = ^DWord; - PDouble = ^Double; - TLONG = longint; - PLONG = ^TLONG; - TWORD = word; - TBYTE = byte; - PScreenStruct = pointer; - -{$PACKRECORDS C} - - type - LONG = dword; - - const - NULL = 0; - - { constants + { constants the constant CURRENT_NUT_VERSION is incremented when increased functionality is added. An NLM can check this value which is placed in the NUTInfo structure, version field, to determine if the NWSNUT NLM contains sufficient functionality to support its requirements } - const + CURRENT_NUT_VERSION = 405; { the constant NUT_REVISION_LEVEL is incremented when a major change in the behavior of NWSNUT is made. This value is not used by the calling @@ -68,30 +53,22 @@ interface CURSOR_ON = 1; VIRTUAL = 0; DIRECT = 1; - SEVERITY_INFORM = 1; + SEVERITY_INFORM = 1; SEVERITY_WARNING = 2; - SEVERITY_FATAL = 3; + SEVERITY_FATAL = 3; { text size minimization styles } - SNORMAL = 0; - SMINWIDTH = 1; + SNORMAL = 0; + SMINWIDTH = 1; SMINHEIGHT = 2; { palettes to set screen colors. - background and foreground can be reversed with VREVERSE - } - { white and black } - BW_PALETTE = 0; - { white and dark blue } - NORMAL_PALETTE = 1; - { light blue and dark blue } - INIT_PALETTE = 2; - { green and black } - HELP_PALETTE = 3; - { red and black } - ERROR_PALETTE = 4; - { pink and white } - WARNING_PALETTE = 5; - { green and red } - OTHER_PALETTE = 6; + background and foreground can be reversed with VREVERSE } + BW_PALETTE = 0; // white and black + NORMAL_PALETTE = 1; // white and dark blue + INIT_PALETTE = 2; // light blue and dark blue + HELP_PALETTE = 3; // green and black + ERROR_PALETTE = 4; // red and black + WARNING_PALETTE = 5; // pink and white + OTHER_PALETTE = 6; // green and red { text and portal justification styles } JRIGHT = 0; JLEFT = 1; @@ -215,12 +192,12 @@ interface UGK_CURSOR_PDOWN_KEY = $0e; { Added in version 403 - + A special key type to cause LISTs to refresh. K_REFRESH_KEY may be returned from an action procedure passed to NWSList, or another thread that wishes to cause a list to refresh may call NWSUngetKey with the UGK version of this, and it too will cause the list to be redrawn. - + Use "type" = UGK_SPECIAL_KEY, and "value" = UGK_REFRESH_KEY } UGK_SPECIAL_KEY = 3; @@ -274,157 +251,40 @@ interface TEXT_SENSITIVE_SCROLL_BARS = $0400; CONSIDER_LOCKED_FIELDS = $0800; { character and key constants } - { was #define dname def_expr } - function F_H1 : longint; - { return type might be wrong } - { Í } - { was #define dname def_expr } - function F_H2 : longint; - { return type might be wrong } + function F_H1 : longint; + { Í } function F_H2 : longint; + { ³ } function F_V1 : longint; + { º } function F_V2 : longint; + { Ú } function F_UL1 : longint; + { ¿ } function F_UR1 : longint; + { À } function F_LL1 : longint; + { Ù } function F_LR1 : longint; + { É } function F_UL2 : longint; + { » } function F_UR2 : longint; + { È } function F_LL2 : longint; + { ¼ } function F_LR2 : longint; + { Á } function F_UT1 : longint; + { Â } function F_DT1 : longint; + { ´ } function F_LT1 : longint; + { Ã } function F_RT1 : longint; + { Ê } function F_UT2 : longint; + { Ë } function F_DT2 : longint; + { ¹ } function F_LT2 : longint; + { Ì } function F_RT2 : longint; + { Å } function F_X1 : longint; + { Î } function F_X2 : longint; + {  } function F_UP : longint; + {  } function F_DOWN : longint; + {  } function F_LEFT : longint; + {  } function F_RIGHT : longint; + { ° } function F_BG1 : longint; + { ± } function F_BG2 : longint; + { ² } function F_BG3 : longint; + { Û } function F_BG4 : longint; - { ³ } - { was #define dname def_expr } - function F_V1 : longint; - { return type might be wrong } - - { º } - { was #define dname def_expr } - function F_V2 : longint; - { return type might be wrong } - - { Ú } - { was #define dname def_expr } - function F_UL1 : longint; - { return type might be wrong } - - { ¿ } - { was #define dname def_expr } - function F_UR1 : longint; - { return type might be wrong } - - { À } - { was #define dname def_expr } - function F_LL1 : longint; - { return type might be wrong } - - { Ù } - { was #define dname def_expr } - function F_LR1 : longint; - { return type might be wrong } - - { É } - { was #define dname def_expr } - function F_UL2 : longint; - { return type might be wrong } - - { » } - { was #define dname def_expr } - function F_UR2 : longint; - { return type might be wrong } - - { È } - { was #define dname def_expr } - function F_LL2 : longint; - { return type might be wrong } - - { ¼ } - { was #define dname def_expr } - function F_LR2 : longint; - { return type might be wrong } - - { Á } - { was #define dname def_expr } - function F_UT1 : longint; - { return type might be wrong } - - { Â } - { was #define dname def_expr } - function F_DT1 : longint; - { return type might be wrong } - - { ´ } - { was #define dname def_expr } - function F_LT1 : longint; - { return type might be wrong } - - { Ã } - { was #define dname def_expr } - function F_RT1 : longint; - { return type might be wrong } - - { Ê } - { was #define dname def_expr } - function F_UT2 : longint; - { return type might be wrong } - - { Ë } - { was #define dname def_expr } - function F_DT2 : longint; - { return type might be wrong } - - { ¹ } - { was #define dname def_expr } - function F_LT2 : longint; - { return type might be wrong } - - { Ì } - { was #define dname def_expr } - function F_RT2 : longint; - { return type might be wrong } - - { Å } - { was #define dname def_expr } - function F_X1 : longint; - { return type might be wrong } - - { Î } - { was #define dname def_expr } - function F_X2 : longint; - { return type might be wrong } - - {  } - { was #define dname def_expr } - function F_UP : longint; - { return type might be wrong } - - {  } - { was #define dname def_expr } - function F_DOWN : longint; - { return type might be wrong } - - {  } - { was #define dname def_expr } - function F_LEFT : longint; - { return type might be wrong } - - {  } - { was #define dname def_expr } - function F_RIGHT : longint; - { return type might be wrong } - - { ° } - { was #define dname def_expr } - function F_BG1 : longint; - { return type might be wrong } - - { ± } - { was #define dname def_expr } - function F_BG2 : longint; - { return type might be wrong } - - { ² } - { was #define dname def_expr } - function F_BG3 : longint; - { return type might be wrong } - - { Û } - { was #define dname def_expr } - function F_BG4 : longint; - { return type might be wrong } { form constants (control flags) } - const F_NOVERIFY = $00; F_VERIFY = $10; @@ -485,123 +345,94 @@ interface DYNAMIC_MESSAGE_THIRTEEN = $fff2; DYNAMIC_MESSAGE_FOURTEEN = $fff1; SYSTEM_MESSAGE = $8000; - { was #define dname(params) para_def_expr } - { argument types are unknown } - { return type might be wrong } + function IS_DYNAMIC_MESSAGE(a : longint) : boolean; type - {PNUTInfo_ = ^TNUTInfo_; - TNUTInfo_ = record - end;} - - PNUTInfo_ = ^TNUTInfo_; - - { height of virtual screen } - { width of virtual screen } - { top-most line of portal } - { left-most column of portal } - { position of portal over virtual portal } - { position of portal over virtual portal } - { the following fields should never be referenced by any application } + PNUTInfo_ = ^TNUTInfo_; PPCB_ = ^TPCB_; TPCB_ = record - frameLine : TLONG; - frameColumn : TLONG; - frameHeight : TLONG; - frameWidth : TLONG; - virtualHeight : TLONG; - virtualWidth : TLONG; - cursorState : TLONG; - borderType : TLONG; - borderAttribute : TLONG; - saveFlag : TWORD; - secondarySaveFlag : TWORD; - directFlag : TLONG; - headerAttribute : TLONG; - portalLine : TLONG; - portalColumn : TLONG; - portalHeight : TLONG; - portalWidth : TLONG; - virtualLine : TLONG; - virtualColumn : TLONG; - cursorLine : TLONG; - cursorColumn : TLONG; - firstUpdateFlag : TLONG; - headerText : PBYTE; - headerText2 : PBYTE; - virtualScreen : PBYTE; - saveScreen : PBYTE; - screenID : PScreenStruct; + frameLine : longint; + frameColumn : longint; + frameHeight : longint; + frameWidth : longint; + virtualHeight : longint; + virtualWidth : longint; + cursorState : longint; + borderType : longint; + borderAttribute : longint; + saveFlag : word; + secondarySaveFlag : word; + directFlag : longint; + headerAttribute : longint; + portalLine : longint; + portalColumn : longint; + portalHeight : longint; + portalWidth : longint; + virtualLine : longint; + virtualColumn : longint; + cursorLine : longint; + cursorColumn : longint; + firstUpdateFlag : longint; + headerText : pchar; + headerText2 : pchar; + virtualScreen : pointer; + saveScreen : pointer; + screenID : TScr; nutInfo : PNUTInfo_; - sequenceNumber : TLONG; - reserved1 : TLONG; - mtflags : TLONG; - borderPalette : TLONG; - showScrollBars : TLONG; - lastLine : TLONG; - longestLineLen : TLONG; - verticalScroll : TLONG; - horizontalScroll : TLONG; - oldVertical : TLONG; - oldHorizontal : TLONG; + sequenceNumber : longint; + reserved1 : longint; + mtflags : longint; + borderPalette : longint; + showScrollBars : longint; + lastLine : longint; + longestLineLen : longint; + verticalScroll : longint; + horizontalScroll : longint; + oldVertical : longint; + oldHorizontal : longint; deHighlightFunction : procedure (para1:PNUTInfo_; para2:PPCB_);cdecl; reHighlightFunction : procedure (para1:PNUTInfo_; para2:PPCB_); cdecl; - reportPortalUpdate : procedure (para1:PPCB_; para2:PNUTInfo_; updateType:TLONG); cdecl; + reportPortalUpdate : procedure (para1:PPCB_; para2:PNUTInfo_; updateType:longint); cdecl; end; TPCB = TPCB_; PPCB = ^TPCB; - { Topmost line of frame on physical screen } - { Leftmost column of frame on physical screen } - { Height of frame on physical screen } - { Width of frame on physical screen } - { Height of virtual screen } - { Width of virtual screen } - { Is the cursor on or off (1 or 0) } - { Type of border to use } - { Attribute to use with border } - { TRUE = save old screen } - { TRUE = no virtual screen } - { Attribute of header text } - { Pointer to header text } - { Pointer to the help text, always assumed to } - { be non NULL (when empty points to a '/0' BYTE } PHS_ = ^THS_; THS_ = record - nextScreen : TLONG; - previousScreen : TLONG; - frameLine : TLONG; - frameColumn : TLONG; - frameHeight : TLONG; - frameWidth : TLONG; - virtualHeight : TLONG; - virtualWidth : TLONG; - cursorState : TLONG; - borderType : TLONG; - borderAttribute : TLONG; - saveFlag : TLONG; - directFlag : TLONG; - headerAttribute : TLONG; - headerText : PBYTE; - text : PBYTE; + nextScreen : longint; + previousScreen : longint; + frameLine : longint; + frameColumn : longint; + frameHeight : longint; + frameWidth : longint; + virtualHeight : longint; + virtualWidth : longint; + cursorState : longint; + borderType : longint; + borderAttribute : longint; + saveFlag : longint; + directFlag : longint; + headerAttribute : longint; + headerText : pchar; + text : pchar; end; THELP_SCREEN = THS_; PHELP_SCREEN = ^THELP_SCREEN; PLIST_STRUCT = ^TLIST_STRUCT; TLIST_STRUCT = record - prev : PLIST_STRUCT; - next : PLIST_STRUCT; - otherInfo : pointer; - marked : TLONG; - flags : TWORD; - maxSkew : TWORD; - entryProcedure : procedure (listElement:PLIST_STRUCT; displayLine:TLONG; NUTInfoStructure:pointer);cdecl; - extra : TLONG; - text : array[0..0] of TBYTE; + prev : PLIST_STRUCT; + next : PLIST_STRUCT; + otherInfo : pointer; + marked : longint; + flags : word; + maxSkew : word; + entryProcedure : procedure (listElement:PLIST_STRUCT; displayLine:longint; NUTInfoStructure:pointer);cdecl; + extra : longint; + text : array[0..0] of char; end; TLIST = TLIST_STRUCT; PLIST = ^TLIST; @@ -609,9 +440,9 @@ interface PLP_ = ^TLP_; TLP_ = record - head : pointer; - tail : pointer; - sortProc : function :longint;cdecl; + head : pointer; + tail : pointer; + sortProc : function :longint;cdecl; freeProcedure : procedure (memoryPointer:pointer); end; TLISTPTR = TLP_; @@ -619,22 +450,22 @@ interface PMI_ = ^TMI_; TMI_ = record - dynamicMessageOne : PBYTE; - dynamicMessageTwo : PBYTE; - dynamicMessageThree : PBYTE; - dynamicMessageFour : PBYTE; - dynamicMessageFive : PBYTE; - dynamicMessageSix : PBYTE; - dynamicMessageSeven : PBYTE; - dynamicMessageEight : PBYTE; - dynamicMessageNine : PBYTE; - dynamicMessageTen : PBYTE; - dynamicMessageEleven : PBYTE; - dynamicMessageTwelve : PBYTE; - dynamicMessageThirteen : PBYTE; - dynamicMessageFourteen : PBYTE; - messageCount : TLONG; - programMesgTable : ^PBYTE; + dynamicMessageOne : pchar; + dynamicMessageTwo : pchar; + dynamicMessageThree : pchar; + dynamicMessageFour : pchar; + dynamicMessageFive : pchar; + dynamicMessageSix : pchar; + dynamicMessageSeven : pchar; + dynamicMessageEight : pchar; + dynamicMessageNine : pchar; + dynamicMessageTen : pchar; + dynamicMessageEleven : pchar; + dynamicMessageTwelve : pchar; + dynamicMessageThirteen : pchar; + dynamicMessageFourteen : pchar; + messageCount : longint; + programMesgTable : ppchar; end; TMessageInfo = TMI_; PMessageInfo = ^TMessageInfo; @@ -642,7 +473,7 @@ interface PINT_ = ^TINT_; TINT_ = record interruptProc : procedure (handle:pointer);cdecl; - key : TLONG; + key : longint; end; TINTERRUPT = TINT_; PINTERRUPT = ^TINTERRUPT; @@ -650,7 +481,7 @@ interface PMP_ = ^TMP_; TMP_ = record listAction : function (option:longint; parameter:pointer):longint;cdecl; - parameter : pointer; + parameter : pointer; end; TMENU_PARAMETER = TMP_; PMENU_PARAMETER = ^TMENU_PARAMETER; @@ -658,63 +489,63 @@ interface { always leave the following fields at the end of the struct. They should never be referenced directly by an application } - + TNUTInfo_ = record portal : array[0..(MAXPORTALS)-1] of PPCB; - currentPortal : TLONG; - headerHeight : TLONG; - waitFlag : TLONG; + currentPortal : longint; + headerHeight : longint; + waitFlag : longint; listStack : array[0..(MAXLISTS)-1] of TLISTPTR; saveStack : array[0..(SAVELISTS)-1] of TLISTPTR; - nextAvailList : TLONG; + nextAvailList : longint; head : PLIST; tail : PLIST; defaultCompareFunction : function (el1:PLIST; el2:PLIST):longint;cdecl; freeProcedure : procedure (memoryPointer:pointer); interruptTable : array[0..(MAXFUNCTIONS)-1] of procedure ; - functionKeyStatus : array[0..(MAXACTIONS)-1] of TLONG; + functionKeyStatus : array[0..(MAXACTIONS)-1] of longint; messages : TMessageInfo; - helpContextStack : array[0..(MAXHELP)-1] of TLONG; - currentPreHelpMessage : TLONG; + helpContextStack : array[0..(MAXHELP)-1] of longint; + currentPreHelpMessage : longint; freeHelpSlot : longint; - redisplayFormFlag : TLONG; - preHelpPortal : TLONG; + redisplayFormFlag : longint; + preHelpPortal : longint; helpActive : smallint; errorDisplayActive : smallint; - helpPortal : TLONG; - waitPortal : TLONG; - errorPortal : TLONG; + helpPortal : longint; + waitPortal : longint; + errorPortal : longint; resourceTag : pointer; screenID : pointer; - helpScreens : PBYTE; + helpScreens : pointer; helpOffset : longint; - helpHelp : TLONG; + helpHelp : longint; allocChain : pointer; - version : TLONG; - reserved : array[0..9] of TLONG; - moduleHandle : TLONG; + version : longint; + reserved : array[0..9] of longint; + moduleHandle : longint; customData : pointer; customDataRelease : procedure (theData:pointer; thisStructure:PNUTInfo_); cdecl; - displayErrorLabel : TLONG; - markBuffer : PBYTE; - markBufferLength : TLONG; - editBuffer : PBYTE; - editBufferLength : TLONG; - staticFlag : TLONG; - processID : TLONG; - mtflags : TLONG; - saveCurrentPortal : TLONG; - palette : TLONG; + displayErrorLabel : longint; + markBuffer : pchar; + markBufferLength : longint; + editBuffer : pchar; + editBufferLength : longint; + staticFlag : longint; + processID : longint; + mtflags : longint; + saveCurrentPortal : longint; + palette : longint; nutDataHandle : pointer; next : PNUTInfo_; prev : PNUTInfo_; listSortFunction : procedure (head:PLIST; tail:PLIST; thisStructure:PNUTInfo_); cdecl; - compatibilityLevel : TLONG; + compatibilityLevel : longint; end; TNUTInfo = TNUTInfo_; PNUTInfo = ^TNUTInfo; PPNUTInfo= ^PNUTInfo; - + { menu header message number } { menu center line } { menu center column } @@ -724,17 +555,17 @@ interface PMFC_ = ^TMFC_; TMFC_ = record - headernum : TLONG; - centerLine : TLONG; - centerColumn : TLONG; - maxoptlen : TLONG; + headernum : longint; + centerLine : longint; + centerColumn : longint; + maxoptlen : longint; action : function (option:longint; parameter:pointer):longint;cdecl; - arg1 : TLONG; - arg2 : TLONG; - arg3 : TLONG; - arg4 : TLONG; - arg5 : TLONG; - arg6 : TLONG; + arg1 : longint; + arg2 : longint; + arg3 : longint; + arg4 : longint; + arg5 : longint; + arg6 : longint; menuhead : TLISTPTR; nutInfo : PNUTInfo; end; @@ -771,18 +602,18 @@ interface Pfielddef = ^Tfielddef; Tfielddef = record element : PLIST; - fieldFlags : TLONG; - fieldLine : TLONG; - fieldColumn : TLONG; - fieldWidth : TLONG; - fieldAttribute : TLONG; + fieldFlags : longint; + fieldLine : longint; + fieldColumn : longint; + fieldWidth : longint; + fieldAttribute : longint; fieldActivateKeys : longint; - fieldFormat : procedure (field:Pfielddef; text:PBYTE; buffLen:TLONG);cdecl; - fieldControl : function (field:Pfielddef; selectKey:longint; fieldChanged:Plongint; handle:PNUTInfo):TLONG; - fieldVerify : function (field:Pfielddef; data:PBYTE; handle:PNUTInfo):longint; + fieldFormat : procedure (field:Pfielddef; text:pchar; buffLen:longint);cdecl; + fieldControl : function (field:Pfielddef; selectKey:longint; fieldChanged:Plongint; handle:PNUTInfo):longint; + fieldVerify : function (field:Pfielddef; data:pchar; handle:PNUTInfo):longint; fieldRelease : procedure (para1:Pfielddef); - fieldData : PBYTE; - fieldXtra : PBYTE; + fieldData : pchar; + fieldXtra : pchar; fieldHelp : longint; fieldAbove : Pfielddef; fieldBelow : Pfielddef; @@ -797,7 +628,7 @@ interface end; TFIELD = Tfielddef; PFIELD = ^TFIELD; - { Structures used for DisplayErrorCondition() } + { Structures used for DisplayErrorCondition } PPCERR_ = ^TPCERR_; TPCERR_ = record @@ -814,40 +645,59 @@ interface end; TNUT_ALLOC = TNA_; PNUT_ALLOC = ^TNUT_ALLOC; -{ C++ extern C conditionnal removed } - { CLIB screen ID } - { OS ResourceTagStructure } - function NWSInitializeNut(utility:TLONG; version:TLONG; headerType:TLONG; compatibilityLevel:TLONG; messageTable:PPBYTE; - helpScreens:PBYTE; screenID:longint; resourceTag:TLONG; handle:PPNUTInfo):longint;cdecl;external External_library name 'NWSInitializeNut'; + function NWSInitializeNut + (utility, + version, + headerType, + compatibilityLevel : longint; + messageTable : PPchar; + helpScreens : pchar; + screenID : TScr; // Clib/OS Screen Id + resourceTag : TRtag; // OS ResourceTagStructure + var handle : PNUTInfo) : longint;cdecl;external External_library name 'NWSInitializeNut'; - procedure NWSScreenSize(maxLines:PLONG; maxColumns:PLONG);cdecl;external External_library name 'NWSScreenSize'; + procedure NWSScreenSize(maxLines,maxColumns:plongint);cdecl;external External_library name 'NWSScreenSize'; + procedure NWSScreenSize(var maxLines,maxColumns:longint);cdecl;external External_library name 'NWSScreenSize'; - procedure NWSShowPortalLine(line:TLONG; column:TLONG; text:PBYTE; length:TLONG; portal:PPCB);cdecl;external External_library name 'NWSShowPortalLine'; + procedure NWSShowPortalLine(line,column:longint; text:pchar; length:longint; portal:PPCB);cdecl;external External_library name 'NWSShowPortalLine'; - procedure NWSShowPortalLineAttribute(line:TLONG; column:TLONG; text:PBYTE; attribute:TLONG; length:TLONG; + procedure NWSShowPortalLineAttribute(line,column:longint; text:pchar; attribute,length:longint; portal:PPCB);cdecl;external External_library name 'NWSShowPortalLineAttribute'; - procedure NWSScrollPortalZone(line:TLONG; column:TLONG; height:TLONG; width:TLONG; attribute:TLONG; - count:TLONG; direction:TLONG; portal:PPCB);cdecl;external External_library name 'NWSScrollPortalZone'; + procedure NWSScrollPortalZone(line,column,height,width,attribute, + count,direction:longint; portal:PPCB);cdecl;external External_library name 'NWSScrollPortalZone'; - procedure NWSFillPortalZone(line:TLONG; column:TLONG; height:TLONG; width:TLONG; fillCharacter:TLONG; - fillAttribute:TLONG; portal:PPCB);cdecl;external External_library name 'NWSFillPortalZone'; + procedure NWSFillPortalZone(line,column,height,width,fillCharacter, + fillAttribute:longint; portal:PPCB);cdecl;external External_library name 'NWSFillPortalZone'; - procedure NWSFillPortalZoneAttribute(line:TLONG; column:TLONG; height:TLONG; width:TLONG; attribute:TLONG; + procedure NWSFillPortalZoneAttribute(line,column,height,width,attribute:longint; portal:PPCB);cdecl;external External_library name 'NWSFillPortalZoneAttribute'; - function NWSGetMessage(message:TLONG; messages:PMessageInfo):PBYTE;cdecl;external External_library name 'NWSGetMessage'; + function NWSGetMessage(message:longint; messages:PMessageInfo):pchar;cdecl;external External_library name 'NWSGetMessage'; - procedure NWSSetDynamicMessage(message:TLONG; text:PBYTE; messages:PMessageInfo);cdecl;external External_library name 'NWSSetDynamicMessage'; + procedure NWSSetDynamicMessage(message:longint; text:pchar; messages:PMessageInfo);cdecl;external External_library name 'NWSSetDynamicMessage'; + procedure NWSSetDynamicMessage(message:longint; text:pchar; var messages:TMessageInfo);cdecl;external External_library name 'NWSSetDynamicMessage'; - function NWSCreatePortal(line:TLONG; column:TLONG; frameHeight:TLONG; frameWidth:TLONG; virtualHeight:TLONG; - virtualWidth:TLONG; saveFlag:TLONG; headerText:PBYTE; headerAttribute:TLONG; borderType:TLONG; - borderAttribute:TLONG; cursorFlag:TLONG; directFlag:TLONG; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSCreatePortal'; + function NWSCreatePortal + (line, + column, + frameHeight, + frameWidth, + virtualHeight, + virtualWidth, + saveFlag:longint; + headerText:pchar; + headerAttribute, + borderType, + borderAttribute, + cursorFlag, + directFlag : longint; + handle : PNUTInfo) : longint;cdecl;external External_library name 'NWSCreatePortal'; - procedure NWSDestroyPortal(portalNumber:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSDestroyPortal'; + procedure NWSDestroyPortal(portalNumber:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSDestroyPortal'; - procedure NWSPositionPortalCursor(line:TLONG; column:TLONG; portal:PPCB);cdecl;external External_library name 'NWSPositionPortalCursor'; + procedure NWSPositionPortalCursor(line:longint; column:longint; portal:PPCB);cdecl;external External_library name 'NWSPositionPortalCursor'; procedure NWSEnablePortalCursor(portal:PPCB);cdecl;external External_library name 'NWSEnablePortalCursor'; @@ -855,10 +705,10 @@ interface procedure NWSDeselectPortal(handle:PNUTInfo);cdecl;external External_library name 'NWSDeselectPortal'; - procedure NWSSelectPortal(portalNumber:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSSelectPortal'; + procedure NWSSelectPortal(portalNumber:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSSelectPortal'; - function NWSComputePortalPosition(centerLine:TLONG; centerColumn:TLONG; height:TLONG; width:TLONG; line:PLONG; - column:PLONG; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSComputePortalPosition'; + function NWSComputePortalPosition(centerLine:longint; centerColumn:longint; height:longint; width:longint; line:plongint; + column:plongint; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSComputePortalPosition'; procedure NWSClearPortal(portal:PPCB);cdecl;external External_library name 'NWSClearPortal'; @@ -866,13 +716,13 @@ type TFreeRoutine = procedure (memoryPointer:pointer); cdecl; procedure NWSInitList(handle:PNUTInfo; freeRoutine:TFreeRoutine);cdecl;external External_library name 'NWSInitList'; - function NWSPushList(handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSPushList'; + function NWSPushList(handle:PNUTInfo):longint;cdecl;external External_library name 'NWSPushList'; - function NWSPopList(handleNWS:PNUTInfo):TLONG;cdecl;external External_library name 'NWSPopList'; + function NWSPopList(handleNWS:PNUTInfo):longint;cdecl;external External_library name 'NWSPopList'; - function NWSSaveList(listIndex:TLONG; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSSaveList'; + function NWSSaveList(listIndex:longint; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSSaveList'; - function NWSRestoreList(listIndex:TLONG; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSRestoreList'; + function NWSRestoreList(listIndex:longint; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSRestoreList'; procedure NWSDestroyList(handle:PNUTInfo);cdecl;external External_library name 'NWSDestroyList'; @@ -880,13 +730,13 @@ type TFreeRoutine = procedure (memoryPointer:pointer); cdecl; procedure NWSDestroyForm(handle:PNUTInfo);cdecl;external External_library name 'NWSDestroyForm'; - function NWSAppendToList(text:PBYTE; otherInfo:pointer; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSAppendToList'; + function NWSAppendToList(text:pchar; otherInfo:pointer; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSAppendToList'; function NWSDeleteFromList(el:PLIST; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSDeleteFromList'; - function NWSInsertInList(text:PBYTE; otherInfo:PBYTE; atElement:PLIST; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSInsertInList'; + function NWSInsertInList(text:pchar; otherInfo:pointer; atElement:PLIST; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSInsertInList'; - function NWSGetListElementText(element:PLIST):PBYTE;cdecl;external External_library name 'NWSGetListElementText'; + function NWSGetListElementText(element:PLIST):pchar;cdecl;external External_library name 'NWSGetListElementText'; function NWSGetListHead(handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSGetListHead'; @@ -898,7 +748,7 @@ type TFreeRoutine = procedure (memoryPointer:pointer); cdecl; procedure NWSGetList(listPtr:PLISTPTR; handle:PNUTInfo);cdecl;external External_library name 'NWSGetList'; - function NWSIsAnyMarked(handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSIsAnyMarked'; + function NWSIsAnyMarked(handle:PNUTInfo):longint;cdecl;external External_library name 'NWSIsAnyMarked'; procedure NWSPushMarks(handle:PNUTInfo);cdecl;external External_library name 'NWSPushMarks'; @@ -910,49 +760,50 @@ type TFreeRoutine = procedure (memoryPointer:pointer); cdecl; procedure NWSInitForm(handle:PNUTInfo);cdecl;external External_library name 'NWSInitForm'; - function NWSGetSortCharacter(charIndex:TLONG):TLONG;cdecl;external External_library name 'NWSGetSortCharacter'; + function NWSGetSortCharacter(charIndex:longint):longint;cdecl;external External_library name 'NWSGetSortCharacter'; - function NWSGetLineDrawCharacter(charIndex:TLONG):TLONG;cdecl;external External_library name 'NWSGetLineDrawCharacter'; + function NWSGetLineDrawCharacter(charIndex:longint):longint;cdecl;external External_library name 'NWSGetLineDrawCharacter'; - function NWSStrcat(_string:PBYTE; newStuff:PBYTE):TLONG;cdecl;external External_library name 'NWSStrcat'; + function NWSStrcat(_string, newStuff:pchar):longint;cdecl;external External_library name 'NWSStrcat'; procedure NWSMemmove(dest:pointer; source:pointer; len:longint);cdecl;external External_library name 'NWSMemmove'; - function NWSToupper(ch:TBYTE):TBYTE;cdecl;external External_library name 'NWSToupper'; + function NWSToupper(ch:char):char;cdecl;external External_library name 'NWSToupper'; - function NWSIsdigit(ch:TBYTE):longint;cdecl;external External_library name 'NWSIsdigit'; + function NWSIsdigit(ch:char):longbool;cdecl;external External_library name 'NWSIsdigit'; - function NWSIsxdigit(ch:TBYTE):longint;cdecl;external External_library name 'NWSIsxdigit'; + function NWSIsxdigit(ch:char):longbool;cdecl;external External_library name 'NWSIsxdigit'; - function NWSAsciiToInt(data:PBYTE):longint;cdecl;external External_library name 'NWSAsciiToInt'; + function NWSAsciiToInt(data:pchar):longint;cdecl;external External_library name 'NWSAsciiToInt'; - function NWSAsciiToLONG(data:PBYTE):TLONG;cdecl;external External_library name 'NWSAsciiToLONG'; + function NWSAsciiToLONG(data:pchar):longint;cdecl;external External_library name 'NWSAsciiToLONG'; - function NWSAsciiHexToInt(data:PBYTE):longint;cdecl;external External_library name 'NWSAsciiHexToInt'; + function NWSAsciiHexToInt(data:pchar):longint;cdecl;external External_library name 'NWSAsciiHexToInt'; procedure NWSWaitForEscape(handle:PNUTInfo);cdecl;external External_library name 'NWSWaitForEscape'; function NWSWaitForEscapeOrCancel(handle:PNUTInfo):longint;cdecl;external External_library name 'NWSWaitForEscapeOrCancel'; - procedure NWSGetKey(_type:PLONG; value:PBYTE; handle:PNUTInfo);cdecl;external External_library name 'NWSGetKey'; + procedure NWSGetKey(_type:plongint; value:pchar; handle:PNUTInfo);cdecl;external External_library name 'NWSGetKey'; + procedure NWSGetKey(var _type:longint; value:pchar; handle:PNUTInfo);cdecl;external External_library name 'NWSGetKey'; - function NWSKeyStatus(handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSKeyStatus'; + function NWSKeyStatus(handle:PNUTInfo):longint;cdecl;external External_library name 'NWSKeyStatus'; - function NWSUngetKey(_type:TLONG; value:TLONG; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSUngetKey'; + function NWSUngetKey(_type:longint; value:longint; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSUngetKey'; - procedure NWSEnableFunctionKey(key:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSEnableFunctionKey'; + procedure NWSEnableFunctionKey(key:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSEnableFunctionKey'; - procedure NWSDisableFunctionKey(key:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSDisableFunctionKey'; + procedure NWSDisableFunctionKey(key:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSDisableFunctionKey'; - procedure NWSDisableInterruptKey(key:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSDisableInterruptKey'; + procedure NWSDisableInterruptKey(key:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSDisableInterruptKey'; type TInterruptProc = procedure (handle:pointer); cdecl; - procedure NWSEnableInterruptKey(key:TLONG; interruptProc:TInterruptProc; handle:PNUTInfo);cdecl;external External_library name 'NWSEnableInterruptKey'; + procedure NWSEnableInterruptKey(key:longint; interruptProc:TInterruptProc; handle:PNUTInfo);cdecl;external External_library name 'NWSEnableInterruptKey'; - procedure NWSSaveFunctionKeyList(keyList:PBYTE; handle:PNUTInfo);cdecl;external External_library name 'NWSSaveFunctionKeyList'; + procedure NWSSaveFunctionKeyList(keyList:pchar; handle:PNUTInfo);cdecl;external External_library name 'NWSSaveFunctionKeyList'; - procedure NWSEnableFunctionKeyList(keyList:PBYTE; handle:PNUTInfo);cdecl;external External_library name 'NWSEnableFunctionKeyList'; + procedure NWSEnableFunctionKeyList(keyList:pchar; handle:PNUTInfo);cdecl;external External_library name 'NWSEnableFunctionKeyList'; procedure NWSSaveInterruptList(interruptList:PINTERRUPT; handle:PNUTInfo);cdecl;external External_library name 'NWSSaveInterruptList'; @@ -964,180 +815,348 @@ type TInterruptProc = procedure (handle:pointer); cdecl; procedure NWSEnableAllFunctionKeys(handle:PNUTInfo);cdecl;external External_library name 'NWSEnableAllFunctionKeys'; - function NWSDisplayTextInPortal(line:TLONG; indentLevel:TLONG; text:PBYTE; attribute:TLONG; portal:PPCB):longint;cdecl;external External_library name 'NWSDisplayTextInPortal'; + function NWSDisplayTextInPortal(line,indentLevel:longint; text:pchar; attribute:longint; portal:PPCB):longint;cdecl;external External_library name 'NWSDisplayTextInPortal'; - function NWSDisplayInformation(header:TLONG; pauseFlag:TLONG; centerLine:TLONG; centerColumn:TLONG; palette:TLONG; - attribute:TLONG; displayText:PBYTE; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSDisplayInformation'; + function NWSDisplayInformation(header,pauseFlag,centerLine,centerColumn,palette, + attribute:longint; displayText:pchar; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSDisplayInformation'; - procedure NWSStartWait(centerLine:TLONG; centerColumn:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSStartWait'; + procedure NWSStartWait(centerLine,centerColumn:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSStartWait'; procedure NWSEndWait(handle:PNUTInfo);cdecl;external External_library name 'NWSEndWait'; - function NWSAlert(centerLine:TLONG; centerColumn:TLONG; handle:PNUTInfo; message:TLONG; args:array of const):TLONG;cdecl;external External_library name 'NWSAlert'; + function NWSAlert(centerLine,centerColumn:longint; handle:PNUTInfo; message:longint; args:array of const):longint;cdecl;external External_library name 'NWSAlert'; - function NWSAlert(centerLine:TLONG; centerColumn:TLONG; handle:PNUTInfo; message:TLONG):TLONG;cdecl;external External_library name 'NWSAlert'; + function NWSAlert(centerLine,centerColumn:longint; handle:PNUTInfo; message:longint):longint;cdecl;external External_library name 'NWSAlert'; - function NWSAlertWithHelp(centerLine:TLONG; centerColumn:TLONG; handle:PNUTInfo; message:TLONG; helpContext:TLONG; - args:array of const):TLONG;cdecl;external External_library name 'NWSAlertWithHelp'; + function NWSAlertWithHelp(centerLine,centerColumn:longint; handle:PNUTInfo; message,helpContext:longint; + args:array of const):longint;cdecl;external External_library name 'NWSAlertWithHelp'; - function NWSAlertWithHelp(centerLine:TLONG; centerColumn:TLONG; handle:PNUTInfo; message:TLONG; helpContext:TLONG):TLONG;cdecl;external External_library name 'NWSAlertWithHelp'; + function NWSAlertWithHelp(centerLine,centerColumn:longint; handle:PNUTInfo; message:longint; helpContext:longint):longint;cdecl;external External_library name 'NWSAlertWithHelp'; - function NWSTrace(handle:PNUTInfo; message:PBYTE; args:array of const):TLONG;cdecl;external External_library name 'NWSTrace'; + function NWSTrace(handle:PNUTInfo; message:pchar; args:array of const):longint;cdecl;external External_library name 'NWSTrace'; + function NWSTrace(handle:PNUTInfo; message:pchar):longint;cdecl;external External_library name 'NWSTrace'; - function NWSTrace(handle:PNUTInfo; message:PBYTE):TLONG;cdecl;external External_library name 'NWSTrace'; + procedure NWSDisplayErrorText(message:longint; severity:longint; handle:PNUTInfo; args:array of const);cdecl;external External_library name 'NWSDisplayErrorText'; - procedure NWSDisplayErrorText(message:TLONG; severity:TLONG; handle:PNUTInfo; args:array of const);cdecl;external External_library name 'NWSDisplayErrorText'; + procedure NWSDisplayErrorText(message:longint; severity:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayErrorText'; - procedure NWSDisplayErrorText(message:TLONG; severity:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayErrorText'; - - procedure NWSDisplayErrorCondition(procedureName:PBYTE; errorCode:longint; severity:TLONG; errorList:PPROCERROR; handle:PNUTInfo; + procedure NWSDisplayErrorCondition(procedureName:pchar; errorCode:longint; severity:longint; errorList:PPROCERROR; handle:PNUTInfo; args:array of const);cdecl;external External_library name 'NWSDisplayErrorCondition'; - procedure NWSDisplayErrorCondition(procedureName:PBYTE; errorCode:longint; severity:TLONG; errorList:PPROCERROR; handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayErrorCondition'; + procedure NWSDisplayErrorCondition(procedureName:pchar; errorCode:longint; severity:longint; errorList:PPROCERROR; handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayErrorCondition'; - function NWSAppendToMenu(message:TLONG; option:TLONG; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSAppendToMenu'; + function NWSAppendToMenu(message:longint; option:longint; handle:PNUTInfo):PLIST;cdecl;external External_library name 'NWSAppendToMenu'; type TActionFunc = function (option:longint; parameter:pointer) : longint; cdecl; - function NWSMenu(header:TLONG; centerLine:TLONG; centerColumn:TLONG; defaultElement:PLIST; action:TActionFunc; - handle:PNUTInfo; actionParameter:pointer):longint;cdecl;external External_library name 'NWSMenu'; + function NWSMenu(header, + centerLine, + centerColumn:longint; + defaultElement:PLIST; + action:TActionFunc; + handle:PNUTInfo; + actionParameter:pointer):longint;cdecl;external External_library name 'NWSMenu'; - function NWSConfirm(header:TLONG; centerLine:TLONG; centerColumn:TLONG; defaultChoice:TLONG; action:TActionFunc; - handle:PNUTInfo; actionParameter:pointer):longint;cdecl;external External_library name 'NWSConfirm'; + function NWSConfirm(header,centerLine,centerColumn,defaultChoice:longint; + action:TActionFunc; + handle:PNUTInfo; + actionParameter:pointer):longint;cdecl;external External_library name 'NWSConfirm'; - function NWSPushHelpContext(helpContext:TLONG; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSPushHelpContext'; + function NWSPushHelpContext(helpContext:longint; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSPushHelpContext'; function NWSPopHelpContext(handle:PNUTInfo):longint;cdecl;external External_library name 'NWSPopHelpContext'; -type TFormatFunc=function (element:PLIST; skew:TLONG; displayLine:PBYTE; width:TLONG):TLONG; cdecl; - TNWSListActionFunc=function (keyPressed:TLONG; elementSelected:PPLIST; itemLineNumber:PLONG; actionParameter:pointer):longint; cdecl; - - function NWSList(header:TLONG; centerLine:TLONG; centerColumn:TLONG; height:TLONG; width:TLONG; - validKeyFlags:TLONG; element:PPLIST; handle:PNUTInfo; format:TFormatFunc; action:TNWSListActionFunc; - actionParameter:pointer):TLONG;cdecl;external External_library name 'NWSList'; +type TFormatFunc=function (element:PLIST; skew:longint; displayLine:pchar; width:longint):longint; cdecl; + TNWSListActionFunc=function (keyPressed:longint; elementSelected:PPLIST; itemLineNumber:plongint; actionParameter:pointer):longint; cdecl; -type TInsertFunc = function (text:PBYTE; otherInfo:Ppointer; parameters:pointer):longint; cdecl; + function NWSList(header:longint; centerLine:longint; centerColumn:longint; height:longint; width:longint; + validKeyFlags:longint; element:PPLIST; handle:PNUTInfo; format:TFormatFunc; action:TNWSListActionFunc; + actionParameter:pointer):longint;cdecl;external External_library name 'NWSList'; + +type TInsertFunc = function (text:pchar; otherInfo:Ppointer; parameters:pointer):longint; cdecl; TFreeProcedure=function (otherInfo:pointer):longint; cdecl; - - function NWSInsertInPortalList(currentElement:PPLIST; currentLine:PLONG; InsertProcedure:TInsertFunc; FreeProcedure:TFreeProcedure; handle:PNUTInfo; + + function NWSInsertInPortalList(currentElement:PPLIST; currentLine:plongint; InsertProcedure:TInsertFunc; FreeProcedure:TFreeProcedure; handle:PNUTInfo; parameters:pointer):longint;cdecl;external External_library name 'NWSInsertInPortalList'; -type TModifyProcedure=function (text:PBYTE; parameters:pointer):longint; cdecl; +type TModifyProcedure=function (text:pchar; parameters:pointer):longint; cdecl; - function NWSModifyInPortalList(currentElement:PPLIST; currentLine:PLONG; ModifyProcedure:TModifyProcedure; handle:PNUTInfo; parameters:pointer):longint;cdecl;external External_library name 'NWSModifyInPortalList'; + function NWSModifyInPortalList(currentElement:PPLIST; currentLine:plongint; ModifyProcedure:TModifyProcedure; handle:PNUTInfo; parameters:pointer):longint;cdecl;external External_library name 'NWSModifyInPortalList'; type TDeleteFunc = function (el:PLIST; handle:PNUTInfo; parameters:pointer):PLIST; cdecl; - function NWSDeleteFromPortalList(currentElement:PPLIST; currentLine:PLONG; DeleteProcedure:TDeleteFunc; deleteCurrentHeader:TLONG; deleteMarkedHeader:TLONG; + function NWSDeleteFromPortalList(currentElement:PPLIST; currentLine:plongint; DeleteProcedure:TDeleteFunc; deleteCurrentHeader:longint; deleteMarkedHeader:longint; handle:PNUTInfo; parameters:pointer):longint;cdecl;external External_library name 'NWSDeleteFromPortalList'; -type TNWSEditInsertFunc=function (buffer:PBYTE; maxLen:TLONG; parameters:pointer):longint; cdecl; - TNWSEditActionFunc=function (action:TLONG; buffer:PBYTE; parameters:pointer):longint; cdecl; +type TNWSEditInsertFunc=function (buffer:pchar; maxLen:longint; parameters:pointer):longint; cdecl; + TNWSEditActionFunc=function (action:longint; buffer:pchar; parameters:pointer):longint; cdecl; - function NWSEditString(centerLine:TLONG; centerColumn:TLONG; editHeight:TLONG; editWidth:TLONG; header:TLONG; - prompt:TLONG; buf:PBYTE; maxLen:TLONG; _type:TLONG; handle:PNUTInfo; - insertProc:TNWSEditInsertFunc; actionProc:TNWSEditActionFunc; parameters:pointer):longint;cdecl;external External_library name 'NWSEditString'; + function NWSEditString( + centerLine, centerColumn, editHeight, editWidth, header, + prompt :longint; + buf:pchar; + maxLen, _type:longint; handle:PNUTInfo; + insertProc:TNWSEditInsertFunc; + actionProc:TNWSEditActionFunc; + parameters:pointer):longint;cdecl;external External_library name 'NWSEditString'; - function NWSAppendIntegerField(line:TLONG; column:TLONG; fflag:TLONG; data:Plongint; minimum:longint; - maximum:longint; help:TLONG; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendIntegerField'; + function NWSAppendIntegerField + (line, column, fflag:longint; data:Plongint; + minimum, maximum, help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendIntegerField'; - function NWSAppendUnsignedIntegerField(line:TLONG; column:TLONG; fflag:TLONG; data:PLONG; minimum:TLONG; - maximum:TLONG; help:TLONG; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendUnsignedIntegerField'; + function NWSAppendIntegerField + (line, column, fflag:longint; var data:longint; + minimum, maximum, help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendIntegerField'; - function NWSAppendHexField(line:TLONG; column:TLONG; fflag:TLONG; data:Plongint; minimum:longint; - maximum:longint; help:TLONG; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendHexField'; + function NWSAppendUnsignedIntegerField + (line, + column, + fflag:longint; + data:plongint; + minimum, maximum, help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendUnsignedIntegerField'; - procedure NWSDisplayPreHelp(line:TLONG; column:TLONG; message:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayPreHelp'; + function NWSAppendUnsignedIntegerField + (line, + column, + fflag:longint; + var data:cardinal; + minimum, maximum, help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendUnsignedIntegerField'; - procedure NWSRemovePreHelp(handle:PNUTInfo);cdecl;external External_library name 'NWSRemovePreHelp'; + function NWSAppendHexField + (line,column,fflag:longint; + data:Plongint; + minimum, maximum, help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendHexField'; - function NWSGetADisk(volName:PBYTE; prompt:PBYTE; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSGetADisk'; + procedure NWSDisplayPreHelp + (line, column, message:longint; + handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayPreHelp'; + + procedure NWSRemovePreHelp + (handle:PNUTInfo);cdecl;external External_library name 'NWSRemovePreHelp'; + + function NWSGetADisk + (volName,prompt:pchar; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSGetADisk'; procedure NWSInitListPtr(listPtr:PLISTPTR);cdecl;external External_library name 'NWSInitListPtr'; - function NWSEditForm(headernum:TLONG; line:TLONG; col:TLONG; portalHeight:TLONG; portalWidth:TLONG; - virtualHeight:TLONG; virtualWidth:TLONG; ESCverify:TLONG; forceverify:TLONG; confirmMessage:TLONG; - handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditForm'; + function NWSEditForm + (headernum, + line, + col, + portalHeight, + portalWidth, + virtualHeight, + virtualWidth, + ESCverify, + forceverify, + confirmMessage : longint; + handle : PNUTInfo):longint;cdecl;external External_library name 'NWSEditForm'; - function NWSEditPortalFormField(header:TLONG; cline:TLONG; ccol:TLONG; formHeight:TLONG; formWidth:TLONG; - controlFlags:TLONG; formHelp:TLONG; confirmMessage:TLONG; startField:PFIELD; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditPortalFormField'; + function NWSEditPortalFormField + (header, + cline, + ccol, + formHeight, + formWidth, + controlFlags:longint; + formHelp:CARDINAL; + confirmMessage:longint; + startField:PFIELD; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditPortalFormField'; - function NWSEditPortalForm(header:TLONG; centerLine:TLONG; centerColumn:TLONG; formHeight:TLONG; formWidth:TLONG; - controlFlags:TLONG; formHelp:TLONG; confirmMessage:TLONG; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditPortalForm'; + function NWSEditPortalForm + (header, + centerLine, + centerColumn, + formHeight, + formWidth, + controlFlags:longint; + formHelp:CARDINAL; + confirmMessage:longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditPortalForm'; -type TfFormat = procedure (field:Pfielddef; text:PBYTE; buffLen:TLONG); cdecl; - TfControl = function (field:Pfielddef; selectKey:longint; fieldChanged:Plongint; handle:PNUTInfo):TLONG; cdecl; - TfVerify = function (field:Pfielddef; data:PBYTE; handle:PNUTInfo):longint; cdecl; +type TfFormat = procedure (field:Pfielddef; text:pchar; buffLen:longint); cdecl; + TfControl = function (field:Pfielddef; selectKey:longint; var fieldChanged:longint; handle:PNUTInfo):longint; cdecl; + TfVerify = function (field:Pfielddef; data:pointer; handle:PNUTInfo):longint; cdecl; TfRelease = procedure (field:Pfielddef); cdecl; { Data & Xtra field release routine } function NWSAppendToForm( - fline:TLONG; - fcol:TLONG; - fwidth:TLONG; - fattr:TLONG; + fline, + fcol, + fwidth, + fattr:longint; fFormat:TfFormat; fControl:TfControl; fVerify:TfVerify; fRelease:TfRelease; - fData:PBYTE; - fXtra:PBYTE; - fflags:TLONG; - fActivateKeys:TLONG; - fhelp:TLONG; + fData:pointer; + fXtra:pointer; + fflags:longint; + fActivateKeys:longint; + fhelp:longint; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendToForm'; - function NWSAppendPromptField(line:TLONG; column:TLONG; promptnum:TLONG; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendPromptField'; + function NWSAppendPromptField(line,column,promptnum:longint; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendPromptField'; - function NWSAppendCommentField(line:TLONG; column:TLONG; prompt:PBYTE; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendCommentField'; + function NWSAppendCommentField(line,column:longint; prompt:pchar; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendCommentField'; - function NWSAppendStringField(line:TLONG; column:TLONG; width:TLONG; fflag:TLONG; data:PBYTE; - cset:PBYTE; help:TLONG; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendStringField'; + function NWSAppendStringField + (line, + column, + width, + fflag:longint; + data,cset:pchar; + help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendStringField'; - function NWSAppendBoolField(line:TLONG; column:TLONG; fflag:TLONG; data:PBYTE; help:TLONG; + function NWSAppendBoolField + (line, + column, + fflag:longint; + data:pointer; + help:longint; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendBoolField'; - function NWSAppendGenericBoolField(line:TLONG; column:TLONG; fflag:TLONG; data:PBYTE; help:TLONG; - yesString:PBYTE; noString:PBYTE; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendGenericBoolField'; + function NWSAppendBoolField + (line, + column, + fflag:longint; + var data:longbool; + help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendBoolField'; -type TSpotActionFunc = function (fp:PFIELD; selectKey:longint; changedField:Plongint; handle:PNUTInfo):TLONG; cdecl; - function NWSAppendHotSpotField(line:TLONG; column:TLONG; fflag:TLONG; - displayString:PBYTE; + function NWSAppendGenericBoolField + (line, + column, + fflag:longint; + data:pointer; + help:longint; + yesString, noString:pchar; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendGenericBoolField'; + + function NWSAppendGenericBoolField + (line, + column, + fflag:longint; + var data:longbool; + help:longint; + yesString, noString:pchar; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendGenericBoolField'; + +type TSpotActionFunc = function (fp:PFIELD; selectKey:longint; var changedField:longint; handle:PNUTInfo):longint; cdecl; + function NWSAppendHotSpotField + (line, + column, + fflag:longint; + displayString:pchar; SpotAction:TSpotActionFunc; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendHotSpotField'; - function NWSInitMenuField(headermsg:TLONG; cLine:TLONG; cCol:TLONG; - action:TActionFunc ; - nutInfo:PNUTInfo; + function NWSInitMenuField + (headermsg, + cLine, + cCol:longint; + action:TActionFunc; + nutInfo:PNUTInfo; args:array of const):PMFCONTROL;cdecl;external External_library name 'NWSInitMenuField'; - function NWSInitMenuField(headermsg:TLONG; cLine:TLONG; cCol:TLONG; - action:TActionFunc; nutInfo:PNUTInfo):PMFCONTROL;cdecl;external External_library name 'NWSInitMenuField'; + function NWSInitMenuField + (headermsg, + cLine, + cCol:longint; + action:TActionFunc; + nutInfo:PNUTInfo):PMFCONTROL;cdecl;external External_library name 'NWSInitMenuField'; - function NWSAppendToMenuField(m:PMFCONTROL; optiontext:TLONG; option:longint; nutInfo:PNUTInfo):longint;cdecl;external External_library name 'NWSAppendToMenuField'; + function NWSAppendToMenuField + (m:PMFCONTROL; + optiontext:longint; + option:longint; + nutInfo:PNUTInfo):longint;cdecl;external External_library name 'NWSAppendToMenuField'; - function NWSAppendMenuField(line:TLONG; column:TLONG; fflag:TLONG; data:Plongint; m:PMFCONTROL; - help:TLONG; nutInfo:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendMenuField'; + function NWSAppendMenuField + (line, + column, + fflag:longint; + data:Plongint; + m:PMFCONTROL; + help:longint; + nutInfo:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendMenuField'; - { length of document } - function NWSEditText(centerLine:TLONG; centerColumn:TLONG; height:TLONG; width:TLONG; headerNumber:TLONG; - textBuffer:PBYTE; maxBufferLength:TLONG; confirmMessage:TLONG; forceConfirm:TLONG; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditText'; + function NWSAppendMenuField + (line, + column, + fflag:longint; + var data:longint; + m:PMFCONTROL; + help:longint; + nutInfo:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendMenuField'; - function NWSViewText(centerLine:TLONG; centerColumn:TLONG; height:TLONG; width:TLONG; headerNumber:TLONG; - textBuffer:PBYTE; maxBufferLength:TLONG; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSViewText'; + function NWSEditText + (centerLine, + centerColumn, + height, + width, + headerNumber:longint; + textBuffer:pchar; + maxBufferLength, + confirmMessage, + forceConfirm:longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditText'; - procedure NWSDisplayHelpScreen(offset:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayHelpScreen'; + function NWSViewText + (centerLine, + centerColumn, + height, + width, + headerNumber:longint; + textBuffer:pchar; + maxBufferLength:longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSViewText'; - function NWSAlloc(numberOfBytes:TLONG; handle:PNUTInfo):pointer;cdecl;external External_library name 'NWSAlloc'; + procedure NWSDisplayHelpScreen + (offset:longint; + handle:PNUTInfo);cdecl;external External_library name 'NWSDisplayHelpScreen'; - procedure NWSFree(address:pointer; handle:PNUTInfo);cdecl;external External_library name 'NWSFree'; + // Allocates memory for NWSNUT purposes + function NWSAlloc + (numberOfBytes:longint; + handle:PNUTInfo):pointer;cdecl;external External_library name 'NWSAlloc'; - function NWSDisplayTextJustifiedInPortal(justify:TLONG; line:TLONG; column:TLONG; textWidth:TLONG; text:PBYTE; - attribute:TLONG; portal:PPCB):longint;cdecl;external External_library name 'NWSDisplayTextJustifiedInPortal'; + procedure NWSFree + (address:pointer; + handle:PNUTInfo);cdecl;external External_library name 'NWSFree'; - function NWSDisplayInformationInPortal(header:TLONG; portalJustifyLine:TLONG; portalJustifyColumn:TLONG; portalJustifyType:TLONG; portalPalette:TLONG; - portalBorderType:TLONG; portalMaxWidth:TLONG; portalMaxHeight:TLONG; portalMinWidth:TLONG; portalMinHeight:TLONG; - textLRJustifyType:TLONG; textLRIndent:TLONG; textTBJustifyType:TLONG; textTBIndent:TLONG; textAttribute:TLONG; - textMinimizeStyle:TLONG; text:PBYTE; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSDisplayInformationInPortal'; + // Displays justified text in an existing portal + function NWSDisplayTextJustifiedInPortal + (justify, + line:longint; column:longint; textWidth:longint; text:pchar; + attribute:longint; portal:PPCB):longint;cdecl;external External_library name 'NWSDisplayTextJustifiedInPortal'; + + function NWSDisplayInformationInPortal + (header, + portalJustifyLine, + portalJustifyColumn, + portalJustifyType, + portalPalette, + portalBorderType, + portalMaxWidth, + portalMaxHeight, + portalMinWidth, + portalMinHeight, + textLRJustifyType, + textLRIndent, + textTBJustifyType, + textTBIndent, + textAttribute, + textMinimizeStyle:longint; + text:pchar; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSDisplayInformationInPortal'; procedure NWSRestoreNut(handle:PNUTInfo);cdecl;external External_library name 'NWSRestoreNut'; @@ -1147,372 +1166,380 @@ type TSpotActionFunc = function (fp:PFIELD; selectKey:longint; changedField:Plon type TSSFEntryProc = procedure (para1:PFIELD; para2:pointer; para3:PNUTInfo); cdecl; TSSFCustomDataReleaseProc = procedure (para1:pointer; para2:PNUTInfo); cdecl; - TSSFFormat=procedure (para1:PFIELD; text:PBYTE; para3:TLONG); cdecl; - TSSFControlFunc = function (para1:PFIELD; para2:longint; para3:Plongint; para4:PNUTInfo):TLONG; cdecl; - TSSFVerifyFunc = function (para1:PFIELD; para2:PBYTE; para3:PNUTInfo):longint; cdecl; + TSSFFormat=procedure (para1:PFIELD; text:pchar; para3:longint); cdecl; + TSSFControlFunc = function (para1:PFIELD; para2:longint; para3:Plongint; para4:PNUTInfo):longint; cdecl; + TSSFVerifyFunc = function (para1:PFIELD; para2:pointer; para3:PNUTInfo):longint; cdecl; TSSFReleaseProc = procedure (para1:PFIELD); cdecl; - - procedure NWSSetFieldFunctionPtr(fp:PFIELD; + + procedure NWSSetFieldFunctionPtr(fp:PFIELD; Format : TSSFFormat; Control: TSSFControlFunc; Verify : TSSFVerifyFunc; Release: TSSFReleaseProc; - Entry : TSSFEntryProc; + Entry : TSSFEntryProc; customDataRelease : TSSFCustomDataReleaseProc);cdecl;external External_library name 'NWSSetFieldFunctionPtr'; - procedure NWSGetFieldFunctionPtr( - fp:PFIELD; - var Format : TSSFFormat; - var Control : TSSFControlFunc; - var Verify : TSSFVerifyFunc; - var Release : TSSFReleaseProc; - var Entry : TSSFEntryProc; - var customDataRelease:TSSFCustomDataReleaseProc);cdecl;external External_library name 'NWSGetFieldFunctionPtr'; type TCompareFunc = function (el1:PLIST; el2:PLIST):longint; cdecl; - procedure NWSSetDefaultCompare(handle:PNUTInfo; + procedure NWSSetDefaultCompare(handle:PNUTInfo; defaultCompareFunction:TCompareFunc);cdecl;external External_library name 'NWSSetDefaultCompare'; procedure NWSGetDefaultCompare(handle:PNUTInfo; var defaultCompareFunction:TCompareFunc);cdecl;external External_library name 'NWSGetDefaultCompare'; type TlistSortFunction = procedure (head:PLIST; tail:PLIST; handle:PNUTInfo); cdecl; { added in version 402 } - procedure NWSSetListSortFunction(handle:PNUTInfo; + procedure NWSSetListSortFunction(handle:PNUTInfo; listSortFunction:TlistSortFunction);cdecl;external External_library name 'NWSSetListSortFunction'; { added in version 402 } - procedure NWSGetListSortFunction(handle:PNUTInfo; + procedure NWSGetListSortFunction(handle:PNUTInfo; var listSortFunction:TlistSortFunction);cdecl;external External_library name 'NWSGetListSortFunction'; - procedure NWSSetScreenPalette(newPalette:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSSetScreenPalette'; + procedure NWSSetScreenPalette(newPalette:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSSetScreenPalette'; - function NWSGetScreenPalette(handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSGetScreenPalette'; + function NWSGetScreenPalette(handle:PNUTInfo):longint;cdecl;external External_library name 'NWSGetScreenPalette'; - procedure NWSGetPCB(var _pPcb:PPCB; portalNumber:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSGetPCB'; + procedure NWSGetPCB(var _pPcb:PPCB; portalNumber:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSGetPCB'; -type TentryProcedure = procedure (element:PLIST; displayLine:TLONG; handle:PNUTInfo); cdecl; - procedure NWSSetListNotifyProcedure(el:PLIST; +type TentryProcedure = procedure (element:PLIST; displayLine:longint; handle:PNUTInfo); cdecl; + procedure NWSSetListNotifyProcedure(el:PLIST; entryProcedure:TentryProcedure);cdecl;external External_library name 'NWSSetListNotifyProcedure'; - procedure NWSGetListNotifyProcedure(el:PLIST; + procedure NWSGetListNotifyProcedure(el:PLIST; var entryProcedure:TentryProcedure);cdecl;external External_library name 'NWSGetListNotifyProcedure'; type TcdReleaseProc = procedure (theData:pointer; handle:PNUTInfo); cdecl; - procedure NWSSetHandleCustomData(handle:PNUTInfo; - customData:pointer; + procedure NWSSetHandleCustomData(handle:PNUTInfo; + customData:pointer; customDataRelease:TcdReleaseProc);cdecl;external External_library name 'NWSSetHandleCustomData'; - procedure NWSGetHandleCustomData(handle:PNUTInfo; - customData:Ppointer; + procedure NWSGetHandleCustomData(handle:PNUTInfo; + customData:Ppointer; customDataRelease:TcdReleaseProc);cdecl;external External_library name 'NWSGetHandleCustomData'; - procedure NWSSetErrorLabelDisplayFlag(flag:TLONG; + procedure NWSSetErrorLabelDisplayFlag(flag:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSSetErrorLabelDisplayFlag'; - procedure NWSSetHelpHelp(helpIndex:TLONG; + procedure NWSSetHelpHelp(helpIndex:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSSetHelpHelp'; { max length of passwordString, including NULL } - function NWSPromptForPassword(passwordHeader:TLONG; line:TLONG; column:TLONG; maxPasswordLen:TLONG; passwordString:PBYTE; - verifyEntry:TLONG; handle:PNUTInfo):TLONG;cdecl;external External_library name 'NWSPromptForPassword'; + function NWSPromptForPassword + (passwordHeader, + line, + column, + maxPasswordLen : longint; + passwordString:pchar; + verifyEntry:longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSPromptForPassword'; - { field flags } - { ptr to field text } - { including null } - { help for field } - { force password verification } - { fill character for field } - function NWSAppendPasswordField(line:TLONG; column:TLONG; width:TLONG; fflag:TLONG; data:PBYTE; - maxDataLen:TLONG; help:TLONG; verifyEntry:TLONG; passwordPortalHeader:TLONG; maskCharacter:TLONG; - handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendPasswordField'; + function NWSAppendPasswordField + (line, + column, + width, + fflag:longint; // field flags + data:pchar; // ptr to field text + maxDataLen, // including null + help, // help for field + verifyEntry, // force password verification + passwordPortalHeader, + maskCharacter:longint; // fill character for field + nhandle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendPasswordField'; - { field display width in form } - { field flags (NORMAL_FIELD, etc.) } - { ptr to field text } - { max len of data, allowing for null terminator } - { valid characters, if using EF_SET } - { NWSEditString flags (EF_UPPER etc.) } - function NWSAppendScrollableStringField(line:TLONG; column:TLONG; width:TLONG; fflag:TLONG; data:PBYTE; - maxLen:TLONG; cset:PBYTE; editFlags:TLONG; help:TLONG; handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendScrollableStringField'; + function NWSAppendScrollableStringField + (line, + column, + width, + fflag:longint; + data:pchar; + maxLen:longint; // max len of data, allowing for null terminator + cset:pointer; // valid characters, if using EF_SET + editFlags, // NWSEditString flags (EF_UPPER etc.) + help:longint; + handle:PNUTInfo):PFIELD;cdecl;external External_library name 'NWSAppendScrollableStringField'; -type TSSFInsertFunc = function (_string:PBYTE; maxLen:TLONG; parameters:pointer):longint; cdecl; +type TSSFInsertFunc = function (_string:pchar; maxLen:longint; parameters:pointer):longint; cdecl; procedure NWSSetScrollableFieldInsertProc(fp:PFIELD; insertProc:TSSFInsertFunc);cdecl;external External_library name 'NWSSetScrollableFieldInsertProc'; { Returns 0 for success, -1 if none selected } { if not NULL, returns portal number } - function NWSGetCurrentPortal(nutInfo:PNUTInfo; portalNumber:PLONG; var portal:PPCB):TLONG;cdecl;external External_library name 'NWSGetCurrentPortal'; + function NWSGetCurrentPortal(nutInfo:PNUTInfo; portalNumber:plongint; var portal:PPCB):longint;cdecl;external External_library name 'NWSGetCurrentPortal'; { if not NULL, returns PCB pointer } - function NWSWaitForKeyAndValue(handle:PNUTInfo; - nKeys:TLONG; - keyType:array of TLONG; - keyValue:array of TLONG):longint;cdecl;external External_library name 'NWSWaitForKeyAndValue'; + function NWSWaitForKeyAndValue(handle:PNUTInfo; + nKeys:longint; + keyType:array of longint; + keyValue:array of longint):longint;cdecl;external External_library name 'NWSWaitForKeyAndValue'; - procedure NWSShowLineAttribute(line:TLONG; - column:TLONG; - text:PBYTE; - attribute:TLONG; - length:TLONG; - screenID:PScreenStruct);cdecl;external External_library name 'NWSShowLineAttribute'; + procedure NWSShowLineAttribute(line, + column:longint; + text:pchar; + attribute, + length:longint; + screenID:TScr);cdecl;external External_library name 'NWSShowLineAttribute'; - procedure NWSShowLine(line:TLONG; column:TLONG; text:PBYTE; length:TLONG; screenID:PScreenStruct);cdecl;external External_library name 'NWSShowLine'; + procedure NWSShowLine(line,column:longint; text:pchar; length:longint; screenID:TScr);cdecl;external External_library name 'NWSShowLine'; - procedure NWSScrollZone(line:TLONG; column:TLONG; height:TLONG; width:TLONG; attribute:TLONG; - count:TLONG; direction:TLONG; screenID:PScreenStruct);cdecl;external External_library name 'NWSScrollZone'; + procedure NWSScrollZone + (line, + column, + height, + width, + attribute, + count, + direction:longint; + screenID:TScr);cdecl;external External_library name 'NWSScrollZone'; - procedure NWSSaveZone(line:TLONG; column:TLONG; height:TLONG; width:TLONG; buffer:PBYTE; - screenID:PScreenStruct);cdecl;external External_library name 'NWSSaveZone'; + procedure NWSSaveZone + (line, + column, + height, + width:longint; + buffer:pointer; + screenID:TScr);cdecl;external External_library name 'NWSSaveZone'; - procedure NWSRestoreZone(line:TLONG; column:TLONG; height:TLONG; width:TLONG; buffer:PBYTE; - screenID:PScreenStruct);cdecl;external External_library name 'NWSRestoreZone'; + procedure NWSSaveZone + (line, + column, + height, + width:longint; + var buffer; + screenID:TScr);cdecl;external External_library name 'NWSSaveZone'; - procedure NWSRestoreDisplay(screenID:PScreenStruct);cdecl;external External_library name 'NWSRestoreDisplay'; + procedure NWSRestoreZone + (line, + column, + height, + width:longint; + buffer:pointer; + screenID:TScr);cdecl;external External_library name 'NWSRestoreZone'; - procedure NWSPositionCursor(line:TLONG; column:TLONG; screenID:PScreenStruct);cdecl;external External_library name 'NWSPositionCursor'; + procedure NWSRestoreZone + (line, + column, + height, + width:longint; + var buffer; + screenID:TScr);cdecl;external External_library name 'NWSRestoreZone'; - procedure NWSGetNUTVersion(majorVersion:PLONG; minorVersion:PLONG; revision:PLONG);cdecl;external External_library name 'NWSGetNUTVersion'; + procedure NWSRestoreDisplay(screenID:TScr);cdecl;external External_library name 'NWSRestoreDisplay'; - procedure NWSSetFormRepaintFlag(value:TLONG; handle:PNUTInfo);cdecl;external External_library name 'NWSSetFormRepaintFlag'; + procedure NWSPositionCursor(line, column:longint; screenID:TScr);cdecl;external External_library name 'NWSPositionCursor'; + + procedure NWSGetNUTVersion(majorVersion, minorVersion, revision:plongint);cdecl;external External_library name 'NWSGetNUTVersion'; + procedure NWSGetNUTVersion(var majorVersion, minorVersion, revision:longint);cdecl;external External_library name 'NWSGetNUTVersion'; + + procedure NWSSetFormRepaintFlag(value:longint; handle:PNUTInfo);cdecl;external External_library name 'NWSSetFormRepaintFlag'; procedure NWSSetFormNoWrap(handle:PNUTInfo);cdecl;external External_library name 'NWSSetFormNoWrap'; - function NWSViewTextWithScrollBars(centerLine:TLONG; centerColumn:TLONG; height:TLONG; width:TLONG; headerNumber:TLONG; - textBuffer:PBYTE; maxBufferLength:TLONG; scrollBarFlag:TLONG; handle:PNUTInfo):longint;cdecl;external External_library name 'NWSViewTextWithScrollBars'; + function NWSViewTextWithScrollBars + (centerLine, + centerColumn, + height, + width, + headerNumber:longint; + textBuffer:pchar; + maxBufferLength, + scrollBarFlag:longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSViewTextWithScrollBars'; { length of document } - function NWSEditTextWithScrollBars(centerLine:TLONG; centerColumn:TLONG; height:TLONG; width:TLONG; headerNumber:TLONG; - textBuffer:PBYTE; maxBufferLength:TLONG; confirmMessage:TLONG; forceConfirm:TLONG; scrollBarFlag:TLONG; - handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditTextWithScrollBars'; + function NWSEditTextWithScrollBars + (centerLine, + centerColumn, + height, + width, + headerNumber:longint; + textBuffer:pchar; + maxBufferLength, + confirmMessage, + forceConfirm, + scrollBarFlag:longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditTextWithScrollBars'; + + function NWSEditTextWithScrollBars + (centerLine, + centerColumn, + height, + width, + headerNumber:longint; + textBuffer:pchar; + maxBufferLength, + confirmMessage : longint; + forceConfirm : longbool; + scrollBarFlag : longint; + handle:PNUTInfo):longint;cdecl;external External_library name 'NWSEditTextWithScrollBars'; implementation - { was #define dname def_expr } function F_H1 : longint; - { return type might be wrong } - begin - F_H1:=NWSGetLineDrawCharacter(0); - end; + begin + F_H1:=NWSGetLineDrawCharacter(0); + end; - { was #define dname def_expr } function F_H2 : longint; - { return type might be wrong } - begin - F_H2:=NWSGetLineDrawCharacter(1); - end; + begin + F_H2:=NWSGetLineDrawCharacter(1); + end; - { was #define dname def_expr } function F_V1 : longint; - { return type might be wrong } - begin - F_V1:=NWSGetLineDrawCharacter(2); - end; + begin + F_V1:=NWSGetLineDrawCharacter(2); + end; - { was #define dname def_expr } function F_V2 : longint; - { return type might be wrong } - begin - F_V2:=NWSGetLineDrawCharacter(3); - end; + begin + F_V2:=NWSGetLineDrawCharacter(3); + end; - { was #define dname def_expr } function F_UL1 : longint; - { return type might be wrong } - begin - F_UL1:=NWSGetLineDrawCharacter(4); - end; + begin + F_UL1:=NWSGetLineDrawCharacter(4); + end; - { was #define dname def_expr } function F_UR1 : longint; - { return type might be wrong } - begin - F_UR1:=NWSGetLineDrawCharacter(5); - end; + begin + F_UR1:=NWSGetLineDrawCharacter(5); + end; - { was #define dname def_expr } function F_LL1 : longint; - { return type might be wrong } - begin - F_LL1:=NWSGetLineDrawCharacter(6); - end; + begin + F_LL1:=NWSGetLineDrawCharacter(6); + end; - { was #define dname def_expr } function F_LR1 : longint; - { return type might be wrong } - begin - F_LR1:=NWSGetLineDrawCharacter(7); - end; + begin + F_LR1:=NWSGetLineDrawCharacter(7); + end; - { was #define dname def_expr } function F_UL2 : longint; - { return type might be wrong } - begin - F_UL2:=NWSGetLineDrawCharacter(8); - end; + begin + F_UL2:=NWSGetLineDrawCharacter(8); + end; - { was #define dname def_expr } function F_UR2 : longint; - { return type might be wrong } - begin - F_UR2:=NWSGetLineDrawCharacter(9); - end; + begin + F_UR2:=NWSGetLineDrawCharacter(9); + end; - { was #define dname def_expr } function F_LL2 : longint; - { return type might be wrong } - begin - F_LL2:=NWSGetLineDrawCharacter(10); - end; + begin + F_LL2:=NWSGetLineDrawCharacter(10); + end; - { was #define dname def_expr } function F_LR2 : longint; - { return type might be wrong } - begin - F_LR2:=NWSGetLineDrawCharacter(11); - end; + begin + F_LR2:=NWSGetLineDrawCharacter(11); + end; - { was #define dname def_expr } function F_UT1 : longint; - { return type might be wrong } - begin - F_UT1:=NWSGetLineDrawCharacter(12); - end; + begin + F_UT1:=NWSGetLineDrawCharacter(12); + end; - { was #define dname def_expr } function F_DT1 : longint; - { return type might be wrong } - begin - F_DT1:=NWSGetLineDrawCharacter(13); - end; + begin + F_DT1:=NWSGetLineDrawCharacter(13); + end; - { was #define dname def_expr } function F_LT1 : longint; - { return type might be wrong } - begin - F_LT1:=NWSGetLineDrawCharacter(14); - end; + begin + F_LT1:=NWSGetLineDrawCharacter(14); + end; - { was #define dname def_expr } function F_RT1 : longint; - { return type might be wrong } - begin - F_RT1:=NWSGetLineDrawCharacter(15); - end; + begin + F_RT1:=NWSGetLineDrawCharacter(15); + end; - { was #define dname def_expr } function F_UT2 : longint; - { return type might be wrong } - begin - F_UT2:=NWSGetLineDrawCharacter(24); - end; + begin + F_UT2:=NWSGetLineDrawCharacter(24); + end; - { was #define dname def_expr } function F_DT2 : longint; - { return type might be wrong } - begin - F_DT2:=NWSGetLineDrawCharacter(25); - end; + begin + F_DT2:=NWSGetLineDrawCharacter(25); + end; - { was #define dname def_expr } function F_LT2 : longint; - { return type might be wrong } - begin - F_LT2:=NWSGetLineDrawCharacter(26); - end; + begin + F_LT2:=NWSGetLineDrawCharacter(26); + end; - { was #define dname def_expr } function F_RT2 : longint; - { return type might be wrong } - begin - F_RT2:=NWSGetLineDrawCharacter(27); - end; + begin + F_RT2:=NWSGetLineDrawCharacter(27); + end; - { was #define dname def_expr } function F_X1 : longint; - { return type might be wrong } - begin - F_X1:=NWSGetLineDrawCharacter(36); - end; + begin + F_X1:=NWSGetLineDrawCharacter(36); + end; - { was #define dname def_expr } function F_X2 : longint; - { return type might be wrong } - begin - F_X2:=NWSGetLineDrawCharacter(39); - end; + begin + F_X2:=NWSGetLineDrawCharacter(39); + end; - { was #define dname def_expr } function F_UP : longint; - { return type might be wrong } - begin - F_UP:=NWSGetLineDrawCharacter(40); - end; + begin + F_UP:=NWSGetLineDrawCharacter(40); + end; - { was #define dname def_expr } function F_DOWN : longint; - { return type might be wrong } - begin - F_DOWN:=NWSGetLineDrawCharacter(41); - end; + begin + F_DOWN:=NWSGetLineDrawCharacter(41); + end; - { was #define dname def_expr } function F_LEFT : longint; - { return type might be wrong } - begin - F_LEFT:=NWSGetLineDrawCharacter(42); - end; + begin + F_LEFT:=NWSGetLineDrawCharacter(42); + end; - { was #define dname def_expr } function F_RIGHT : longint; - { return type might be wrong } - begin - F_RIGHT:=NWSGetLineDrawCharacter(43); - end; + begin + F_RIGHT:=NWSGetLineDrawCharacter(43); + end; - { was #define dname def_expr } function F_BG1 : longint; - { return type might be wrong } - begin - F_BG1:=NWSGetLineDrawCharacter(44); - end; + begin + F_BG1:=NWSGetLineDrawCharacter(44); + end; - { was #define dname def_expr } function F_BG2 : longint; - { return type might be wrong } - begin - F_BG2:=NWSGetLineDrawCharacter(45); - end; + begin + F_BG2:=NWSGetLineDrawCharacter(45); + end; - { was #define dname def_expr } function F_BG3 : longint; - { return type might be wrong } - begin - F_BG3:=NWSGetLineDrawCharacter(46); - end; + begin + F_BG3:=NWSGetLineDrawCharacter(46); + end; - { was #define dname def_expr } function F_BG4 : longint; - { return type might be wrong } - begin - F_BG4:=NWSGetLineDrawCharacter(47); - end; + begin + F_BG4:=NWSGetLineDrawCharacter(47); + end; - { was #define dname(params) para_def_expr } - { argument types are unknown } - { return type might be wrong } function IS_DYNAMIC_MESSAGE(a : longint) : boolean; - begin - IS_DYNAMIC_MESSAGE:=(a > $fff0) and (a < $ffff); - end; + begin + IS_DYNAMIC_MESSAGE:=(a > $fff0) and (a < $ffff); + end; end. { $Log$ - Revision 1.1 2003-02-16 17:45:08 armin + Revision 1.2 2005-01-04 11:25:33 armin + * rtl code cleanup, compat fixes between clib and libc + + Revision 1.1 2003/02/16 17:45:08 armin * added nwsnut, nwconio and nwthreads for netware - -} \ No newline at end of file + +} diff --git a/rtl/netwlibc/Makefile b/rtl/netwlibc/Makefile index dd10b4ffe7..7f24a893db 100644 --- a/rtl/netwlibc/Makefile +++ b/rtl/netwlibc/Makefile @@ -1465,6 +1465,7 @@ systhrds$(PPUEXT): systhrds.pp $(INC)/threadh.inc $(SYSTEMUNIT)$(PPUEXT) objpas$ netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT) $(COMPILER) -I$(WININC) netware.pp winsock$(PPUEXT) : winsock.pp ../netware/winsock.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) +nwsnut$(PPUEXT) : nwsnut.pp ../netware/nwsnut.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) sockets$(PPUEXT) : sockets.pp winsock$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \ $(INC)/sockets.inc $(INC)/socketsh.inc dynlibs$(PPUEXT) : $(INC)/dynlibs.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) diff --git a/rtl/netwlibc/Makefile.fpc b/rtl/netwlibc/Makefile.fpc index 3c7dc8d1e4..d03bcfab24 100644 --- a/rtl/netwlibc/Makefile.fpc +++ b/rtl/netwlibc/Makefile.fpc @@ -139,6 +139,8 @@ netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT) winsock$(PPUEXT) : winsock.pp ../netware/winsock.pp $(SYSTEMUNIT)$(PPUEXT) objpas$(PPUEXT) +nwsnut$(PPUEXT) : nwsnut.pp ../netware/nwsnut.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) + sockets$(PPUEXT) : sockets.pp winsock$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT) \ $(INC)/sockets.inc $(INC)/socketsh.inc diff --git a/rtl/netwlibc/libc.pp b/rtl/netwlibc/libc.pp index 3e804192ce..1dab43cf3b 100644 --- a/rtl/netwlibc/libc.pp +++ b/rtl/netwlibc/libc.pp @@ -57,15 +57,15 @@ type Pint8_t = ^int8_t; int8_t = char; - Pint16_t = ^int16_t; - int16_t = smallint; + Pint16 = ^Tint16; + Tint16 = smallint; - Pint64_t = ^int64_t; - int64_t = int64; + Pint64_t = ^Tint64; + Tint64 = int64; { exact-width unsigned types... } - Puint64_t = ^uint64_t; - uint64_t = qword; + Puint64 = ^Tuint64; + Tuint64 = qword; { lower and upper bound of exact width integer types... } { macros for minimum-width integer constants... } { minimum-width signed integer types... } @@ -133,10 +133,10 @@ type { maximum-width integer types... } Pintmax_t = ^intmax_t; - intmax_t = int64_t; + intmax_t = int64; Puintmax_t = ^uintmax_t; - uintmax_t = uint64_t; + uintmax_t = Tuint64; { macros for maximum-width integer constants... } { limits for other integer types... } @@ -149,7 +149,7 @@ type { signed byte counts for file I/O } Psize64_t = ^size64_t; - size64_t = uint64_t; + size64_t = Tuint64; { used for 64-bit (long) file I/O } Pmode_t = ^mode_t; @@ -161,140 +161,127 @@ type { file offset value } Poff64_t = ^off64_t; - off64_t = int64_t; + off64_t = int64; { 64-bit (long) file offset value } Pino_t = ^ino_t; - ino_t = uint64_t; + ino_t = Tuint64; Ppid_t = ^pid_t; pid_t = longint; { capable of holding a pointer or -1 } Puid_t = ^uid_t; - uid_t = uint64_t; + uid_t = Tuint64; Pgid_t = ^gid_t; - gid_t = uint64_t; + gid_t = Tuint64; Pblksize_t = ^blksize_t; - blksize_t = uint64_t; + blksize_t = Tuint64; Pblkcnt_t = ^blkcnt_t; - blkcnt_t = uint64_t; + blkcnt_t = Tuint64; Pdev_t = ^dev_t; - dev_t = uint64_t; + dev_t = Tuint64; Pnlink_t = ^nlink_t; nlink_t = dword; Pptrdiff_t = ^ptrdiff_t; ptrdiff_t = longint; -{ difference of two pointers } -{ everybody else until we hear differently... } -{ everybody else until we hear differently... } Pwchar_t = ^wchar_t; - wchar_t = word; + wchar_t = WideChar; PPwchar_t = ^Pwchar_t; -{----------------------------------------------------------------------------- -** Definitions for the 'restrict' keyword which not all platforms support. - } -{ consume the 'restrict' keyword as '__restrict' } -{----------------------------------------------------------------------------- - } + + { prototypes for functions standard and nonstandard... } - function memchr(_para1:pointer; _para2:longint; _para3:size_t):pointer;cdecl;external libc_nlm name 'memchr'; - - -function memcmp(_para1:pointer; _para2:pointer; _para3:size_t):longint;cdecl;external libc_nlm name 'memcmp'; - -function memcpy(__restrict:pointer; __restrict1:pointer; _para3:size_t):pointer;cdecl;external libc_nlm name 'memcpy'; - -function memmove(_para1:pointer; _para2:pointer; _para3:size_t):pointer;cdecl;external libc_nlm name 'memmove'; +function memcmp(_para1, _para2:pointer; _para3:size_t):longint;cdecl;external libc_nlm name 'memcmp'; +function memcpy(__restrict, __restrict1:pointer; _para3:size_t):pointer;cdecl;external libc_nlm name 'memcpy'; +function memmove(_para1, _para2:pointer; _para3:size_t):pointer;cdecl;external libc_nlm name 'memmove'; function memset(_para1:pointer; _para2:longint; _para3:size_t):pointer;cdecl;external libc_nlm name 'memset'; - -function strcasecmp(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'strcasecmp'; +function strcasecmp(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'strcasecmp'; function strcat(dst,src:Pchar):Pchar;cdecl;external libc_nlm name 'strcat'; function strchr(_para1:Pchar; _para2:longint):Pchar;cdecl;external libc_nlm name 'strchr'; -function strcmp(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'strcmp'; -function strcoll(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'strcoll'; -function strcpy(__restrict:Pchar; __restrict1:Pchar):Pchar;cdecl;external libc_nlm name 'strcpy'; -function strcspn(_para1:Pchar; _para2:Pchar):size_t;cdecl;external libc_nlm name 'strcspn'; +function strcmp(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'strcmp'; +function strcoll(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'strcoll'; +function strcpy(__restrict, __restrict1:Pchar):Pchar;cdecl;external libc_nlm name 'strcpy'; +function strcspn(_para1, _para2:Pchar):size_t;cdecl;external libc_nlm name 'strcspn'; function strerror(_para1:longint):Pchar;cdecl;external libc_nlm name 'strerror'; -function strlcat(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'strlcat'; -function strlcpy(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'strlcpy'; +function strlcat(__restrict, __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'strlcat'; +function strlcpy(__restrict, __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'strlcpy'; function {$ifdef INCLUDED_FROM_SYSTEM}libc_strlen{$else}strlen{$endif}(_para1:Pchar):size_t;cdecl;external libc_nlm name 'strlen'; -function strncasecmp(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strncasecmp'; -function strncat(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'strncat'; -function strncmp(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strncmp'; -function strncoll(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strncoll'; -function strncpy(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'strncpy'; -function strnicmp(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strnicmp'; -function strnset(_para1:Pchar; _para2:longint; _para3:size_t):Pchar;cdecl;external libc_nlm name 'strnset'; -function strpbrk(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strpbrk'; -function strrchr(_para1:Pchar; _para2:longint):Pchar;cdecl;external libc_nlm name 'strrchr'; +function strncasecmp(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strncasecmp'; +function strncat(__restrict, __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'strncat'; +function strncmp(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strncmp'; +function strncoll(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strncoll'; +function strncpy(__restrict, __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'strncpy'; +function strnicmp(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strnicmp'; +function strnset(_para1, _para2:longint; _para3:size_t):Pchar;cdecl;external libc_nlm name 'strnset'; +function strpbrk(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strpbrk'; +function strrchr(_para1, _para2:longint):Pchar;cdecl;external libc_nlm name 'strrchr'; function strrev(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'strrev'; function strset(_para1:Pchar; _para2:longint):Pchar;cdecl;external libc_nlm name 'strset'; -function strspn(_para1:Pchar; _para2:Pchar):size_t;cdecl;external libc_nlm name 'strspn'; -function strstr(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strstr'; -function strtok(__restrict:Pchar; __restrict1:Pchar):Pchar;cdecl;external libc_nlm name 'strtok'; -function strxfrm(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'strxfrm'; +function strspn(_para1, _para2:Pchar):size_t;cdecl;external libc_nlm name 'strspn'; +function strstr(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strstr'; +function strtok(__restrict, __restrict1:Pchar):Pchar;cdecl;external libc_nlm name 'strtok'; +function strxfrm(__restrict, __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'strxfrm'; { POSIX and other functions... } -function strtok_r(__restrict:Pchar; __restrict1:Pchar; __restrict2:PPchar):Pchar;cdecl;external libc_nlm name 'strtok_r'; -function memicmp(_para1:pointer; _para2:pointer; _para3:size_t):longint;cdecl;external libc_nlm name 'memicmp'; -function stpcpy(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'stpcpy'; -function stricmp(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'stricmp'; +function strtok_r(__restrict, __restrict1, __restrict2:PPchar):Pchar;cdecl;external libc_nlm name 'strtok_r'; +function memicmp(_para1, _para2:pointer; _para3:size_t):longint;cdecl;external libc_nlm name 'memicmp'; +function stpcpy(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'stpcpy'; +function stricmp(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'stricmp'; function strdup(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'strdup'; -function strecpy(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strecpy'; +function strecpy(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strecpy'; function strerror_r(_para1:longint; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'strerror_r'; {$ifndef DisableArrayOfConst} -function strlist(_para1:Pchar; _para2:Pchar; args:array of const):Pchar;cdecl;external libc_nlm name 'strlist'; +function strlist(_para1, _para2:Pchar; args:array of const):Pchar;cdecl;external libc_nlm name 'strlist'; {$endif} -function strlist(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strlist'; +function strlist(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strlist'; function strlwr(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'strlwr'; function strrindex(_para1:Pchar; _para2:size_t; _para3:longint):Pchar;cdecl;external libc_nlm name 'strrindex'; function strwhich(_para1:Pchar; _para2:longint; _para3:Pchar):Pchar;cdecl;external libc_nlm name 'strwhich'; function strupr(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'strupr'; -procedure swab(_para1:pointer; _para2:pointer; _para3:size_t);cdecl;external libc_nlm name 'swab'; -procedure swaw(_para1:pointer; _para2:pointer; _para3:size_t);cdecl;external libc_nlm name 'swaw'; -procedure ungettok(__restrict:Pchar; __restrict1:Pchar);cdecl;external libc_nlm name 'ungettok'; -procedure ungettok_r(__restrict:Pchar; __restrict1:Pchar; __restrict2:PPchar);cdecl;external libc_nlm name 'ungettok_r'; +procedure swab(_para1, _para2:pointer; _para3:size_t);cdecl;external libc_nlm name 'swab'; +procedure swaw(_para1, _para2:pointer; _para3:size_t);cdecl;external libc_nlm name 'swaw'; +procedure ungettok(__restrict, __restrict1:Pchar);cdecl;external libc_nlm name 'ungettok'; +procedure ungettok_r(__restrict, __restrict1:Pchar; __restrict2:PPchar);cdecl;external libc_nlm name 'ungettok_r'; { multibyte (double) interfaces for locale code page work... } -function Lstrbcpy(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'Lstrbcpy'; -function Lstrchr(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrchr'; -function Lstrcmp(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'Lstrcmp'; -function Lstrcoll(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'Lstrcoll'; -function Lstrcspn(_para1:Pchar; _para2:Pchar):size_t;cdecl;external libc_nlm name 'Lstrcspn'; -function Lstricmp(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'Lstricmp'; +function Lstrbcpy(__restrict, __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'Lstrbcpy'; +function Lstrchr(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrchr'; +function Lstrcmp(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'Lstrcmp'; +function Lstrcoll(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'Lstrcoll'; +function Lstrcspn(_para1, _para2:Pchar):size_t;cdecl;external libc_nlm name 'Lstrcspn'; +function Lstricmp(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'Lstricmp'; function Lstrlen(_para1:Pchar):size_t;cdecl;external libc_nlm name 'Lstrlen'; function Lstrlwr(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrlwr'; function Lstrncat(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'Lstrncat'; -function Lstrncmp(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'Lstrncmp'; -function Lstrncoll(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'Lstrncoll'; -function Lstrncpy(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'Lstrncpy'; -function Lstrnicmp(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'Lstrnicmp'; -function Lstrpbrk(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrpbrk'; -function Lstrrchr(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrrchr'; +function Lstrncmp(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'Lstrncmp'; +function Lstrncoll(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'Lstrncoll'; +function Lstrncpy(__restrict, __restrict1:Pchar; _para3:size_t):Pchar;cdecl;external libc_nlm name 'Lstrncpy'; +function Lstrnicmp(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'Lstrnicmp'; +function Lstrpbrk(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrpbrk'; +function Lstrrchr(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrrchr'; function Lstrrev(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrrev'; -function Lstrspn(_para1:Pchar; _para2:Pchar):size_t;cdecl;external libc_nlm name 'Lstrspn'; -function Lstrstr(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrstr'; +function Lstrspn(_para1, _para2:Pchar):size_t;cdecl;external libc_nlm name 'Lstrspn'; +function Lstrstr(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrstr'; function Lstrtok_r(__restrict:Pchar; __restrict1:Pchar; __restrict2:PPchar):Pchar;cdecl;external libc_nlm name 'Lstrtok_r'; function Lstrupr(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'Lstrupr'; function Lstrxfrm(__restrict:Pchar; __restrict1:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'Lstrxfrm'; { length-preceeded string manipulation... } -function ASCIIZToLenStr(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'ASCIIZToLenStr'; -function ASCIIZToMaxLenStr(_para1:Pchar; _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'ASCIIZToMaxLenStr'; -function LenStrCat(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'LenStrCat'; -function LenStrCmp(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'LenStrCmp'; -function LenStrCpy(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'LenStrCpy'; -function LenToASCIIZStr(_para1:Pchar; _para2:Pchar):longint;cdecl;external libc_nlm name 'LenToASCIIZStr'; -function strindex(_para1:Pchar; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strindex'; +function ASCIIZToLenStr(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'ASCIIZToLenStr'; +function ASCIIZToMaxLenStr(_para1, _para2:Pchar; _para3:size_t):longint;cdecl;external libc_nlm name 'ASCIIZToMaxLenStr'; +function LenStrCat(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'LenStrCat'; +function LenStrCmp(_para1, _para2:Pchar):longint;cdecl;external libc_nlm name 'LenStrCmp'; +function LenStrCpy(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'LenStrCpy'; +function LenToASCIIZStr(_para1,_para2:Pchar):longint;cdecl;external libc_nlm name 'LenToASCIIZStr'; +function strindex(_para1, _para2:Pchar):Pchar;cdecl;external libc_nlm name 'strindex'; // stdarg.h @@ -496,8 +483,8 @@ type Plldiv_t = ^lldiv_t; lldiv_t = record - quot : int64_t; - rem : int64_t; + quot : Tint64; + rem : Tint64; end; (** unsupported pragma#pragma pack()*) @@ -510,7 +497,7 @@ function atexit(_para1:TCDeclProcedure ):longint;cdecl;external libc_nlm name 'a function atof(_para1:Pchar):double;cdecl;external libc_nlm name 'atof'; function atoi(_para1:Pchar):longint;cdecl;external libc_nlm name 'atoi'; function atol(_para1:Pchar):longint;cdecl;external libc_nlm name 'atol'; -function atoll(_para1:Pchar):int64_t;cdecl;external libc_nlm name 'atoll'; +function atoll(_para1:Pchar):Tint64;cdecl;external libc_nlm name 'atoll'; //!! function bsearch(_para1:pointer; _para2:pointer; _para3:size_t; _para4:size_t; _para5:function (_para1:pointer; _para2:pointer):longint):pointer;cdecl;external libc_nlm name 'bsearch'; function calloc(_para1:size_t; _para2:size_t):pointer;cdecl;external libc_nlm name 'calloc'; @@ -520,8 +507,8 @@ procedure free(_para1:pointer);cdecl;external libc_nlm name 'free'; function getenv(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'getenv'; function labs(_para1:longint):longint;cdecl;external libc_nlm name 'labs'; function __CW_ldiv(_para1:longint; _para2:longint):ldiv_t;cdecl;external libc_nlm name '__CW_ldiv'; -function llabs(_para1:int64_t):int64_t;cdecl;external libc_nlm name 'llabs'; -function __CW_lldiv(_para1:int64_t; _para2:int64_t):lldiv_t;cdecl;external libc_nlm name '__CW_lldiv'; +function llabs(_para1:Tint64):Tint64;cdecl;external libc_nlm name 'llabs'; +function __CW_lldiv(_para1:Tint64; _para2:Tint64):lldiv_t;cdecl;external libc_nlm name '__CW_lldiv'; function malloc(_para1:size_t):pointer;cdecl;external libc_nlm name 'malloc'; function mblen(_para1:Pchar; _para2:size_t):longint;cdecl;external libc_nlm name 'mblen'; function mbstowcs(_para1:Pwchar_t; _para2:Pchar; _para3:size_t):size_t;cdecl;external libc_nlm name 'mbstowcs'; @@ -534,9 +521,9 @@ function realloc(_para1:pointer; _para2:size_t):pointer;cdecl;external libc_nlm procedure srand(_para1:dword);cdecl;external libc_nlm name 'srand'; function strtod(__restrict:Pchar; __restrict1:PPchar):double;cdecl;external libc_nlm name 'strtod'; function strtol(__restrict:Pchar; __restrict1:PPchar; _para3:longint):longint;cdecl;external libc_nlm name 'strtol'; -function strtoll(__restrict:Pchar; __restrict1:PPchar; _para3:longint):int64_t;cdecl;external libc_nlm name 'strtoll'; +function strtoll(__restrict:Pchar; __restrict1:PPchar; _para3:longint):Tint64;cdecl;external libc_nlm name 'strtoll'; function strtoul(__restrict:Pchar; __restrict1:PPchar; _para3:longint):dword;cdecl;external libc_nlm name 'strtoul'; -function strtoull(__restrict:Pchar; __restrict1:PPchar; _para3:longint):uint64_t;cdecl;external libc_nlm name 'strtoull'; +function strtoull(__restrict:Pchar; __restrict1:PPchar; _para3:longint):Tuint64;cdecl;external libc_nlm name 'strtoull'; function system(_para1:Pchar):longint;cdecl;external libc_nlm name 'system'; function wcstombs(__restrict:Pchar; __restrict1:Pwchar_t; _para3:size_t):size_t;cdecl;external libc_nlm name 'wcstombs'; function wctomb(_para1:Pchar; _para2:wchar_t):longint;cdecl;external libc_nlm name 'wctomb'; @@ -549,7 +536,7 @@ function htol(_para1:Pchar):dword;cdecl;external libc_nlm name 'htol'; function itoa(_para1:longint; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'itoa'; function itoab(_para1:dword; _para2:Pchar):Pchar;cdecl;external libc_nlm name 'itoab'; function ltoa(_para1:longint; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'ltoa'; -function lltoa(_para1:int64_t; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'lltoa'; +function lltoa(_para1:Tint64; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'lltoa'; function _lrotr(_para1:dword; _para2:dword):dword;cdecl;external libc_nlm name '_lrotr'; function _lrotl(_para1:dword; _para2:dword):dword;cdecl;external libc_nlm name '_lrotl'; function mkdtemp(_para1:Pchar):Pchar;cdecl;external libc_nlm name 'mkdtemp'; @@ -567,11 +554,11 @@ function _rotl(_para1:dword; _para2:dword):dword;cdecl;external libc_nlm name '_ function rotl8(_para1:byte; _para2:longint):byte;cdecl;external libc_nlm name 'rotl8'; function rotl16(_para1:word; _para2:longint):word;cdecl;external libc_nlm name 'rotl16'; function rotl32(_para1:dword; _para2:longint):dword;cdecl;external libc_nlm name 'rotl32'; -function rotl64(_para1:uint64_t; _para2:longint):uint64_t;cdecl;external libc_nlm name 'rotl64'; +function rotl64(_para1:Tuint64; _para2:longint):Tuint64;cdecl;external libc_nlm name 'rotl64'; function rotr8(_para1:byte; _para2:longint):byte;cdecl;external libc_nlm name 'rotr8'; function rotr16(_para1:word; _para2:longint):word;cdecl;external libc_nlm name 'rotr16'; function rotr32(_para1:dword; _para2:longint):dword;cdecl;external libc_nlm name 'rotr32'; -function rotr64(_para1:uint64_t; _para2:longint):uint64_t;cdecl;external libc_nlm name 'rotr64'; +function rotr64(_para1:Tuint64; _para2:longint):Tuint64;cdecl;external libc_nlm name 'rotr64'; function setenv(_para1:Pchar; _para2:Pchar; _para3:longint):longint;cdecl;external libc_nlm name 'setenv'; procedure setkey(_para1:Pchar);cdecl;external libc_nlm name 'setkey'; function stackavail:size_t;cdecl;external libc_nlm name 'stackavail'; @@ -580,7 +567,7 @@ function stackwatermark:size_t;cdecl;external libc_nlm name 'stackwatermark'; function strtoi(_para1:Pchar; _para2:longint):longint;cdecl;external libc_nlm name 'strtoi'; function truncmb(_para1:Pchar; _para2:size_t):Pchar;cdecl;external libc_nlm name 'truncmb'; function ultoa(_para1:dword; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'ultoa'; -function ulltoa(_para1:uint64_t; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'ulltoa'; +function ulltoa(_para1:Tuint64; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'ulltoa'; function unsetenv(name:Pchar):longint;cdecl;external libc_nlm name 'unsetenv'; function utoa(_para1:dword; _para2:Pchar; _para3:longint):Pchar;cdecl;external libc_nlm name 'utoa'; function valuemb(_para1:Pchar):longint;cdecl;external libc_nlm name 'valuemb'; @@ -597,13 +584,13 @@ procedure atomic_xor(addr:Pdword; value:dword);cdecl;external libc_nlm name 'ato procedure atomic_and(addr:Pdword; value:dword);cdecl;external libc_nlm name 'atomic_and'; function atomic_xchgadd(addr:Pdword; value:dword):dword;cdecl;external libc_nlm name 'atomic_xchgadd'; function atomic_cmpxchg(addr:Pdword; cmpvalue:dword; newvalue:dword):dword;cdecl;external libc_nlm name 'atomic_cmpxchg'; -procedure atomic64_inc(addr:Puint64_t);cdecl;external libc_nlm name 'atomic64_inc'; -procedure atomic64_dec(addr:Puint64_t);cdecl;external libc_nlm name 'atomic64_dec'; -procedure atomic64_add(addr:Puint64_t; value:uint64_t);cdecl;external libc_nlm name 'atomic64_add'; -procedure atomic64_sub(addr:Puint64_t; value:uint64_t);cdecl;external libc_nlm name 'atomic64_sub'; -function atomic64_xchg(addr:Puint64_t; value:uint64_t):uint64_t;cdecl;external libc_nlm name 'atomic64_xchg'; -function atomic64_xchgadd(addr:Puint64_t; value:uint64_t):uint64_t;cdecl;external libc_nlm name 'atomic64_xchgadd'; -function atomic64_cmpxchg(addr:Puint64_t; cmpvalue:uint64_t; newvalue:uint64_t):uint64_t;cdecl;external libc_nlm name 'atomic64_cmpxchg'; +procedure atomic64_inc(addr:Puint64);cdecl;external libc_nlm name 'atomic64_inc'; +procedure atomic64_dec(addr:Puint64);cdecl;external libc_nlm name 'atomic64_dec'; +procedure atomic64_add(addr:Puint64; value:tuint64);cdecl;external libc_nlm name 'atomic64_add'; +procedure atomic64_sub(addr:Puint64; value:tuint64);cdecl;external libc_nlm name 'atomic64_sub'; +function atomic64_xchg(addr:Puint64; value:tuint64):Tuint64;cdecl;external libc_nlm name 'atomic64_xchg'; +function atomic64_xchgadd(addr:Puint64; value:Tuint64):Tuint64;cdecl;external libc_nlm name 'atomic64_xchgadd'; +function atomic64_cmpxchg(addr:Puint64; cmpvalue:Tuint64; newvalue:Tuint64):Tuint64;cdecl;external libc_nlm name 'atomic64_cmpxchg'; { compiler-specific implementations of alloca()... } function max(a:longint; b:longint):longint;cdecl;external libc_nlm name 'max'; function min(a:longint; b:longint):longint;cdecl;external libc_nlm name 'min'; @@ -643,10 +630,10 @@ type caddr_t = char; Puseconds_t = ^useconds_t; - useconds_t = uint64_t; + useconds_t = Tuint64; Psuseconds_t = ^suseconds_t; - suseconds_t = int64_t; + suseconds_t = Tint64; Pu_int8_t = ^u_int8_t; u_int8_t = byte; @@ -658,7 +645,7 @@ type u_int32_t = dword; Pu_int64_t = ^u_int64_t; - u_int64_t = uint64_t; + u_int64_t = Tuint64; function getpid:pid_t;cdecl;external libc_nlm name 'getpid'; function getppid:pid_t;cdecl;external libc_nlm name 'getppid'; @@ -1323,12 +1310,12 @@ type st_flags : dword; // flags for this entry st_mode : mode_t; // emulated file mode st_spare1 : dword; - st_gen : uint64_t; // generation number of inode + st_gen : Tuint64; // generation number of inode st_ino : ino_t; // directory entry number st_dev : dev_t; // volume number st_rdev : dev_t; // device type (always 0) st_size : off64_t; // total file size - st_spare2 : uint64_t; + st_spare2 : Tuint64; st_blocks : blkcnt_t; // count of blocks allocated to file st_blksize : blksize_t; // block size for allocation--files only st_nlink : nlink_t; // count of hard links (always 1) @@ -1552,13 +1539,13 @@ type sig_atomic_t = longint; Psigset_t = ^sigset_t; - sigset_t = uint64_t; + sigset_t = Tuint64; { flags for sa_flags in struct sigaction } Psigaction = ^sigaction; sigaction = record sa_handler : procedure (_para1:longint);cdecl; - sa_mask : sigset_t; - sa_flags : longint; + sa_mask : sigset_t; + sa_flags : longint; end; type TCDeclProc1LIntPara = procedure (_para1:longint); cdecl; @@ -1733,10 +1720,10 @@ type f_frsize : size_t; f_bsize : blksize_t; f_blocks : blkcnt_t; - f_bfree : uint64_t; - f_files : uint64_t; - f_ffree : uint64_t; - f_fspare : array[0..1] of uint64_t; + f_bfree, + f_files, + f_ffree : Tuint64; + f_fspare : array[0..1] of Tuint64; f_fserver: array[0..(48 + 4)-1] of char; f_fname : array[0..(16 + 4)-1] of char; f_fpack : array[0..19] of char; @@ -2378,7 +2365,7 @@ function unidup(s1:Punicode_t):Punicode_t;cdecl;external libc_nlm name 'unidup'; type PNXTime_t = ^NXTime_t; - NXTime_t = uint64_t; + NXTime_t = Tuint64; PNXTimerVal_t = ^NXTimerVal_t; NXTimerVal_t = record @@ -2444,7 +2431,7 @@ type NXInterruptId_t = longint; PNXInterruptSet_t = ^NXInterruptSet_t; - NXInterruptSet_t = uint64_t; + NXInterruptSet_t = Tuint64; PNXContextState_t = ^NXContextState_t; NXContextState_t = Longint; @@ -2621,14 +2608,14 @@ type NXShareMode_t = dword; PNXOffset_t = ^NXOffset_t; - NXOffset_t = uint64_t; + NXOffset_t = Tuint64; { (file offsets and lengths) } PNXSOffset_t = ^NXSOffset_t; - NXSOffset_t = int64_t; + NXSOffset_t = Tint64; PNXLockToken_t = ^NXLockToken_t; - NXLockToken_t = uint64_t; + NXLockToken_t = Tuint64; PNXHandle_t = ^NXHandle_t; NXHandle_t = longint; @@ -2660,13 +2647,13 @@ type PNXGuid_t = ^NXGuid_t; NXGuid_t = record case longint of - 0 : ( guid_field : array[0..1] of uint64_t ); + 0 : ( guid_field : array[0..1] of Tuint64 ); end; PNXFid_t = ^NXFid_t; NXFid_t = record fidFsId : NXGuid_t; - fidFileId : array[0..1] of uint64_t; + fidFileId : array[0..1] of Tuint64; end; PNXUpCallReason_t = ^NXUpCallReason_t; @@ -2926,7 +2913,9 @@ function NXLinkCreateSymbolic(srcPathCtx:NXPathCtx_t; linkname:pointer; target:p type PNXChangeBits_t = ^NXChangeBits_t; - NXChangeBits_t = uint64_t; + NXChangeBits_t = Tuint64; + TNXChangeBits = NXChangeBits_t; + PNXChangeBits = PNXChangeBits_t; { pathname format (PNF) enumeration } { use PNF in effect at open } { generic NKS pathname format } @@ -3000,7 +2989,7 @@ type deFid : NXFid_t; deEffectiveRights : dword; deFileSize : NXOffset_t; - deFlags : uint64_t; + deFlags : Tuint64; deAttrChangeTime : NXTime_t; deAccessTime : NXTime_t; deModifyTime : NXTime_t; @@ -3030,7 +3019,7 @@ type xdeFid : NXFid_t; xdeEffectiveRights : dword; xdeFileSize : NXOffset_t; - xdeFlags : uint64_t; + xdeFlags : Tuint64; xdeChangeTime : NXTime_t; xdeAccessTime : NXTime_t; xdeModifyTime : NXTime_t; @@ -3154,9 +3143,9 @@ function wcstol(__restrict:Pwchar_t; __restrict1:PPwchar_t; xx:longint):longint; // long double wcstold(const wchar_t * __restrict1, wchar_t ** __restrict); // long double wcstold(const wchar_t * __restrict1, wchar_t ** __restrict); -function wcstoll(__restrict:Pwchar_t; __restrict1:PPwchar_t; xx:longint):int64_t;cdecl;external libc_nlm name 'wcstoll'; +function wcstoll(__restrict:Pwchar_t; __restrict1:PPwchar_t; xx:longint):Tint64;cdecl;external libc_nlm name 'wcstoll'; function wcstoul(__restrict:Pwchar_t; __restrict1:PPwchar_t; _para3:longint):dword;cdecl;external libc_nlm name 'wcstoul'; -function wcstoull(__restrict:Pwchar_t; __restrict1:PPwchar_t; _para3:longint):uint64_t;cdecl;external libc_nlm name 'wcstoull'; +function wcstoull(__restrict:Pwchar_t; __restrict1:PPwchar_t; _para3:longint):Tuint64;cdecl;external libc_nlm name 'wcstoull'; function wcsxfrm(__restrict:Pwchar_t; __restrict1:Pwchar_t; _para3:size_t):size_t;cdecl;external libc_nlm name 'wcsxfrm'; function wctob(_para1:wint_t):longint;cdecl;external libc_nlm name 'wctob'; function wmemchr(ws:Pwchar_t; wc:wchar_t; n:size_t):Pwchar_t;cdecl;external libc_nlm name 'wmemchr'; @@ -3417,9 +3406,9 @@ type procedure clearscreen;cdecl;external libc_nlm name 'clearscreen'; {$ifndef DisableArrayOfConst} -function __consoleprintf(_para1:Pchar; args:array of const):longint;cdecl;external libc_nlm name 'consoleprintf'; +function consoleprintf(txt:Pchar; args:array of const):longint;cdecl;external libc_nlm name 'consoleprintf'; +function consoleprintf(txt:Pchar):longint;cdecl;external libc_nlm name 'consoleprintf'; {$endif} -function __consoleprintf(txt:Pchar):longint;cdecl;external libc_nlm name 'consoleprintf'; function __consoleprintfl1(txt:Pchar;p1:longint):longint;cdecl;external libc_nlm name 'consoleprintf'; function __consoleprintfl2(txt:Pchar;p1,p2:longint):longint;cdecl;external libc_nlm name 'consoleprintf'; function __consoleprintfl3(txt:Pchar;p1,p2,p3:longint):longint;cdecl;external libc_nlm name 'consoleprintf'; @@ -4945,8 +4934,8 @@ function salvageerasedfile(pathName:Pchar; sequence:longint; newFileName:Pchar): function scanerasedfiles(path:Pchar; nextEntryNumber:Plongint; deletedFileInfo:PNWDIR):longint;cdecl;external libc_nlm name 'scanerasedfiles'; function _fs_type(fildes:longint):longint;cdecl;external libc_nlm name '_fs_type'; function _fildes_type(fildes:longint):longint;cdecl;external libc_nlm name '_fildes_type'; -function _fildes_from_nsskey(key:uint64_t; oflag:longint):longint;cdecl;external libc_nlm name '_fildes_from_nsskey'; -function _key_from_fildes(fildes:longint; _type:Plongint; err:Plongint):uint64_t;cdecl;external libc_nlm name '_key_from_fildes'; +function _fildes_from_nsskey(key:Tuint64; oflag:longint):longint;cdecl;external libc_nlm name '_fildes_from_nsskey'; +function _key_from_fildes(fildes:longint; _type:Plongint; err:Plongint):Tuint64;cdecl;external libc_nlm name '_key_from_fildes'; { fast type of a file descriptor--st_mode in fstat()... } { equates to move between NKS file handles and POSIX descriptors... } { derivation of POSIX descriptor from NSS open file key... } @@ -5029,11 +5018,11 @@ type xdeFid : NXFid_t; xdeEffectiveRights : dword; xdeFileAttributes : dword; - xdeCreateTime : uint64_t; - xdeLastAccessTime : uint64_t; - xdeLastWriteTime : uint64_t; - xdeLastChangeTime : uint64_t; - xdeFileSize : uint64_t; + xdeCreateTime : Tuint64; + xdeLastAccessTime : Tuint64; + xdeLastWriteTime : Tuint64; + xdeLastChangeTime : Tuint64; + xdeFileSize : Tuint64; Reserved0 : dword; Reserved1 : dword; Reserved2 : dword; @@ -5042,18 +5031,18 @@ type xdeVolumeSerialNumber : dword; Reserved4 : dword; Reserved5 : dword; - xdeFileIndex : uint64_t; - Reserved6 : uint64_t; + xdeFileIndex : Tuint64; + Reserved6 : Tuint64; xdeAllocationSize : dword; xdeAccessFlags : dword; xdeMiscFlags : dword; Reserved7 : dword; - xdeEaSize : uint64_t; - xdeCompressedFileSize : uint64_t; + xdeEaSize : Tuint64; + xdeCompressedFileSize : Tuint64; xdeCompressionFormat : word; Reserved8 : word; Reserved9 : dword; - Reserved10 : uint64_t; + Reserved10 : Tuint64; end; { Win32 (NX_PNF_WIN) information... } { ...including name } @@ -5396,25 +5385,25 @@ type PNXMutex_t = ^NXMutex_t; NXMutex_t = record - reserved1 : uint64_t; + reserved1 : Tuint64; reserved2 : array[0..9] of pointer; end; PNXRwLock_t = ^NXRwLock_t; NXRwLock_t = record - reserved1 : uint64_t; + reserved1 : Tuint64; reserved2 : array[0..9] of pointer; end; PNXSema_t = ^NXSema_t; NXSema_t = record - reserved1 : uint64_t; + reserved1 : Tuint64; reserved2 : array[0..4] of pointer; end; PNXCond_t = ^NXCond_t; NXCond_t = record - reserved1 : uint64_t; + reserved1 : Tuint64; reserved2 : array[0..4] of pointer; end; @@ -5524,22 +5513,22 @@ type xde_mtime : time_t; xde_btime : time_t; xde_ctime : time_t; - xde_change : uint64_t; - xde_ino : uint64_t; - xde_dev : array[0..1] of uint64_t; - xde_rdev : array[0..1] of uint64_t; - xde_uid : uint64_t; - xde_gid : uint64_t; - xde_size : uint64_t; - xde_blocks : uint64_t; + xde_change : Tuint64; + xde_ino : Tuint64; + xde_dev : array[0..1] of Tuint64; + xde_rdev : array[0..1] of Tuint64; + xde_uid : Tuint64; + xde_gid : Tuint64; + xde_size : Tuint64; + xde_blocks : Tuint64; xde_blksize : dword; spare2 : dword; - spare3 : uint64_t; - spare4 : uint64_t; - spare5 : uint64_t; - spare6 : uint64_t; - spare7 : uint64_t; - spare8 : uint64_t; + spare3 : Tuint64; + spare4 : Tuint64; + spare5 : Tuint64; + spare6 : Tuint64; + spare7 : Tuint64; + spare8 : Tuint64; end; { UNIX (NX_PNF_UNIX) information... } { ...including name } @@ -6034,7 +6023,7 @@ function ___lastFileSysErrno:Plongint;cdecl;external libc_nlm name '___lastFileS type Paddr64_t = ^addr64_t; - addr64_t = uint64_t; + addr64_t = Tuint64; PESMQueryInfo_t = ^ESMQueryInfo_t; ESMQueryInfo_t = record @@ -6170,6 +6159,31 @@ function fnmatch(pattern, _string:Pchar; flags:longint):longint;cdecl;external l FSHOOK_NESL_SHIM_BIT = $00000080; FSHOOK_DATA_FILTERED_BIT = $80000000; + FSHOOK_TYPE_DELETE_WARN = 0; + FSHOOK_TYPE_DELETE_REPORT = 1; + FSHOOK_TYPE_CREATE_WARN = 2; + FSHOOK_TYPE_CREATE_REPORT = 3; + FSHOOK_TYPE_OPEN_WARN = 4; + FSHOOK_TYPE_OPEN_REPORT = 5; + FSHOOK_TYPE_CLOSE_WARN = 6; + FSHOOK_TYPE_CLOSE_REPORT = 7; + FSHOOK_TYPE_RENAME_WARN = 8; + FSHOOK_TYPE_RENAME_REPORT = 9; + FSHOOK_TYPE_MODIFYINFO_WARN = 10; + FSHOOK_TYPE_MODIFYINFO_REPORT = 11; + FSHOOK_TYPE_SETDATASIZE_WARN = 12; + FSHOOK_TYPE_SETDATASIZE_REPORT = 13; + FSHOOK_TYPE_ADDTRUSTEE_WARN = 14; + FSHOOK_TYPE_ADDTRUSTEE_REPORT = 15; + FSHOOK_TYPE_REMOVETRUSTEE_WARN = 16; + FSHOOK_TYPE_REMOVETRUSTEE_REPORT = 17; + FSHOOK_TYPE_SETINHERITEDRIGHTS_WARN = 18; + FSHOOK_TYPE_SETINHERITEDRIGHTS_REPORT = 19; + FSHOOK_TYPE_CHANGEVOLSTATE_WARN = 20; + FSHOOK_TYPE_CHANGEVOLSTATE_REPORT = 21; + FSHOOK_TYPE_CHANGEPOOLSTATE_WARN = 22; + FSHOOK_TYPE_CHANGEPOOLSTATE_REPORT = 23; + {========================================================== NSS file system hooks @@ -6178,31 +6192,33 @@ function fnmatch(pattern, _string:Pchar; flags:longint):longint;cdecl;external l type Pfse_info = ^fse_info; fse_info = record - version : longint; - reserved1 : longint; - reserved2 : pointer; - rtag : rtag_t; - link : Pfse_info; - regID : pointer; - regSpace : pointer; - consID : pointer; - length : size_t; - data : pointer; - reserved3 : array[0..3] of pointer; - _type : longint; - userParm : pointer; - parm0 : pointer; - parm1 : pointer; - flags : dword; + version : longint; // event block version + reserved1 : longint; // do not modify + reserved2 : pointer; // do not modify + rtag : rtag_t; // registerer's resource tag + link : Pfse_info; // used by registerer to link blocks + regID : pointer; // registerer of the event + regSpace : pointer; // scratch space for registerer's use + consID : pointer; // consumer of event if relevant + length : size_t; // in bytes of event data + data : pointer; // pointer to data + reserved3 : array[0..3] of pointer; // do not modify + _type : longint; // one of NSS_FSTYPE_-... + userParm : pointer; // specified at time of registration + parm0 : pointer; // value depends on event type + parm1 : pointer; // ibid + flags : dword; // as noted above end; fsevent_info_t = fse_info; Pfsevent_info_t = ^fsevent_info_t; + Pfsevent_info = Pfsevent_info_t; + Tfsevent_info = fsevent_info_t; Pzkey_t = ^zkey_t; - zkey_t = uint64_t; + zkey_t = Tuint64; Pzid_t = ^zid_t; - zid_t = uint64_t; + zid_t = Tuint64; Pvolid_t = ^volid_t; volid_t = record @@ -6215,6 +6231,10 @@ type end; userid_t = volid_t; Puserid_t = ^userid_t; + TVolId = volid_t; + PVolId = pvolid_t; + TUserId = userid_t; + PUserId = puserid_t; Ptimeinfo_t = ^timeinfo_t; timeinfo_t = record @@ -6223,6 +6243,9 @@ type modifiedTime, // last time data was changed metaDataModifiedTime : time_t; // last time metadata was changed end; + Ttimeinfo = timeinfo_t; + Ptimeinfo = Ptimeinfo_t; + { commonlity in call-back structures... } { NSS (NetWare 6) filesystem hooks events and call-back data structures... } @@ -6234,6 +6257,9 @@ type zid : zid_t; volID : volid_t; end; + Tdel_warn = del_warn_t; + Pdel_warn = Pdel_warn_t; + Pdel_report_t = ^del_report_t; del_report_t = record @@ -6241,6 +6267,8 @@ type enterRetStatus, opRetCode : longint; end; + Tdel_report = del_report_t; + Pdel_report = Pdel_report_t; Pcreate_warn_t = ^create_warn_t; create_warn_t = record @@ -6257,6 +6285,8 @@ type requestedRights, createAndOpen : dword; end; + Tcreate_warn = create_warn_t; + Pcreate_warn = Pcreate_warn_t; Pcreate_report_t = ^create_report_t; create_report_t = record @@ -6269,6 +6299,8 @@ type retVolID : volid_t; times : timeinfo_t; end; + Tcreate_report = create_report_t; + Pcreate_report = Pcreate_report_t; Popen_warn_t = ^open_warn_t; open_warn_t = record @@ -6280,6 +6312,8 @@ type requestedRights : dword; openParms : pointer; end; + Topen_warn = open_warn_t; + Popen_warn = Popen_warn_t; Popen_report_t = ^open_report_t; open_report_t = record @@ -6291,6 +6325,8 @@ type retVolID : volid_t; times : timeinfo_t; end; + Topen_report = open_report_t; + Popen_report = Popen_report_t; Pclose_warn_t = ^close_warn_t; close_warn_t = record @@ -6300,6 +6336,8 @@ type fhState : dword; times : timeinfo_t; end; + Tclose_warn = close_warn_t; + Pclose_warn = Pclose_warn_t; Pclose_report_t = ^close_report_t; close_report_t = record @@ -6308,6 +6346,8 @@ type opRetCode : longint; fileDeleted : dword; end; + Tclose_report = close_report_t; + Pclose_report = Pclose_report_t; Pren_warn_t = ^ren_warn_t; ren_warn_t = record @@ -6320,6 +6360,8 @@ type destName : Punicode_t; renameFlags : dword; end; + Tren_warn = ren_warn_t; + Pren_warn = Pren_warn_t; Pren_report_t = ^ren_report_t; ren_report_t = record @@ -6327,25 +6369,9 @@ type enterRetStatus : longint; opRetCode : longint; end; -{ the simple way } -{ --on the Mac... } -{ OSType } -{ OSType } -{ Integer } -{ Point } -{ Integer } -{ Integer } -{ (6 bytes) } -{ SignedByte } -{ SignedByte } -{ Integer } -{ LongInt } -{ Point } -{ LongInt } -{ SignedByte } -{ SignedByte } -{ Integer } -{ LongInt } + Tren_report = ren_report_t; + Pren_report = Pren_report_t; + Pzinfo_t = ^zinfo_t; zinfo_t = record @@ -6353,7 +6379,7 @@ type totalBytes : size_t; nextByte : size_t; padding : dword; - retMask : uint64_t; + retMask : Tuint64; std : record zid : zid_t; dataStreamZid : zid_t; @@ -6377,11 +6403,11 @@ type fileNameArray : off_t; end; time : record - created : uint64_t; - archived : uint64_t; - modified : uint64_t; - accessed : uint64_t; - metaDataModified : uint64_t; + created : Tuint64; + archived : Tuint64; + modified : Tuint64; + accessed : Tuint64; + metaDataModified : Tuint64; end; id : record owner : userid_t; @@ -6408,7 +6434,7 @@ type totalDataSize : size64_t; end; deleted : record - time : uint64_t; + time : Tuint64; id : userid_t; end; macNS : record @@ -6419,32 +6445,32 @@ type FInfo : record fdType : longint; fdCreator : longint; - fdFlags : int16_t; + fdFlags : Tint16; fdLocation : record - v : int16_t; - h : int16_t; + v : Tint16; + h : Tint16; end; - fdFldr : int16_t; + fdFldr : Tint16; end; extended : record case longint of 0 : ( FXInfo : record - fdIconID : int16_t; - fdUnused : int16_t; + fdIconID : Tint16; + fdUnused : Tint16; fdScript : int8_t; fdFlags : int8_t; - fdComment : int16_t; + fdComment : Tint16; fdPutAway : longint; end ); 1 : ( DXInfo : record frScroll : record - v : int16_t; - h : int16_t; + v : Tint16; + h : Tint16; end; frOpenChain : longint; fdScript : int8_t; fdFlags : int8_t; - fdComment : int16_t; + fdComment : Tint16; fdPutAway : longint; end ); end; @@ -6476,9 +6502,9 @@ type volumeState : dword; nameSpaceMask : dword; features : record - enabled : uint64_t; - enableModMask : uint64_t; - supported : uint64_t; + enabled : Tuint64; + enableModMask : Tuint64; + supported : Tuint64; end; maximumFileSize : size64_t; totalSpaceQuota : size64_t; @@ -6491,7 +6517,7 @@ type purgeableBytes : size64_t; nonPurgeableBytes : size64_t; numDeletedFiles : size64_t; - oldestDeletedTime : uint64_t; + oldestDeletedTime : Tuint64; minKeepSeconds : size_t; maxKeepSeconds : size_t; lowWaterMark : size_t; @@ -6510,9 +6536,9 @@ type poolState : dword; nameSpaceMask : dword; features : record - enabled : uint64_t; - enableModMask : uint64_t; - supported : uint64_t; + enabled : Tuint64; + enableModMask : Tuint64; + supported : Tuint64; end; totalSpace : size64_t; numUsedBytes : size64_t; @@ -6522,6 +6548,8 @@ type extAttrUserFlags : dword; variableData : array[0..0] of byte; end; + Tzinfo = zinfo_t; + Pzinfo = Pzinfo_t; Pmod_warn_t = ^mod_warn_t; mod_warn_t = record @@ -6535,6 +6563,8 @@ type modifyInfo : Pzinfo_t; modifyTypeInfo : pointer; end; + Tmod_warn = mod_warn_t; + Pmod_warn = Pmod_warn_t; Pmod_report_t = ^mod_report_t; mod_report_t = record @@ -6542,24 +6572,30 @@ type enterRetStatus : longint; opRetCode : longint; end; + Tmod_report = mod_report_t; + Pmod_report = Pmod_report_t; Psetsize_warn_t = ^setsize_warn_t; setsize_warn_t = record enterExitID : dword; slotID : dword; key : zkey_t; - curEOF : uint64_t; - newEOF : uint64_t; + curEOF : Tuint64; + newEOF : Tuint64; setSizeFlags : dword; end; + Tsetsize_warn = setsize_warn_t; + Psetsize_warn = Psetsize_warn_t; Psetsize_report_t = ^setsize_report_t; setsize_report_t = record enterExitID : dword; enterRetStatus : longint; opRetCode : longint; - newEOF : uint64_t; + newEOF : Tuint64; end; + Tsetsize_report = setsize_report_t; + Psetsize_report = Psetsize_report_t; Paddtrustee_warn_t = ^addtrustee_warn_t; addtrustee_warn_t = record @@ -6572,6 +6608,8 @@ type rights : dword; attributes : dword; end; + Taddtrustee_warn = addtrustee_warn_t; + Paddtrustee_warn = Paddtrustee_warn_t; Paddtrustee_report_t = ^addtrustee_report_t; addtrustee_report_t = record @@ -6580,6 +6618,9 @@ type opRetCode : longint; end; + Taddtrustee_report = addtrustee_report_t; + Paddtrustee_report = Paddtrustee_report_t; + Premtrustee_warn_t = ^remtrustee_warn_t; remtrustee_warn_t = record enterExitID : dword; @@ -6590,6 +6631,8 @@ type trusteeID : userid_t; purgedFileFlag : dword; end; + Tremtrustee_warn = remtrustee_warn_t; + Premtrustee_warn = Premtrustee_warn_t; Premtrustee_report_t = ^remtrustee_report_t; remtrustee_report_t = record @@ -6597,7 +6640,8 @@ type enterRetStatus : longint; opRetCode : longint; end; -{ (Boolean) } + Tremtrustee_report = remtrustee_report_t; + Premtrustee_report = Premtrustee_report_t; Psetrights_warn_t = ^setrights_warn_t; setrights_warn_t = record @@ -6609,6 +6653,8 @@ type inheritedRights : dword; authorizeFlag : longint; end; + Tsetrights_warn = setrights_warn_t; + Psetrights_warn = Psetrights_warn_t; Psetrights_report_t = ^setrights_report_t; setrights_report_t = record @@ -6616,6 +6662,8 @@ type enterRetStatus : longint; opRetCode : longint; end; + Tsetrights_report = setrights_report_t; + Psetrights_report = Psetrights_report_t; Pxvolstate_warn_t = ^xvolstate_warn_t; xvolstate_warn_t = record @@ -6626,6 +6674,8 @@ type volID : volid_t; poolID : volid_t; end; + Txvolstate_warn = xvolstate_warn_t; + Pxvolstate_warn = Pxvolstate_warn_t; Pxvolstate_report_t = ^xvolstate_report_t; xvolstate_report_t = record @@ -6638,6 +6688,8 @@ type volID : volid_t; poolID : volid_t; end; + Txvolstate_report = xvolstate_report_t; + Pxvolstate_report = Pxvolstate_report_t; Pxpoolstate_warn_t = ^xpoolstate_warn_t; xpoolstate_warn_t = record @@ -6647,6 +6699,9 @@ type mode : dword; poolID : volid_t; end; + Txpoolstate_warn = xpoolstate_warn_t; + Pxpoolstate_warn = Pxpoolstate_warn_t; + Pxpoolstate_report_t = ^xpoolstate_report_t; xpoolstate_report_t = record @@ -6658,117 +6713,133 @@ type mode : dword; poolID : volid_t; end; + Txpoolstate_report = xpoolstate_report_t; + Pxpoolstate_report = Pxpoolstate_report_t; + {============================================================ Traditional file system hooks These were interfaced by CLib in its NDK header, nwfshook.h. ============================================================} -{ values for 'requestedAccessRights'... } -{ values for 'dataStreamNumber'... } -{ values for 'flags' in fst_info_t... } - PEraseFileCallBackStruct = ^EraseFileCallBackStruct; - EraseFileCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - attributeMatchBits : dword; + PEraseFileCallBackStruct = ^TEraseFileCallBackStruct; + TEraseFileCallBackStruct = record + case longint of + 0: (slot : longint); + 1: (connection : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + attributeMatchBits : dword); end; { (see fsio.h) } - POpenFileCallBackStruct = ^OpenFileCallBackStruct; - OpenFileCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - attributeMatchBits : dword; - requestedAccessRights : dword; - dataStreamNumber : longint; - fileHandle : Plongint; + POpenFileCallBackStruct = ^TOpenFileCallBackStruct; + TOpenFileCallBackStruct = record + case longint of + 0: (slot : longint); + 1: (connection : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + attributeMatchBits : dword; + requestedAccessRights : dword; + dataStreamNumber : longint; + fileHandle : Plongint); end; - PCreateFileCallBackStruct = ^CreateFileCallBackStruct; - CreateFileCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - createAttributeBits : dword; - createFlagBits : dword; - dataStreamNumber : longint; - fileHandle : Plongint; + PCreateFileCallBackStruct = ^TCreateFileCallBackStruct; + TCreateFileCallBackStruct = record + case integer of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + createAttributeBits : dword; + createFlagBits : dword; + dataStreamNumber : longint; + fileHandle : Plongint); end; - PCreateAndOpenCallBackStruct = ^CreateAndOpenCallBackStruct; - CreateAndOpenCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - createAttributeBits : dword; - requestedAccessRights : dword; - createFlagBits : dword; - dataStreamNumber : longint; - fileHandle : Plongint; + PCreateAndOpenCallBackStruct = ^TCreateAndOpenCallBackStruct; + TCreateAndOpenCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + createAttributeBits : dword; + requestedAccessRights : dword; + createFlagBits : dword; + dataStreamNumber : longint; + fileHandle : Plongint); end; - PRenameMoveEntryCallBackStruct = ^RenameMoveEntryCallBackStruct; - RenameMoveEntryCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - attributeMatchBits : dword; - subDirsOnlyFlag : longint; - newDirBase : longint; - newPathString : Pchar; - originalNewCount : longint; - compatibilityFlag : dword; - allowRenamesToMyselfFlag : longint; + PRenameMoveEntryCallBackStruct = ^TRenameMoveEntryCallBackStruct; + TRenameMoveEntryCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + attributeMatchBits : dword; + subDirsOnlyFlag : longint; + newDirBase : longint; + newPathString : Pchar; + originalNewCount : longint; + compatibilityFlag : dword; + allowRenamesToMyselfFlag : longint); end; - PCloseFileCallBackStruct = ^CloseFileCallBackStruct; - CloseFileCallBackStruct = record - slot : longint; - task : longint; - fileHandle : longint; + PCloseFileCallBackStruct = ^TCloseFileCallBackStruct; + TCloseFileCallBackStruct = record + case integer of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + fileHandle : longint); end; - PCreateDirCallBackStruct = ^CreateDirCallBackStruct; - CreateDirCallBackStruct = record - slot : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - directoryAccessMask : dword; + PCreateDirCallBackStruct = ^TCreateDirCallBackStruct; + TCreateDirCallBackStruct = record + case integer of + 0: (connection : longint); + 1: (slot : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + directoryAccessMask : dword); end; - PDeleteDirCallBackStruct = ^DeleteDirCallBackStruct; - DeleteDirCallBackStruct = record - slot : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; + PDeleteDirCallBackStruct = ^TDeleteDirCallBackStruct; + TDeleteDirCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint); end; Tmodifyvector = record @@ -6792,166 +6863,223 @@ type end; Pmodifyvector = ^Tmodifyvector; - PModifyDirEntryCallBackStruct = ^ModifyDirEntryCallBackStruct; - ModifyDirEntryCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - attributeMatchBits : dword; - targetNameSpace : longint; - modifyVector : Pmodifyvector; - modifyBits : dword; - allowWildCardsFlag : longint; + PModifyDirEntryCallBackStruct = ^TModifyDirEntryCallBackStruct; + TModifyDirEntryCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + attributeMatchBits : dword; + targetNameSpace : longint; + modifyVector : Pmodifyvector; + modifyBits : dword; + allowWildCardsFlag : longint); end; - PSalvageDeletedCallBackStruct = ^SalvageDeletedCallBackStruct; - SalvageDeletedCallBackStruct = record - slot : longint; - volume : longint; - dirBase : longint; - toBeSalvagedDirBase : longint; - nameSpace : longint; - newName : Pchar; + PSalvageDeletedCallBackStruct = ^TSalvageDeletedCallBackStruct; + TSalvageDeletedCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + volume : longint; + dirBase : longint; + toBeSalvagedDirBase : longint; + nameSpace : longint; + newName : Pchar); end; - PPurgeDeletedCallBackStruct = ^PurgeDeletedCallBackStruct; - PurgeDeletedCallBackStruct = record - slot : longint; - volume : longint; - dirBase : longint; - toBePurgedDirBase : longint; - nameSpace : longint; + PPurgeDeletedCallBackStruct = ^TPurgeDeletedCallBackStruct; + TPurgeDeletedCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + volume : longint; + dirBase : longint; + toBePurgedDirBase : longint; + nameSpace : longint); end; - PRenameNSEntryCallBackStruct = ^RenameNSEntryCallBackStruct; - RenameNSEntryCallBackStruct = record - slot : longint; - task : longint; - volume : longint; - dirBase : longint; - pathString : Pchar; - pathComponentCount : longint; - nameSpace : longint; - matchBits : dword; - newName : Pchar; + PRenameNSEntryCallBackStruct = ^TRenameNSEntryCallBackStruct; + TRenameNSEntryCallBackStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + dirBase : longint; + pathString : Pchar; + pathComponentCount : longint; + nameSpace : longint; + matchBits : dword; + newName : Pchar); end; - PGenericSalvageDeletedCBStruct = ^GenericSalvageDeletedCBStruct; - GenericSalvageDeletedCBStruct = record - slot : longint; - nameSpace : longint; - sequence : longint; - volume : longint; - dirBase : longint; - newName : Pchar; + PGenericSalvageDeletedCBStruct = ^TGenericSalvageDeletedCBStruct; + TGenericSalvageDeletedCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + nameSpace : longint; + sequence : longint; + volume : longint; + dirBase : longint; + newName : Pchar); end; - PGenericPurgeDeletedCBStruct = ^GenericPurgeDeletedCBStruct; - GenericPurgeDeletedCBStruct = record - slot : longint; - nameSpace : longint; - sequence : longint; - volume : longint; - dirBase : longint; + PGenericPurgeDeletedCBStruct = ^TGenericPurgeDeletedCBStruct; + TGenericPurgeDeletedCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + nameSpace : longint; + sequence : longint; + volume : longint; + dirBase : longint); end; - PGenericOpenCreateCBStruct = ^GenericOpenCreateCBStruct; - GenericOpenCreateCBStruct = record - slot : longint; - task : longint; - volume : longint; - pathComponentCount : longint; - dirBase : longint; - pathString : Pchar; - nameSpace : longint; - dataStreamNumber : longint; - openCreateFlags : dword; - searchAttributes : dword; - createAttributes : dword; - requestedAccessRights : dword; - returnInfoMask : dword; - fileHandle : Plongint; - openCreateAction : Pchar; + PGenericOpenCreateCBStruct = ^TGenericOpenCreateCBStruct; + TGenericOpenCreateCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + pathComponentCount : longint; + dirBase : longint; + pathString : Pchar; + nameSpace : longint; + dataStreamNumber : longint; + openCreateFlags : dword; + searchAttributes : dword; + createAttributes : dword; + requestedAccessRights : dword; + returnInfoMask : dword; + fileHandle : Plongint; + openCreateAction : Pchar); end; - PGenericRenameCBStruct = ^GenericRenameCBStruct; - GenericRenameCBStruct = record - slot : longint; - task : longint; - nameSpace : longint; - renameFlag : longint; - searchAttributes : dword; - srcVolume : longint; - srcPathComponentCount : longint; - srcDirBase : longint; - srcPathString : Pchar; - dstVolume : longint; - dstPathComponentCount : longint; - dstDirBase : longint; - dstPathString : Pchar; + PGenericRenameCBStruct = ^TGenericRenameCBStruct; + TGenericRenameCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + nameSpace : longint; + renameFlag : longint; + searchAttributes : dword; + srcVolume : longint; + srcPathComponentCount : longint; + srcDirBase : longint; + srcPathString : Pchar; + dstVolume : longint; + dstPathComponentCount : longint; + dstDirBase : longint; + dstPathString : Pchar); end; - PGenericEraseFileCBStruct = ^GenericEraseFileCBStruct; - GenericEraseFileCBStruct = record - slot : longint; - task : longint; - volume : longint; - pathComponentCount : longint; - dirBase : longint; - pathString : Pchar; - nameSpace : longint; - searchAttributes : dword; + PGenericEraseFileCBStruct = ^TGenericEraseFileCBStruct; + TGenericEraseFileCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + pathComponentCount : longint; + dirBase : longint; + pathString : Pchar; + nameSpace : longint; + searchAttributes : dword); end; - PGenericModifyDOSInfoCBStruct = ^GenericModifyDOSInfoCBStruct; - GenericModifyDOSInfoCBStruct = record - slot : longint; - task : longint; - volume : longint; - pathComponentCount : longint; - dirBase : longint; - pathString : Pchar; - nameSpace : longint; - searchAttributes : dword; - modifyMask : dword; - modifyInfo : pointer; + PGenericModifyDOSInfoCBStruct = ^TGenericModifyDOSInfoCBStruct; + TGenericModifyDOSInfoCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + volume : longint; + pathComponentCount : longint; + dirBase : longint; + pathString : Pchar; + nameSpace : longint; + searchAttributes : dword; + modifyMask : dword; + modifyInfo : pointer); end; - PGenericModifyNSInfoCBStruct = ^GenericModifyNSInfoCBStruct; - GenericModifyNSInfoCBStruct = record - slot : longint; - task : longint; - dataLength : size_t; - srcNameSpace : longint; - dstNameSpace : longint; - volume : longint; - dirBase : longint; - modifyMask : dword; - modifyInfo : pointer; + PGenericModifyNSInfoCBStruct = ^TGenericModifyNSInfoCBStruct; + TGenericModifyNSInfoCBStruct = record + case longint of + 0: (connection : longint); + 1: (slot : longint; + task : longint; + dataLength : size_t; + srcNameSpace : longint; + dstNameSpace : longint; + volume : longint; + dirBase : longint; + modifyMask : dword; + modifyInfo : pointer); end; {============================================================================ ** NSS file system hook prototypes... } -type TCdeclPfsEventFunc = function (info:Pfsevent_info_t):longint; cdecl; +//type TCdeclPfsEventFunc = function (info:Pfsevent_info_t):longint; cdecl; +type TCdeclPfsEventFunc = function (var info:Tfsevent_info):longint; cdecl; + function fs_register(_type:longint; cbFunc:TCdeclPfsEventFunc; userParm:pointer):longint;cdecl;external libc_nlm name 'fs_register'; function fs_unregister(_type:longint; cbFunc:TCdeclPfsEventFunc):longint;cdecl;external libc_nlm name 'fs_unregister'; + function fs_mapkeytopath(key:zkey_t; path:Punicode_t; maxpathlen:Psize_t; want_volume:longint):longint;cdecl;external libc_nlm name 'fs_mapkeytopath'; +function fs_mapkeytopath(key:zkey_t; path:Punicode_t; maxpathlen:Psize_t; want_volume:longbool):longint;cdecl;external libc_nlm name 'fs_mapkeytopath'; +function fs_mapkeytopath(key:zkey_t; path:Punicode_t; var maxpathlen:longint; want_volume:longint):longint;cdecl;external libc_nlm name 'fs_mapkeytopath'; +function fs_mapkeytopath(key:zkey_t; path:Punicode_t; var maxpathlen:longint; want_volume:longbool):longint;cdecl;external libc_nlm name 'fs_mapkeytopath'; + function fs_mapzidtopath(zid:zid_t; volId:Pvolid_t; path:Punicode_t; maxpathlen:Psize_t; want_volume:longint):longint;cdecl;external libc_nlm name 'fs_mapzidtopath'; +function fs_mapzidtopath(zid:zid_t; volId:Pvolid_t; path:Punicode_t; maxpathlen:Psize_t; want_volume:longbool):longint;cdecl;external libc_nlm name 'fs_mapzidtopath'; +function fs_mapzidtopath(zid:zid_t; var volId:volid_t; path:Punicode_t; var maxpathlen:longint; want_volume:longint):longint;cdecl;external libc_nlm name 'fs_mapzidtopath'; +function fs_mapzidtopath(zid:zid_t; var volId:volid_t; path:Punicode_t; var maxpathlen:longint; want_volume:longbool):longint;cdecl;external libc_nlm name 'fs_mapzidtopath'; + function fs_read(key:zkey_t; buf:pointer; off:off64_t; len:size_t; bytes:Pssize_t):longint;cdecl;external libc_nlm name 'fs_read'; +function fs_read(key:zkey_t; var buf; off:off64_t; len:size_t; var bytes:ssize_t):longint;cdecl;external libc_nlm name 'fs_read'; + function fs_write(key:zkey_t; buf:pointer; off:off64_t; len:size_t; bytes:Pssize_t):longint;cdecl;external libc_nlm name 'fs_write'; +function fs_write(key:zkey_t; var buf; off:off64_t; len:size_t; var bytes:ssize_t):longint;cdecl;external libc_nlm name 'fs_write'; {============================================================================ Generic information (NEB and traditional) based on connection slot. This has little to do with file system hooks, but in LibC, there is no way to get a hold of a connection slot except through file system hook interfaces.} -function fs_getslotinfo(slot:longint; name:Pchar; objectType:Pword; objectId:Pdword; loginTime:Pchar):longint;cdecl;external libc_nlm name 'fs_getslotinfo'; -function fs_getslotinfo(slot:longint; name:Pchar; var objectType:word; var objectId:dword; loginTime:Pchar):longint;cdecl;external libc_nlm name 'fs_getslotinfo'; +function fs_getslotinfo(slot:longint; + name:Pchar; + objectType:PWord; + objectId:Pdword; + loginTime:Pointer):longint;cdecl;external libc_nlm name 'fs_getslotinfo'; +function fs_getslotinfo(slot:longint; + name:Pchar; + var objectType:word; + var objectId:dword; + var loginTime):longint;cdecl;external libc_nlm name 'fs_getslotinfo'; + +// Clib compatible function name: +function GetConnectionInformation (connectionNumber:longint; + objectName :Pchar; + objectType :PWORD; + objectID :Plongint; + loginTime :pointer):longint;cdecl;external libc_nlm name 'fs_getslotinfo'; +function GetConnectionInformation (connectionNumber:longint; + objectName :Pchar; + var objectType :word; + var objectID :longint; + var loginTime):longint;cdecl;external libc_nlm name 'fs_getslotinfo'; + {========================================== @@ -6959,31 +7087,41 @@ function fs_getslotinfo(slot:longint; name:Pchar; var objectType:word; var objec type TCDeclFunc1PtrArgLongint = function (info:pointer):longint; cdecl; -function fst_register(_type:longint; cbFunc:TCDeclFunc1PtrArgLongint):longint;cdecl;external libc_nlm name 'fst_register'; -function fst_unregister(_type:longint; cbFunc:TCDeclFunc1PtrArgLongint):longint;cdecl;external libc_nlm name 'fst_unregister'; +function fst_register(_type:longint; cbFunc:pointer):longint;cdecl;external libc_nlm name 'fst_register'; +function fst_unregister(_type:longint; cbFunc:pointer):longint;cdecl;external libc_nlm name 'fst_unregister'; function fst_getvoldir(slot:longint; fileHandle:longint; namespace:longint; volNum:Plongint; dirBase:Plongint):longint;cdecl;external libc_nlm name 'fst_getvoldir'; -function fst_getorignamespace(volNum:longint; dirBase:longint; namespace:Plongint):longint;cdecl;external libc_nlm name 'fst_getorignamespace'; -function fst_mapvoldirtopath(volNum:longint; dirBase:longint; namespace:longint; path:Pchar; maxPathLen:size_t):longint;cdecl;external libc_nlm name 'fst_mapvoldirtopath'; +function fst_getvoldir(slot, fileHandle, namespace:longint; var volNum, dirBase:longint):longint;cdecl;external libc_nlm name 'fst_getvoldir'; +function fst_getorignamespace(volNum, dirBase:longint; namespace:Plongint):longint;cdecl;external libc_nlm name 'fst_getorignamespace'; +function fst_getorignamespace(volNum, dirBase:longint; var namespace:longint):longint;cdecl;external libc_nlm name 'fst_getorignamespace'; +function fst_mapvoldirtopath(volNum,dirBase,namespace:longint; path:Pchar; maxPathLen:longint):longint;cdecl;external libc_nlm name 'fst_mapvoldirtopath'; function fst_mapvoltoname(volNum:longint; name:Pchar):longint;cdecl;external libc_nlm name 'fst_mapvoltoname'; -function fst_read(slot:longint; fileHandle:longint; buffer:pointer; offset:off64_t; length:size_t; - bytes:Pssize_t):longint;cdecl;external libc_nlm name 'fst_read'; -function fst_write(slot:longint; fileHandle:longint; buffer:pointer; offset:off64_t; length:size_t; - bytes:Pssize_t):longint;cdecl;external libc_nlm name 'fst_write'; -function fst_size(slot:longint; fileHandle:longint; length:Poff64_t):longint;cdecl;external libc_nlm name 'fst_size'; -function fst_flush(slot:longint; fileHandle:longint):longint;cdecl;external libc_nlm name 'fst_flush'; +function fst_read(slot,fileHandle:longint; buffer:pointer; offset:off64_t; length:size_t; + bytes:Plongint):longint;cdecl;external libc_nlm name 'fst_read'; +function fst_read(slot,fileHandle:longint; buffer:pointer; offset:off64_t; length:size_t; + var bytes:longint):longint;cdecl;external libc_nlm name 'fst_read'; +function fst_write(slot, fileHandle:longint; buffer:pointer; offset:off64_t; length:size_t; + bytes:Plongint):longint;cdecl;external libc_nlm name 'fst_write'; +function fst_write(slot, fileHandle:longint; buffer:pointer; offset:off64_t; length:size_t; + var bytes:longint):longint;cdecl;external libc_nlm name 'fst_write'; +function fst_size(slot, fileHandle:longint; length:Poff64_t):longint;cdecl;external libc_nlm name 'fst_size'; +function fst_flush(slot, fileHandle:longint):longint;cdecl;external libc_nlm name 'fst_flush'; + type Pfst_info_t = ^fst_info_t; fst_info_t = record - volNum : longint; - DosBase : longint; - dirBase : longint; - namespace : longint; + volNum, + DosBase, + dirBase, + namespace, datastream : longint; flags : dword; end; + Tfst_info = fst_info_t; + Pfst_info = Pfst_info_t; -function fst_getinfo(slot:longint; fileHandle:longint; info:Pfst_info_t):longint;cdecl;external libc_nlm name 'fst_getinfo'; +function fst_getinfo(slot,fileHandle:longint; info:Pfst_info_t):longint;cdecl;external libc_nlm name 'fst_getinfo'; +function fst_getinfo(slot,fileHandle:longint; var info:fst_info_t):longint;cdecl;external libc_nlm name 'fst_getinfo'; // getopt.h @@ -7107,88 +7245,61 @@ function catopen(name:Pchar; oflag:longint):nl_catd;cdecl;external libc_nlm name // langinfo.h -{ Sunday } - const - DAY_1 = 1; - { Monday } - DAY_2 = 2; - { Tuesday } - DAY_3 = 3; - { Wednesday } - DAY_4 = 4; - { Thursday } - DAY_5 = 5; - { Friday } - DAY_6 = 6; - { Saturday } - DAY_7 = 7; - { Sun } - ABDAY_1 = 8; - { Mon } - ABDAY_2 = 9; - { Tue } - ABDAY_3 = 10; - { Wed } - ABDAY_4 = 11; - { Thu } - ABDAY_5 = 12; - { Fri } - ABDAY_6 = 13; - { Sat } - ABDAY_7 = 14; - { January } - MON_1 = 15; - { February } - MON_2 = 16; - { March } - MON_3 = 17; - { April } - MON_4 = 18; - { May } - MON_5 = 19; - { June } - MON_6 = 20; - { July } - MON_7 = 21; - { August } - MON_8 = 22; - { September } - MON_9 = 23; - { October } - MON_10 = 24; - { November } - MON_11 = 25; - { December } - MON_12 = 26; - ABMON_1 = 27; - ABMON_2 = 28; - ABMON_3 = 29; - ABMON_4 = 30; { Apr } - ABMON_5 = 31; { May } - ABMON_6 = 32; { Jun } - ABMON_7 = 33; { Jul } - ABMON_8 = 34; { Aug } - ABMON_9 = 35; { Sep } - ABMON_10 = 36; { Oct } - ABMON_11 = 37; { Nov } - ABMON_12 = 38; { Dec } - RADIXCHAR = 39; { radix character (not supported) } - THOUSEP = 40; { separator for thousand } - CRNCYSTR = 43; { currency symbol } - D_T_FMT = 44; { string for formatting date and time } - D_FMT = 45; { date format } - T_FMT = 46; { time format } - AM_STR = 47; { am string } - PM_STR = 48; { pm string } - CODESET = 49; { code set name } - T_FMT_AMPM = 50; { a.m. or p.m. time format string (not supported) } - ERA = 51; { era description segments (not supported) } - ERA_D_FMT = 52; { era date format string (not supported) } - ERA_D_T_FMT = 53; { era date and time format string (not supported) } - ERA_T_FMT = 54; { era time format string (not supported) } - ALT_DIGITS = 55; { alternative symbols for digits (not supported) } - _MAXSTRMSG = 57; { maximum number of strings in langinfo } + DAY_1 = 1; // Sunday + DAY_2 = 2; // Monday + DAY_3 = 3; // Tuesday + DAY_4 = 4; // Wednesday + DAY_5 = 5; // Thursday + DAY_6 = 6; // Friday + DAY_7 = 7; // Saturday + ABDAY_1 = 8; // Sun + ABDAY_2 = 9; // Mon + ABDAY_3 = 10; // Tue + ABDAY_4 = 11; // Wed + ABDAY_5 = 12; // Thu + ABDAY_6 = 13; // Fri + ABDAY_7 = 14; // Sat + MON_1 = 15; // January + MON_2 = 16; // February + MON_3 = 17; // March + MON_4 = 18; // April + MON_5 = 19; // May + MON_6 = 20; // June + MON_7 = 21; // July + MON_8 = 22; // August + MON_9 = 23; // September + MON_10 = 24; // October + MON_11 = 25; // November + MON_12 = 26; // December + ABMON_1 = 27; // Jan + ABMON_2 = 28; // Feb + ABMON_3 = 29; // Mar + ABMON_4 = 30; // Apr + ABMON_5 = 31; // May + ABMON_6 = 32; // Jun + ABMON_7 = 33; // Jul + ABMON_8 = 34; // Aug + ABMON_9 = 35; // Sep + ABMON_10 = 36; // Oct + ABMON_11 = 37; // Nov + ABMON_12 = 38; // Dec + RADIXCHAR = 39; // radix character (not supported) + THOUSEP = 40; // separator for thousand + CRNCYSTR = 43; // currency symbol + D_T_FMT = 44; // string for formatting date and time + D_FMT = 45; // date format + T_FMT = 46; // time format + AM_STR = 47; // am string + PM_STR = 48; // pm string + CODESET = 49; // code set name + T_FMT_AMPM = 50; // a.m. or p.m. time format string (not supported) + ERA = 51; //era description segments (not supported) + ERA_D_FMT = 52; // era date format string (not supported) + ERA_D_T_FMT = 53; // era date and time format string (not supported) + ERA_T_FMT = 54; // era time format string (not supported) + ALT_DIGITS = 55; // alternative symbols for digits (not supported) + _MAXSTRMSG = 57; // maximum number of strings in langinfo function nl_langinfo(item:nl_item):Pchar;cdecl;external libc_nlm name 'nl_langinfo'; @@ -7503,7 +7614,7 @@ type Stepping : dword; Revision : dword; FeatureFlags : dword; - SerialNumber : uint64_t; + SerialNumber : Tuint64; Speed : dword; L1CacheSize : dword; L2CacheSize : dword; @@ -7512,8 +7623,8 @@ type RunningThreads : dword; SuspendedThreads : dword; reserved2 : dword; - ThreadCPUTime : uint64_t; - reserved3 : uint64_t; + ThreadCPUTime : Tuint64; + reserved3 : Tuint64; reserved4 : array[0..7] of dword; end; @@ -7561,16 +7672,16 @@ type Pvmemory_info = ^Tvmemory_info; Tvmemory_info = record - PageInCount : uint64_t; - PageOutCount : uint64_t; - SwapResvCount : uint64_t; - SwapPageCount : uint64_t; - SwapFreeCount : uint64_t; - PageFaultCount : uint64_t; - freeCachePages : uint64_t; - freeCleanPages : uint64_t; - freeDirtyPages : uint64_t; - VMPhysicalPageCount : uint64_t; + PageInCount : Tuint64; + PageOutCount : Tuint64; + SwapResvCount : Tuint64; + SwapPageCount : Tuint64; + SwapFreeCount : Tuint64; + PageFaultCount : Tuint64; + freeCachePages : Tuint64; + freeCleanPages : Tuint64; + freeDirtyPages : Tuint64; + VMPhysicalPageCount : Tuint64; reserved : array[0..19] of dword; end; @@ -7631,8 +7742,8 @@ type DirectoryServicesObjectID : dword; VolumeLastModifiedDateAndTime : dword; mounted : longint; - BlockCount : uint64_t; - BlocksFree : uint64_t; + BlockCount : Tuint64; + BlocksFree : Tuint64; BlockSize : dword; reserved : array[0..57] of dword; end; @@ -7688,7 +7799,7 @@ type ncpx_id_t = dword; Pncpx_client_t = ^ncpx_client_t; - ncpx_client_t = uint64_t; + ncpx_client_t = Tuint64; Pncpx_frag_element_t = ^ncpx_frag_element_t; ncpx_frag_element_t = record @@ -9117,7 +9228,10 @@ end. { $Log$ - Revision 1.8 2004-12-29 13:01:43 armin + Revision 1.9 2005-01-04 11:25:33 armin + * rtl code cleanup, compat fixes between clib and libc + + Revision 1.8 2004/12/29 13:01:43 armin * made commandParser more compatible between clib and libc Revision 1.7 2004/12/16 12:42:55 armin diff --git a/rtl/netwlibc/system.pp b/rtl/netwlibc/system.pp index ccde9bef4c..d78d1f0f19 100644 --- a/rtl/netwlibc/system.pp +++ b/rtl/netwlibc/system.pp @@ -97,12 +97,12 @@ procedure NWSysSetThreadFunctions (atv:TSysReleaseThreadVars; stdata:TSysSetThreadDataAreaPtr); -procedure ConsolePrintf (s :shortstring); -procedure ConsolePrintf (FormatStr : PCHAR; Param : LONGINT); -procedure ConsolePrintf (FormatStr : PCHAR; Param : pchar); -procedure ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT); -procedure ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT); -procedure ConsolePrintf (FormatStr : PCHAR); +procedure _ConsolePrintf (s :shortstring); +procedure _ConsolePrintf (FormatStr : PCHAR; Param : LONGINT); +procedure _ConsolePrintf (FormatStr : PCHAR; Param : pchar); +procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT); +procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT); +procedure _ConsolePrintf (FormatStr : PCHAR); procedure __EnterDebugger;cdecl;external '!netware' name 'EnterDebugger'; function NWGetCodeStart : pointer; // needed for Lineinfo @@ -165,7 +165,7 @@ begin if TerminatingThreadID <> dword(pthread_self) then begin {$ifdef DEBUG_MT} - ConsolePrintf ('Terminating Thread %x because halt was called while Thread %x terminates nlm'#13#10,dword(pthread_self),TerminatingThreadId); + _ConsolePrintf ('Terminating Thread %x because halt was called while Thread %x terminates nlm'#13#10,dword(pthread_self),TerminatingThreadId); {$endif} pthread_exit (nil); // only for the case ExitThread fails @@ -269,7 +269,7 @@ var P2 : POINTER; begin if HeapSbrkReleased then begin - ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10); + _ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10); exit(nil); end; SysOSAlloc := _Alloc (size,HeapAllocResourceTag); @@ -341,7 +341,7 @@ var i : longint; begin if HeapSbrkReleased then begin - ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10); + _ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10); end else if (HeapSbrkLastUsed > 0) then for i := 1 to HeapSbrkLastUsed do @@ -867,7 +867,7 @@ procedure InitFPU;assembler; function CheckFunction : longint; CDECL; [public,alias: '_NonAppCheckUnload']; var oldPtr : pointer; begin - //ConsolePrintf ('CheckFunction'#13#10); + //_ConsolePrintf ('CheckFunction'#13#10); if assigned (NetwareCheckFunction) then begin if assigned (SetThreadDataAreaPtr) then @@ -884,15 +884,15 @@ begin end; -procedure ConsolePrintf (s : shortstring); +procedure _ConsolePrintf (s : shortstring); begin if length(s) > 254 then byte(s[0]) := 254; s := s + #0; - ConsolePrintf (@s[1]); + _ConsolePrintf (@s[1]); end; -procedure ConsolePrintf (FormatStr : PCHAR); +procedure _ConsolePrintf (FormatStr : PCHAR); begin if NWLoggerScreen = nil then NWLoggerScreen := getnetwarelogger; @@ -900,7 +900,7 @@ begin screenprintf (NWLoggerScreen,FormatStr); end; -procedure ConsolePrintf (FormatStr : PCHAR; Param : LONGINT); +procedure _ConsolePrintf (FormatStr : PCHAR; Param : LONGINT); begin if NWLoggerScreen = nil then NWLoggerScreen := getnetwarelogger; @@ -908,12 +908,12 @@ begin screenprintf (NWLoggerScreen,FormatStr,Param); end; -procedure ConsolePrintf (FormatStr : PCHAR; Param : pchar); +procedure _ConsolePrintf (FormatStr : PCHAR; Param : pchar); begin - ConsolePrintf (FormatStr,longint(Param)); + _ConsolePrintf (FormatStr,longint(Param)); end; -procedure ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT); +procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT); begin if NWLoggerScreen = nil then NWLoggerScreen := getnetwarelogger; @@ -921,7 +921,7 @@ begin screenprintf (NWLoggerScreen,FormatStr,P1,P2); end; -procedure ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT); +procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT); begin if NWLoggerScreen = nil then NWLoggerScreen := getnetwarelogger; @@ -1098,14 +1098,14 @@ function _DLLMain (hInstDLL:pointer; fdwReason:dword; DLLParam:longint):longbool var res : longbool; begin {$ifdef DEBUG_MT} - ConsolePrintf ('_FPC_DLL_Entry called'); + _ConsolePrintf ('_FPC_DLL_Entry called'); {$endif} _DLLMain := false; isLibrary := true; case fdwReason of DLL_ACTUAL_DLLMAIN : _DLLMain := true; DLL_NLM_STARTUP : begin - //__ConsolePrintf ('DLL_NLM_STARTUP'); + //_ConsolePrintf ('DLL_NLM_STARTUP'); if assigned(Dll_Process_Attach_Hook) then begin res:=Dll_Process_Attach_Hook(DllParam); @@ -1116,7 +1116,7 @@ begin _DLLMain := true; end; DLL_NLM_SHUTDOWN : begin - //__ConsolePrintf ('DLL_NLM_SHUTDOWN'); + //_ConsolePrintf ('DLL_NLM_SHUTDOWN'); TermSigHandler(0); _DLLMain := true; end; @@ -1190,7 +1190,10 @@ Begin End. { $Log$ - Revision 1.10 2004-12-07 11:40:43 armin + Revision 1.11 2005-01-04 11:25:34 armin + * rtl code cleanup, compat fixes between clib and libc + + Revision 1.10 2004/12/07 11:40:43 armin * implemented GetProcessId, defined TimeVal and TimeZone in addition to TTimeVal, TTimeZone, Makefile defaults to binutilsprefix i386-netware Revision 1.9 2004/12/05 14:36:38 hajny diff --git a/rtl/netwlibc/sysutils.pp b/rtl/netwlibc/sysutils.pp index 4cbbab54b3..0340edd394 100644 --- a/rtl/netwlibc/sysutils.pp +++ b/rtl/netwlibc/sysutils.pp @@ -453,7 +453,7 @@ Begin else DiskSize:=-1;} DiskSize := -1; - __ConsolePrintf ('warning: fpc sysutils.disksize not implemented'#13#10); + ConsolePrintf ('warning: fpc sysutils.disksize not implemented'#13#10); {$warning DiskSize not implemented (does it make sense ?) } End; @@ -699,7 +699,10 @@ end. { $Log$ - Revision 1.7 2004-12-16 12:42:55 armin + Revision 1.8 2005-01-04 11:25:34 armin + * rtl code cleanup, compat fixes between clib and libc + + Revision 1.7 2004/12/16 12:42:55 armin * added NetWare Alert * added sysutils.sleep @@ -731,4 +734,3 @@ end. * first rtl version for netwlibc } -