Update of /cvsroot/instantobjects/Source/Brokers/XML
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv436/Source/Brokers/XML
Modified Files:
InstantXML.pas InstantXMLConnectionDefEdit.pas
Log Message:
Porting to Delphi 5
Index: InstantXML.pas
===================================================================
RCS file: /cvsroot/instantobjects/Source/Brokers/XML/InstantXML.pas,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** InstantXML.pas 1 Oct 2004 16:09:13 -0000 1.2
--- InstantXML.pas 10 Feb 2005 23:06:25 -0000 1.3
***************
*** 32,35 ****
--- 32,36 ----
uses
+ {$IFDEF VER130}{$DEFINE MSWINDOWS}FileCtrl,{$ENDIF}
Classes, DB, InstantPersistence, InstantCommand, Contnrs;
***************
*** 39,43 ****
DOT_XML_EXT = '.'+XML_EXT;
XML_WILDCARD = '*'+DOT_XML_EXT;
!
type
TXMLFileFormat = (xffUtf8, xffUtf8BOT, xffIso);
--- 40,45 ----
DOT_XML_EXT = '.'+XML_EXT;
XML_WILDCARD = '*'+DOT_XML_EXT;
! {$IFDEF VER130}PathDelim = '\';{$ENDIF}
!
type
TXMLFileFormat = (xffUtf8, xffUtf8BOT, xffIso);
***************
*** 225,229 ****
function GetFileVersion(const FileName : string) : Integer; forward;
-
procedure Register;
begin
--- 227,230 ----
***************
*** 232,243 ****
end;
!
! // note by marcoc: there is already an IncludeTrailingPathDelimiter
! {function CheckPathDelim(const Path : string) : string;
begin
! Result := Path;
! if Copy(Path,length(Path),1) <> pathDelim then
! Result := Result + PathDelim;
! end;}
procedure GlobalLoadFileList(const Path: string; FileList : TStringList);
--- 233,242 ----
end;
! {$IFDEF VER130}
! function IncludeTrailingPathDelimiter(const S : string) : string;
begin
! Result := IncludeTrailingBackSlash(S);
! end;
! {$ENDIF}
procedure GlobalLoadFileList(const Path: string; FileList : TStringList);
***************
*** 921,926 ****
--- 920,929 ----
strStream.Write(XMLHEADER, Length(XMLHEADER));
InstantWriteObject(strStream, sfXML, AObject);
+ {$IFNDEF VER130}
if FXMLFileFormat in [xffUtf8, xffUtf8Bot] then
strUtf8 := AnsiToUtf8 (strStream.DataString);
+ {$ELSE}
+ strUtf8 := strStream.DataString;
+ {$ENDIF}
finally
strStream.Free;
***************
*** 929,934 ****
fileStream := TFileStream.Create(FileName, fmCreate);
try
- // if FXMLFileFormat = xffUtf8Bot then
- // add BOT
Result := fileStream.Write (strUtf8[1], Length (strUtf8)) <> 0;
finally
--- 932,935 ----
***************
*** 967,972 ****
--- 968,975 ----
end;
+ {$IFNDEF VER130}
if FXMLFileFormat in [xffUtf8, xffUtf8Bot] then
strUtf8 := Utf8ToAnsi (strUtf8);
+ {$ENDIF}
strstream := TStringStream.Create (strUtf8);
Index: InstantXMLConnectionDefEdit.pas
===================================================================
RCS file: /cvsroot/instantobjects/Source/Brokers/XML/InstantXMLConnectionDefEdit.pas,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** InstantXMLConnectionDefEdit.pas 20 Jul 2004 16:39:09 -0000 1.1
--- InstantXMLConnectionDefEdit.pas 10 Feb 2005 23:06:26 -0000 1.2
***************
*** 31,34 ****
--- 31,36 ----
interface
+ {$IFDEF VER130}{$DEFINE MSWINDOWS}{$ENDIF}
+
uses
Classes, InstantXML,
|