[Info-vax] SDL header generator, was: Re: Error Messages in Basic - %BASIC-E-PARMODNOT, mode for parameter <n> of routine <procedure-name> not as declared
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Mon Jun 10 01:05:02 EDT 2019
On 2019-06-08, Robert A. Brooks <FIRST.LAST at vmssoftware.com> wrote:
> On 6/8/2019 3:47 PM, John Reagan wrote:
>
>> I suggested a change to the SDL years ago which I think would be invisible to
>> Macro and BLISS (I don't remember the state of C's XAB struct definition) but
>> my change was never accepted.
>
> Let's get the current SDL maintainer in a locked room and offer him
> a deal he cannot refuse.
>
If you are going to make changes to the SDL header generator, can you
_please_ get it to generate C header files which are much more
intelligent than they currently are ?
You commented earlier about people using their own headers instead of
the system supplied ones. One reason for that is that some of the
system supplied headers are _horrible_.
For example, take a look at the C header version of clidef, which is
the header that defines the control blocks for sys$cli().
That is a horrible, horrible, horrible, header file.
sys$cli() control blocks mostly have a common header and then a request
specific body. However, the header has been merged into one specific
control block, clidef1, instead of being a standalone structure that
is referenced by the definitions for the other blocks (such as clidef2).
If you want to use these header definitions in clidef2, you have to do
a non-typesafe cast of a clidef1 pointer to point to the start of clidef2
and make sure you only reference the common header part of clidef1. Yuck.
Also, the whole approach of SDL using a 64 bit integer (new definitions)
or an array of 2 32-bit integers (old definitions) to hold an inline
descriptor within a control block is _extremely_ yucky and offers no
type-checking (not even C language level type-checking) at compile time.
SDL has clearly been written to do a literal translation of what low-level
languages such as Macro-32 would see, and to deal with low-level memory
locations only without making use of any of the higher level abstractions
available in higher level languages, including C.
Surely SDL in the 21st century should be expected to do better than that ?
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world
More information about the Info-vax
mailing list