News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Recent posts

#1
Beginner questions / Re: wcslen on MinGW-w64
Last post by Vortex - June 29, 2025, 01:03:34 PM
Hi dimmed,

Any chance to learn why specifically you selected this string?
#2
Beginner questions / Re: wcslen on MinGW-w64
Last post by Pelle - June 28, 2025, 03:20:34 PM
When using:
wcslen((wchar_t*)str))
at the very least, make sure str is a properly terminated wide string (ignoring all other problems with this approach for now).

Append one (or two) '\0' to str, like so:
const char* str = "\x41\x00\xa9\x03\x03\x26\x2d\x4e\x3d\xd8\x02\xde\0";
#3
Beginner questions / Re: wcslen on MinGW-w64
Last post by TimoVJL - June 28, 2025, 12:27:48 PM
#include <stdio.h>
#include <wchar.h>

int main(void)
{
    const char* str = "\x41\x00\xa9\x03\x03\x26\x2d\x4e\x3d\xd8\x02\xde";
    printf("wcslen(str) = %zu\n", wcslen((wchar_t*)str));
    return 0;
}

x86
wcslen(str) = 15x64
wcslen(str) = 9
This version using -Ze gives 6 in both cases
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <wchar.h>

#pragma comment(lib, "user32.lib")

int main(void)
{
    const char* str = "\x41\x00\xa9\x03\x03\x26\x2d\x4e\x3d\xd8\x02\xde";
    printf("wcslen(str) = %zu\n", wcslen((wchar_t*)str));
MessageBoxW(0, (wchar_t*)str, L"test", MB_OK);
    return 0;
}
#4
Beginner questions / Re: wcslen on MinGW-w64
Last post by Vortex - June 28, 2025, 10:24:49 AM
Hi dimmed,

Could you be more specific as your question is not directly related to Pelles C ?
#5
Beginner questions / wcslen on MinGW-w64
Last post by dimmed - June 28, 2025, 05:56:18 AM
I'm the groggily user on Github. I tried to use a library named libutf in the past:

https://github.com/holepunchto/libutf/issues/1

https://github.com/holepunchto/libutf/issues/2

The developer was not easy to work with. In the end the thread closed without anything settled.

I still think I was right about wcslen on MinGW-w64.
#6
General discussions / Re: Is it OK for other project...
Last post by Robert - June 27, 2025, 07:51:12 PM
https://www.smorgasbordet.com/pellesc/termsofuse.htm

Pelles C is freeware for any use: personal, commercial, etc. No registration is required to download it, and you can use it anonymously.
Pelles C can be freely distributed, but it can not be sold.
Pelles C is provided 'as-is', without any expressed or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.

Pelles C is totally free. However, some users may want to express their gratitude by donating some money.
If Pelles C is a major part in building a product sold for money, it seems fair (to me) to donate a little bit of that money to Pelles C - but this is never required.

Donations will help to pay for this website, my time spent on support, and any possible new versions.
#7
General discussions / Re: Is it OK for other project...
Last post by TimoVJL - June 27, 2025, 11:02:43 AM
From a that Orange C licence:
QuoteThe windows header files are derived from Pelles C.  Pelles C is derived from LCC.
The licensing for Pelles C is that things derived from Pelles C cannot be used commerically.
LCC also doesn't want things to be used commerically, but it has an additional stipulation
that there has to be acknowledgement of use.  These header files remain under the Pelles C
and LCC licenses and are not covered by the GNU license that the rest of the runtime library
abides by.
#8
General discussions / Is it OK for other project to ...
Last post by dimmed - June 27, 2025, 07:30:05 AM
I'm talking about the legal issue. There is another C compiler project named Orange C:

https://github.com/LADSoft/OrangeC

They have imported the Windows API headers from an old version of Pelles C to replace their outdated one. You can still find the relevant commits and issues on their Github repository. The Orange C developer said this is OK according to the license of Pelles C, but it seems they have never contacted Mr. Pelle Orinius officially.
#9
User contributions / Re: Dll to Poasm 64 bit includ...
Last post by jack - June 23, 2025, 01:34:28 AM
👍
#10
User contributions / Re: Hint_SA (Standalone)
Last post by John Z - June 22, 2025, 12:43:12 PM
Final release (hopefully) of Hint_SA.

More code clean-up.  Better search for future db updates which might have only a header or library.
Can be used without a mouse.

I'm working on updating the current db3 file. It will be posted alone after any significant updates are complete. No db structural changes expected so just downloading a newer db3 will be all that is needed.

As before the full project and sources in hint_sa_v111.zip, the db3 is 7z inside. 
Just the exe, db3, and readme in the just_program_hint_sa_v111.7z.

Feedback is welcomed -

John Z