Elektrine lite

← Feed

@CoolSWEng@mastodon.acm.org

2025-12-24 08:12 UTC

@jaj@mastodon.social At the time C was so new that they were experimenting with its facilities and libraries. According to https://dspinellis.github.io/unix-history-man/man3.html printf was indeed first documented in V4; see the man page https://dspinellis.github.io/unix-v4man/v4man.pdf#page=193.

Replies (1)

  • @jaj@mastodon.social 2025-12-24 08:35

    @CoolSWEng@mastodon.acm.org Indeed, ls.c makes extensive use of printf, so it was available. This suggests that the code in cp.c, and its conf function which converts integers to strings, is even older or its author was not familiar with printf yet. It could also be that they didn't want to include the library in the cp utility. I'm not sure but I guess everything was statically linked back then?

    Open ##3935181