1

I'm trying to read linux commands C sources. I started with cat which is one of the shortest, and supposedly easiest, and I found this on line 645:

if ( fstat(STDOUT_FILENO, &stat_buf) < 0)
    die(EXIT_FAILURE, err_no, _("standard output"));

I understand we're handling errors here. The puzzling part is _("standard output") Is it a function called _ ? I could't find its declaration, if it is.

raphaelSeguin
  • 449
  • 3
  • 12
  • [Underscore `_` before the format string](https://stackoverflow.com/q/3336056/995714), [What does _(“text”), i.e. underscore bracket char, do?](https://stackoverflow.com/q/15244397/995714), [What does printf (_(“hello, world\n”)) mean?](https://stackoverflow.com/q/4299669/995714) – phuclv May 11 '21 at 08:42

1 Answers1

2

IIRC, _ is some C macro defined somewhere which expands to calling gettext(3)

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547