News:

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

Main Menu

Recent posts

#11
Bug reports / Re: glu.h -- Silence warnings
Last post by Pelle - February 01, 2026, 10:20:33 PM
OK, thanks. Needed for older standards, before C23.
#12
Announcements / Re: New Year, new URL
Last post by Pelle - February 01, 2026, 10:15:42 PM
Quote from: alderman2 on January 12, 2026, 06:05:10 PMWhy not create a new programming language?
No, I think for me "Pelles C" will just be "C".

Quote from: Robert on January 13, 2026, 09:11:31 PMBored ? Nothing to do ? SWAR and AVX512 may offer some entertainment.
Well, I added AVX-512F... a lot of work, but not much interest. Intel seemed to care most. Not sure where they will be in a few years.
Adding AVX-512<letter soup> is just more work. Nothing really new to learn.

Quote from: Robert on January 13, 2026, 09:11:31 PMCheck out Wojciech Muła's work.
I will do that.

Quote from: bitcoin on January 14, 2026, 05:28:04 PMHow about creating some kind of library to simplify GUI application development? It's no secret that things are pretty bad in this area on Windows right now. C++ Builder was ideal, but it either died or became too complex. Qt is a heavy monster, and it's for C++ anyway. There's really nothing else. What if we made something like that for C?
Well... it was one idea ~20 years ago, but it didn't happen then.
A quick solution would be a very basic library with narrow focus. Unless you happen to fit into this narrow focus it won't be of much help. A better solution would take more work, starting with a well researched specification. By the time this is done, perhaps the world has moved on...?

Quote from: TimoVJL on January 14, 2026, 09:33:45 PMMultitarget project file would be nice feature  ;)
I very much prefer to have one target per project. I think the concept of workspaces is good enough. Maybe not perfect, but good enough...
#13
Add-ins / Re: Export C source as HTML or...
Last post by Robert - January 31, 2026, 10:02:38 PM
Quote from: John Z on January 31, 2026, 05:21:03 PMAttached is what I'm calling version 1.3.

It adds the ability to export an UTF encoded source file into an UTF encoded html file.
It supports color coding. If unwanted, change the colors in the source to black.
It supports output with line numbers added, if wanted.
It supports Dark background output, if wanted. (don't use black characters then  ;) )
It will partially work for UTF16le but I didn't try any characters unique to UTF16le (maybe later) as UTF-8 was the focus.

All sources included in the project zip as usual.
A Dark Mode with Line Numbers example is attached too.
Check the readme file for more information.

Done...

John Z

Thank you John Z. An Excellent job done !  ;D  8)
#14
Bug reports / Re: tchar.h: Missing Macro _pu...
Last post by Vortex - January 31, 2026, 07:11:25 PM
msvcrt.dll exports the function _putws. Creating the import library :

\PellesC\bin\polib /OUT:msvcrt.lib /MACHINE:x86 C:\Windows\System32\msvcrt.dll
#include <stdio.h>

extern int _putws(const wchar_t *str);

int main(void)
{
    _putws(L"This is a _putws test.");
    return 0;
}
#15
Bug reports / tchar.h: Missing Macro _putts ...
Last post by Fuerst - January 31, 2026, 06:57:03 PM
compiling the source below, you get the following compiler-error because in tchar.h, the macro _putts is missing.

O:\Sources\test2\test2.c(21): warning #2018: Undeclared function '_putts' (did you mean: fputws?); assuming 'extern' returning 'int'.
 _putts(_T("Hello World"));


--- Source

#define _UNICODE

#define WORKAROUND
#undef WORKAROUND

#include <stdio.h>
#include <tchar.h> // missing _putts() (and _putws)

#if defined WORKAROUND
    /* function _putws() missed although */
#   if defined _UNICODE
#      define _putws(s) {_fputts((s), stdout); _fputts(_T("\n"), stdout); }
#       define _putts(s) _putws(s)
#   else
#      define _putts(s) puts(s)
#   endif
#endif

int main(void)
{
   _putts(_T("Hello World"));
}
#16
Assembly discussions / REAL4 convertion with OLE auto...
Last post by Vortex - January 31, 2026, 05:46:37 PM
Inspired by Jochen's thread in the Masm Forum ( http://masm32.com/board/index.php?topic=13156.0 ) , here ıs a REAL4 to string convertion example with VarBstrFromR4 :

include    VarBstrFromR4.inc

.data

f          REAL4 3.14

.data?

output      dd ?
buffer      db 8 dup(?)

.code

start:

    invoke  VarBstrFromR4,f,0,0,ADDR output

    xor    eax,eax
    invoke  WideCharToMultiByte,CP_ACP,eax,\
            output,-1,ADDR buffer,\
            8,eax,eax

    invoke  StdOut,ADDR buffer

    invoke  SysFreeString,output

    invoke  ExitProcess,0
.
.
#17
Add-ins / Re: Export C source as HTML or...
Last post by John Z - January 31, 2026, 05:21:03 PM
Attached is what I'm calling version 1.3.

It adds the ability to export an UTF encoded source file into an UTF encoded html file.
It supports color coding. If unwanted, change the colors in the source to black.
It supports output with line numbers added, if wanted.
It supports Dark background output, if wanted. (don't use black characters then  ;) )
It will partially work for UTF16le but I didn't try any characters unique to UTF16le (maybe later) as UTF-8 was the focus.

All sources included in the project zip as usual.
A Dark Mode with Line Numbers example is attached too.
Check the readme file for more information.

Done...

John Z

#18
Add-ins / Re: Export C source as HTML or...
Last post by John Z - January 31, 2026, 03:58:25 PM
Happy to do it.

Here is another output with actual UTF-8 characters :) I realized the first didn't have any 'special' characters.

The version is almost complete.  It also has an optional Dark output mode, and an optional Line Number output mode.  Just removing any nonsense I might have put in.

John Z
#19
Add-ins / Re: Export C source as HTML or...
Last post by TimoVJL - January 31, 2026, 03:35:58 PM
A good thing, that Add-In is still updated  :)
#20
Add-ins / Re: Export C source as HTML or...
Last post by John Z - January 31, 2026, 12:30:14 PM
Making progress  :)

Some help used from 'vibe' coding too.

Here is the first output trial utf8 source to utf8 html.
More improvements to be done before posting new project files.

So this is just preliminary look.

John Z