-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathssl_buffer.pas
45 lines (37 loc) · 1.65 KB
/
ssl_buffer.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{}
unit ssl_buffer;
interface
uses ssl_types;
var
BUF_MEM_new: function: PBUF_MEM; cdecl = nil;
BUF_MEM_free: procedure(a: PBUF_MEM); cdecl = nil;
BUF_MEM_grow: function(str: PBUF_MEM; len: TC_SIZE_T): TC_INT; cdecl = nil;
BUF_MEM_grow_clean: function(str: PBUF_MEM; len: TC_SIZE_T): TC_INT; cdecl = nil;
BUF_strdup: function(str: PAnsiChar): PAnsiChar; cdecl = nil;
BUF_strndup: function(str: PAnsiChar; siz: TC_SIZE_T): PAnsiChar; cdecl = nil;
BUF_memdup: function(data: Pointer; siz: TC_SIZE_T): Pointer; cdecl = nil;
BUF_reverse: procedure(_out: PAnsiChar; _in: PAnsiChar; siz: TC_SIZE_T); cdecl = nil;
BUF_strlcpy: function(dst: PAnsiChar; src: PAnsiChar; siz: TC_SIZE_T): TC_SIZE_T; cdecl = nil;
BUF_strlcat: function(dst: PAnsiChar; src: PAnsiChar; siz: TC_SIZE_T): TC_SIZE_T; cdecl = nil;
ERR_load_BUF_strings: Procedure; cdecl = nil;
procedure SSL_InitBuffer;
implementation
uses ssl_lib;
procedure SSL_InitBuffer;
begin
if @BUF_MEM_new = nil then
begin
@BUF_MEM_new:= LoadFunctionCLib('BUF_MEM_new');
@BUF_MEM_free:= LoadFunctionCLib('BUF_MEM_free');
@BUF_MEM_grow:= LoadFunctionCLib('BUF_MEM_grow');
@BUF_MEM_grow_clean:= LoadFunctionCLib('BUF_MEM_grow_clean');
@BUF_strdup:= LoadFunctionCLib('BUF_strdup');
@BUF_strndup:= LoadFunctionCLib('BUF_strndup');
@BUF_memdup:= LoadFunctionCLib('BUF_memdup');
@BUF_reverse:= LoadFunctionCLib('BUF_reverse');
@BUF_strlcpy:= LoadFunctionCLib('BUF_strlcpy');
@BUF_strlcat:= LoadFunctionCLib('BUF_strlcat');
@ERR_load_BUF_strings:= LoadFunctionCLib('ERR_load_BUF_strings');
end;
end;
end.