MCPcopy Index your code
hub / github.com/MapServer/MapServer / getString

Function getString

mapfile.c:200–217  ·  view source on GitHub ↗

** Load a string from the map file. A "string" is defined in lexer.l. */

Source from the content-addressed store, hash-verified

198** Load a string from the map file. A "string" is defined in lexer.l.
199*/
200int getString(char **s) {
201 /* if (*s)
202 msSetError(MS_SYMERR, "Duplicate item (%s):(line %d)", "getString()", msyystring_buffer, msyylineno);
203 return(MS_FAILURE);
204 } else */
205 if(msyylex() == MS_STRING) {
206 if(*s) free(*s); /* avoid leak */
207 *s = msStrdup(msyystring_buffer);
208 if (*s == NULL) {
209 msSetError(MS_MEMERR, NULL, "getString()");
210 return(MS_FAILURE);
211 }
212 return(MS_SUCCESS);
213 }
214
215 msSetError(MS_SYMERR, "Parsing error near (%s):(line %d)", "getString()", msyystring_buffer, msyylineno);
216 return(MS_FAILURE);
217}
218
219/*
220** Load a floating point number from the map file. (see lexer.l)

Callers 15

loadJoinFunction · 0.85
loadFeatureFunction · 0.85
loadGridFunction · 0.85
loadLabelFunction · 0.85
loadHashTableFunction · 0.85
loadClusterFunction · 0.85
loadStyleFunction · 0.85
loadClassFunction · 0.85
loadLayerFunction · 0.85
loadReferenceMapFunction · 0.85
loadOutputFormatFunction · 0.85
loadLegendFunction · 0.85

Calls 2

msStrdupFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected