home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / dos / writechars.c < prev   
Encoding:
C/C++ Source or Header  |  1997-01-27  |  1.3 KB  |  73 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: writechars.c,v 1.3 1997/01/27 00:36:35 ldp Exp $
  4.     $Log: writechars.c,v $
  5.     Revision 1.3  1997/01/27 00:36:35  ldp
  6.     Polish
  7.  
  8.     Revision 1.2  1996/12/09 13:53:51  aros
  9.     Added empty templates for all missing functions
  10.  
  11.     Moved #include's into first column
  12.  
  13.     Revision 1.1  1996/12/06 15:19:40  aros
  14.     Initial revision
  15.  
  16.  
  17.     Desc:
  18.     Lang: english
  19. */
  20. #include <proto/exec.h>
  21. #include "dos_intern.h"
  22.  
  23. /*****************************************************************************
  24.  
  25.     NAME */
  26. #include <proto/dos.h>
  27.  
  28.     AROS_LH2(LONG, WriteChars,
  29.  
  30. /*  SYNOPSIS */
  31.     AROS_LHA(STRPTR, buf, D1),
  32.     AROS_LHA(ULONG , buflen, D2),
  33.  
  34. /*  LOCATION */
  35.     struct DosLibrary *, DOSBase, 157, Dos)
  36.  
  37. /*  FUNCTION
  38.  
  39.     INPUTS
  40.  
  41.     RESULT
  42.  
  43.     NOTES
  44.  
  45.     EXAMPLE
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.  
  51.     INTERNALS
  52.  
  53.     HISTORY
  54.     5-12-96    turrican automatically created from
  55.                 dos_lib.fd and clib/dos_protos.h
  56.  
  57. *****************************************************************************/
  58. {
  59.     AROS_LIBFUNC_INIT
  60.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  61.  
  62.     ULONG i;
  63.     BPTR file=((struct Process *)FindTask(NULL))->pr_COS;
  64.  
  65.     for(i=0;i<buflen;i++)
  66.     if(FPutC(file,buf[i])<0)
  67.         return EOF;
  68.  
  69.     return (LONG)i;
  70.  
  71.     AROS_LIBFUNC_EXIT
  72. } /* WriteChars */
  73.