1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| --- a/dlls/localspl/cups.c +++ b/dlls/localspl/cups.c @@ -493,7 +493,24 @@ static NTSTATUS start_doc(void *args) static NTSTATUS write_doc(void *args) { const struct write_doc_params *params = args; - doc_t *doc = (doc_t *)(size_t)params->doc; + doc_t *doc = (doc_t *)(size_t)params->doc; + TRACE("\n"); + static FILE *ps_file = NULL; + if (!ps_file) : + doc_t *doc = (doc_t *)(size_t)params->doc; + + static FILE *ps_file = NULL; + if (!ps_file) + { + ps_file = fopen("/tmp/wine_print.ps", "wb"); : + doc_t *doc = (doc_t *)(size_t)params->doc; + TRACE("\n"); + static FILE *ps_file = NULL; + if (!ps_file) + { + ps_file = fopen("/tmp/wine_print.ps", "wb"); + if (!ps_file) + ERR("Failed to open PS debug file\n"); + } + + if (ps_file) + { + fwrite(params->buf, 1, params->size, ps_file); + fflush(ps_file); + TRACE("Saved %u bytes to /tmp/wine_print.ps\n", params->size); : + doc_t *doc = (doc_t *)(size_t)params->doc; + TRACE("\n"); + static FILE *ps_file = NULL; + if (!ps_file) + { + ps_file = fopen("/tmp/wine_print.ps", "wb"); + if (!ps_file) + ERR("Failed to open PS debug file\n"); + } + + if (ps_file) + { + fwrite(params->buf, 1, params->size, ps_file); + fflush(ps_file); + TRACE("Saved %u bytes to /tmp/wine_print.ps\n", params->size); + } return doc->write_doc(doc, params->buf, params->size); }
|