2 % (c) The GRASP/AQUA Project, Glasgow University, 1994
4 \subsection[writeFile.lc]{hPutStr Runtime Support}
12 writeFile(buf, fp, bytes)
18 char *p = (char *) buf;
23 /* Disallow short writes */
24 while ((count = fwrite(p, 1, bytes, (FILE *) fp)) < bytes) {
32 clearerr((FILE *) fp);
40 writeBuf(fp, elt_sz, len, buf)
47 char *p = (char *) buf;
49 if (len == 0 || elt_sz == 0)
52 /* Disallow short writes */
53 while ((count = fwrite((char *)buf, (unsigned)elt_sz, (int)len, (FILE *) fp)) < len) {
61 clearerr((FILE *) fp);