9 ms·
Not sure offhand how portable it is, but asprintf() handles automatic buffer allocation, thus not requiring any extra steps afaik. It does exit on MacOS and Li
by floating-io 1y ago
Not sure offhand how portable it is, but asprintf() handles automatic buffer allocation, thus not requiring any extra steps afaik.
It does exit on MacOS and Linux, at the very least.
- db48x 1y agoThose are so unportable that I’d completely forgotten about them :) But my man pages say that they exist on BSD in addition to GNU, so that’s pretty good these days. I say go for it.