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

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: vprintf.c,v 1.7 1997/01/27 00:36:34 ldp Exp $
  4.     $Log: vprintf.c,v $
  5.     Revision 1.7  1997/01/27 00:36:34  ldp
  6.     Polish
  7.  
  8.     Revision 1.6  1996/12/09 13:53:50  aros
  9.     Added empty templates for all missing functions
  10.  
  11.     Moved #include's into first column
  12.  
  13.     Revision 1.5  1996/10/24 15:50:38  aros
  14.     Use the official AROS macros over the __AROS versions.
  15.  
  16.     Revision 1.4  1996/09/13 17:50:09  digulla
  17.     Use IPTR
  18.  
  19.     Revision 1.3  1996/08/13 13:52:53  digulla
  20.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  21.     Replaced AROS_LA by AROS_LHA
  22.  
  23.     Revision 1.2  1996/08/01 17:40:59  digulla
  24.     Added standard header for all files
  25.  
  26.     Desc:
  27.     Lang: english
  28. */
  29. #include <proto/exec.h>
  30. #include <dos/dos.h>
  31. #include "dos_intern.h"
  32.  
  33. void vfp_hook();
  34.  
  35. /*****************************************************************************
  36.  
  37.     NAME */
  38. #include <proto/dos.h>
  39.  
  40.     AROS_LH2(LONG, VPrintf,
  41.  
  42. /*  SYNOPSIS */
  43.     AROS_LHA(STRPTR, format,   D1),
  44.     AROS_LHA(IPTR *, argarray, D2),
  45.  
  46. /*  LOCATION */
  47.     struct DosLibrary *, DOSBase, 159, Dos)
  48.  
  49. /*  FUNCTION
  50.  
  51.     INPUTS
  52.  
  53.     RESULT
  54.  
  55.     NOTES
  56.  
  57.     EXAMPLE
  58.  
  59.     BUGS
  60.  
  61.     SEE ALSO
  62.  
  63.     INTERNALS
  64.  
  65.     HISTORY
  66.     29-10-95    digulla automatically created from
  67.                 dos_lib.fd and clib/dos_protos.h
  68.  
  69. *****************************************************************************/
  70. {
  71.     AROS_LIBFUNC_INIT
  72.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  73.  
  74.     struct vfp vfp;
  75.     BPTR file=((struct Process *)FindTask(NULL))->pr_COS;
  76.  
  77.     vfp.file=file;
  78.     vfp.count=0;
  79.  
  80.     (void)RawDoFmt(format,argarray,vfp_hook,&vfp);
  81.  
  82.     /* Remove the last character (which is a NUL character) */
  83.     if(vfp.count>0)
  84.     {
  85.     vfp.count--;
  86.     ((struct FileHandle *)BADDR(file))->fh_Pos--;
  87.     }
  88.     return vfp.count;
  89.     AROS_LIBFUNC_EXIT
  90. } /* VPrintf */
  91.