Sinopsis de C

Sinopsis de C

What's the bare minimum #C89 needed to connect to the console in any OS and, in Windows (inc. XP), Linux & MacOS, enable raw mode? Asking for a friend.
Maybe there's a bare-bones framework out there for "give my app a terminal window and make the OS go away" that doesn't involve installing gigabytes of compiler suites and libraries :|
ยปTocaia is a simple and portable Gopher Client built with C89 and POSIX in mind. It offers a TUI interface to explore Gopherspace, with support for menus, text files, searches, and back/forward navigation.ยซ
It's interesting comparing Usenet of 1993 to Hacker News of today. Some questions are perennial, it seems:
"But what use is malloc(0)?" followed by a discussion of people rolling their own Pascal-like strings.
"Why unique?" followed by a discussion of making sets and maps.
"It's not a valid pointer." leading to the usual pantomime rejoinder.
I haven't seen anyone ask what the old implementations that returned NULL did to errno, though.
Back in 1993, #AIX was the example that people gave of a C library where malloc(0) returned NULL.
https://groups.google.com/g/comp.unix.aix/c/lstmVEcmD2Q/m/wRsWt_Tnw1UJ
Most of the C libraries that I touched back then either just handed off to the operating system's API for suballocation, which did not treat zero specially, or had their own suballocation functions, which did not treat zero specially.
You managed to hit the Giant Bat for 7 damage with your Greatsword.
You were hit by the Giant Bat's Bite attack, you took 5 damage.
You got knocked unconscious and ultimately succumbed to your injuries.
---
๐ชฆ Here lies Max, the Gnome Barbarian
โค๏ธ 14 โญ 1 ๐ช 12
โ๏ธ Greatsword [2d6+2, +4] ๐ก๏ธ None [13]
Str 14 Dex 12 Con 14 Int 13 Wis 8 Cha 11
โ ๏ธ 0
โ๏ธ๐ง๐งโโ๏ธ๐๏ธ๐ฆโ ๏ธ
๐บ๏ธ 89 ๐ 12:01 ๐ค 280
#dndend
The Giant Bat used Bite, dealing 6 damage to you.
You got knocked unconscious, but managed to get back up.
---
๐ฆ Giant Bat
โค๏ธโค๏ธโค๏ธ๐๐ค๐ค๐ค๐ค๐ค๐ค 9/23
๐ก๏ธ 13 โ๏ธ
โ1/4
โจ 50
You were hit by the Giant Bat's Bite attack, you took 8 damage.
---
๐ฆ Giant Bat
โค๏ธโค๏ธโค๏ธ๐๐ค๐ค๐ค๐ค๐ค๐ค 9/23
๐ก๏ธ 13 โ๏ธ
โ1/4
โจ 50