/**************************************************************************/
/*                                                                        */
/*                                 Sources                                */
/*                                from  the                               */
/*                           XSC SOFTWARE PACKAGE                         */
/*                                                                        */
/*                Copyright (c) 1997 University of Karlsruhe              */
/*                     Institute for Appl. Mathematics                    */
/*                                                                        */
/* This program is free software for non-commercial use. For details, see */
/* the file LICENSE.XSC, distributed with this software package.          */
/*                                                                        */
/* This program is distributed WITHOUT ANY WARRANTY. For details, see the */
/* file LICENSE.XSC, distributed with this software package.              */
/*                                                                        */
/**************************************************************************/

/* RCS $Id: e_popp.c,v 1.2 1997/09/25 17:16:17 ae59 Exp $ */
/*
$Log: e_popp.c,v $
 * Revision 1.2  1997/09/25  17:16:17  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:22:15  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : e_popp.c                              */
/*                                                              */
/*      Entries         : void e_popp                           */
/*                                                              */
/*      Description     : pop trace back entry from stack       */
/*                                                              */
/*      Date            : 1992-01-16                            */
/*      1992-01-16 : e_renv replaced by o_text[6]               */
/****************************************************************/

#ifndef ALL_IN_ONE
#ifdef AIX
#include "/u/p88c/runtime/o_defs.h"
#else
#include "o_defs.h"
#endif
#define local
extern bentry *e_btop;
extern int e_line;
#ifdef TRACEC_ENABLE
extern a_bool f_pptr;
extern int e_tlvl;
#endif
extern f_text f_errr;
extern char *e_head;
#ifdef STATTB_ENABLE
extern a_bool f_pptb;
#endif
extern char *o_text[];
#endif

#ifdef LINT_ARGS
local void e_popp(void)
#else
local void e_popp()
#endif
        {
#ifdef TRACEC_ENABLE
        int i;

        if (f_pptr)
#ifdef STATTB_ENABLE
#ifndef RTSTRC_DISABLE
        if (NOT(f_pptb) || e_btop->filename!=o_text[6])
#endif
#endif
           {
           e_tlvl--;
           fprintf(f_errr.fp,"%s",e_head);
           for (i=0;i<e_tlvl;i++)
              fprintf(f_errr.fp,"%c",((i%5) ? '.' : '+'));
           fprintf(f_errr.fp,"%s in %s terminated.\n",
                   e_btop->function,e_btop->filename);
           }
#endif

        if (e_btop==(bentry *)NULL) return;

        /* restore global variable e_line                       */
        e_line = e_btop->line;

        /* pop top element from traceback stack                 */
        e_btop = e_btop->pred;

        return;
        }
