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

Function writeNumberOrKeyword

mapfile.c:561–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561static void writeNumberOrKeyword(FILE *stream, int indent, const char *name, double defaultNumber, double number, int value, int size, ...) {
562 va_list argp;
563 int i, j=0;
564 const char *s;
565
566 va_start(argp, size);
567 while (j<size) { /* check each value/keyword mapping in the list */
568 i = va_arg(argp, int);
569 s = va_arg(argp, const char *);
570 if(value == i) {
571 writeIndent(stream, ++indent);
572 fprintf(stream, "%s %s\n", name, s);
573 va_end(argp);
574 return;
575 }
576 j++;
577 }
578 va_end(argp);
579
580 writeNumber(stream, indent, name, defaultNumber, number);
581}
582
583static void writeNameValuePair(FILE *stream, int indent, const char *name, const char *value) {
584 char *string_tmp;

Callers 3

writeLabelFunction · 0.85
writeStyleFunction · 0.85
writeLayerFunction · 0.85

Calls 2

writeIndentFunction · 0.85
writeNumberFunction · 0.85

Tested by

no test coverage detected