ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBExternals.pas
Revision: 1
Committed: Mon Jul 31 16:43:00 2000 UTC (23 years, 8 months ago) by tony
Content type: text/x-pascal
File size: 6060 byte(s)
Log Message:
Borland IBX Open Source Release

File Contents

# User Rev Content
1 tony 1 {************************************************************************}
2     { }
3     { Borland Delphi Visual Component Library }
4     { InterBase Express core components }
5     { }
6     { Copyright (c) 1998-2000 Inprise Corporation }
7     { }
8     { InterBase Express is based in part on the product }
9     { Free IB Components, written by Gregory H. Deatz for }
10     { Hoagland, Longo, Moran, Dunst & Doukas Company. }
11     { Free IB Components is used under license. }
12     { }
13     { The contents of this file are subject to the InterBase }
14     { Public License Version 1.0 (the "License"); you may not }
15     { use this file except in compliance with the License. You }
16     { may obtain a copy of the License at http://www.Inprise.com/IPL.html }
17     { Software distributed under the License is distributed on }
18     { an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either }
19     { express or implied. See the License for the specific language }
20     { governing rights and limitations under the License. }
21     { The Original Code was created by InterBase Software Corporation }
22     { and its successors. }
23     { Portions created by Inprise Corporation are Copyright (C) Inprise }
24     { Corporation. All Rights Reserved. }
25     { Contributor(s): Jeff Overcash }
26     { }
27     {************************************************************************}
28    
29     unit IBExternals;
30    
31     { Some structures, declarations that we need for the IB stuff to work, but
32     that aren't really part of the ib header file. }
33     interface
34    
35     uses
36     Windows, IBUtils;
37    
38     type
39     Int = LongInt; { 32 bit signed }
40     UInt = DWord; { 32 bit unsigned }
41     Long = LongInt; { 32 bit signed }
42     ULong = DWord; { 32 bit unsigned }
43     Short = SmallInt;{ 16 bit signed }
44     UShort = Word; { 16 bit unsigned }
45     Float = Single; { 32 bit }
46     UChar = Byte; { 8 bit unsigned }
47     ISC_LONG = Long; { 32 bit signed }
48     UISC_LONG = ULong; { 32 bit unsigned }
49     ISC_INT64 = Int64; { 64 bit signed }
50     ISC_STATUS = Long; { 32 bit signed }
51     UISC_STATUS = ULong; { 32 bit unsigned}
52     Void = Pointer;
53     { Delphi Pointer types }
54     PPChar = ^PChar;
55     PSmallInt = ^SmallInt;
56     PInt = ^Int;
57     PInteger = ^Integer;
58     PShort = ^Short;
59     PUShort = ^UShort;
60     PLong = ^Long;
61     PULong = ^ULong;
62     PFloat = ^Float;
63     PUChar = ^UChar;
64     PVoid = ^Pointer;
65     PDouble = ^Double;
66     PISC_LONG = ^ISC_LONG;
67     PUISC_LONG = ^UISC_LONG;
68     PISC_STATUS = ^ISC_STATUS;
69     PPISC_STATUS = ^PISC_STATUS;
70     PUISC_STATUS = ^UISC_STATUS;
71    
72     { C Date/Time Structure }
73     TCTimeStructure = record
74     tm_sec : integer; { Seconds }
75     tm_min : integer; { Minutes }
76     tm_hour : integer; { Hour (0--23) }
77     tm_mday : integer; { Day of month (1--31) }
78     tm_mon : integer; { Month (0--11) }
79     tm_year : integer; { Year (calendar year minus 1900) }
80     tm_wday : integer; { Weekday (0--6) Sunday = 0) }
81     tm_yday : integer; { Day of year (0--365) }
82     tm_isdst : integer; { 0 if daylight savings time is not in effect) }
83     end;
84     PCTimeStructure = ^TCTimeStructure;
85     TM = TCTimeStructure;
86     PTM = ^TM;
87    
88     TISC_VARYING = record
89     strlen: Short;
90     str: array[0..0] of Char;
91     end;
92    
93     {***************************}
94     {* Some blob ctl structs *}
95     {* from IB help files for *}
96     {* implementing UDFs . *}
97     {* -- Taken from docs, not *}
98     {* in original ibase.h *}
99     {***************************}
100     TISC_BlobGetSegment = function(BlobHandle: PInt;
101     Buffer: PChar;
102     BufferSize: Long;
103     var ResultLength: Long): Short; cdecl;
104     TISC_BlobPutSegment = procedure(BlobHandle: PInt;
105     Buffer: PChar;
106     BufferLength: Short); cdecl;
107     TBlob = record
108     GetSegment : TISC_BlobGetSegment;
109     BlobHandle : PInt;
110     SegmentCount : Long;
111     MaxSegmentLength : Long;
112     TotalSize : Long;
113     PutSegment : TISC_BlobPutSegment;
114     end;
115     PBlob = ^TBlob;
116    
117     const
118     { Delphi consts }
119     { Days of week }
120     dSun = 1; dMon = 2; dTue = 3; dWed = 4; dThu = 5; dFri = 6; dSat = 7;
121     { Months of year }
122     dJan = 1; dFeb = 2; dMar = 3; dApr = 4; dMay = 5; dJun = 6;
123     dJul = 7; dAug = 8; dSep = 9; dOct = 10; dNov = 11; dDec = 12;
124     { C Consts }
125     cYearOffset = 1900;
126     { Days of week }
127     cSun = 0; cMon = 1; cTue = 2; cWed = 3; cThu = 4; cFri = 5; cSat = 6;
128     { Months of year }
129     cJan = 0; cFeb = 1; cMar = 2; cApr = 3; cMay = 4; cJun = 5;
130     cJul = 6; cAug = 7; cSep = 8; cOct = 9; cNov = 10; cDec = 11;
131    
132     procedure InitializeTCTimeStructure(var tm_record: TCTimeStructure);
133    
134     implementation
135    
136     procedure InitializeTCTimeStructure(var tm_record: TCTimeStructure);
137     begin
138     with tm_record do begin
139     tm_sec := 0;
140     tm_min := 0;
141     tm_hour := 0;
142     tm_mday := 0;
143     tm_mon := 0;
144     tm_year := 0;
145     tm_wday := 0;
146     tm_yday := 0;
147     tm_isdst := 0;
148     end;
149     end;
150    
151    
152     end.