From: btk@aber.ac.uk (Benjamin Thomas Ketteridge)
Newsgroups: comp.lang.ada
Subject: Re: DEC Ada run-time error messages (Was: More Ashamedness of Ada - this time OBJECT WORLD)
Date: 23 Nov 92 10:27:32 GMT
Organization: The Cottage of the 2 Bears, Aberystwyth.

> DEC's "Software Product Description" says that the DEC Ada compiler for
> Ultrix is written in Bliss and Ada (no proportions given). So, it's not
> the fault of C...

================ Cut Here ======================== Cut Here ===================

/* ACS generated code
*/
#define Ada_Start ada$acs$start
static int once_block[3] = { 0, 0, 0};
static int ada_component_handle_address;
int ada_argc;
char **ada_argv;
static ada_elaborate(task_monitor_ptr,coll_list_ptr)
        int task_monitor_ptr, coll_list_ptr;

{
        ADA$MAIN_PROGRAM_ARGUMENT_LIST_$E (task_monitor_ptr, coll_list_ptr);
        ADA$ANALYSER_$E (task_monitor_ptr, coll_list_ptr);
        ADA$LOW_LEVEL_IO_$E (task_monitor_ptr, coll_list_ptr);
        ADA$IO_EXCEPTIONS_$E (task_monitor_ptr, coll_list_ptr);
        ADA$LOW_LEVEL_IO$E (task_monitor_ptr, coll_list_ptr);
        ADA$TEXT_IO_$E (task_monitor_ptr, coll_list_ptr);
        ADA$TEXT_IO$E (task_monitor_ptr, coll_list_ptr);
        ADA$C_TYPES_$E (task_monitor_ptr, coll_list_ptr);
        ADA$C_TYPES$E (task_monitor_ptr, coll_list_ptr);
        ADA$MAIN_PROGRAM_ARGUMENT_LIST$E (task_monitor_ptr, coll_list_ptr);
        ADA$VMT_PACKAGE_$E (task_monitor_ptr, coll_list_ptr);
        ADA$MATH_LIB_$E (task_monitor_ptr, coll_list_ptr);
        ADA$D3_VECTORS_$E (task_monitor_ptr, coll_list_ptr);
        ADA$MATH_LIB_ERRNO_$E (task_monitor_ptr, coll_list_ptr);
        ADA$MATH_LIB$E (task_monitor_ptr, coll_list_ptr);
        ADA$D3_VECTORS$E (task_monitor_ptr, coll_list_ptr);
        ADA$VMT_PACKAGE$E (task_monitor_ptr, coll_list_ptr);
        ADA$OGL_PACKAGE_$E (task_monitor_ptr, coll_list_ptr);
        ADA$OGL_PACKAGE$E (task_monitor_ptr, coll_list_ptr);
        ADA$SML_PACKAGE_$E (task_monitor_ptr, coll_list_ptr);
        ADA$SML_PACKAGE$E (task_monitor_ptr, coll_list_ptr);
        ADA$ANALYSER$E (task_monitor_ptr, coll_list_ptr);
        return;
}

static ada_make_component_handle()
{
    ada_component_handle_address = ada$init_component_handle(ada_elaborate);
}
int Ada_Start ()
{
    ada$cma_once(once_block, ada_make_component_handle);
    return ada_component_handle_address;
}

main(argc, argv ,envp)
    int argc;
    char *argv[];
    char *envp[];
{
    int my_component_handle;
    int returned_value;

#define Main_Name ADA$ANALYSE$M
    int Main_Name();

#define Ada_Init ada_init_no_tasks
    int Ada_Init();
    int ada_complete_component();
    int ada_call_main_program();
    int Ada_Start();
        ada_argc = argc;
        ada_argv = argv;
        Ada_Init(Ada_Start, 1, 2, &my_component_handle);
        if(!my_component_handle) {
            return 1;
        }
        returned_value = ada_call_main_program(Main_Name, &my_component_handle);
        ada_complete_component(&my_component_handle);
        return 0;
}

================ Cut Here ======================== Cut Here ===================

When binding an Ada program under DEC Ada 1.10 the above is compiled first, and 
then linked into the executable along with the user's program! I think it's C,
don't you? >8-> >8->

ciao
+--------------------------------------------------------------------------+
|    _|--|_    | Disclaimer: I know nothing! Do you really know anything?  |
|     (\/)     +-------------------------------+---------------------------+
|      vv      | We've a Gremlin in the works! |      btk@aber.ac.uk       |
+--------------+-------------------------------+---------------------------+