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

Function readSizeTFromChar

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

! readSizeTFromChar() : * @return : size_t 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

362 * Will also modify `*stringPtr`, advancing it to position where it stopped reading.
363 * Note : function will exit() program if digit sequence overflows */
364static size_t readSizeTFromChar(const char** stringPtr) {
365 static const char errorMsg[] = "error: numeric value overflows size_t";
366 size_t result;
367 if (readSizeTFromCharChecked(stringPtr, &result)) { errorOut(errorMsg); }
368 return result;
369}
370
371/** longCommandWArg() :
372 * check if *stringPtr is the same as longCommand.

Callers 1

mainFunction · 0.85

Calls 2

readSizeTFromCharCheckedFunction · 0.85
errorOutFunction · 0.85

Tested by

no test coverage detected