diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2023-02-27 09:47:50 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2023-02-27 14:39:45 +0000 |
commit | cc86ef9a49487d2a71d0f49b201853a43038d34c (patch) | |
tree | 40b11fbae0e98fbf564b6f53492f18ca4e7b9dd1 /psi | |
parent | d68bb39be2c7ff5ad4d7e702737bfd21395ec19e (diff) | |
download | ghostpdl-cc86ef9a49487d2a71d0f49b201853a43038d34c.tar.gz |
Bug 706389: Fix versioning format consistency
The main code issue with this bug was that the banner printed on startup is
printed from Postscript, and Postscript's cvs operator doesn't allow for
dictating the number of digits it outputs so the number 00 will always end up as
the string "0", or 01 as "1". So our 10.01.0 version would be printed as
"10.1.0".
To address this, as a ".revisionstring" entry to systemdict, created during
startup, the string is created in C, so we control the format.
The remaining issues need to be address as part of the release process.
Diffstat (limited to 'psi')
-rw-r--r-- | psi/iinit.c | 10 | ||||
-rw-r--r-- | psi/int.mak | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/psi/iinit.c b/psi/iinit.c index 2d8bfe99e..5242f3a77 100644 --- a/psi/iinit.c +++ b/psi/iinit.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2022 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -405,7 +405,7 @@ zop_init(i_ctx_t *i_ctx_p) /* Initialize the predefined names other than operators. */ /* Do this here in case op_init changed any of them. */ { - ref vcr, vpr, vpf, vre, vrd; + ref vcr, vpr, vpf, vre, vrd, vres; make_const_string(&vcr, a_readonly | avm_foreign, strlen(gs_copyright), (const byte *)gs_copyright); @@ -414,13 +414,17 @@ zop_init(i_ctx_t *i_ctx_p) make_const_string(&vpf, a_readonly | avm_foreign, strlen(gs_productfamily), (const byte *)gs_productfamily); + make_const_string(&vres, a_readonly | avm_foreign, + strlen(GS_STRINGIZE(GS_DOT_VERSION)), + (const byte *)GS_STRINGIZE(GS_DOT_VERSION)); make_int(&vre, gs_revision); make_int(&vrd, gs_revisiondate); if ((code = i_initial_enter_name(i_ctx_p, "copyright", &vcr)) < 0 || (code = i_initial_enter_name(i_ctx_p, "product", &vpr)) < 0 || (code = i_initial_enter_name(i_ctx_p, "productfamily", &vpf)) < 0 || (code = i_initial_enter_name(i_ctx_p, "revision", &vre)) < 0 || - (code = i_initial_enter_name(i_ctx_p, "revisiondate", &vrd)) < 0) + (code = i_initial_enter_name(i_ctx_p, "revisiondate", &vrd)) < 0 || + (code = i_initial_enter_name(i_ctx_p, ".revisionstring", &vres)) < 0) return code; } diff --git a/psi/int.mak b/psi/int.mak index db0e5c2df..f049aa0bf 100644 --- a/psi/int.mak +++ b/psi/int.mak @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2021 Artifex Software, Inc. +# Copyright (C) 2001-2023 Artifex Software, Inc. # All Rights Reserved. # # This software is provided AS-IS with no warranty, either express or @@ -291,7 +291,7 @@ $(PSOBJ)iinit.$(OBJ) : $(PSSRC)iinit.c $(GH) $(string__h)\ $(ipacked_h) $(iparray_h) $(iutil_h) $(ivmspace_h) \ $(gxiodev_h) $(store_h)\ $(INT_MAK) $(MAKEDIRS) - $(PSCC) $(PSO_)iinit.$(OBJ) $(C_) $(PSSRC)iinit.c + $(PSCC) $(D_)GS_DOT_VERSION=$(GS_DOT_VERSION)$(_D) $(PSO_)iinit.$(OBJ) $(C_) $(PSSRC)iinit.c $(PSOBJ)iscan.$(OBJ) : $(PSSRC)iscan.c $(GH) $(memory__h)\ $(btoken_h) $(dstack_h) $(ierrors_h) $(files_h)\ |