home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / curses-2.10.lha / curses / src / scanw.c < prev    next >
C/C++ Source or Header  |  1994-02-21  |  2KB  |  66 lines

  1. /* -*-C-*-
  2.  *
  3.  *
  4.  * Filename : scanw.c
  5.  *
  6.  * Author   : Simon J Raybould.    (sie@fulcrum.bt.co.uk).
  7.  *
  8.  * Date     : Friday 23rd August 1991.
  9.  *
  10.  * Desc     : scanf()
  11.  *
  12.  *
  13.  * THIS CODE IS NOT PUBLIC DOMAIN
  14.  * ==============================
  15.  * 
  16.  * This code is copyright Simon J Raybould 1991, all rights are reserved.
  17.  * All code, ideas, data structures and algorithms remain the property of the
  18.  * author. Neither the whole nor sections of this code may be used as part
  19.  * of other code without the authors consent. If you wish to use some of this
  20.  * code then please email me at (sie@fulcrum.bt.co.uk).
  21.  *
  22.  * This source is not public domain, so you do not have any right to alter it
  23.  * or sell it for personal gain. The source is provided purely for reference
  24.  * purposes. You may re-compile the source with any compiler you choose.
  25.  * You must not distribute altered copies without the authors consent. My
  26.  * intention is that the source will help people isolate any bugs much more
  27.  * effectivly.
  28.  *
  29.  * Disclaimer
  30.  * ==========
  31.  *
  32.  * No implication is made as to this code being fit for any purpose at all.
  33.  * I (the author) shall not be held responsible for any loss of data or damage 
  34.  * to property that may result from its use or misuse.
  35.  *
  36.  *
  37.  * Revision History
  38.  * ================
  39.  *
  40.  * $Log: scanw.c,v $
  41.  * Revision 1.2  1992/12/25  23:38:27  sie
  42.  * Fixed the bug with scanw().
  43.  * There is no svscanf() function!
  44.  *
  45.  * Revision 1.1  91/09/07  11:46:35  sie
  46.  * Initial revision
  47.  * 
  48.  *
  49.  */
  50.  
  51. static char *rcsid = "$Header: /SRC/lib/curses/src/RCS/scanw.c,v 1.2 1992/12/25 23:38:27 sie Exp $";
  52.  
  53. #include "curses.h"
  54. #include <stdarg.h>
  55.  
  56.  
  57. scanw(char *fmt,
  58.       char *ptr1, char *ptr2, char *ptr3, char *ptr4, char *ptr5,
  59.       char *ptr6, char *ptr7, char *ptr8, char *ptr9, char *ptr10)
  60. {
  61.   char buffer[BUFSIZ];
  62.   
  63.   getstr(buffer);
  64.   return sscanf(buffer, fmt, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10);
  65. }
  66.