| 486 | } |
| 487 | |
| 488 | static void writeKeyword(FILE *stream, int indent, const char *name, int value, int size, ...) { |
| 489 | va_list argp; |
| 490 | int i, j=0; |
| 491 | const char *s; |
| 492 | |
| 493 | va_start(argp, size); |
| 494 | while (j<size) { /* check each value/keyword mapping in the list, values with no match are ignored */ |
| 495 | i = va_arg(argp, int); |
| 496 | s = va_arg(argp, const char *); |
| 497 | if(value == i) { |
| 498 | writeIndent(stream, ++indent); |
| 499 | fprintf(stream, "%s %s\n", name, s); |
| 500 | va_end(argp); |
| 501 | return; |
| 502 | } |
| 503 | j++; |
| 504 | } |
| 505 | va_end(argp); |
| 506 | } |
| 507 | |
| 508 | static void writeDimension(FILE *stream, int indent, const char *name, int x, int y, char *bind_x, char *bind_y) { |
| 509 | writeIndent(stream, ++indent); |
no test coverage detected