-- File: RapunzelService.doc - last edit: -- BJackson.pa 26-Sep-86 20:56:34 -- Copyright (C) 1986 by Xerox Corporation. All rights reserved. ***Watch out for CCompiler bug(s)*** Bug #1: SEQUENCES have bad description routines generated for these data types. What needs to be done is whenever you run CCompiler, you MUST hand edit the file RapunzelDescription.mesa and change all occurances of the string "BASE[p­]" into "p". ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DescribeSeqCmd: Courier.Description = { p: LONG POINTER TO Rapunzel.SeqCmd = notes.noteSize[ SIZE[Rapunzel.SeqCmd]]; notes.noteArrayDescriptor[p, SIZE[Rapunzel.Cmd], CARDINAL.LAST]; FOR i:Rapunzel.SeqCmdIndex IN [0..LENGTH[p­]) DO notes.noteParameters[@p[i], DescribeCmd]; ENDLOOP; }; instead of: notes.noteArrayDescriptor[BASE[p­], SIZE[Rapunzel.Cmd], CARDINAL.LAST]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bug #2: CHOICES have bad description routines generated for these data types. What needs to be done is whenever you run CCompiler, you MUST hand edit the file RapunzelDescription.mesa and change all occurances of passages which define the sizes of the individual variant type (so that they do include the type word). These passages look like: sizes: ARRAY [0..#) OF CARDINAL ¬ [ SIZE[type1], SIZE[type2], ...]; they should look like: SIZE[tag1 variantRecordType], SIZE[tag2 variantRecordType], ...]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DescribeCmd: Courier.Description = { p: LONG POINTER TO Rapunzel.Cmd = notes.noteSize[ SIZE[Rapunzel.Cmd]]; sizes: ARRAY [0..2) OF CARDINAL ¬ [ SIZE[Rapunzel.PokeShortCmd], SIZE[Rapunzel.PeekShortCmd]]; notes.noteChoice[p, SIZE[Rapunzel.Cmd], LONG[DESCRIPTOR[sizes]]]; WITH variant: p­ SELECT FROM pokeShort => notes.noteParameters[@variant.pokeShort, DescribePokeShortCmd]; peekShort => notes.noteParameters[@variant.peekShort, DescribePeekShortCmd]; ENDCASE; }; instead of: SIZE[pokeShort Rapunzel.Cmd], SIZE[peekShort Rapunzel.Cmd]]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~