Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
```
# Build artifacts
# Compiled and build artifacts
*.o
*.obj
*.a
*.so
*.dll
*.exe
*.dll
*.so
*.a
*.out
build/
dist/
target/

# Dependencies
3rdparty/
venv/
.venv/
__pycache__/
.mypy_cache/
.pytest_cache/
.gradle/
node_modules/

# Logs and temp files
*.log
*.tmp
*.swp
*.swo

# Environment
.env
Expand All @@ -24,7 +35,12 @@
.vscode/
.idea/

# OS specific
# Coverage
coverage/
htmlcov/
.coverage

# System files
.DS_Store
Thumbs.db
```
32 changes: 16 additions & 16 deletions src/APIcfBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef APIcfBaseH
#define APIcfBaseH

#include <System.Classes.hpp>
#include "vcl_utils.h"
#include <map>
#include <set>

Expand Down Expand Up @@ -110,7 +110,7 @@ class v8file

TCriticalSection *Lock;

TStream* data;
vcl_utils::TStream* data;

v8catalog* parent;

Expand Down Expand Up @@ -159,9 +159,9 @@ class v8file
// перезапись целиком
int Write(const void* Buffer, int Length);
// дозапись/перезапись частично
int Write(TStream* Stream, int Start, int Length);
int Write(vcl_utils::TStream* Stream, int Start, int Length);
// перезапись целиком
int Write(TStream* Stream);
int Write(vcl_utils::TStream* Stream);

String GetFileName();
String GetFullName();
Expand All @@ -178,16 +178,16 @@ class v8file
void Close();

// перезапись целиком и закрытие файла (для экономии памяти не используется data файла)
int WriteAndClose(TStream* Stream, int Length = -1);
int WriteAndClose(vcl_utils::TStream* Stream, int Length = -1);

void GetTimeCreate(FILETIME* ft);
void GetTimeModify(FILETIME* ft);
void SetTimeCreate(FILETIME* ft);
void SetTimeModify(FILETIME* ft);

void SaveToFile(const String& FileName);
void SaveToStream(TStream* stream);
//TStream* get_data();
void SaveToStream(vcl_utils::TStream* stream);
//vcl_utils::TStream* get_data();

TV8FileStream* get_stream(bool own = false);

Expand All @@ -204,8 +204,8 @@ class v8catalog

v8file* file; // файл, которым является каталог. Для корневого каталога NULL

TStream* data; // поток каталога. Если file не NULL (каталог не корневой), совпадает с file->data
TStream* cfu; // поток файла cfu. Существует только при is_cfu == true
vcl_utils::TStream* data; // поток каталога. Если file не NULL (каталог не корневой), совпадает с file->data
vcl_utils::TStream* cfu; // поток файла cfu. Существует только при is_cfu == true

void initialize(int Offset = 0);

Expand Down Expand Up @@ -236,12 +236,12 @@ class v8catalog
void free_block(int start);

// возвращает адрес начала блока
int write_block(TStream* block, int start, bool use_page_size, int len = -1);
int write_block(vcl_utils::TStream* block, int start, bool use_page_size, int len = -1);

// возвращает адрес начала блока
int write_datablock(TStream* block, int start, bool _zipped = false, int len = -1);
int write_datablock(vcl_utils::TStream* block, int start, bool _zipped = false, int len = -1);

TStream* read_datablock(int start, int offset = 0);
vcl_utils::TStream* read_datablock(int start, int offset = 0);

int get_nextblock(int start);

Expand All @@ -254,7 +254,7 @@ class v8catalog
v8catalog(v8file* f); // создать каталог из файла
v8catalog(String name); // создать каталог из физического файла (cf, epf, erf, hbk, cfu)
v8catalog(String name, bool _zipped); // создать каталог из физического файла (cf, epf, erf, hbk, cfu)
v8catalog(TStream* stream, bool _zipped, bool leave_stream = false); // создать каталог из потока
v8catalog(vcl_utils::TStream* stream, bool _zipped, bool leave_stream = false); // создать каталог из потока

~v8catalog();

Expand All @@ -280,7 +280,7 @@ class v8catalog
};

//===========================================================================
class TV8FileStream : public TStream
class TV8FileStream : public vcl_utils::TStream
{
protected:
v8file* file;
Expand All @@ -296,8 +296,8 @@ class TV8FileStream : public TStream
virtual int Write(const void *Buffer, int Count);
virtual int Write(const ByteArr Buffer, int Offset, int Count);

virtual int Seek(int Offset, System::Word Origin);
virtual __int64 Seek(const __int64 Offset, TSeekOrigin Origin);
virtual int Seek(int Offset, int Origin); // Заменено System::Word на int
virtual __int64 Seek(const __int64 Offset, int Origin); // Заменено TSeekOrigin на int
};

