/**************************************************************************/
/*                                                                        */
/*                                 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: f_rdi1.c,v 1.2 1997/09/25 17:20:34 ae59 Exp $ */
/*
$Log: f_rdi1.c,v $
 * Revision 1.2  1997/09/25  17:20:34  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:22:31  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : f_rdi1.c                              */
/*                                                              */
/*      Entry           : void f_rdi1(desc,i)                   */
/*                        FILE *desc;                           */
/*                        a_intg *i;                            */
/*                                                              */
/*      Arguments       : desc   - device descriptor            */
/*                        i      - integer variable             */
/*                                                              */
/*      Description     : perform PASCAL read(integer).         */
/*                                                              */
/*      Date            : 1991-02-01                            */
/*      1991-02-01 : f_getc() used instead of fgetc()           */
/*      1991-01-29 : code reduced using b_text()                */
/*      1990-11-15 : E_TPUSH+E_TPOPP                            */
/*      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 f_rdi1(f_text *desc,a_intg *i)
#else
local void f_rdi1(desc,i)

f_text *desc;
a_intg *i;
#endif
        {
        E_TPUSH("f_rdi1")

        if (b_text(desc,TRUE))
           {
           *i = (a_intg)desc->win.ch[0];
           desc->eoln = FALSE;
           if (f_rint(desc->fp,i)==EOF)
              desc->eof = desc->eoln = TRUE;
           else
              f_getc(desc);
           }

        E_TPOPP("f_rdi1")
        }
