Lines Matching defs:in

9  * Redistribution and use in source and binary forms, with or without
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
74 IO in, out; /* input/output state */
128 if (in.name == NULL) {
129 in.name = "stdin";
130 in.fd = STDIN_FILENO;
132 in.fd = open(in.name, O_RDONLY, 0);
133 if (in.fd == -1)
134 err(1, "%s", in.name);
137 getfdtype(&in);
139 if (files_cnt > 1 && !(in.flags & ISTAPE))
170 if ((in.db = malloc(out.dbsz + in.dbsz - 1)) == NULL)
172 out.db = in.db;
173 } else if ((in.db = malloc(MAX(in.dbsz, cbsz) + cbsz)) == NULL ||
176 in.dbp = in.db;
180 if (in.offset)
300 memset(in.dbp, fill_char, in.dbsz);
302 memset(in.dbp, ' ', in.dbsz);
304 memset(in.dbp, 0, in.dbsz);
307 n = read(in.fd, in.dbp, in.dbsz);
309 in.dbrcnt = 0;
320 err(1, "%s", in.name);
321 warn("%s", in.name);
328 * in sector size chunks.
330 if (in.flags & ISSEEK &&
331 lseek(in.fd, (off_t)in.dbsz, SEEK_CUR))
332 warn("%s", in.name);
339 in.dbcnt += in.dbrcnt = in.dbsz;
343 } else if ((size_t)n == in.dbsz) {
344 in.dbcnt += in.dbrcnt = n;
351 in.dbcnt += in.dbrcnt = in.dbsz;
353 in.dbcnt += in.dbrcnt = n;
363 out.dbcnt = in.dbcnt;
365 in.dbcnt = 0;
370 if ((n = in.dbrcnt) & 1) {
374 swab(in.dbp, in.dbp, (size_t)n);
377 in.dbp += in.dbrcnt;
422 * output block in a single write; increment the full block stats.
429 * write the block in multiple chunks. The original versions of dd(1)
430 * never wrote a block in more than a single write, so the latter case
433 * One special case is if we're forced to do the write -- in that case