| 147 | /* Compute the next line number. */ |
| 148 | |
| 149 | static void |
| 150 | next_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. |