Decode the coordinates attribute. */
| 57 | |
| 58 | /* Decode the coordinates attribute. */ |
| 59 | static void coords(Attr attr, unsigned *line, unsigned *column) |
| 60 | { |
| 61 | if (attr) { |
| 62 | /* Find the colon separator: */ |
| 63 | const char *start = input + attr->value->start; |
| 64 | const char *end = input + attr->value->end; |
| 65 | const char *p; |
| 66 | for (p = start; p < end; ++p) |
| 67 | if (*p == ':') { |
| 68 | /* Get value line:col */ |
| 69 | *line = atoi(start); |
| 70 | *column = atoi(p+1); |
| 71 | return; |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /* Determine correct coordinates for all tokens (leaf nodes) |
| 77 | and adjust all labels by removing leading and trailing white-space. |
no outgoing calls
no test coverage detected