Lines Matching defs:io
72 dssfopen(Dss_t* dss, const char* path, Sfio_t* io, Dssflags_t flags, Dssformat_t* format)
85 if (io)
88 if (sfdisc(io, &top))
91 sfdisc(io, SF_POPDISC);
94 sfdisc(io, SF_POPDISC);
95 sfdczip(io, path, dss->meth->compress ? dss->meth->compress : "gzip", dss->disc->errorf);
106 if (io)
111 io = sfstdout;
114 else if (io)
119 io = sfstdin;
123 else if (io)
127 if (!(io = sfopen(NiL, path, (flags & DSS_FILE_APPEND) ? "a" : "w")))
134 else if (!(io = dssfind(path, NiL, DSS_VERBOSE, buf, sizeof(buf), dss->disc)))
149 sfclose(io);
156 file->io = io;
165 sfclose(io);
173 if (sfsize(file->io) || !fstat(sffileno(file->io), &st) && (S_ISFIFO(st.st_mode)
179 if (sfdczip(file->io, file->path, NiL, dss->disc->errorf) < 0)
186 s = sfreserve(file->io, SF_UNBOUND, SF_LOCKR);
187 n = sfvalue(file->io);
196 sfread(file->io, s, 0);
255 if (!file->io)
260 if ((file->flags & DSS_FILE_WRITE) && sfsync(file->io))
267 sfclose(file->io);
293 file->length = sftell(file->io) - file->offset;
324 return (file->seekf ? (*file->seekf)(file, offset, file->dss->disc) : sfseek(file->io, offset, SEEK_SET)) == offset ? 0 : -1;