Home
last modified time | relevance | path

Searched refs:ofd (Results 1 – 18 of 18) sorted by relevance

/plan9/acme/mail/src/
H A Dreply.c326 print2(int fd, int ofd, char *fmt, ...) in print2() argument
339 if(ofd > 0) in print2()
340 write(ofd, s, m); in print2()
345 write2(int fd, int ofd, char *buf, int n, int nofrom) in write2() argument
353 if(ofd <= 0) in write2()
357 return write(ofd, buf, n); in write2()
367 write(ofd, p, m); in write2()
371 write(ofd, " ", 1); in write2()
372 write(ofd, from, 4); in write2()
387 int first, nfld, delit, ofd; in mesgsend() local
[all …]
H A Dmesg.c562 int ofd, n, k, ret; in mesgsave() local
586 ofd = open(s, OWRITE); in mesgsave()
587 if(ofd < 0){ in mesgsave()
590 }else if(seek(ofd, 0LL, 2)<0 || write(ofd, all, n)!=n){ in mesgsave()
595 close(ofd); in mesgsave()
/plan9/sys/src/cmd/bzip2/
H A Dbunzip2.c12 static int bunzip(int ofd, char *ofile, Biobuf *bin);
58 int ofd, ifd, ok; in bunzipf() local
79 ofd = 1; in bunzipf()
100 ofd = create(ofile, OWRITE, 0666); in bunzipf()
101 if(ofd < 0){ in bunzipf()
110 ok = bunzip(ofd, ofile, &bin); in bunzipf()
119 if(!stdout && ofd >= 0) in bunzipf()
120 close(ofd); in bunzipf()
125 bunzip(int ofd, char *ofile, Biobuf *bin) in bunzip() argument
144 Binit(&bout, ofd, OWRITE); in bunzip()
H A Dbzip2.c65 int ifd, ofd, ok; in bzipf() local
86 ofd = 1; in bzipf()
100 ofd = create(ofile, OWRITE, 0666); in bzipf()
101 if(ofd < 0){ in bzipf()
112 Binit(&bout, ofd, OWRITE); in bzipf()
122 close(ofd); in bzipf()
/plan9/sys/src/cmd/gzip/
H A Dgunzip.c19 static int gunzip(int ofd, char *ofile, Biobuf *bin);
98 int ofd, ifd, ok; in gunzipf() local
119 ofd = -1; in gunzipf()
121 ofd = 1; in gunzipf()
142 ofd = create(ofile, OWRITE, 0666); in gunzipf()
143 if(ofd < 0){ in gunzipf()
153 ok = gunzip(ofd, ofile, &bin); in gunzipf()
162 if(!stdout && ofd >= 0) in gunzipf()
163 close(ofd); in gunzipf()
168 gunzip(int ofd, char *ofile, Biobuf *bin) in gunzip() argument
[all …]
H A Dgzip.c76 int ifd, ofd, ok; in gzipf() local
97 ofd = 1; in gzipf()
111 ofd = create(ofile, OWRITE, 0666); in gzipf()
112 if(ofd < 0){ in gzipf()
122 Binit(&bout, ofd, OWRITE); in gzipf()
132 close(ofd); in gzipf()
H A Dunzip.c13 static int copyout(int ofd, Biobuf *bin, long len);
14 static int crcwrite(void *ofd, void *buf, int n);
694 copyout(int ofd, Biobuf *bin, long len) in copyout() argument
707 if(crcwrite((void*)ofd, buf, n) != n) in copyout()
/plan9/sys/src/cmd/page/
H A Dfilter.c11 int ofd; in initfilt() local
33 ofd = opentemp("/tmp/pagecvtXXXXXXXXX"); in initfilt()
55 dup(ofd, 1); in initfilt()
63 seek(ofd, 0, 0); in initfilt()
65 Binit(b, ofd, OREAD); in initfilt()
/plan9/sys/src/ape/cmd/pax/
H A Dbuffer.c117 int ofd; local
120 if ((ofd = openout(name, asb, linkp = linkfrom(name, asb), 0)) > 0) {
122 close(indata(ofd, asb->sb_size, name));
126 passdata(linkp->l_path->p_name, ifd, name, ofd);
128 close(ofd);
315 void passdata(char *from, int ifd, char *to, int ofd) in passdata() argument
319 void passdata(from, ifd, to, ofd) in passdata()
323 int ofd;
335 && (sparse = ar_write(ofd, block, (uint) got)) >= 0) {
341 && (lseek(ofd, (OFFSET)(-sparse), 1) < 0
[all …]
H A Dpass.c140 int ofd; local
153 if ((ofd = openout(to, asb, islink(to, asb), 1)) < 0) {
156 if (ofd > 0) {
157 passdata(from, ifd, to, ofd);
/plan9/sys/src/ape/cmd/pdksh/
H A Dio.c268 ksh_dup2(ofd, nfd, errok) in ksh_dup2() argument
269 int ofd; in ksh_dup2()
273 int ret = dup2(ofd, nfd);
314 restfd(fd, ofd) in restfd() argument
315 int fd, ofd; in restfd()
319 if (ofd < 0) /* original fd closed */
322 ksh_dup2(ofd, fd, TRUE); /* XXX: what to do if this fails? */
323 close(ofd);
H A Dproto.h122 int ksh_dup2 ARGS((int ofd, int nfd, int errok));
124 void restfd ARGS((int fd, int ofd));
/plan9/sys/src/cmd/spin/
H A Dpangen1.c543 dolocal(FILE *ofd, char *pre, int dowhat, int p, char *s, enum btypes b) in dolocal() argument
559 do_var(ofd, dowhat, buf, sp, "", " = ", ";\n"); in dolocal()
583 do_var(ofd, dowhat, "", sp, buf, buf2, buf3); in dolocal()
587 do_var(ofd, dowhat, buf, sp, "", " = ", ";\n"); in dolocal()
848 do_var(FILE *ofd, int dowhat, char *s, Symbol *sp, in do_var() argument
873 walk_struct(ofd, dowhat, s, sp, pre, sep, ter); in do_var()
880 { fprintf(ofd, "\t\t%s%s%s%s", in do_var()
882 fprintf(ofd, "%s%s", s, sp->name); in do_var()
884 { fprintf(ofd, "\t\t%s%s%s%s", in do_var()
886 do_init(ofd, sp); in do_var()
[all …]
H A Dstructs.c430 walk_struct(FILE *ofd, int dowhat, char *s, Symbol *z, char *a, char *b, char *c) in walk_struct() argument
444 walk_struct(ofd, dowhat, eprefix, tl->sym, a,b,c); in walk_struct()
446 do_var(ofd, dowhat, eprefix, tl->sym, a,b,c); in walk_struct()
/plan9/sys/src/cmd/
H A Didiff.c28 int fd, ofd; in main() local
66 ofd = opentemp(idiffout, ORDWR|ORCLOSE, 0); in main()
70 Binit(&bout, ofd, OWRITE); in main()
74 seek(ofd, 0, 0); in main()
75 Binit(&bout, ofd, OREAD); in main()
H A Dkbmap.c137 int i, fd, ofd; in writemap() local
144 if((ofd = open("/dev/kbmap", OWRITE)) < 0) { in writemap()
150 if(write(ofd, buf, i) != i){ in writemap()
156 close(ofd); in writemap()
/plan9/sys/src/cmd/postscript/postio/
H A Difdef.c800 int ofd; /* for saving and restoring stderr */ in dkhost_connect() local
820 ofd = dup(2); in dkhost_connect()
835 dup(ofd); in dkhost_connect()
836 close(ofd); in dkhost_connect()
/plan9/sys/lib/dist/cmd/bzfs/
H A Dunbzip.c68 bunzip(int ofd, char *ofile, Biobuf *bin) in bunzip() argument
87 Binit(&bout, ofd, OWRITE); in bunzip()