Lines Matching refs:safe_write
145 static int safe_write(int fd, const char *p, unsigned long len);
222 * safe_write(): a small wrapper which ensures all the data is written in calls
225 static int safe_write(int fd, const char *p, unsigned long len) {
1142 if (safe_write(outfile, header, strlen(header) + 1) < 0)
1144 if (safe_write(outfile, (const char *)&fileversion, sizeof(int)) < 0)
1148 if (safe_write(outfile, (char *)&(sp->scanheadwidth),
1151 if (safe_write(outfile, (char *)(sp->blackweight),
1154 if (safe_write(outfile, (char *)(sp->redweight),
1157 if (safe_write(outfile, (char *)(sp->greenweight),
1160 if (safe_write(outfile, (char *)(sp->blueweight),
1163 if (safe_write(outfile, (char *)(sp->gamma), 32) < 0)