/**************************************************************************/
/*                                                                        */
/*                                 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_putc.c,v 1.2 1997/09/25 17:20:03 ae59 Exp $ */
/*
$Log: f_putc.c,v $
 * Revision 1.2  1997/09/25  17:20:03  ae59
 * Copyright-message
 *
 * Revision 1.1  1994/01/27  13:22:29  ae59
 * Put under RCS control
 *
 */
/****************************************************************/
/*                                                              */
/*      Filename        : f_putc.c                              */
/*                                                              */
/*      Entry           : void f_putc(ch,desc)                  */
/*                        a_char ch;                            */
/*                        f_text *desc;                         */
/*                                                              */
/*      Arguments       : ch     - character to be written      */
/*                        desc   - descriptor of device         */
/*                                                              */
/*      Description     : put a character to a checked          */
/*                        TEXT device.                          */
/*                                                              */
/*      Date            : 1991-07-09                            */
/*      1991-07-09 : set eoln=FALSE                             */
/*      1991-03-04 : fputc() argument casted to (int).          */
/*                   character assigned to desc->win.dow        */
/****************************************************************/

#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_putc(a_char ch,f_text *desc)
#else
local void f_putc(ch,desc)

a_char ch;
f_text *desc;
#endif
        {
        E_TPUSH("f_putc")

        desc->win.ch[0]=(char)ch;
        if (desc->err==FALSE)
        if (fputc((int)ch,desc->fp)==EOF)
           {
           desc->err = TRUE;
           e_trap(I_O_ERROR,4,E_TMSG,35,E_TSTR+E_TEXT(8),desc->name);
           }
        else
           desc->eoln = FALSE;

        E_TPOPP("f_putc")
        return;
        }
