| 1949 | /* Copy NREAD bytes of BUF, with no conversions. */ |
| 1950 | |
| 1951 | static void |
| 1952 | copy_simple (char const *buf, idx_t nread) |
| 1953 | { |
| 1954 | char const *start = buf; /* First uncopied char in BUF. */ |
| 1955 | |
| 1956 | do |
| 1957 | { |
| 1958 | idx_t nfree = MIN (nread, output_blocksize - oc); |
| 1959 | |
| 1960 | memcpy (obuf + oc, start, nfree); |
| 1961 | |
| 1962 | nread -= nfree; /* Update the number of bytes left to copy. */ |
| 1963 | start += nfree; |
| 1964 | oc += nfree; |
| 1965 | if (oc >= output_blocksize) |
| 1966 | write_output (); |
| 1967 | } |
| 1968 | while (nread != 0); |
| 1969 | } |
| 1970 | |
| 1971 | /* Copy NREAD bytes of BUF, doing conv=block |
| 1972 | (pad newline-terminated records to 'conversion_blocksize', |
no test coverage detected