2 ms·
In years past, some Unix utilities used to do things like silently truncating long lines that were too long for the static buffers used by those tools. The GN
by BrazzVuvuzela 5y ago
In years past, some Unix utilities used to do things like silently truncating long lines that were too long for the static buffers used by those tools. The GNU Coding Standards document (originally written in the early 90s I believe) specifically says not to do things like this (GNU's Not Unix, after all..)
> For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead.
> Avoid arbitrary limits on the length or number of any data structure, including file names, lines, files, and symbols, by allocating all data structures dynamically. In most Unix utilities, “long lines are silently truncated”. This is not acceptable in a GNU utility.
https://www.gnu.org/prep/standards/standards.html https://www.gnu.org/prep/standards/standards.html