home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Source / Rtl / Win / NS36FIX.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  5.5 KB  |  118 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Borland Delphi Runtime Library                  }
  5. {       This module contains only the prototypes for    }
  6. {       the Netscape 3.5 Internet Server API used in    }
  7. {       the ISAPITER.DLL                                }
  8. {                                                       }
  9. {       Note: To recompile ISAPITER.DLL for Netscape    }
  10. {       3.5 servers you must conditionally define       }
  11. {       NETSCAPE35.                                     }
  12. {                                                       }
  13. {       Copyright (C) 1997,99 Inprise Corporation       }
  14. {                                                       }
  15. {*******************************************************}
  16.  
  17. unit NS36Fix;
  18.  
  19. {$WEAKPACKAGEUNIT}
  20.  
  21. interface
  22.  
  23. uses Windows, NSAPI;
  24.  
  25. const
  26.   nshttp = 'ns-httpd36.dll';
  27.  
  28. function system_version: PChar; cdecl;
  29. procedure system_free(ptr: Pointer); cdecl;
  30. procedure magnus_atrestart(fn: TMagnusAtRestart; data: Pointer); cdecl;
  31. function system_fopenWA(path: PChar): SYS_FILE; cdecl;
  32. procedure system_fclose(fd: SYS_FILE); cdecl;
  33. function system_fwrite_atomic(fd: SYS_FILE; buf: Pointer; sz: Integer): Integer; cdecl;
  34. function param_free(pp: PPbParam): Integer; cdecl;
  35. function pblock_create(n: Integer): PPblock; cdecl;
  36. procedure pblock_free(pb: PPblock); cdecl;
  37. function pblock_findval(name: PChar; pb: PPblock): PChar; cdecl;
  38. function pblock_nvinsert(name, value: PChar; pb: PPblock): PPbParam; cdecl;
  39. function pblock_nninsert(name: PChar; value: Integer; pb: PPblock): PPbParam; cdecl;
  40. function pblock_pblock2str(pb: PPblock; str: PChar): PChar; cdecl;
  41. procedure pblock_copy(src, dst: PPblock); cdecl;
  42. function _pblock_fr(name: PChar; pb: PPblock; remove: BOOL): PPbParam; cdecl;
  43. function net_read(sd: SYS_NETFD; buf: PChar; sz, timeout: Integer): Integer; cdecl;
  44. function net_write(sd: SYS_NETFD; buf: PChar; sz: Integer): Integer; cdecl;
  45. function net_isalive(sd: SYS_NETFD): BOOL; cdecl;
  46. function session_dns_lookup(sn: PSession; verify: BOOL): PChar; cdecl;
  47. function shexp_casecmp(str, exp: PChar): Integer; cdecl;
  48. function util_env_create(env: PPCharArray; n: Integer; var pos: Integer): PPCharArray; cdecl;
  49. function util_env_str(name, value: PChar): PChar; cdecl;
  50. procedure util_env_free(env: PPCharArray); cdecl;
  51. function util_env_find(env: PPCharArray; name: PChar): PChar; cdecl;
  52. function objset_findbyname(name: PChar; ign, os: PHttpdObjSet): PHttpdObject; cdecl;
  53. function conf_getglobals: PConfGlobalVars; cdecl;
  54. function request_translate_uri(uri: PChar; sn: PSession): PChar; cdecl;
  55. function http_scan_headers(sn: PSession; buf: PNetBuf; t: PChar;
  56.   headers: PPblock): Integer; cdecl;
  57. function http_start_response(sn: PSession; rq: PRequest): Integer; cdecl;
  58. function http_hdrs2env(pb: PPblock): PPCharArray; cdecl;
  59. procedure http_status(sn: PSession; rq: PRequest; n: Integer; r: PChar); cdecl;
  60.  
  61. function pblock_remove(name: PChar; pb: PPblock): PPbParam;
  62. function session_dns(sn: PSession): PChar;
  63. function NSstr2String(nsStr: PChar): string;
  64.  
  65. implementation
  66.  
  67. function pblock_remove(name: PChar; pb: PPblock): PPbParam;
  68. begin
  69.   Result := _pblock_fr(name,pb,True);
  70. end;
  71.  
  72. function session_dns(sn: PSession): PChar;
  73. begin
  74.   Result := session_dns_lookup(sn, False);
  75. end;
  76.  
  77. function NSstr2String(nsStr: PChar): string;
  78. begin
  79.   Result := nsStr;
  80.   system_free(nsStr);
  81. end;
  82.  
  83. { imports }
  84.  
  85. function system_version; external nshttp name 'INTsystem_version';
  86. procedure system_free; external nshttp name 'INTsystem_free';
  87. procedure magnus_atrestart; external nshttp name 'INTmagnus_atrestart';
  88. function system_fopenWA; external nshttp name 'INTsystem_fopenWA';
  89. procedure system_fclose; external nshttp name 'INTsystem_fclose';
  90. function system_fwrite_atomic; external nshttp name 'INTsystem_fwrite_atomic';
  91. function param_free; external nshttp name 'INTparam_free';
  92. function pblock_create; external nshttp name 'INTpblock_create';
  93. procedure pblock_free; external nshttp name 'INTpblock_free';
  94. function pblock_findval; external nshttp name 'INTpblock_findval';
  95. function pblock_nvinsert; external nshttp name 'INTpblock_nvinsert';
  96. function pblock_nninsert; external nshttp name 'INTpblock_nninsert';
  97. function pblock_pblock2str; external nshttp name 'INTpblock_pblock2str';
  98. procedure pblock_copy; external nshttp name 'INTpblock_copy';
  99. function _pblock_fr; external nshttp name 'INTpblock_fr';
  100. function net_read; external nshttp name 'INTnet_read';
  101. function net_write; external nshttp name 'INTnet_write';
  102. function net_isalive; external nshttp name 'INTnet_isalive';
  103. function session_dns_lookup; external nshttp name 'INTsession_dns_lookup';
  104. function shexp_casecmp; external nshttp name 'INTshexp_casecmp';
  105. function util_env_create; external nshttp name 'INTutil_env_create';
  106. function util_env_str; external nshttp name 'INTutil_env_str';
  107. procedure util_env_free; external nshttp name 'INTutil_env_free';
  108. function util_env_find; external nshttp name 'INTutil_env_find';
  109. function objset_findbyname; external nshttp name 'INTobjset_findbyname';
  110. function conf_getglobals; external nshttp name 'INTconf_getglobals';
  111. function request_translate_uri; external nshttp name 'INTservact_translate_uri';
  112. function http_scan_headers; external nshttp name 'INThttp_scan_headers';
  113. function http_start_response; external nshttp name 'INThttp_start_response';
  114. function http_hdrs2env; external nshttp name 'INThttp_hdrs2env';
  115. procedure http_status; external nshttp name 'INThttp_status';
  116.  
  117. end.
  118.