home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 1.ddi / CLIB1.ZIP / SCANF.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  1.7 KB  |  48 lines

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