Home
last modified time | relevance | path

Searched refs:SEEK_CUR (Results 1 – 25 of 169) sorted by relevance

1234567

/freebsd/contrib/libarchive/libarchive/test/
H A Dtest_read_format_rar.c1412 /* Use various combinations of SEEK_SET, SEEK_CUR, and SEEK_END */ in DEFINE_TEST()
1415 assertEqualInt(0, archive_seek_data(a, 0, SEEK_CUR)); in DEFINE_TEST()
1416 assertEqualInt(-1, archive_seek_data(a, -10, SEEK_CUR)); in DEFINE_TEST()
1417 assertEqualInt(10, archive_seek_data(a, 10, SEEK_CUR)); in DEFINE_TEST()
1418 assertEqualInt(-1, archive_seek_data(a, -20, SEEK_CUR)); in DEFINE_TEST()
1419 assertEqualInt(10, archive_seek_data(a, 0, SEEK_CUR)); in DEFINE_TEST()
1423 assertEqualInt(file_size + 40, archive_seek_data(a, 0, SEEK_CUR)); in DEFINE_TEST()
1424 assertEqualInt(file_size + 40 + 20, archive_seek_data(a, 20, SEEK_CUR)); in DEFINE_TEST()
1425 assertEqualInt(file_size + 40 + 20 + 20, archive_seek_data(a, 20, SEEK_CUR)); in DEFINE_TEST()
1435 assertEqualInt(file_size + 40, archive_seek_data(a, 40, SEEK_CUR)); in DEFINE_TEST()
[all...]
/freebsd/stand/libsa/
H A Dlseek.c83 case SEEK_CUR: in lseek()
102 filepos = (f->f_ops->fo_seek)(f, 0, SEEK_CUR); in lseek()
110 case SEEK_CUR: in lseek()
129 if (where == SEEK_CUR) in lseek()
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dstride_dd.c216 if (lseek(ifd, (stride - 1) * bsize, SEEK_CUR) == -1) { in read_entire_file()
220 if (lseek(ofd, (stride - 1) * bsize, SEEK_CUR) == -1) { in read_entire_file()
262 if (lseek(ifd, (stride - 1) * bsize, SEEK_CUR) == -1) { in read_on_count()
266 if (lseek(ofd, (stride - 1) * bsize, SEEK_CUR) == -1) { in read_on_count()
318 if (lseek(ifd, skipamt, SEEK_CUR) == -1) { in main()
326 if (lseek(ofd, seekamt, SEEK_CUR) == -1) { in main()
/freebsd/lib/libfigpar/
H A Dfigpar.c163 if ((curpos = lseek(fd, 0, SEEK_CUR)) == -1) { in parse_config()
206 if (lseek(fd, 1, SEEK_CUR) != -1) in parse_config()
247 if ((curpos = lseek(fd, 0, SEEK_CUR)) == -1) { in parse_config()
269 if ((charpos = lseek(fd, 0, SEEK_CUR)) == -1) { in parse_config()
280 if (lseek(fd, -2, SEEK_CUR) == -1) { in parse_config()
292 if (lseek(fd, -2, SEEK_CUR) == -1) { in parse_config()
351 if ((charpos = lseek(fd, 0, SEEK_CUR)) == -1) { in parse_config()
/freebsd/contrib/libarchive/libarchive/
H A Darchive_read_open_file.c155 if (lseek(fileno(mine->f), skip, SEEK_CUR) < 0) in file_skip()
157 if (_fseeki64(mine->f, skip, SEEK_CUR) != 0) in file_skip()
159 if (fseeko(mine->f, skip, SEEK_CUR) != 0) in file_skip()
161 if (fseek(mine->f, skip, SEEK_CUR) != 0) in file_skip()
H A Darchive_read_open_fd.c154 if (((old_offset = lseek(mine->fd, 0, SEEK_CUR)) >= 0) && in file_skip()
155 ((new_offset = lseek(mine->fd, skip, SEEK_CUR)) >= 0)) in file_skip()
/freebsd/crypto/heimdal/lib/kadm5/
H A Dlog.c68 krb5_storage_seek(sp, -4, SEEK_CUR); in kadm5_log_get_version_fd()
333 off = krb5_storage_seek (sp, 0, SEEK_CUR); in kadm5_log_delete()
337 len = krb5_storage_seek (sp, 0, SEEK_CUR) - off; in kadm5_log_delete()
338 krb5_storage_seek(sp, -(len + 4), SEEK_CUR); in kadm5_log_delete()
342 krb5_storage_seek(sp, len, SEEK_CUR); in kadm5_log_delete()
413 off = krb5_storage_seek (sp, 0, SEEK_CUR); in kadm5_log_rename()
419 len = krb5_storage_seek (sp, 0, SEEK_CUR) - off; in kadm5_log_rename()
421 krb5_storage_seek(sp, -(len + 4), SEEK_CUR); in kadm5_log_rename()
426 krb5_storage_seek(sp, len, SEEK_CUR); in kadm5_log_rename()
468 off = krb5_storage_seek(sp, 0, SEEK_CUR); in kadm5_log_replay_rename()
[all …]
/freebsd/bin/pax/
H A Dar_io.c177 else if ((lseek(arfd, (off_t)0L, SEEK_CUR) == -1) && (errno == ESPIPE)) in ar_open()
460 if (((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) || in ar_set_wr()
619 if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) in ar_write()
755 if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) in ar_rdsync()
758 if (lseek(arfd, mpos, SEEK_CUR) < 0) in ar_rdsync()
816 if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) >= 0) { in ar_fow()
884 if ((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) { in ar_rev()
/freebsd/lib/libc/tests/stdio/
H A Dopen_memstream2_test.c179 SEEK_FAIL(-1, SEEK_CUR, EINVAL); in ATF_TC_BODY()
182 SEEK_OK(-1, SEEK_CUR, 2); in ATF_TC_BODY()
186 SEEK_FAIL(2, SEEK_CUR, EOVERFLOW); in ATF_TC_BODY()
H A Dopen_wmemstream_test.c179 SEEK_FAIL(-1, SEEK_CUR, EINVAL); in ATF_TC_BODY()
182 SEEK_OK(-1, SEEK_CUR, 2); in ATF_TC_BODY()
186 SEEK_FAIL(2, SEEK_CUR, EOVERFLOW); in ATF_TC_BODY()
/freebsd/crypto/heimdal/lib/krb5/
H A Dstore_mem.c50 sp->seek(sp, size, SEEK_CUR); in mem_fetch()
61 sp->seek(sp, size, SEEK_CUR); in mem_store()
83 case SEEK_CUR: in mem_seek()
H A Dstore_emem.c51 sp->seek(sp, size, SEEK_CUR); in emem_fetch()
74 sp->seek(sp, size, SEEK_CUR); in emem_store()
92 case SEEK_CUR: in emem_seek()
/freebsd/contrib/netbsd-tests/lib/libc/stdio/
H A Dt_open_memstream.c81 ATF_CHECK(fseek(fp, -1, SEEK_CUR) == 0); in ATF_TC_BODY()
83 ATF_CHECK(fseek(fp, 5, SEEK_CUR) == 0); in ATF_TC_BODY()
H A Dt_fflush.c123 ATF_REQUIRE(fseek(f, 0, SEEK_CUR) == 0); in ATF_TC_BODY()
130 ATF_REQUIRE(lseek(fd, 0, SEEK_CUR) == 3); in ATF_TC_BODY()
H A Dt_fmemopen.c484 ATF_CHECK(fseeko(fp, (off_t)0, SEEK_CUR) == 0); in ATF_TC_BODY()
488 ATF_CHECK(fseeko(fp, (off_t)-1, SEEK_CUR) == -1); in ATF_TC_BODY()
493 ATF_CHECK(fseeko(fp, (off_t)1, SEEK_CUR) == 0); in ATF_TC_BODY()
498 ATF_CHECK(fseeko(fp, (off_t)1, SEEK_CUR) == -1); in ATF_TC_BODY()
535 ATF_CHECK(fseeko(fp, (off_t)0, SEEK_CUR) == 0); in ATF_TC_BODY()
540 ATF_CHECK(fseeko(fp, (off_t)1, SEEK_CUR) == 0); in ATF_TC_BODY()
545 ATF_CHECK(fseeko(fp, (off_t)1, SEEK_CUR) == -1); in ATF_TC_BODY()
550 ATF_CHECK(fseeko(fp, (off_t)-1, SEEK_CUR) == 0); in ATF_TC_BODY()
555 ATF_CHECK(fseeko(fp, (off_t)-1, SEEK_CUR) == -1); in ATF_TC_BODY()
/freebsd/sys/sys/
H A Dunistd.h107 #define SEEK_CUR 1 /* set file offset to current plus offset */ macro
118 #define L_INCR SEEK_CUR
/freebsd/lib/libc/gen/
H A Dpututxline.c98 ret = fseeko(fp, -(off_t)sizeof(fe), SEEK_CUR); in utx_active_add()
162 if (fseeko(fp, -(off_t)sizeof(fe), SEEK_CUR) == -1) in utx_active_remove()
219 ret = fseeko(fp, -(off_t)sizeof fe, SEEK_CUR); in utx_lastlogin_add()
/freebsd/contrib/bmake/
H A Darch.c541 if (fseek(arch, -(long)elen, SEEK_CUR) != 0) in ArchStatMember()
559 if (fseek(arch, ((long)size + 1) & ~1, SEEK_CUR) != 0) in ArchStatMember()
727 if (fseek(arch, -(long)sizeof *out_arh, SEEK_CUR) != in ArchFindMember()
765 SEEK_CUR) != 0) { in ArchFindMember()
771 if (fseek(arch, -(long)elen, SEEK_CUR) != 0) { in ArchFindMember()
782 if (fseek(arch, (size + 1) & ~1L, SEEK_CUR) != 0) { in ArchFindMember()
/freebsd/bin/dd/
H A Dposition.c94 if (lseek(in.fd, seek_offset(&in), SEEK_CUR) == -1 && in pos_in()
164 if (lseek(out.fd, seek_offset(&out), SEEK_CUR) == -1 && in pos_out()
/freebsd/usr.sbin/pmcannotate/
H A Dpmcannotate.c547 fseek(fp, nbytes * -1, SEEK_CUR); in general_printasm()
578 fseek(fp, strlen(buffer) * -1, SEEK_CUR); in general_printc()
619 if (fseek(fp, nbytes * -1, SEEK_CUR) == -1) in printblock()
668 if (fseek(fp, nbytes * -1, SEEK_CUR) == -1) in printblock()
673 if (fseek(fp, strlen(buffer) * -1, SEEK_CUR) == -1) in printblock()
/freebsd/usr.bin/csplit/
H A Dcsplit.c328 fseeko(ofp, -(off_t)sizeof(buf), SEEK_CUR); in toomuch()
333 if (fseeko(ofp, -(off_t)nread, SEEK_CUR) != 0) in toomuch()
341 if (fseeko(ofp, nread - i + 1, SEEK_CUR) != 0) in toomuch()
/freebsd/sys/contrib/zlib/
H A Dgzlib.c250 state->start = LSEEK(state->fd, 0, SEEK_CUR); in gz_open()
358 if (whence != SEEK_SET && whence != SEEK_CUR) in gzseek64()
371 ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR); in gzseek64()
457 offset = LSEEK(state->fd, 0, SEEK_CUR); in gzoffset64()
/freebsd/contrib/diff/src/
H A Dsystem.h81 #ifndef SEEK_CUR
82 # define SEEK_CUR 1 macro
/freebsd/contrib/elftoolchain/libpe/
H A Dlibpe_dos.c240 SEEK_CUR) < 0) { in libpe_write_msdos_stub()
357 if (lseek(pe->pe_fd, (off_t) sizeof(PE_DosHdr), SEEK_CUR) < in libpe_write_msdos_stub()
383 if (lseek(pe->pe_fd, (off_t) pe->pe_stub_ex, SEEK_CUR) < 0) { in libpe_write_msdos_stub()
/freebsd/sys/contrib/openzfs/lib/libspl/os/freebsd/
H A Dmnttab.c215 nfs = (int)lseek(fileno(fp), 0, SEEK_CUR); in getmntent()
231 if (lseek(fileno(fp), 1, SEEK_CUR) == -1) in getmntent()

1234567