/**************************************************************************/
/*                                                                        */
/*                                 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_put_.c,v 1.2 1997/09/25 17:19:55 ae59 Exp $ */
/*
$Log: f_put_.c,v $
 * Revision 1.2  1997/09/25  17:19:55  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:22:28  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : f_put_.c                              */
/*                                                              */
/*      Entry           : void f_put_(desc)                     */
/*                        f_text *desc;                         */
/*                                                              */
/*      Arguments       : desc   - descriptor of device         */
/*                                                              */
/*      Description     : PASCAL put function.                  */
/*                                                              */
/*      Date            : 1991-02-01                            */
/*      1991-02-01 : f_putc() used instead of f_putc()          */
/*      1990-11-12 : E_TPUSH+E_TPOPP                            */
/****************************************************************/

#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_put_(f_text *desc)
#else
local void f_put_(desc)

f_text *desc;
#endif
        {
        size_t i;

        E_TPUSH("f_put_")

        if (desc->asgd==FALSE || desc->fp==NULL)
           e_trap(I_O_ERROR,4,E_TMSG,17,E_TSTR+E_TEXT(8),desc->name);
        else if(desc->infl==TRUE)
           e_trap(I_O_ERROR,4,E_TMSG,34,E_TSTR+E_TEXT(8),desc->name);
        else if(desc->err==TRUE)
           e_trap(I_O_ERROR,4,E_TMSG,35,E_TSTR+E_TEXT(8),desc->name);
        else
           {
           for (i=0;i<desc->ellen;i++)
              f_putc((a_char)desc->win.ch[i],desc);
           }

        E_TPOPP("f_put_")
        }
