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

Function msOWSPrintParam

mapows.c:1198–1221  ·  view source on GitHub ↗

msOWSPrintParam() ** ** Same as printMetadata() but applied to mapfile parameters. **/

Source from the content-addressed store, hash-verified

1196** Same as printMetadata() but applied to mapfile parameters.
1197**/
1198int msOWSPrintParam(FILE *stream, const char *name, const char *value,
1199 int action_if_not_found, const char *format,
1200 const char *default_value)
1201{
1202 int status = MS_NOERR;
1203
1204 if(value && strlen(value) > 0)
1205 {
1206 msIO_fprintf(stream, format, value);
1207 }
1208 else
1209 {
1210 if (action_if_not_found == OWS_WARN)
1211 {
1212 msIO_fprintf(stream, "<!-- WARNING: Mandatory mapfile parameter '%s' was missing in this context. -->\n", name);
1213 status = action_if_not_found;
1214 }
1215
1216 if (default_value)
1217 msIO_fprintf(stream, format, default_value);
1218 }
1219
1220 return status;
1221}
1222
1223/* msOWSPrintEncodeParam()
1224**

Callers

nothing calls this directly

Calls 1

msIO_fprintfFunction · 0.85

Tested by

no test coverage detected