squeek502
That's not planned AFAIK (see https://github.com/ziglang/zig/issues/16269). `translate-c` is really only intended for header translation, not C source code.
See https://github.com/ziglang/zig/issues/20875 for the (not fully fleshed out yet) plans around C compilation.
And indeed, it looks like using `=` as a drive letter breaks things in an interesting way:
=:\> cd bar
Not enough memory resources are available to process this command.
=:\bar>
`cd` exits with error code 1, but the directory change still goes through.With a program that dumps the NULL terminated <key>=<value> lines of the environment block, it looks like it does still modify the environment, but in an unexpected way:
Before `cd /D =:\`, I had a line that looked like this (i.e. the per-drive CWD for C:\ was C:\foo):
=C:=C:\foo
After `cd /D =:\`, that was unexpectedly modified to: =C:==:\
Funnily enough, that line means that the "working directory" of the C drive is `=:\`, and that actually is acted upon: =:\foo> cd /D C:
=:\>
---You might also be interested to know that '= in the name of an environment variable' is a more general edge case that is handled inconsistently on more than just Windows: https://github.com/ziglang/zig/issues/23331
C:\> cd /D λ:\
λ:\> cd bar
λ:\bar> cd /D C:\
C:\> echo %=Λ:%
λ:\bar
C:\> cd /D Λ:
λ:\bar>Will submit an issue/PR to correct it when I get a chance.
[1] https://html.spec.whatwg.org/multipage/parsing.html#named-ch...
I believe the most relevant links are https://github.com/ziglang/zig/issues/16270 and https://github.com/orgs/ziglang/projects/2/views/1?pane=issu... (as you can see, nothing is concrete yet, just vague mentions of optimization passes)
More details here: https://ziggit.dev/t/how-zig-incremental-compilation-is-impl...
It's always theoretically possible that someone, somewhere is somehow relying on such a miscompilation, but for many of the ones detailed in the article, it seems extraordinarily unlikely.
In terms of what I prioritized bug-for-bug compatibility on, I tailored it to getting https://github.com/squeek502/win32-samples-rc-tests passing 100%, and then also tried to take into account how likely a bug/quirk was to be used in a real .rc file (ultimately this is just a judgement call, though). The results of that test suite (provided in the readme) is also a better indication of how rc.exe-compatible the various resource compilers are in practice (i.e. on 'real' .rc files).
> |-separated lists of numeric or NOT
Note that | is not the only operator that can be used in style parameters, & + and - are all allowed too.
> perhaps Windows versions that don't support DIALOGEX also don't support GROUPBOX
Seems possible for sure. From [1]:
> The 16-bit extended dialog template is purely historical. The only operating systems to support it were the Windows 95/98/Me series.
[1] https://devblogs.microsoft.com/oldnewthing/20040622-00/?p=38...
> The examples below this also seem to have reversed the order of the input byte and the FF.
Good catch, fixed
I'm actually pretty okay with where I've landed with FONT resources. The legwork has already been done in figuring things out, and with the strategy I've chosen, resinator doesn't even need to parse .fnt files at all, so the implementation is pretty simple (I wrote a .fnt parser, but it's now unused[1]).
[1] https://github.com/squeek502/resinator/blob/master/src/fnt.z...
- Auto-generating a `.h` file has temporarily regressed
- Friendly toward package maintainers is an ongoing goal
- "Memory zeroed by default" is not accurate, instead you must initialize all variables (to either some value or `undefined`)
https://github.com/SerenityOS/serenity/tree/master/Userland/...
Ladybird was the name used for to the cross-platform version of the browser.
https://awesomekling.github.io/Ladybird-a-new-cross-platform...
- https://github.com/ziglang/zig/blob/1606717b5fed83ee64ba1a91...
- https://www.ryanliptak.com/blog/zig-intro-to-check-all-alloc...
A few Zig related posts, but the posts I like the most are some technical posts about the Quake/GoldSrc/Source engines:
- Rampsliding Is a Quake Engine Quirk in the Same Way That Bunnyhopping Is: https://www.ryanliptak.com/blog/rampsliding-quake-engine-qui...
- Source vs GoldSrc Movement: Downward Slopes: https://www.ryanliptak.com/blog/source-vs-goldsrc-movement-s...
https://www.ryanliptak.com/blog/rampsliding-quake-engine-qui...