[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxaxp::vmsnotes

Title:VAX and Alpha VMS
Notice:This is a new VMSnotes, please read note 2.1
Moderator:VAXAXP::BERNARDO
Created:Wed Jan 22 1997
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:703
Total number of notes:3722

379.0. "trouble with iledef.h, __NEW_STARLET, and lib$routines.h" by STAR::ABIS (I come in peace) Tue Mar 25 1997 11:03

        When somebody told me that there was finally an "official" def file
        with item list definitions I said "GROOVY MAN!"

        But when I included iledef in my code, I got an error:

$ ty test.c
#include <lib$routines>
#include <iledef>

main ()
{
unsigned int eventFlag;
ILE3 item_list[5];
int status;

status = lib$get_ef( &eventFlag );
return status;
}
$ cc test

ILE3 item_list[5];
.....^
%CC-E-NOSEMI, Missing ";".
at line number 7 in file SYS$SYSDEVICE:[ABIS.DELETE]TEST.C;12

        When I asked around, somebody told me I need to define __NEW_STARLET to
        get the item list definintions to work.  He didn't know why.  So I
        tried it:

$ cc/defin=__NEW_STARLET test

        int coefficient [4] [],
............^
%CC-E-BADBOUNDS, In the declaration of "coefficient", the array bounds are incor
rectly specified.
at line number 2811 in module LIB$ROUTINES of text library SYS$COMMON:[SYSLIB]SY
S$STARLET_C.TLB;1

        And that screwed up lib$routines.  So it looks like we have two bugs
        here.  Why do I need to define __NEW_STARLET to get item list
        definitions and the lib$routines problem.

        I'm running Alpha VMS 7.1, DEC C V5.5-003

        Eric
T.RTitleUserPersonal
Name
DateLines
379.1Looks like QAR materialXDELTA::HOFFMANSteve, OpenVMS EngineeringTue Mar 25 1997 11:580
379.2what facility?STAR::ABISI come in peaceTue Mar 25 1997 13:261
379.3Database EVMS-RAVEN, component STARLET.XDELTA::HOFFMANSteve, OpenVMS EngineeringTue Mar 25 1997 13:320
379.4MILORD::BISHOPThe punishment that brought us peace was upon HimTue Mar 25 1997 21:119
    the coefficient problem in lib$routines is known and fixed post-V7.1.
    
    You need to extract lib$routines, edit it to reverse the [] and the [4]
    and replace it into the library. then that one will be all set.
    
    I can't help you with the iledef part, but if you QAR it, we can find
    out what's going on.
    
    - Richard.
379.5EEMELI::MOSEROrienteers do it in the bush...Wed Mar 26 1997 08:0613
    you need the __NEW_STARLET in order to get the ILE3 definition,
    otherwise you need to use something like 'struct ile3' instead.
    
    It is best explained if you extract the header file and have a look
    at it via
    
    $ libr/extr=iledef/out=tt sys$share:sys$starlet_c.tlb
    
    I do agree with you, that the error message isn't very verbose in
    pointing you at the right direction, but after you have started to
    use __NEW_STARLET fro a while you get used to what look for first...
    
    /cmos
379.6QAR count just went up by 2STAR::ABISI come in peaceWed Mar 26 1997 10:228
I figured that out and changed my declaration to lowercase so that I don't need
__NEW_STARLET.  And without __NEW_STARLET, lib$routines is working again.  

I also entered two QARs so that management can have some numbers to play with
and because I don't think it's a good idea to have types change their spelling
when other literals are defined.

Eric
379.7working as designedEVMS::RIXWed Mar 26 1997 15:4828
Eric,

A while ago, VMS created C header files for all of our [LIB] 
data structures.  In doing this we chose certain "standards" 
that we would adhere to....one of these standards is that all
our typedef names would consist of capital letters.

After we did all this for LIB, we decided it would be convenient 
to be able to use STARLET the same way.  A problem we had 
was that SDL generated the type name in lower case and many
of the SDL aggregate definitions were not typedefs at all. 

Along came __NEW_STARLET.  SDL was modified so that a backward
compatible definition of the aggregate would be defined, 
so we wouldn't affect any customers, and a new definition 
(__NEW_STARLET) would get generated using the "standards" we
set for our LIB data structures.

If you had originally defined :

ile3 item_list[5];

all should have worked fine without defining __NEW_STARLET.


-Anne McElearney