Utility to jump whitespace and cr/lf */
| 964 | |
| 965 | /* Utility to jump whitespace and cr/lf */ |
| 966 | static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer) |
| 967 | { |
| 968 | if ((buffer == NULL) || (buffer->content == NULL)) |
| 969 | { |
| 970 | return NULL; |
| 971 | } |
| 972 | |
| 973 | while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32)) |
| 974 | { |
| 975 | buffer->offset++; |
| 976 | } |
| 977 | |
| 978 | if (buffer->offset == buffer->length) |
| 979 | { |
| 980 | buffer->offset--; |
| 981 | } |
| 982 | |
| 983 | return buffer; |
| 984 | } |
| 985 | |
| 986 | /* skip the UTF-8 BOM (byte order mark) if it is at the beginning of a buffer */ |
| 987 | static parse_buffer *skip_utf8_bom(parse_buffer * const buffer) |
no outgoing calls
no test coverage detected