|
Cross-Platform C Library Integration
ภาพรวม
HotPDF ใช้ HPDFCLibs.pas เป็น bridge ฝั่ง Pascal ระหว่าง Delphi กับ C object files ที่ link แบบ static และใช้โดย HPDFZLib.pas, HPDFJpeg.pas, และ HPDFTiff.pas unit นี้ expose runtime symbols ที่ libraries เหล่านั้นต้องการ พร้อมรักษา Pascal declaration layer เดียวกันสำหรับทั้ง Win32 และ Win64 builds
Key Features
- shared runtime bridge สำหรับ zlib-ng ใน zlib-compatible mode, zlib-ng 64-bit runtime SIMD dispatch, libjpeg-turbo 3.1.90 พร้อม NASM SIMD objects, และ libtiff 4.7.1
- Memory, stdio, string/character, and selected math/runtime helper coverage
- 32-byte aligned malloc, free, realloc, and calloc bridging for SIMD-friendly native buffers
- ความเข้ากันได้ของ Win32 กับ zlib-ng OMF objects ที่ build ด้วย bcc32c และ JPEG/TIFF OMF objects ที่ build ด้วย bcc32 จาก
Lib\thirdparty\Win32
- ความเข้ากันได้ของ Win64 กับ COFF64 obj files จาก
Lib\thirdparty\Win64 และ zlib-ng COFF objects จาก Lib\thirdparty\Win64x
- helper types ขนาด pointer และ Pascal stubs สำหรับ symbols ที่ Delphi linker import โดยตรงไม่ได้
High-Performance JPEG Backend
standard JPEG workflows backed โดย libjpeg-turbo 3.1.90 ผ่าน classic libjpeg-compatible API ที่ HPDFJpeg.pas expose object builds สำหรับ Win32, Win64 และ Win64x มี NASM SIMD acceleration objects ที่เกี่ยวข้อง และ bundled object set เดียวกันยัง available ให้ TIFF integration layer สำหรับ JPEG-compressed TIFF handling
Zlib-ng Bridge Notes
Win64 Flate image streams ใช้ C bridge ขนาดเล็กรอบ zlib-ng one-shot compression bridge นี้เก็บ native zlib-ng length types ไว้ใน C ขณะรักษา Pascal-facing 32-bit buffer lengths และ maximum compression behavior ของ HotPDF
Win64x และ diagnostic MSVC Win64 zlib-ng object builds มี runtime-dispatched SSE2, SSSE3, SSE4.1, SSE4.2, PCLMULQDQ และ AVX2 implementations พร้อม generic fallbacks Win32 ใช้ generic zlib-ng OMF objects เพื่อคงความเข้ากันได้กับ bcc32c ส่วน Win32 JPEG/TIFF path ยังคงอยู่บน classic bcc32 OMF objects
กลุ่ม function ที่รองรับ
- Memory Management: malloc, free, realloc, calloc with 32-byte aligned allocation
- File and Stream Operations: fopen, fclose, fputc, fread, fwrite, fflush, ferror
- String and Character Functions: strcpy, sprintf, memcpy, memmove, memset, tolower, toupper, towlower, towupper, getenv, atoi
- Runtime Helpers: ftol, setjmp, log, snprintf, memcmp
Architecture Support
- Win32: Pascal wrappers และ WinAPI-backed helpers ที่ตรงกับ bcc32c และ bcc32 OMF objects ที่ link โดย Delphi Win32 versions ที่รองรับทั้งหมด
- Win64: msvcrt.dll imports plus small helper stubs required by the MSVC-generated COFF64 objects
- Common Types: PtrInt and PtrUInt keep pointer-sized declarations aligned across both targets
See Also
|