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
75 IO in, out; /* input/output state */
129 if (in.name == NULL) {
130 in.name = "stdin";
131 in.fd = STDIN_FILENO;
133 in.fd = open(in.name, O_RDONLY, 0);
134 if (in.fd == -1)
135 err(1, "%s", in.name);
138 getfdtype(&in);
140 if (files_cnt > 1 && !(in.flags & ISTAPE))
171 if ((in.db = malloc(out.dbsz + in.dbsz - 1)) == NULL)
173 out.db = in.db;
174 } else if ((in.db = malloc(MAX(in.dbsz, cbsz) + cbsz)) == NULL ||
178 /* dbp is the first free position in each buffer. */
179 in.dbp = in.db;
183 if (in.offset)
303 memset(in.dbp, fill_char, in.dbsz);
305 memset(in.dbp, ' ', in.dbsz);
307 memset(in.dbp, 0, in.dbsz);
310 n = read(in.fd, in.dbp, in.dbsz);
312 in.dbrcnt = 0;
323 err(1, "%s", in.name);
324 warn("%s", in.name);
331 * in sector size chunks.
333 if (in.flags & ISSEEK &&
334 lseek(in.fd, (off_t)in.dbsz, SEEK_CUR))
335 warn("%s", in.name);
342 in.dbcnt += in.dbrcnt = in.dbsz;
346 } else if ((size_t)n == in.dbsz) {
347 in.dbcnt += in.dbrcnt = n;
354 in.dbcnt += in.dbrcnt = in.dbsz;
356 in.dbcnt += in.dbrcnt = n;
366 out.dbcnt = in.dbcnt;
368 in.dbcnt = 0;
373 if ((n = in.dbrcnt) & 1) {
377 swab(in.dbp, in.dbp, (size_t)n);
380 in.dbp += in.dbrcnt;
434 * output block in a single write; increment the full block stats.
441 * write the block in multiple chunks. The original versions of dd(1)
442 * never wrote a block in more than a single write, so the latter case
445 * One special case is if we're forced to do the write -- in that case
475 * to write, in which case we'll need to call