#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef Base64H
#define Base64H

#include <System.Classes.hpp>
#include "vcl_utils.h"
//---------------------------------------------------------------------------

void base64_encode(TStream* infile, TStream* outfile, int linesize);
Expand Down
2 changes: 1 addition & 1 deletion src/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ String tohex64(__int64 n)
}

//---------------------------------------------------------------------------
String hexstring(TStream* str)
String hexstring(vcl_utils::TStream* str)
{
int i;
String s = L"";
Expand Down
4 changes: 2 additions & 2 deletions src/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//#include <vcl.h>
#include <vector>
#include "APIcfBase.h"
#include <System.Classes.hpp>
#include "vcl_utils.h"

//---------------------------------------------------------------------------
void time1CD_to_FileTime(FILETIME* ft, unsigned char* time1CD);
Expand All @@ -25,7 +25,7 @@ String date_to_string(const unsigned char* bytedate);
String tohex(int n);
String tohex64(__int64 n);
String hexstring(char* buf, int n);
String hexstring(TStream* str);
String hexstring(vcl_utils::TStream* str);
//---------------------------------------------------------------------------

String GetNameFromTreePath(v8catalog *cf, String &guid_md, const std::vector<int>& path);
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef ConfigStorageH
#define ConfigStorageH

#include <System.Classes.hpp>
#include "vcl_utils.h"
#include <vector>
#include <map>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion src/MainUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <unordered_map>
#include <unordered_set>

#include <System.SysUtils.hpp>
#include "vcl_utils.h"

#include "V8File.h"
#include "ApicfBase.h"
Expand Down
2 changes: 1 addition & 1 deletion src/MainUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef MainUnitH
#define MainUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include "vcl_utils.h"
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/MessageRegistration.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef MessageRegistrationH
#define MessageRegistrationH

#include <System.Classes.hpp>
#include "vcl_utils.h"
//#include <vcl.h>
#pragma hdrstop

Expand Down
3 changes: 1 addition & 2 deletions src/MetaObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

// Для совместимости с C++ Builder VCL
#ifdef __BORLANDC__
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include "vcl_utils.h"
#endif

// Forward declarations
Expand Down
4 changes: 2 additions & 2 deletions src/ModuleTextStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#ifndef ModuleTextStorageH
#define ModuleTextStorageH

#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include "vcl_utils.h"
#include "vcl_utils.h"

#include "APIcfBase.h"
#include "Parse_tree.h"
Expand Down
3 changes: 1 addition & 2 deletions src/Property.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

// Для совместимости с C++ Builder VCL
#ifdef __BORLANDC__
#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include "vcl_utils.h"
#include <Vcl.Graphics.hpp>
#endif

Expand Down
3 changes: 1 addition & 2 deletions src/SynHighlighter1C.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#define SynHighlighter1CH
//---------------------------------------------------------------------------

#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include "vcl_utils.h"
#include <Vcl.Graphics.hpp>
#include "SynEditHighlighter.hpp"

Expand Down
10 changes: 5 additions & 5 deletions src/TempStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef TempStreamH
#define TempStreamH

#include <System.Classes.hpp>
#include "vcl_utils.h"

class TTempStreamStaticInit
{
Expand All @@ -14,13 +14,13 @@ class TTempStreamStaticInit


//---------------------------------------------------------------------------
class TTempStream : public THandleStream
class TTempStream : public vcl_utils::TStream
{
public:
static String tempcat;
static String tempname;
static std::wstring tempcat;
static std::wstring tempname;
static long tempno;
static String gettempname();
static std::wstring gettempname();

TTempStream();
virtual ~TTempStream();
Expand Down
6 changes: 3 additions & 3 deletions src/UZLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define UZLibH


#include <System.Classes.hpp>
#include "vcl_utils.h"
#include "zlib.h"

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -116,8 +116,8 @@ class ZInflateStream : ZStreamBase
};


void ZInflateStream(TStream* src, TStream* dst);
void ZDeflateStream(TStream* src, TStream* dst);
void ZInflateStream(vcl_utils::TStream* src, vcl_utils::TStream* dst);
void ZDeflateStream(vcl_utils::TStream* src, vcl_utils::TStream* dst);

int inf(FILE *source, FILE *dest);
int def(FILE *source, FILE *dest, int level);
Expand Down
2 changes: 1 addition & 1 deletion src/v8reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <signal.h>

#include <System.IOUtils.hpp>
#include <System.SysUtils.hpp>
#include "vcl_utils.h"
//---------------------------------------------------------------------------
USEFORM("MainUnit.cpp", MainForm);
//---------------------------------------------------------------------------
Expand Down
Loading