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

Function msUpdateLegendFromString

mapfile.c:4505–4528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4503}
4504
4505int msUpdateLegendFromString(legendObj *legend, char *string, int url_string)
4506{
4507 if(!legend || !string) return MS_FAILURE;
4508
4509 msAcquireLock( TLOCK_PARSER );
4510
4511 if(url_string)
4512 msyystate = MS_TOKENIZE_URL_STRING;
4513 else
4514 msyystate = MS_TOKENIZE_STRING;
4515 msyystring = string;
4516 msyylex(); /* sets things up, but doesn't process any tokens */
4517
4518 msyylineno = 1; /* start at line 1 */
4519
4520 if(loadLegend(legend, legend->map) == -1) {
4521 msReleaseLock( TLOCK_PARSER );
4522 return MS_FAILURE; /* parse error */;
4523 }
4524 msReleaseLock( TLOCK_PARSER );
4525
4526 msyylex_destroy();
4527 return MS_SUCCESS;
4528}
4529
4530static void writeLegend(FILE *stream, int indent, legendObj *legend)
4531{

Callers 2

msUpdateMapFromURLFunction · 0.85

Calls 4

msAcquireLockFunction · 0.85
loadLegendFunction · 0.85
msReleaseLockFunction · 0.85
msyylex_destroyFunction · 0.85

Tested by

no test coverage detected