/**************************************************************************/
/*                                                                        */
/*                                 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_bmcm.c,v 1.2 1997/09/25 16:59:00 ae59 Exp $ */
/*
$Log: b_bmcm.c,v $
 * Revision 1.2  1997/09/25  16:59:00  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:21:10  ae59
 * Put under RCS control
 *
 */
/************************************************************************/
/*                                                                      */
/* Descriptive Name : b_bmcm.c          Processor : C                   */
/*                                                                      */
/* Compare mantissas of intern numbers                                  */
/*                                                                      */
/* Function value :   int   0 - mantissas compared                      */
/*                         -1 - first number less than second number    */
/*                          1 - first number greater than second number */
/*                                                                      */
/* Function references : none                                           */
/*                                                                      */
/*      Date            : 1990-09-03                            */
/*      1990-07-16 : LINT_ARGS prototype                        */
/*      1990-08-02 : data type of argument n changed to a_btyp  */
/*      1990-09-03 : compare with decremented n corrected       */
/************************************************************************/

#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_bmcm(a_btyp n,a_btyp *i1,a_btyp *i2)
#else
local int b_bmcm(n,i1,i2)

a_btyp n;             /* length of mantissas                          */
a_btyp *i1;
a_btyp *i2;           /* pointer to intern mantissas                  */
#endif
        {
/*----------------------------------------------------------------------*/
        while (n-->0)
           {
           if (*i1>*i2) return(1);
           if (*i1<*i2) return(-1);
           i1++;
           i2++;
           }
/*----------------------------------------------------------------------*/
        return(0);
        }
