tempodox 6 days ago

Highly interesting!

  main(argc, argv)
  int argv[];
This is a culture shock. Did the PDP-11 not distinguish between `char` and `int`?

3
jecel 6 days ago

Here the `int` is being used in place of `char *`, not `char`.

And yes, the PDP-11 did have byte addressing while the PDP-7 on which Unix was originally created was a word addressed machine.

tempodox 6 days ago

I see, now it makes sense.

spijdar 6 days ago

Of course it did -- this was one of the distinguishing features (byte addressing) of the PDP-11 vs the original machine that ran UNIX, the PDP-7, after all ;-)

In "ancient"/K&R C, types weren't specified with the parameters, but on the following lines afterwards. GCC would still compile code like this, if passed the -traditional flag, until ... some point in the last decade or so. Still, this style was deprecated with ANSI C/C89, so it had a good run.

Maken 3 days ago

I find even more interesting that in a later version this appears:

  main(argc, argv)
  char argv[][];
Which sadly is no longer valid in C.