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

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