[Info-vax] Announcing Ghostscript v9.05 for VMS

John E. Malmberg wb8tyw at qsl.network
Tue Aug 7 22:05:48 EDT 2012


On 8/7/2012 11:38 AM, hb wrote:
>
> Although I can't find anything documented I think to remember someone
> stating that setting DECC features should be done before decc$main runs.
> Again, this may not affect the feature you want to use or reset, but be
> aware that (re-)setting DECC features from main will not always work as
> expected.

Some DECC features must be set before decc$crtl_init() is called.

And the DECC features that control input line parsing need to be set 
before the decc internal main function parses those command line arguments.

The DCL set process/parse also affects this for programs that are 
launched directly from DCL.

In order to do that in C program, you must set those values in a 
LIB$INITIALIZE section.

You have to be careful in the LIB$INITIALIZE section to not call a C 
library routine that will need to call decc$crtl_init before calling the 
routines that set the decc features.

Unfortunately the documentation is sparse on what routines will 
implicitly call decc$crtl_init().  There are some guidelines in the CRTL 
in the decc$crtl_init() section.

And on the Perl project, I discovered that decc$disable_posix_root 
setting is not honored in a LIB$INITIALIZE section for programs that use 
Posix threads.

C programs may need to use a LIB$INITIALIZE section, and possibly a 
wrapper around the main() function to protect them selves against 
incompatible DECC logical names.

Here is a reference from the port of Bash 4.2.37 that is currently in 
progress, a vms_crtl_init.c that can be compiled 3 different ways 
depending of what is needed for the application.  The 
vms_crtl_init_demo.mms is used to build those variants and some test 
programs for them.

http://gnv.cvs.sourceforge.net/viewvc/gnv/gnu_vms/bash-4.2/vms_crtl_init.c?view=markup

http://gnv.cvs.sourceforge.net/viewvc/gnv/gnu_vms/bash-4.2/vms_crtl_init_demo.mms?view=markup

This type of coding is used for programs to behave one way under DCL and 
another way when run from GNV Bash.  The current ports of curl and Perl 
5.12.x and later are doing this.  The Perl support is not yet complete, 
as it needs a more improved GNV before that can be done and properly tested.

Regards,
-John
wb8tyw at qsl.network
Personal Opinion Only



More information about the Info-vax mailing list