MCPcopy Create free account
hub / github.com/MapServer/MapServer / parse_number

Method parse_number

renderers/agg/src/agg_svg_path_tokenizer.cpp:117–136  ·  view source on GitHub ↗

------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

115
116 //------------------------------------------------------------------------
117 bool path_tokenizer::parse_number()
118 {
119 char buf[256]; // Should be enough for any number
120 char* buf_ptr = buf;
121
122 // Copy all sign characters
123 while((buf_ptr < buf+255 && *m_path == '-') || *m_path == '+')
124 {
125 *buf_ptr++ = *m_path++;
126 }
127
128 // Copy all numeric characters
129 while(buf_ptr < buf+255 && is_numeric(*m_path))
130 {
131 *buf_ptr++ = *m_path++;
132 }
133 *buf_ptr = 0;
134 m_last_number = atof(buf);
135 return true;
136 }
137
138
139} //namespace svg

Callers

nothing calls this directly

Calls 1

is_numericFunction · 0.85

Tested by

no test coverage detected