+Sun Dec 10 00:10:27 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+ * lib/mlib.c: remove no longer used struct
+ * lib/mlib.c: return number of bytes read in do_fd_read
+ * main/enquiry.c: one more place where we cah use read_fd_vbuf
+
Sat Dec 09 12:21:35 CET 2000 peter karlsson <peterk@debian.org>
* po/sv.po, doc/sv/deb.5, doc/sv/deb-old.5, doc/sv/dpkg.8:
checksubprocerr(status,description,sigpipeok);
}
-typedef struct do_fd_copy_data {
- int fd;
-} do_fd_copy_data_t;
typedef struct do_fd_buf_data {
void *buf;
int type;
do_fd_buf_data_t data = { buf, type };
va_list al;
struct varbuf v;
+ int ret;
varbufinit(&v);
varbufvprintf(&v, desc, al);
va_end(al);
- do_fd_read(fd, limit, do_fd_write_combined, &data, v.buf);
+ ret = do_fd_read(fd, limit, do_fd_write_combined, &data, v.buf);
varbuffree(&v);
+ return ret;
}
if (count<0) ohshite(_("failed in do_fd_read on read (%s)"), desc);
free(buf);
+ return bytesread;
}
exit(0);
}
close(p1[1]);
- while ((c= getc(ccpipe)) != EOF) varbufaddc(&vb,c);
- if (ferror(ccpipe)) ohshite(_("error reading from CC pipe"));
+ read_fd_vbuf(fileno(ccpipe), &vb, -1, _("error reading from CC pipe"));
waitsubproc(c1,"gcc --print-libgcc-file-name",0);
if (!vb.used) badlgccfn(ccompiler,"",_("empty output"));
varbufaddc(&vb,0);