[cairo-commit] 2 commits - src/cairo-ps-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 15:48:55 UTC 2022


 src/cairo-ps-surface.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 20a54465c597b4f90ab35d73cab25b6e89dfa9bb
Merge: 688164aba 092da8a99
Author: Uli Schlachter <psychon at znc.in>
Date:   Tue Apr 5 15:48:53 2022 +0000

    Merge branch 'issue-537' into 'master'
    
    Add CAIRO_DEBUG_PS_NO_DATE env var to remove date from PS output
    
    Closes #537
    
    See merge request cairo/cairo!308

commit 092da8a9979d2b1ce1ee5af3e3a282411a8521e7
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Tue Apr 5 20:03:32 2022 +0930

    Add CAIRO_DEBUG_PS_NO_DATE env var to remove date from PS output
    
    Fixes #537

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 2d05ad69f..b5cf60d1b 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -316,17 +316,21 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface)
 
     _cairo_output_stream_printf (surface->final_stream,
 				 "%%!PS-Adobe-3.0%s\n"
-				 "%%%%Creator: cairo %s (https://cairographics.org)\n"
-				 "%%%%CreationDate: %s"
-				 "%%%%Pages: %d\n",
+				 "%%%%Creator: cairo %s (https://cairographics.org)\n",
 				 eps_header,
-				 cairo_version_string (),
-				 ctime_r (&now, ctime_buf),
-				 surface->num_pages);
+				 cairo_version_string ());
+
+    if (!getenv ("CAIRO_DEBUG_PS_NO_DATE")) {
+	_cairo_output_stream_printf (surface->final_stream,
+				     "%%%%CreationDate: %s",
+				     ctime_r (&now, ctime_buf));
+    }
 
     _cairo_output_stream_printf (surface->final_stream,
+				 "%%%%Pages: %d\n"
 				 "%%%%DocumentData: Clean7Bit\n"
 				 "%%%%LanguageLevel: %d\n",
+				 surface->num_pages,
 				 level);
 
     if (!cairo_list_is_empty (&surface->document_media)) {


More information about the cairo-commit mailing list