Skip to content

Commit

Permalink
add pascal binding (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
thechampagne committed Oct 21, 2023
1 parent bc4cbda commit d15aa0c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,39 @@ void main()
}
```

#### [Pascal](https://en.wikipedia.org/wiki/Pascal_(programming_language))
> Third party binding: [thechampagne/zip-pascal](https://github.com/thechampagne/zip-pascal)
```pas
program main;
{$linklib c}
{$linklib zip}
uses ctypes;
function zip_open(zipname:Pchar; level:longint; mode:char):pointer;cdecl;external;
procedure zip_close(zip:pointer);cdecl;external;
function zip_entry_open(zip:pointer; entryname:Pchar):longint;cdecl;external;
function zip_entry_close(zip:pointer):longint;cdecl;external;
function zip_entry_write(zip:pointer; buf:pointer; bufsize:csize_t):longint;cdecl;external;
const
content: Pchar = 'test content';
var
zip : pointer;
begin
zip := zip_open('/tmp/pascal.zip', 6, 'w');
zip_entry_open(zip, 'test');
zip_entry_write(zip, content, strlen(content));
zip_entry_close(zip);
zip_close(zip);
end.
```

### Check out more cool projects which use this library

* [Filament](https://github.com/google/filament): Filament is a real-time physically based rendering engine for Android, iOS, Linux, macOS, Windows, and WebGL. It is designed to be as small as possible and as efficient as possible on Android.
Expand Down

0 comments on commit d15aa0c

Please sign in to comment.