News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#31
Bug reports / Re: Some fonts are missing fro...
Last post by Pelle - April 22, 2026, 03:33:31 PM
OK, cool. The fix will be in the next update.
#32
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 03:18:32 PM
HI Timo,

Sure here are two files _good is with the older version, _311T is with the current version.
The headers are different - The compressed data itself for the files looks fairly much the same on a quick check.  The file sizes are different too when looking at the actual. Both versions open in 7z without complaint.

Both files used the same source data and same program except swapping zip procs -
good file is 3,703 bytes
not so good file is 3,938 bytes

John Z

LibreOffice 25.8
Excel 2010
#33
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 02:45:00 PM
John Z,
can you give a small example file for tests with Libre Office and MS Office ?
#34
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 02:07:32 PM
Thanks Timo, Vortex,

Well surprising results.  I built your version.  Very good I had not thought to use __MINGW32__ so my build ended up with more code 'customizations'. 

However, when I used your version to create an ODF spreadsheet it ended up with the same exact issue!  Note that I have been using using an older version of miniz to do the same thing successfully, so any issue is only related to the new miniz.

Just like with my mod of miniz, both ODF and Excel indicate a problem which they both can  'repair' and all spreadsheet data is there. Whereas Explorer ZIP, and 7z have no issue unzipping the file, and show no error report.

So there is some sort of (minor repairable) incompatibility with ODF/Excel expectations when using the newest 3.1.1 64 bit capable version.  I did try it with the 32 bit fileopen ('w'-64) and it was the same.

Looks like I'll be sticking with the old perfectly working version for now...at least until I can spend time to figure out the difference.

John Z
#35
User contributions / Re: Github-kuba miniz for Pell...
Last post by Vortex - April 22, 2026, 11:05:10 AM
Hi Timo,

Great work, thanks. Based on your sample, here is a modified version creating the archive test.zip and adding the file sample.docx

#include <stdlib.h>
//#include <zip.h>
#pragma comment(lib, "zip.lib")
//#include "zip_stdcall.h"
#define ZIP_DEFAULT_COMPRESSION_LEVEL 6
typedef struct zip_t zip_t;
extern struct zip_t __stdcall *zip_open(const char *zipname, int level, char mode);
extern int __stdcall zip_entry_open(struct zip_t *zip, const char *entryname);
extern int __stdcall zip_entry_fwrite(struct zip_t *zip, const char *filename);
extern int __stdcall zip_entry_close(struct zip_t *zip);
extern int __stdcall zip_close(struct zip_t *zip);

int __cdecl main(void)
{
    struct zip_t *zip = zip_open("test.zip", ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
    {
        zip_entry_open(zip, "sample.docx");
        {
            zip_entry_fwrite(zip, "sample.docx");
        }
        zip_entry_close(zip);
    }
    zip_close(zip);
    return 0;
}
#36
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 09:29:40 AM
A simple example:#include <stdlib.h>
//#include <zip.h>
#pragma comment(lib, "zip.lib")
//#include "zip_stdcall.h"
#define ZIP_DEFAULT_COMPRESSION_LEVEL 6
typedef struct zip_t zip_t;
extern struct zip_t __stdcall *zip_open(const char *zipname, int level, char mode);
extern int __stdcall zip_entry_open(struct zip_t *zip, const char *entryname);
extern int __stdcall zip_entry_fwrite(struct zip_t *zip, const char *filename);
extern int __stdcall zip_entry_close(struct zip_t *zip);
extern int __stdcall zip_close(struct zip_t *zip);

int __cdecl main(void)
{
struct zip_t *zip = zip_open("meta.zip", ZIP_DEFAULT_COMPRESSION_LEVEL, 'w');
{
    zip_entry_open(zip, "meta.xml");
    {
        zip_entry_fwrite(zip, "meta.xml");
    }
    zip_entry_close(zip);
}
zip_close(zip);
return 0;
}
#37
Bug reports / Re: Some fonts are missing fro...
Last post by ander_cc - April 22, 2026, 04:37:38 AM
Thank you very much Pelle! It is a efficient way.
#38
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 21, 2026, 09:06:54 PM
Thanks Timo,Vortex,

Yes I had that one and several other changes similar to what I did for 3.0.2
It is creating a zip file that can be opened with both Windows Explorer and 7z.

However there is something amiss.  Both LibreOffice Calc and Excel complain of a corrupted zip, but both will 'repair' it and open with all the data intact.

So it seems like something not quite right in the header, or other housekeeping part.  Checking the actual zipped files from an 'old' version and in the new 3.1.1 version shows the files themselves are identical.

Maybe I'll just start over - But I'll try your work first  :)

Thanks,
John Z


#39
Feature requests / Re: Enhanced editor suggestion...
Last post by Pelle - April 21, 2026, 09:04:13 PM
Just a few notes:
1) Workspace files was added long after project files, limiting the available options.
2) All 169 (currently) sub-projects of Pelles C is in the same workspace file. Not the biggest project in the world, but not "small". Once all the projects are set up, it's mostly a matter of switching between "Debug" and "Release" builds, which is already available for a workspace.

As always, I guess it boils down to what you are used to and what you expect...
#40
User contributions / Re: Github-kuba miniz for Pell...
Last post by Vortex - April 21, 2026, 09:00:14 PM
Hi Timo,

Great work, many thanks.