Subversion Repositories fastphp

Rev

Rev 44 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 44 Rev 70
Line 53... Line 53...
53
 
53
 
54
uses
54
uses
55
  StrUtils, Windows;
55
  StrUtils, Windows;
56
 
56
 
57
const
57
const
-
 
58
  MAGIC_V100  = 'FAST100!';
58
  LEN_MAGIC   = 8;
59
  UTF8_BOM    = '';
59
  LEN_ICON    = 4;
60
  LEN_ICON    = 4;
60
  LEN_LINENO  = 8;
61
  LEN_LINENO  = 8;
61
  LEN_DESCLEN = 4;
62
  LEN_DESCLEN = 4;
62
 
63
 
63
{$EXTERNALSYM LockWindowUpdate}
64
{$EXTERNALSYM LockWindowUpdate}
Line 115... Line 116...
115
    end;
116
    end;
116
    {$ENDREGION}
117
    {$ENDREGION}
117
 
118
 
118
    {$REGION 'Update the treeview'}
119
    {$REGION 'Update the treeview'}
119
    Self.Items.Clear;
120
    Self.Items.Clear;
-
 
121
 
-
 
122
    {$REGION 'Remove UTF8-BOMs'}
-
 
123
    repeat
-
 
124
      magic := Read(ptr, Length(UTF8_BOM));
-
 
125
    until magic <> UTF8_BOM;
-
 
126
    ptr := ptr - Length(UTF8_BOM);
-
 
127
    {$ENDREGION}
-
 
128
 
120
    magic := Read(ptr, LEN_MAGIC);
129
    magic := Read(ptr, length(MAGIC_V100));
-
 
130
 
121
    if magic = 'FAST100!' then
131
    if magic = MAGIC_V100 then
-
 
132
    begin
122
      Rec100(nil, ptr)
133
      Rec100(nil, ptr)
-
 
134
    end
123
    else
135
    else
-
 
136
    begin
124
      raise EFastNodeException.CreateFmt('FastNode version "%s" not supported.', [magic]);
137
      raise EFastNodeException.CreateFmt('FastNode version "%s" not supported.', [magic]);
-
 
138
    end;
125
    {$ENDREGION}
139
    {$ENDREGION}
126
 
140
 
127
    {$REGION 'Recover the previous current state (selected and expanded flags)'}
141
    {$REGION 'Recover the previous current state (selected and expanded flags)'}
128
    for i := 0 to Self.Items.Count-1 do
142
    for i := 0 to Self.Items.Count-1 do
129
    begin
143
    begin