MCPcopy Create free account
hub / github.com/F-Stack/f-stack / readU32FromChar

Function readU32FromChar

freebsd/contrib/zstd/programs/zstdcli.c:319–324  ·  view source on GitHub ↗

! readU32FromChar() : * @return : unsigned integer value read from input in `char` format. * allows and interprets K, KB, KiB, M, MB and MiB suffix. * Will also modify `*stringPtr`, advancing it to position where it stopped reading. * Note : function will exit() program if digit sequence overflows */

Source from the content-addressed store, hash-verified

317 * Will also modify `*stringPtr`, advancing it to position where it stopped reading.
318 * Note : function will exit() program if digit sequence overflows */
319static unsigned readU32FromChar(const char** stringPtr) {
320 static const char errorMsg[] = "error: numeric value overflows 32-bit unsigned int";
321 unsigned result;
322 if (readU32FromCharChecked(stringPtr, &result)) { errorOut(errorMsg); }
323 return result;
324}
325
326/*! readSizeTFromCharChecked() :
327 * @return 0 if success, and store the result in *value.

Callers 6

parseCoverParametersFunction · 0.70
parseFastCoverParametersFunction · 0.70
parseLegacyParametersFunction · 0.70
parseAdaptParametersFunction · 0.70
mainFunction · 0.70

Calls 2

readU32FromCharCheckedFunction · 0.85
errorOutFunction · 0.85

Tested by

no test coverage detected