home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 387b.lha / dice_v2.02 / lib / stdio / scanf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-30  |  348 b   |  27 lines

  1.  
  2. /*
  3.  *  SCANF.C
  4.  *
  5.  *  (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  6.  */
  7.  
  8. #include <stdarg.h>
  9. #include <stdio.h>
  10.  
  11. int
  12. scanf(ctl)
  13. const char *ctl;
  14. {
  15.     int error;
  16.     int cnt;
  17.     va_list va;
  18.  
  19.     va_start(va, ctl);
  20.     error = _sfmt(ctl, va, fgetc, ungetc, stdin, &cnt);
  21.     va_end(va);
  22.     if (error)
  23.     return(error);
  24.     return(cnt);
  25. }
  26.  
  27.