News:

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

Main Menu

Recent posts

#11
User contributions / Re: Github-kuba miniz for Pell...
Last post by TimoVJL - Yesterday at 04:33:43 PM
You have to modify sources a bit ?
miniz.h line 5451
from
#ifdef _MSC_VER#if defined(_MSC_VER) && !defined(__POCC__)

zip.c line 42
#if defined(_MSC_VER) && !defined(__POCC__)
#12
User contributions / Re: Github-kuba miniz for Pell...
Last post by John Z - Yesterday at 03:24:20 PM
Has anyone gotten the newest release version 3.1.1 of Github-kuba miniz to build in Pelles C?

https://github.com/kuba--/zip

Has new features as well as 64bit capability.

John Z
#13
Bug reports / Re: Some fonts are missing fro...
Last post by John Z - Yesterday at 03:20:51 PM
Quote from: Pelle on Yesterday at 03:05:19 PMMaybe. I need to check things more - this part of the IDE hasn't changed for 10+ years, so...

I'm confused - If it is an IDE issue then why using the same IDE do I see the fonts?
Attached screen shot -

First thing to do is check check windows settings, personalization, fonts to see if it is there.  It is possible and likely that putting it into the manifest it appears to work because windows will find the closest match to a font if that font is missing, as I recall. And verified with a web search

"Yes, Windows automatically substitutes a missing font with a default font (usually Microsoft Sans Serif or Arial) when it encounters a document or application requiring a font not installed on the system. This process ensures text remains visible, though it may change the document's formatting, layout, and appearance.
Key details on Windows font substitution:

    Automatic Process: When a specified font is unavailable, Windows attempts to map the missing font to an available one based on internal registry settings."


John Z
#14
Bug reports / Re: Some fonts are missing fro...
Last post by Pelle - Yesterday at 03:05:19 PM
Thank you for the info!

Quote from: ander_cc on April 20, 2026, 10:02:34 AMI check the output of your code paste below.
I think you filter the fonts with "GB2312_CHARSET" ? Maybe add "ANSI_CHARSET" could fix it.
Maybe. I need to check things more - this part of the IDE hasn't changed for 10+ years, so...
#15
Expert questions / Re: Link error with minhook
Last post by ander_cc - Yesterday at 12:37:06 PM
You can compile it to static lib with pelles c. but do not add MinHook.def and MinHook.rc to project.
I try it and it works.

If you add MinHook.rc file can get follow error. I donot know why.
*** Error:   "D:\minihook\dll_resources\MinHook.rc" -Fo"D:\minihook\output\MinHook.res"


#16
Bug reports / Re: Maybe a optimization bug.
Last post by Vortex - April 20, 2026, 10:53:43 PM
The code below compiled as 32-bit application works fine :

#include <stdio.h>

int main(void)
{
    int i;
    int s=0;
    for (i=1;i<11;)
    {
s=s+i;
__asm inc i;
    }
    printf("i=%d , sum = %d\n",i,s);
    return 0;
}

i=11 , sum = 55
#17
Bug reports / Re: Maybe a optimization bug.
Last post by TimoVJL - April 20, 2026, 10:09:30 PM
Hi John Z, have a fun with Clang with limits with optimizations.
Optimizations for static code isn't so important and you know reasons for that.
#18
Bug reports / Re: Maybe a optimization bug.
Last post by John Z - April 20, 2026, 01:59:47 PM
Many variations can complicate the use of i enough that the optimizer does not affect i.

Both of these variations within the loop also 'work' to inhibit the optimization -
s = s + (i*i)/i;
and
s = s + ((i << 1) >> 1);

We can probably find more too, but I'm fairly sure this is not helping -

#include <stdio.h>

int main(void)
{
    int i = 1;
    int s = 0;

    do {
        //s = s + (i*i)/i;         // works
          s = s + ((i << 1) >> 1); // works
        i++;   
    } while (i <= 10);
    printf("i = %d\n", i);
    printf("Sum = %d\n", s);
    return 0;
}

Another 'working' version
#include <stdio.h>

int main(void)
{
    int i = 0;
    int s = 0;

    do {
++i;
s = s + i;
       } while (i <= 9);
    printf("i = %d\n", i);
    printf("Sum = %d\n", s);
    return 0;
}

John Z
#19
Bug reports / Re: Maybe a optimization bug.
Last post by Vortex - April 20, 2026, 12:55:52 PM
I was too fast, same issue :

_text   SEGMENT PARA 'CODE'

main    PROC
        sub     rsp, 40
        lea     rcx, [@154]
        call    printf    
        lea     rcx, [@156]
        mov     edx, 55   
        call    printf    
        xor     eax, eax  
        add     rsp, 40   
        ret               
main    ENDP

_text   ENDS

.rdata  SEGMENT PARA 'CONST'                          

@156    label byte
        db 53H, 75H, 6DH, 20H, 3DH, 20H, 25H, 64H       ; 0000 _ Sum = %d
        db 0AH, 00H                                  

@154    label byte
        db 69H, 20H, 3DH, 20H, 25H, 64H, 0AH, 00H       ; 000A _ i = %d..

.rdata  ENDS

Again, this line is fixing the issue :

    for (i=1;i<11;i=i-(-1))
#20
Bug reports / Re: Some fonts are missing fro...
Last post by ander_cc - April 20, 2026, 10:02:34 AM
Quote from: Pelle on April 18, 2026, 05:58:35 PMI am deliberately filtering the fonts list. At least last time I checked, several years ago, not doing this filtering gave me many fonts I couldn't use.
I will have to think about this (when I can find the time)...
I check the output of your code paste below.
I think you filter the fonts with "GB2312_CHARSET" ? Maybe add "ANSI_CHARSET" could fix it.