News:

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

Main Menu

Recent posts

#21
User contributions / Re: Github-kuba miniz for Pell...
Last post by Vortex - April 22, 2026, 11:11:11 PM
Source code reviewed to remove some unnecessary struct statements :

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

int __cdecl main(void)
{
    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;
}
#22
Beginner questions / Re: same code pelles c and gcc...
Last post by mid-kid - April 22, 2026, 09:50:18 PM
I've looked into the standard's explanation quoted above with a friend, and we came up with the following:

Quotestdc_first_leaning_one finds the first 1 bit, searching from most significant to least significant. The index of this bit is returned such that the most significant bit is 1 and the least significant bit is w, where w is the amount of bits in the data type. 0 is returned when no match was found.

The key to understanding the definition in the standard, is to realize that the term "most significant index" refers to a way of indexing the number and not a specific index.

I hope this helps solve the conundrum  :D
#23
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 09:11:21 PM
Thanks Timo,

I appreciate, very much, all of your help!

John Z
#24
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 07:52:44 PM
LibreOffice 7.1
MS Office 2010
#25
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 07:43:12 PM
Thanks Timo,

Quote from: TimoVJL on April 22, 2026, 07:30:25 PMLibre Office opens a that A_BaseFile_imp_T_32bit.ods normally.

Can you let me know what LibreOffice version you have?

Thanks,
John Z

P.S. for excel you must right click on the file and choose Open With Excel.
#26
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 07:30:25 PM
Libre Office opens a that A_BaseFile_imp_T_32bit.ods normally.

#27
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - April 22, 2026, 05:21:38 PM
Oh yes, I did try using the ('w' - 64) attribute to open as 32 bit with my version.
Convention:

    Use 'w' - 64 (integer value 55) when calling zip_open, zip_stream_open, etc., to select write mode without enabling ZIP64.
    The same pattern applies to other modes: use 'r' - 64, 'a' - 64, 'd' - 64 to pick the non-ZIP64 variants.

I will try that again, with your version, and post.

Thanks,

John Z

Update: Created with 'w' - 64  (but I'm not sure how to really tell if 32bit or 64bit ZIP)  using 7z Info does not show as 64 bit while prior version does, so this must be 32 bit.  It has the same symptom.
#28
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - April 22, 2026, 05:10:11 PM
That A_BaseFile_imp_T_311T.ods is 64bit zip, perhaps a reason why it isn't accepted.
#29
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.
#30
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