~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to packages/base/mysql/mysql4_com.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
unit mysql4_com;
 
2
interface
 
3
 
 
4
{
 
5
  Automatically converted by H2Pas 0.99.15 from mysql_com.ph
 
6
  The following command line parameters were used:
 
7
    -p
 
8
    -D
 
9
    -l
 
10
    mysqlclient
 
11
    mysql_com.ph
 
12
}
 
13
{$mode objfpc}{$H+}
 
14
{$MACRO on}
 
15
 
 
16
{$PACKRECORDS C}
 
17
 
 
18
{$IFDEF Unix}
 
19
  {$DEFINE extdecl:=cdecl}
 
20
  const
 
21
    External_library = 'libmysqlclient.so';
 
22
{$ENDIF}
 
23
{$IFDEF Win32}
 
24
  {$DEFINE extdecl:=stdcall}
 
25
  const
 
26
    External_library = 'libmysql.dll';
 
27
{$ENDIF}
 
28
 
 
29
{ Pointers to basic pascal types, inserted by h2pas conversion program.}
 
30
Type
 
31
  PLongint  = ^Longint;
 
32
  PSmallInt = ^SmallInt;
 
33
  PByte     = ^Byte;
 
34
  PWord     = ^Word;
 
35
  PDWord    = ^DWord;
 
36
  PDouble   = ^Double;
 
37
 
 
38
{$i mysql4_comtypes.inc}
 
39
 
 
40
  { Copyright (C) 2000 MySQL AB
 
41
 
 
42
     This program is free software; you can redistribute it and/or modify
 
43
     it under the terms of the GNU General Public License as published by
 
44
     the Free Software Foundation; either version 2 of the License, or
 
45
     (at your option) any later version.
 
46
 
 
47
     This program is distributed in the hope that it will be useful,
 
48
     but WITHOUT ANY WARRANTY; without even the implied warranty of
 
49
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
50
     GNU General Public License for more details.
 
51
 
 
52
     You should have received a copy of the GNU General Public License
 
53
     along with this program; if not, write to the Free Software
 
54
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  }
 
55
 
 
56
 
 
57
  function my_net_init(net:PNET; vio:PVio):longint;extdecl;external External_library name 'my_net_init';
 
58
 
 
59
  procedure net_end(net:PNET);extdecl;external External_library name 'net_end';
 
60
 
 
61
  procedure net_clear(net:PNET);extdecl;external External_library name 'net_clear';
 
62
 
 
63
  function net_flush(net:PNET):longint;extdecl;external External_library name 'net_flush';
 
64
 
 
65
(* Const before type ignored *)
 
66
  function my_net_write(net:PNET; packet:Pchar; len:dword):longint;extdecl;external External_library name 'my_net_write';
 
67
 
 
68
(* Const before type ignored *)
 
69
  function net_write_command(net:PNET; command:byte; packet:Pchar; len:dword):longint;extdecl;external External_library name 'net_write_command';
 
70
 
 
71
(* Const before type ignored *)
 
72
  function net_real_write(net:PNET; packet:Pchar; len:dword):longint;extdecl;external External_library name 'net_real_write';
 
73
 
 
74
  function my_net_read(net:PNET):dword;extdecl;external External_library name 'my_net_read';
 
75
 
 
76
  { The following function is not meant for normal usage  }
 
77
  {
 
78
  struct sockaddr;
 
79
  int my_connect(my_socket s, const struct sockaddr  name, unsigned int namelen,
 
80
               unsigned int timeout);
 
81
   }
 
82
 
 
83
 
 
84
  procedure randominit(_para1:Prand_struct; seed1:dword; seed2:dword);extdecl;external External_library name 'randominit';
 
85
 
 
86
  function rnd(_para1:Prand_struct):double;extdecl;external External_library name 'rnd';
 
87
 
 
88
(* Const before type ignored *)
 
89
  procedure make_scrambled_password(_to:Pchar; password:Pchar);extdecl;external External_library name 'make_scrambled_password';
 
90
 
 
91
(* Const before type ignored *)
 
92
  procedure get_salt_from_password(res:Pdword; password:Pchar);extdecl;external External_library name 'get_salt_from_password';
 
93
 
 
94
  procedure make_password_from_salt(_to:Pchar; hash_res:Pdword);extdecl;external External_library name 'make_password_from_salt';
 
95
 
 
96
(* Const before type ignored *)
 
97
(* Const before type ignored *)
 
98
  function scramble(_to:Pchar; message:Pchar; password:Pchar; old_ver:my_bool):Pchar;extdecl;external External_library name 'scramble';
 
99
 
 
100
(* Const before type ignored *)
 
101
(* Const before type ignored *)
 
102
  function check_scramble(_para1:Pchar; message:Pchar; salt:Pdword; old_ver:my_bool):my_bool;extdecl;external External_library name 'check_scramble';
 
103
 
 
104
  function get_tty_password(opt_message:Pchar):Pchar;extdecl;external External_library name 'get_tty_password';
 
105
 
 
106
(* Const before type ignored *)
 
107
  procedure hash_password(result:Pdword; password:Pchar);extdecl;external External_library name 'hash_password';
 
108
 
 
109
  { Some other useful functions  }
 
110
  procedure my_init;extdecl;external External_library name 'my_init';
 
111
 
 
112
(* Const before type ignored *)
 
113
(* Const before type ignored *)
 
114
  procedure load_defaults(conf_file:Pchar; groups:PPchar; argc:Plongint; argv:PPPchar);extdecl;external External_library name 'load_defaults';
 
115
 
 
116
  function my_thread_init:my_bool;extdecl;external External_library name 'my_thread_init';
 
117
 
 
118
  procedure my_thread_end;extdecl;external External_library name 'my_thread_end';
 
119
 
 
120
 
 
121
function packet_error : longint;
 
122
 
 
123
  { For net_store_length  }
 
124
  { was #define dname def_expr }
 
125
  function NULL_LENGTH : dword;
 
126
 
 
127
 
 
128
implementation
 
129
 
 
130
// Next function also defined in mysql4_comdyn
 
131
  { was #define dname def_expr }
 
132
  function packet_error : longint;
 
133
      { return type might be wrong }
 
134
      begin
 
135
         packet_error:= not (dword(0));
 
136
      end;
 
137
 
 
138
// Next function also defined in mysql4_comdyn
 
139
  { was #define dname def_expr }
 
140
  function NULL_LENGTH : dword;
 
141
      begin
 
142
         NULL_LENGTH:=dword( not (0));
 
143
      end;
 
144
 
 
145
 
 
146
end.