On August 22, 2018 5:37:43 AM GMT+08:00, Cornelius Keck <ckeck(a)texoma.net> wrote:
Early C-compilers didn't care much about
prototypes. The default return
type of a function would be an int. It was up to the code's author to
pass the right (amount, order, type). The linker didn't care about
signatures as long as the symbol resolved.
What one did need were struct definitions and macros, such as getchar,
putchar, min, max, abs, because they might not be provided by some
library, causing link to fail.
Back then one could get away with constructs creative enough to make a
modern compiler blow a gasket, and it would all run just fine, as long
as one didn't accidentally drop a bunch of bits when typecasting, and
sizeof(int) = sizeof(int*).
Those were interesting times. I do miss them.
Gesendet von meinem BlackBerry 10-Smartphone.
Von: Caipenghui
Gesendet: Dienstag, 21. August 2018 00:12
An: tuhs(a)minnie.tuhs.org
Betreff: [TUHS] About Unix header files
Hello everyone
Hello everyone, I have a question, I looked at the source code of early
Unix, found that a lot of.c files did
not contain header files, so compiler compiler will not error?
Caipenghui
We miss DMR. DMR is dead, but we
will not forget his contribution to
humanity. We will learn a simple humorous spirit of DMR. Not only did he teach us to code,
he seemed to convey a human spirit. DMR also conveys the spirit of Unix philosophy, such
as kiss.do a thing, do it well, etc.
Caipenghui