Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/fmtbufsz/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


_ifmt needs a buffer of at least 88 characters.  here's my calculation
%b is the worst case, and the largest integer is 64 bits.  at 1 char per bit,
this is 64 characters.  if %,b is used, we need 64/3 = 21 characters for
the commas.  %#,b requires two more characters.  one addn'l character
is required for %#+,b.  so this makes 64 + 21 + 2 + 1 = 88 characters.

- erik

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.