[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
hb
end.of at inter.net
Wed Jun 12 13:04:05 EDT 2019
On 6/10/19 7:05 AM, Simon Clubley wrote:
> 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.
To remove some clutter, you may find "unifdef - selectively remove C
preprocessor conditionals" (https://github.com/fanf2/unifdef) useful.
With a few tweaks it compiles, links and runs on VMS. Let me know if you
can't figure out.
You may want to use it like (cut & paste may have wrapped this in an
unexpected way):
$ ty _:UNIFH.COM
$ if p1 .eqs. ""
$ then
$ this = f$environment("procedure")
$ this = this - f$parse(this,,,"version") - f$parse(this,,,"type")
$ write sys$output "UNIFdef Header file"
$ write sys$output "usage: @''this' <header-file>
$ write sys$output "examples:"
$ write sys$output " @''this' ptedef.h"
$ write sys$output " unifdef's ptedef.h to ptedef.txt"
$ write sys$output "Unifdef'ed means: defined are __NEW_STARLET and
__INITIAL_POINTER_SIZE,"
$ write sys$output "undefined are IAS_ASSEMBLER, __cplusplus, __VAXC
and __NOBASEALIGN_SUPPORT"
$ write sys$output "This command procedure creates and deletes the
file tmp.h"
$ write sys$output "in the current working directory."
$ exit
$ endif
$ o = p1 - f$parse(p1,,,"version") - f$parse(p1,,,"type")
$ convert/fdl=sys$input 'p1 sys$disk:[]tmp.h
file
org seq
record
format stream_lf
car car
$ pipe unifdef "-D__NEW_STARLET" "-UIAS_ASSEMBLER"
"-D__INITIAL_POINTER_SIZE" "-U__cplusplus" "-U__VAXC"
"-U__NOBASEALIGN_SUPPORT" tm
p.h >'o.txt
$ delete tmp.h;
More information about the Info-vax
mailing list