[Info-vax] What are my current process units - blocks or bytes ?

Stephen Hoffman seaohveh at hoffmanlabs.invalid
Thu Aug 27 10:32:47 EDT 2020


On 2020-08-27 09:36:33 +0000, geze... at rlgsc.com said:

> It would probably be a good idea if VSI enhanced F$GETJPI to include a 
> "DISPLAY_UNITS" request, so that command procedures can retrieve and 
> subsequently restore the display state as needed. Actually, it would be 
> a good policy with such settings in general.

Ignoring the apparently-undocumented-but-exists JPI$_UNITS and 
JPI$_TOKEN and JPI$_ORG_BYTLM discussions... Prolly a few other 
itemcodes missing too, but I've not poked in any detail...  Most of 
these appeared around V7.3-2, FWIW.

As for saving and restoring, can we not follow the bad design ideas 
from elsewhere within OpenVMS?

On request, push all the context settings onto some internal stack at 
the start of the DCL procedure, and upon request pop all the settings 
at exit.

Unfortunately, we can't expect DCL to do this save-restore implicitly 
upon entry as it'll likely break too much of the existing DCL, absent 
DCL2/NEWDCL/VCL/etc.

We've been chasing this half-baked nobody-thought-this-through DCL 
scheme with f$verify wrappers for decades, and then there's the 
canonical bad-design-example that is the 
C-RTL-forest-of-logical-names-misused-for-settings mess.

I mean, sure, querying the current setting is nice and can be useful, 
but the classic DCL (and C RTL model) manual-save-and-manual-restore 
scheme is just... hack-ish, fragile, ugly, in-extensible, and bad.

For an example of the alternative approach, #pragma environment save 
and #pragma environment restore in OpenVMS C.  This means I don't have 
to re-visit existing code to tweak what gets saved and restored, unlike 
the approach used in DCL and with those pesky C RTL feature logical 
names.

As for the original question on checking sizes, another wrinkle here 
that tends to get missed are the negative values that can and do arise 
within DCL, when the return values for the storage sizes overflow. 
Which they will.


-- 
Pure Personal Opinion | HoffmanLabs LLC 




More information about the Info-vax mailing list