Lines Matching refs:buf
154 * Given a buffer `buf' of words separated by one or more of the characters
157 * `fields[i]' to point to the beginning of field i in `buf'. Return the
163 field_split(char *buf, unsigned int nfields, char *fields[], const char *seps)
169 fields[i] = buf;
174 * strchr(3C) will match `seps' if `*buf' is the NUL byte
178 ch = strchr(seps, *buf);
181 if (ch != NULL && (buf == fields[i] || buf[-1] != '\\'))
183 buf++;
194 if (*buf == '\0')
197 *buf = '\0';
204 ch = strchr(seps, buf[1]);
206 buf++;
208 buf++;
296 char *buf = buffer;
299 nbytes = pread(fd, &buf[nread], buflen - nread, off + nread);
323 const char *buf = buffer;
326 nbytes = pwrite(fd, &buf[nwritten], buflen - nwritten,
354 char *buf = NULL;
372 buf = mmap(buf, chunksize, PROT_READ, mflags, srcfd, srcoff);
373 if (buf == MAP_FAILED)
378 if (pnwrite(dstfd, &buf[skip], validsize - skip, dstoff)
381 (void) munmap(buf, chunksize);
390 (void) munmap(buf, chunksize);