linuxrocks.online is one of the many independent Mastodon servers you can use to participate in the fediverse.
Linux geeks doing what Linux geeks do... Special thanks go out to Altispeed Technologies for hosting our hardware! https://www.altispeed.com/

Server stats:

242
active users

Michael Connor Buchan

It's very annoying that has fixed-width integer types in stdint.h, but doesn't provide functions for working with them, like for instance, strtoi32(). Heck, standard C doesn't even have strtoint() for regular ints!

the closest I've come is strtoi() which lets you specify bounds, so you could use E.G. INT32_MIN & INT32_MAX, but that's a nonstandard extension.

So you have to use a bunch of macro soup to fix this problem yourself and use strtoimax(), which defeats the entire point of the stdint types. 😤

And yes, atoi() is a thing for normal ints, but it's not useful if you need both for 0 to be a useful value and to detect parse errors, which is very common!