/**************************************************************************/
/*                                                                        */
/*                                 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_shr1.c,v 1.2 1997/09/25 17:06:55 ae59 Exp $ */
/*
$Log: b_shr1.c,v $
 * Revision 1.2  1997/09/25  17:06:55  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:21:41  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : b_shr1.c                              */
/*                                                              */
/*      Entries         : void b_shr1(lang,laenge);             */
/*                        a_btyp *lang;                         */
/*                        a_intg laenge;                        */
/*                                                              */
/*      Arguments       : lang = array of length laenge         */
/*                        laenge = length of array lang         */
/*                                                              */
/*      Description     : Shift a_btyp array lang of length     */
/*                        laenge by 1 position to the right     */
/*                                                              */
/*      Date            : 1990-12-18                            */
/*      1990-07-16 : 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 void b_shr1(a_btyp *lang,a_intg laenge)
#else
local void b_shr1(lang,laenge)

a_btyp *lang;
a_intg laenge;
#endif
        {
        a_intg i;

        /* shift right                                          */
        for ( i=laenge-1; i>0; i-- )
            lang[i] = (lang[i]>>1) | (lang[i-1]<<(B_LENGTH-1));
        *lang >>= 1;

        return;
        }
