home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / compiler / clib / sprintf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-09  |  1.2 KB  |  64 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: sprintf.c,v 1.1 1996/12/11 14:27:10 aros Exp $
  4.  
  5.     Desc: ANSI C function sprintf()
  6.     Lang: english
  7. */
  8.  
  9. /*****************************************************************************
  10.  
  11.     NAME */
  12. #include <stdio.h>
  13.  
  14.     int sprintf (
  15.  
  16. /*  SYNOPSIS */
  17.     char       * str,
  18.     const char * format,
  19.     ...)
  20.  
  21. /*  FUNCTION
  22.     Formats a list of arguments and writes them into the string str.
  23.  
  24.     INPUTS
  25.     str - The formatted string is written into this variable. You
  26.         must make sure that it is large enough to contain the
  27.         result.
  28.     format - Format string as described above
  29.     ... - Arguments for the format string
  30.  
  31.     RESULT
  32.     The number of characters written into the string.
  33.  
  34.     NOTES
  35.     No checks are made that str is large enough for the result.
  36.  
  37.     EXAMPLE
  38.  
  39.     BUGS
  40.  
  41.     SEE ALSO
  42.     fprintf(), vprintf(), vfprintf(), snprintf(), vsprintf(),
  43.     vnsprintf()
  44.  
  45.     INTERNALS
  46.  
  47.     HISTORY
  48.     11.12.1996 digulla created
  49.  
  50. ******************************************************************************/
  51. {
  52.     int     retval;
  53.     va_list args;
  54.  
  55.     va_start (args, format);
  56.  
  57.     retval = vsprintf (str, format, args);
  58.  
  59.     va_end (args);
  60.  
  61.     return retval;
  62. } /* sprintf */
  63.  
  64.