home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 1.ddi / CLIBSRC1.ZIP / SCANF.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.3 KB  |  46 lines

  1. /*-----------------------------------------------------------------------*
  2.  * filename - scanf.c
  3.  *
  4.  * function(s)
  5.  *        scanf - gets formatted input from stdin
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*
  9.  *      C/C++ Run Time Library - Version 5.0
  10.  *
  11.  *      Copyright (c) 1987, 1992 by Borland International
  12.  *      All Rights Reserved.
  13.  *
  14.  */
  15.  
  16.  
  17. #include <stdarg.h>
  18. #include <stdio.h>
  19. #include <_stdio.h>
  20. #include <_scanf.h>
  21.  
  22. #undef   ungetc         /* remove the macro version */
  23.  
  24. /*---------------------------------------------------------------------*
  25.  
  26. Name            scanf - gets formatted input from stdin
  27.  
  28. Usage           int scanf(const char *format[, argument ...])
  29.  
  30. Prototype in    stdio.h
  31.  
  32. Description     gets formatted input from stdin
  33.  
  34. Return value    number of fields scanned and stored.  scanf returns EOF
  35.                 if an attempt is made to read at end-of-file
  36.  
  37. *---------------------------------------------------------------------*/
  38. int cdecl _FARFUNC scanf(const char *fmt, ...)
  39.   {
  40.   return( _scanner( (int near (*)(void *))_Nfgetc,
  41.                     (void near (*)(int, void *))_Nungetc,
  42.                     stdin,
  43.                     fmt,
  44.                    _va_ptr ) );
  45.   }
  46.