MCPcopy Create free account
hub / github.com/OSGeo/PROJ / parseInt

Function parseInt

src/apps/utils.cpp:112–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 } while (0)
111
112static int parseInt(const char *&ptr) {
113 int val = 0;
114 while (*ptr >= '0' && *ptr <= '9') {
115 val = val * 10 + (*ptr - '0');
116 if (val > 1000) {
117 return -1;
118 }
119 ++ptr;
120 }
121 return val;
122}
123
124// This function is a limited version of fprintf(f, formatString, val) where
125// formatString is a subset of formatting strings accepted by

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected