/**************************************************************************/
/*                                                                        */
/*                                 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: b_ball.c,v 1.2 1997/09/25 16:56:43 ae59 Exp $ */
/*
$Log: b_ball.c,v $
 * Revision 1.2  1997/09/25  16:56:43  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:21:01  ae59
 * Put under RCS control
 *
 */
/************************************************************************/
/*                                                                      */
/* Descriptive Name : b_ball.c          Processor : C                   */
/*                                                                      */
/* Allocation of a_btyp array and clear allocated array.                */
/*                                                                      */
/* Function value : int     0 - a_btyp array allocated                  */
/*                      ALLOC - allocation error                        */
/*                                                                      */
/*      Date            : 1991-01-17                                    */
/*      1991-01-17 : (size_t) cast in calloc()                          */
/*      1990-07-13 : LINT_ARGS prototype                                */
/************************************************************************/

#ifndef ALL_IN_ONE
#ifdef AIX
#include "/u/p88c/runtime/o_defs.h"
#else
#include "o_defs.h"
#endif
#define local
#endif

#ifdef LINT_ARGS
local int b_ball(a_btyp n,a_btyp **i)
#else
local int b_ball(n,i)

a_btyp n;             /* length of mantissa to be allocated             */
a_btyp **i;           /* address of pointer to a_btyp array             */
#endif
        {
        /* possible allignment problem in case of incorrect calloc()    */
        if ((*i = (a_btyp *)calloc((size_t)n,sizeof(a_btyp)))==NULL)
           return(ALLOC);
#ifdef HEAP_CHECK
b_geth((a_char *)i,(a_char *)(*i),(a_char *)"b_ball");
#endif
        return(0);
        }
