]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix NULL printer name bug.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 3 Oct 2008 20:34:07 +0000 (20:34 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 3 Oct 2008 20:34:07 +0000 (20:34 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@8005 7a7537e8-13f0-0310-91df-b6672ffda945

filter/bannertops.c

index db4bd91124167d90db9ced4deb8ba2561823c37e..43970c1a8e0d5e85ae41c0c6ccdb37b8e07c8c4d 100644 (file)
  *
  * Contents:
  *
+ *   main()           - Generate PostScript cover pages.
+ *   load_banner()    - Load the banner file.
+ *   ps_ascii85()     - Print binary data as a series of base-85 numbers.
+ *   write_banner()   - Write a banner page...
+ *   write_epilogue() - Write the PostScript file epilogue.
+ *   write_prolog()   - Write the PostScript file prolog with options.
  */
 
 /*
@@ -601,11 +607,11 @@ write_banner(banner_file_t *banner,       /* I - Banner file */
        y -= line_height;
        psTextUTF8(fonts, fontsize, PS_BOLD, PS_RIGHT,
                   _cupsLangString(language, _("Printer Name: ")));
-        psTextUTF8(fonts, fontsize, PS_NORMAL, PS_LEFT, getenv("PRINTER_NAME"));
+        psTextUTF8(fonts, fontsize, PS_NORMAL, PS_LEFT, getenv("PRINTER"));
       }
       if (banner->show & SHOW_JOB_ID)
       {
-        snprintf(text, sizeof(text), "%s-%d", getenv("PRINTER_NAME"), job_id);
+        snprintf(text, sizeof(text), "%s-%d", getenv("PRINTER"), job_id);
        printf("%.1f %.1f moveto", x, y);
        y -= line_height;
        psTextUTF8(fonts, fontsize, PS_BOLD, PS_RIGHT,