German D tutorial: HTML5 Anwendung mit GTK3 schreiben

Petar Petar
Fri Feb 14 08:44:11 UTC 2020


On Thursday, 13 February 2020 at 22:48:32 UTC, Andre Pany wrote:
> Hi,
>
> Dieses Tutorial zeigt, wie GTK3 zum Erstellen von HTML5 
> Anwendungen verwendet werden kann.
>
> http://d-land.sepany.de/tutorials/gui/html5-anwendungen-mit-gtk3-schreiben
>
> Viele Grüße
> Andre

Hi Andre,

I quickly skimmed through your article and I noticed that you're 
making a copy of the D-style `string[] args`, so you can 
guarantee that you have null terminated C-style `const char** 
argv`. You can avoid this by directly accessing the original args 
that were passed to the C main:

void main()
{
     import core.stdc.stdio : printf;
     import core.runtime : Runtime;
     const args = Runtime.cArgs;
     foreach (i; 0 .. args.argc)
         printf("%s\n", args.argv[i]);
}


More information about the Digitalmars-d-announce mailing list