[FreeVMS] Re: Coding Standard

Subject: [FreeVMS] Re: Coding Standard
From: Roar Thronæs (roart@nvg.ntnu.no)
Date: Wed Sep 10 2003 - 13:27:22 CEST

On Tue, Sep 09, 2003 at 11:40:39PM -0400, Andrew Allison wrote:
> Just to clarify / confirm the coding standard for all Library routines
> before I proceed / continue down the garden path. ( Disclaimer: I don't care
> which is picked both have merits :-)
> Currently the routines that are located in freevms/librtl/src are in the
> format of ...
> example: LIB$ADDX or lib_addx
> FreeVMS functions - Standard Functions
> External file name lib_addx.c Lower case 1 Underscore
> Internal function name lib$addx Lower case 1 Dollar
> Symbols / Const SS$_NORMAL Upper case 1 Dollar sign
> Question:
> Should we be using C style or VMS style.

According to lib$routines.h it is unsigned int lib$addx,
and in ssdef.h it is STR$_NORMAL.
Since we write it in C it should be the same.

> Should the external file name be the same as internal function names?
> External file name LIB$ADDX.c Really something
> like LIB\$ADDX.c when your typing
> Internal function name LIB$ADDX
> It will cause a lot of back slashes and double dollar signs in file
> names and Makefiles but it would be more VMS'ish.

I don't think VMS uses naming like lib$addx.c, rather libaddx.c, and short.
Should in any case not have $s in the filename; I have had problems with it
(mkdep and such).

> Side Note:
> I would like to restructure the directories a bit under
> librtl and add some other sub directories namely STR$, MTH$, LIB$, util,
> testing etc. or it's going to get very messy. Haven't picked a favorite yet.
> Either break librtl into librtl/STR$/src librtl/MTH$/src
> librtl/LIB$/src or
> librtl/src/STR$ librtl/src/MTH$
> librtl/LIB$/src
> Writers Note: Maybe I should settle for part 1 and let a few MONTHS
> pass, even before considering part 2.
> There is a lot of typing involved :-)

Having files named like librtl/src/lib*.c, librtl/src/ots*.c,
librtl/src/str*.c should be sufficient (for both ordinary and util routines).
MTH$, PPL$ seem to have their own directories mthrtl/src/ etc.
(If it was good enough for them, it should be for us...)
(After some years we could optimize stuff by using librtl/src/i386 dirs etc)
Test dir might be librtl/test/ ?

> What version of VMS should the library strive for? ( Maybe this question
> should be answered in 2005 :-)

Mainly 5.x.
The complete Internals books are 5.x, even though I from time to time use
newer stuff if needed.
(But all my online manuals are for 7.x, and I do not know the differences,
unless the libraries want newer kernel functionality or are 64-bit.)

What librtl stuff do you intend to write at first?

Roar Thronæs

Liste de diffusion FreeVMS
Pour se désinscrire : mailto:freevms-request@ml.free.fr?subject=unsubscribe

This archive was generated by hypermail 2b25 : Wed Sep 10 2003 - 13:28:40 CEST