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

  1. /*-----------------------------------------------------------------------*
  2.  * filename - fscanf.c
  3.  *
  4.  * function(s)
  5.  *        fscanf - performs formatted input from a stream
  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        fscanf - performs formatted input from a stream
  29.  
  30. Usage        #include <stdio.h>
  31.         int fscanf(FILE *stream, const char *format[, argument,...]);
  32.  
  33. Prototype in    stdio.h
  34.  
  35. Description    reads data from the named input stream into the locations
  36.         given by the address arguments
  37.  
  38. Return value    the number of input fields successfully scanned, converted
  39.         and stored; the return value does not include scanned
  40.         fields that were not stored.
  41.  
  42.         If an attempt is made to read at end-of-file, the return
  43.         value is EOF.
  44.  
  45.         If no fields were stored, the return value is 0
  46.  
  47. *---------------------------------------------------------------------*/
  48. int cdecl fscanf (FILE *fp, const char *fmt, ...)
  49.   {
  50.   return( _scanner ( (int near (*)(void *))_Nfgetc,
  51.                      (void near (*)(int, void *))_Nungetc,
  52.                      fp,
  53.                      fmt,
  54.                      _va_ptr ) );
  55.   }
  56.