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 |
{$IFDEF LINUX }
|
37 |
unix;
|
38 |
{$ELSE}
|
39 |
Windows;
|
40 |
{$ENDIF}
|
41 |
|
42 |
type
|
43 |
Int = LongInt; { 32 bit signed }
|
44 |
UInt = DWord; { 32 bit unsigned }
|
45 |
Long = LongInt; { 32 bit signed }
|
46 |
ULong = DWord; { 32 bit unsigned }
|
47 |
Short = SmallInt;{ 16 bit signed }
|
48 |
UShort = Word; { 16 bit unsigned }
|
49 |
Float = Single; { 32 bit }
|
50 |
UChar = Byte; { 8 bit unsigned }
|
51 |
ISC_LONG = Long; { 32 bit signed }
|
52 |
UISC_LONG = ULong; { 32 bit unsigned }
|
53 |
ISC_INT64 = Int64; { 64 bit signed }
|
54 |
{$IFDEF CPU64}
|
55 |
ISC_STATUS = Int64; { 64 bit signed }
|
56 |
UISC_STATUS = UInt64; { 64 bit unsigned}
|
57 |
{$ELSE}
|
58 |
ISC_STATUS = Long; { 32 bit signed }
|
59 |
UISC_STATUS = ULong; { 32 bit unsigned}
|
60 |
{$ENDIF}
|
61 |
FB_API_HANDLE = ^Pointer;
|
62 |
Void = Pointer;
|
63 |
{ Delphi Pointer types }
|
64 |
PInt = ^Int;
|
65 |
PShort = ^Short;
|
66 |
PUShort = ^UShort;
|
67 |
PLong = ^Long;
|
68 |
PULong = ^ULong;
|
69 |
PFloat = ^Float;
|
70 |
PUChar = ^UChar;
|
71 |
PVoid = ^Pointer;
|
72 |
PISC_LONG = ^ISC_LONG;
|
73 |
PUISC_LONG = ^UISC_LONG;
|
74 |
PISC_STATUS = ^ISC_STATUS;
|
75 |
PPISC_STATUS = ^PISC_STATUS;
|
76 |
PUISC_STATUS = ^UISC_STATUS;
|
77 |
|
78 |
{ C Date/Time Structure }
|
79 |
TCTimeStructure = record
|
80 |
tm_sec : integer; { Seconds }
|
81 |
tm_min : integer; { Minutes }
|
82 |
tm_hour : integer; { Hour (0--23) }
|
83 |
tm_mday : integer; { Day of month (1--31) }
|
84 |
tm_mon : integer; { Month (0--11) }
|
85 |
tm_year : integer; { Year (calendar year minus 1900) }
|
86 |
tm_wday : integer; { Weekday (0--6) Sunday = 0) }
|
87 |
tm_yday : integer; { Day of year (0--365) }
|
88 |
tm_isdst : integer; { 0 if daylight savings time is not in effect) }
|
89 |
tm_gmtoff: longint;
|
90 |
tm_zone: PChar;
|
91 |
end;
|
92 |
PCTimeStructure = ^TCTimeStructure;
|
93 |
TM = TCTimeStructure;
|
94 |
PTM = ^TM;
|
95 |
|
96 |
TISC_VARYING = record
|
97 |
strlen: Short;
|
98 |
str: array[0..0] of Char;
|
99 |
end;
|
100 |
|
101 |
{***************************}
|
102 |
{* Some blob ctl structs *}
|
103 |
{* from IB help files for *}
|
104 |
{* implementing UDFs . *}
|
105 |
{* -- Taken from docs, not *}
|
106 |
{* in original ibase.h *}
|
107 |
{***************************}
|
108 |
TISC_BlobGetSegment = function(BlobHandle: PInt;
|
109 |
Buffer: PChar;
|
110 |
BufferSize: Long;
|
111 |
var ResultLength: Long): Short; cdecl;
|
112 |
TISC_BlobPutSegment = procedure(BlobHandle: PInt;
|
113 |
Buffer: PChar;
|
114 |
BufferLength: Short); cdecl;
|
115 |
TBlob = record
|
116 |
GetSegment : TISC_BlobGetSegment;
|
117 |
BlobHandle : PInt;
|
118 |
SegmentCount : Long;
|
119 |
MaxSegmentLength : Long;
|
120 |
TotalSize : Long;
|
121 |
PutSegment : TISC_BlobPutSegment;
|
122 |
end;
|
123 |
PBlob = ^TBlob;
|
124 |
|
125 |
const
|
126 |
{ Delphi consts }
|
127 |
{ Days of week }
|
128 |
dSun = 1; dMon = 2; dTue = 3; dWed = 4; dThu = 5; dFri = 6; dSat = 7;
|
129 |
{ Months of year }
|
130 |
dJan = 1; dFeb = 2; dMar = 3; dApr = 4; dMay = 5; dJun = 6;
|
131 |
dJul = 7; dAug = 8; dSep = 9; dOct = 10; dNov = 11; dDec = 12;
|
132 |
{ C Consts }
|
133 |
cYearOffset = 1900;
|
134 |
{ Days of week }
|
135 |
cSun = 0; cMon = 1; cTue = 2; cWed = 3; cThu = 4; cFri = 5; cSat = 6;
|
136 |
{ Months of year }
|
137 |
cJan = 0; cFeb = 1; cMar = 2; cApr = 3; cMay = 4; cJun = 5;
|
138 |
cJul = 6; cAug = 7; cSep = 8; cOct = 9; cNov = 10; cDec = 11;
|
139 |
|
140 |
procedure InitializeTCTimeStructure(var tm_record: TCTimeStructure);
|
141 |
|
142 |
implementation
|
143 |
|
144 |
procedure InitializeTCTimeStructure(var tm_record: TCTimeStructure);
|
145 |
begin
|
146 |
with tm_record do begin
|
147 |
tm_sec := 0;
|
148 |
tm_min := 0;
|
149 |
tm_hour := 0;
|
150 |
tm_mday := 0;
|
151 |
tm_mon := 0;
|
152 |
tm_year := 0;
|
153 |
tm_wday := 0;
|
154 |
tm_yday := 0;
|
155 |
tm_isdst := 0;
|
156 |
end;
|
157 |
end;
|
158 |
|
159 |
|
160 |
end.
|