
/* This file was automatically generated by pclu.*/

#include "pclu_err.h"
#include "pclu_sys.h"


extern struct dbg_info* dbg_info__system_root;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG _system_root_TRACE
int _system_root_TRACE;
extern struct OPS *int_ops;
static Vlist1 owns__system_root = {0, 1,{ {0, 2, "_init", &int_ops}
}
};
extern errcode _home_dir();
CLUREF STR_CLU;
static int _system_root_own_init = 0;

/**** BEGIN PROCEDURE _system_root ****/

errcode _system_root(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        } locals;
    locals.DBG_INFO = dbg_info__system_root;
        if (_system_root_own_init == 0) {
        stringOPcons("CLU", CLU_1, CLU_3, &STR_CLU);
        _system_root_own_init = 1;
    }
    enter_proc(2);

  LINE(3);
    {
    {
    CLUREF T_1_1;
    locals.err = _home_dir(STR_CLU, &T_1_1);
    if (locals.err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE _system_root ****/

extern struct OPS *string_ops;
typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist2 *locals;
    Vlist1 *owns;
    Vlist0 *ptowns;
    Vlist0 *popowns;
    Slist0 *type_formals;
    Slist0 *op_formals;
    } dbg_info__system_root_actual;
static Vlist1 vals__system_root = {0, 1, { {0, 2, "", &string_ops}}
};
static siglist0 sigs__system_root = {0, 0};
static Vlist2 locals__system_root = {0, 2,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops}}
};
static Vlist0 popowns__system_root = {0, 0};
Slist0 tformals__system_root = {0, 0};
Slist0 opformals__system_root = {0, 0};
dbg_info__system_root_actual dbg_info__system_root_data = {0, 12, 
    "_system_root", "/common/pub/dcurtis-temp/pclu/lib/clu/_system_root.clu", 0, 0, (int)_system_root, 0, 
    &vals__system_root, &sigs__system_root, &locals__system_root, &owns__system_root, &NO_VALS, &NO_VALS, &NO_PARMS, &NO_PARMS};
    struct dbg_info *dbg_info__system_root = (struct dbg_info*)&dbg_info__system_root_data;
