Lines 1032-1045
Link Here
|
1032 |
|
1032 |
|
1033 |
if (!isempty(psfifo->data)) { |
1033 |
if (!isempty(psfifo->data)) { |
1034 |
/* Send psfifo to renderer */ |
1034 |
/* Send psfifo to renderer */ |
1035 |
fwrite(psfifo->data, psfifo->len, 1, rendererhandle); |
1035 |
fwrite_or_die(psfifo->data, psfifo->len, 1, rendererhandle); |
1036 |
/* flush psfifo */ |
1036 |
/* flush psfifo */ |
1037 |
dstrclear(psfifo); |
1037 |
dstrclear(psfifo); |
1038 |
} |
1038 |
} |
1039 |
|
1039 |
|
1040 |
/* Send line to renderer */ |
1040 |
/* Send line to renderer */ |
1041 |
if (!printprevpage) { |
1041 |
if (!printprevpage) { |
1042 |
fwrite(line->data, line->len, 1, rendererhandle); |
1042 |
fwrite_or_die(line->data, line->len, 1, rendererhandle); |
1043 |
|
1043 |
|
1044 |
while (stream_next_line(line, stream) > 0) { |
1044 |
while (stream_next_line(line, stream) > 0) { |
1045 |
if (startswith(line->data, "%%")) { |
1045 |
if (startswith(line->data, "%%")) { |
Lines 1049-1055
Link Here
|
1049 |
break; |
1049 |
break; |
1050 |
} |
1050 |
} |
1051 |
else { |
1051 |
else { |
1052 |
fwrite(line->data, line->len, 1, rendererhandle); |
1052 |
fwrite_or_die(line->data, line->len, 1, rendererhandle); |
1053 |
linect++; |
1053 |
linect++; |
1054 |
} |
1054 |
} |
1055 |
} |
1055 |
} |
Lines 1141-1154
Link Here
|
1141 |
|
1141 |
|
1142 |
if (psfifo->len) { |
1142 |
if (psfifo->len) { |
1143 |
/* Send psfifo to the renderer */ |
1143 |
/* Send psfifo to the renderer */ |
1144 |
fwrite(psfifo->data, psfifo->len, 1, rendererhandle); |
1144 |
fwrite_or_die(psfifo->data, psfifo->len, 1, rendererhandle); |
1145 |
dstrclear(psfifo); |
1145 |
dstrclear(psfifo); |
1146 |
} |
1146 |
} |
1147 |
|
1147 |
|
1148 |
/* Print the rest of the input data */ |
1148 |
/* Print the rest of the input data */ |
1149 |
if (more_stuff) { |
1149 |
if (more_stuff) { |
1150 |
while (stream_next_line(tmp, stream)) |
1150 |
while (stream_next_line(tmp, stream)) |
1151 |
fwrite(tmp->data, tmp->len, 1, rendererhandle); |
1151 |
fwrite_or_die(tmp->data, tmp->len, 1, rendererhandle); |
1152 |
} |
1152 |
} |
1153 |
} |
1153 |
} |
1154 |
|
1154 |
|
Lines 1197-1203
Link Here
|
1197 |
|
1197 |
|
1198 |
/* Feed the PostScript header and the FIFO contents */ |
1198 |
/* Feed the PostScript header and the FIFO contents */ |
1199 |
if (prepend) |
1199 |
if (prepend) |
1200 |
fwrite(prepend->data, prepend->len, 1, kid3in); |
1200 |
fwrite_or_die(prepend->data, prepend->len, 1, kid3in); |
1201 |
|
1201 |
|
1202 |
/* We are the parent, return glob to the file handle */ |
1202 |
/* We are the parent, return glob to the file handle */ |
1203 |
*fd = kid3in; |
1203 |
*fd = kid3in; |