MCPcopy Create free account
hub / github.com/GregoryFaust/samblaster / resizeSplitLine

Function resizeSplitLine

samblaster.cpp:277–290  ·  view source on GitHub ↗

Resize the buffer of a splitLine. Since the new buffer may not be in the same place, we need to first unsplit, resize, then resplit.

Source from the content-addressed store, hash-verified

275// Resize the buffer of a splitLine.
276// Since the new buffer may not be in the same place, we need to first unsplit, resize, then resplit.
277void resizeSplitLine(splitLine_t * line, int newsize)
278{
279 // First unsplit it.
280 unsplitSplitLine(line);
281 // Resize the buffer, giving a little extra room.
282 line->maxBufLen = newsize + 50;
283 line->buffer = (char *)realloc(line->buffer, line->maxBufLen);
284 if (line->buffer == NULL)
285 {
286 fatalError("samblaster: Failed to reallocate to a larger read buffer size.\n");
287 }
288 // Now resplit the line.
289 splitSplitLine(line, line->numFields);
290}
291
292
293// Change a field into a value.

Callers 2

changeFieldSplitLineFunction · 0.85
addTagFunction · 0.85

Calls 3

unsplitSplitLineFunction · 0.85
fatalErrorFunction · 0.85
splitSplitLineFunction · 0.85

Tested by

no test coverage detected