2
0

mysql4_com.pp 4.7 KB

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