[1,10] -- WHITESMITHS' SUPPORT ------------------------------ Submitted by: Chris Doran Date: September 1988 Sira Ltd., South Hill, Chislehurst, Kent, BR7 5EH, England. Tel: +44 1 467 2636, Telex: 896649, FAX: +44 1 467 6515 This directory contains corrections and additions to the Whitesmith's V2.1 and V2.2 C/Pascal system, and other utilities supplied in the UK by Real Time Systems. CPRINT.C printf() etc, see "The C Letter" V2 No 2, pp7-10, reprinted in PRINTF.C V2 No 3 pp8-11. Whilst printf() is in the Whitesmiths' SPRINTF.C Unix-compatible library under V2.2, this version avoids the enormous code overhead of ULIB (though it doesn't implement quite all the features of the Kernighan and Ritchie standard). I put this version in PLIB, so if anyone actually specifies ULIB (before PLIB), the ULIB version takes precedence. If they don't ask for ULIB, they still have printf(), which saves everyone getting disillusioned when their very first ("Hello world!") program typed in from K&R fails miserably. EXIT.MAC Exit with status and onexit, see "The C Letter", V2 No 2 24-Apr-81 pp11-12, with some changes. BLDA68.CMD Modified build files, containing some patches and BLDA80.CMD modifications to link with FCSRES without error BLDCPM.CMD See "The C Letter" V2 No5 pp13-15. BLDHEX.CMD BLD68.CMD BLD80.CMD MAIN.PAT Patch to library module _main to fetch command lines MAIN.OBJ;2 by .GCML instead of just GMCR$. See "The C Letter" MAIN.OBJ;1 V2 No 5 pp9-11. ECHO.C Test program for above. ECHO.CMD ECHOBLD.CMD LCMAIN.PAT Patch to _main for RT-11, without which no Whitesmith's utilities will work!! See file for details. XMCHDR.MAC Version of CHDR for RT-11 XM monitor to use extended memory .SETTOP, giving more heap space. LINK programs with XMCHDR.OBJ instead of CHDR.OBJ, and /XM switch. See "The C Letter" V2 No3 PP7-8 Aug 81. DATE.MAC DATE and TIME for Pascal (should work for C too). TIME.MAC See "The C Letter" V2 No5 pp11-13. DATIM.PAS DATE.MAR DATE and TIME for VAX C/Pascal. Return "[d]d-mmm-yyyy" and TIME.MAR "mm:hh:ss.tt". PCW.* This is the Pascal Benchmark from "Personal Computer World" magazine, together with some timings for various Pascals and similar high level languages on different machines. CLIST.C Whitesmiths' C version of C Checker program from a VAX SIG tape ([VAX84C.MADISONDE.MICRO]CC.C), with some corrections and many extensions. Counts brackets, quotes, primes, and comments to check for matches. Also does a line-numbered listing. Hardly as good as lint, but better than nothing. UNMATCHED.C Demonstration file, with almost everything unmatched. ENCRYPT*.* Simple program to encrypt and decrypt data using the Whitesmiths' encrypt/decrypt functions. Install as both ...ENC and ...DEC on RSX. Needs two separate programs on VMS -- see program source. ****************************************************************************** Only the following are new/updated for the Sept 88 submission. They apply mainly to use under VAX/VMS, but the HELP sources could be edited for RSX. C.RNH HELP on using Whitesmiths' C and Pascal compilers. These PASCAL.RNO require Bonner Lab Runoff to expand substitutions. Runoff C.RNH CSYNTAX.RNO alone for the C file, PASCAL.RNO+C.RNH for the Pascal version. These files may be slightly Sira-specific, as I've altered (debugged) the compiler driver scripts a little. There is no description of Pascal language syntax yet, and descriptions of the C runtime libraries could do with fleshing out a bit. TOH.COM Command procedure to convert a MACRO symbol definitions file to a C .H file. The MACRO file is extracted from a library (presumably SYS$LIBRARY:STARLET.MLB, or LIB.MLB). Then all lines other than those beginning $EQU are thrown away, $EQU's are changed to #define's, and ;...'s become /*...*/. Invoke as: $@TOH library module .H_file You are prompted for the arguments if you don't give them. Thus, SMGDEF.H, required for the above program can be produced by: $@TOH SYS$LIBRARY:STARLET $SMGDEF SMGDEF (default filetypes are .MLB and .H). This procedure uses the Real Time Systems "stream editor", XSE. If you don't have XSE, you may be able to write an EDT or TPU command file to do what XSE does There is an option (module=*) to extract ALL $*DEF modules from the library, but it takes a long time; I suggest you only fetch things when you need them. An alternative option (module = ^) replaces only those which already exist, which is useful after system updates. In this case, you are told about modules which have changed, and both old and new versions are left for you to compare. In any case, you should examine what TOH produces; MACRO forms I haven't encountered may produce invalid C code. Note that only simple constant #defines are produced. For things which are really structs (RAB, FAB etc.) see the [FERMILAB.VAXC*] directories on recent US VAX SIG tapes. SINGLE.C Simple demonstration of the above. SMGDEMO.C Whitesmiths' C version of the SMG$ demonstration program in the Screen Management Guidelines section of the VAX/VMS Runtime Library Manual, Part I. Also needs, and demonstrates, .H files produced by TOH.COM. DESCRIPTR.H Includes DESCRIPTOR typedef and $DESCRIPTOR_x macros (described in C.RNH, and used in the above demo programs. You should append this to SYS$LIBRARY:VMS.H. EDTDEF.H .H file for EDT$... symbols. There isn't a $EDTDEF module anywhere I can find, but you may need the symbol values if you want to use callable EDT. This file is created from the System Routines Manual, and listing of EDT$FILEIO in the V4.4 microfiche. In principle, I should warn you that it may change with a new release of VMS, but since EDT is being made obsolete, this is most unlikely. -------- Whitesmiths' C and Pascal compilers are marketed by Whitesmiths Ltd., 97 Lowell Road, Concord, Massachusetts, in the U.S.A., and by Real Time Systems, PO Box 70, Viking House, Nelson Street, Douglas, Isle of Man, (0624 26021) in the U.K.. Real Time Systems also produce XSE, X68000, etc..