4 ms·
The source for GNU's true (from coreutils [1]) seems to be 80 lines which is ... infinitely more than 0 of course, but still quite manageable especially for a c
by unwind 3y ago
The source for GNU's true (from coreutils [1]) seems to be 80 lines which is ... infinitely more than 0 of course, but still quite manageable especially for a core utility.
Oh, and I "love" how the coreutils code considers string comparison to be hard enough to warrant a macro (in system.h [2]):
#define STREQ(a, b) (strcmp (a, b) == 0)
[1]: https://github.com/coreutils/coreutils/blob/master/src/true.c https://github.com/coreutils/coreutils/blob/master/src/true....
[2]: https://github.com/coreutils/coreutils/blob/master/src/system.h https://github.com/coreutils/coreutils/blob/master/src/syste...