From: Piotr Caban piotr@codeweavers.com
--- dlls/wineps.drv/ps.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/dlls/wineps.drv/ps.c b/dlls/wineps.drv/ps.c index 59e245b9b6c..149bfc81c36 100644 --- a/dlls/wineps.drv/ps.c +++ b/dlls/wineps.drv/ps.c @@ -526,19 +526,11 @@ INT PSDRV_WriteEndPage( print_ctx *ctx )
INT PSDRV_WriteNewPage( print_ctx *ctx ) { - char *buf; - char name[100]; signed int xtrans, ytrans, rotation; - int ret = 1; + char buf[256], name[16];
sprintf(name, "%d", ctx->job.PageNo);
- buf = HeapAlloc( GetProcessHeap(), 0, sizeof(psnewpage) + 200 ); - if(!buf) { - WARN("HeapAlloc failed\n"); - return 0; - } - if(ctx->Devmode->dmPublic.dmOrientation == DMORIENT_LANDSCAPE) { if(ctx->pi->ppd->LandscapeOrientation == -90) { xtrans = GetDeviceCaps(ctx->hdc, PHYSICALHEIGHT) - @@ -564,10 +556,9 @@ INT PSDRV_WriteNewPage( print_ctx *ctx )
if( write_spool( ctx, buf, strlen(buf) ) != strlen(buf) ) { WARN("WriteSpool error\n"); - ret = 0; + return 0; } - HeapFree( GetProcessHeap(), 0, buf ); - return ret; + return 1; }