MCPcopy Create free account
hub / github.com/coreutils/coreutils / next_line_num

Function next_line_num

src/cat.c:149–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147/* Compute the next line number. */
148
149static void
150next_line_num (void)
151{
152 char *endp = line_num_end;
153 do
154 {
155 if ((*endp)++ < '9')
156 return;
157 *endp-- = '0';
158 }
159 while (endp >= line_num_start);
160
161 if (line_num_start > line_buf)
162 *--line_num_start = '1';
163 else
164 *line_buf = '>';
165 if (line_num_start < line_num_print)
166 line_num_print--;
167}
168
169/* Plain cat. Copy the file behind 'input_desc' to STDOUT_FILENO.
170 BUF (of size BUFSIZE) is the I/O buffer, used by reads and writes.

Callers 1

catFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected