Writing a simple text editor in D using a C tutorial

Răzvan Birișan razvan.birisan at pm.me
Tue Aug 29 17:38:03 UTC 2023


On Tuesday, 29 August 2023 at 16:59:57 UTC, Dejan Lekic wrote:
> On Tuesday, 29 August 2023 at 16:17:56 UTC, Răzvan Birișan 
> wrote:
>> Is there a better way to use `termios.h` inside D? Am I 
>> missing the point and there is a way to set these flags in D 
>> without using C libraries?
>
> I would try to use termios from druntime instead.
>
> Try: import core.sys.posix.termios;

I've made the change and that fixed the issue. Looks like there 
is also core.sys.posix.unistd, I'll use this and remove the C 
bindings that I've created.

I was only searching the official documentation and "termios" 
returned 0 results.
I also stumbled upon the unofficial documentation but didn't find 
it useful.

I now realize the I can browse the dmd source code on github...


More information about the Digitalmars-d-learn mailing list