MCPcopy Create free account
hub / github.com/coreutils/coreutils / getoptnum

Function getoptnum

src/pr.c:1156–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1154/* Parse numeric arguments, ensuring MIN <= number <= INT_MAX. */
1155
1156static int
1157getoptnum (char const *n_str, int min, char const *err)
1158{
1159 return xnumtoimax (n_str, 10, min, INT_MAX, "", err, 0,
1160 min <= 0 ? 0 : XTOINT_MIN_RANGE);
1161}
1162
1163/* Parse options of the form -scNNN.
1164

Callers 2

parse_column_countFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected