/**************************************************************************/
/*                                                                        */
/*                                 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: l_rval.c,v 1.2 1997/09/25 17:38:31 ae59 Exp $ */
/*
$Log: l_rval.c,v $
 * Revision 1.2  1997/09/25  17:38:31  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:23:28  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : l_rval.c                              */
/*                                                              */
/*      Entries         : void l_rval(strng,s,rnd)              */
/*                        s_trng strng;                         */
/*                        multiprecision *s;                    */
/*                        a_intg rnd;                           */
/*                                                              */
/*      Arguments       : strng - input string                  */
/*                        s     - converted multiprecision      */
/*                        rnd   - rounding                      */
/*                                                              */
/*      Description     : Convert a string to multiprecision    */
/*                                                              */
/*      Date            : 1991-06-11                            */
/*      1991-06-11 : append '\0' to string in l_conv() call     */
/*      1991-06-10 : new routine                                */
/****************************************************************/

#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 l_rval(s_trng strng,multiprecision *s,a_intg rnd)
#else
local void l_rval(strng,s,rnd)

s_trng strng;
multiprecision *s;
a_intg rnd;
#endif
        {
        char ch;

        E_TPUSH("l_rval")

        ch = strng.ptr[strng.clen];
        strng.ptr[strng.clen] = '\0';
        l_conv((a_char *)strng.ptr,s,rnd);
        strng.ptr[strng.clen] = ch;

        if (strng.tmp) s_free(&strng);

        E_TPUSH("l_rval")
        return;
        }
