Developers’ Weblog

FOSS hosting by
HostEurope Logo

Developers’ Weblog

⚠ This page contains old, outdated, obsolete, … historic or WIP content! No warranties e.g. for correctness!

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

pcc and Win32

2008-11-25 by tg@
Tags: pcc snippet unicode

I think I’m quite finished with the Unicode stuff. You can now do really weird things like this:

今日は(const struct person *$kunde)
        printf("Γεια σου %ls!", $kunde->имя);

ISO C99 permits it.

On the other hand, pcc on Win32 appears broken, cannot be compiled either natively (e.g. due to use of “long long” and other bogus things which may be C99 but not MS-C90) nor cross from GNU/Cygwin32 (because the Win32 port seems to be orphaned and, even if I try to fix these things, it doesn’t work for me). So I couldn't get it to build a simple MessageBoxW() hello world program.

I wonder what the reception of my patch will be. I wish support for wchar_t were a release goal, then I could try to tap into that BSD func *smile* but anyway, I was just bored, and we need wchar_t support in pcc anyway, and better I do it than some ISO-2022-JP fanboy. And that above example… well, three more lines of code, so that you can actually write “int blöd;” ipv “int bl\u00F6d;” ☻☺ I think it’s worth it, even if such can confuse the hell out of people trying to read your code.

This thread contains the patches (three versions, until now… use today’s please), in case you want to help testing.

MirBSD Logo