Utility function to increase the size of a buffer.
| 135 | |
| 136 | // Utility function to increase the size of a buffer. |
| 137 | void str_ExtendBuffer |
| 138 | ( |
| 139 | char **buf, // buffer to populate |
| 140 | size_t *bufferLen, // size of buffer |
| 141 | size_t extensionLen // number of bytes to add |
| 142 | ) { |
| 143 | *bufferLen += extensionLen; |
| 144 | *buf = rm_realloc(*buf, sizeof(char) * *bufferLen); |
| 145 | } |
| 146 | |
| 147 | // Utility function to check if the string matches |
| 148 | // the regex pattern. |
no test coverage detected