|
|
1.1 ! root 1: /* @(#) __sscans.c: 1.1 10/15/83 (1.3 3/1/83) */ ! 2: /* ! 3: * 1/26/81 (Berkeley) @(#)scanw.c 1.1 ! 4: */ ! 5: ! 6: # include "curses.ext" ! 7: # include <varargs.h> ! 8: ! 9: /* ! 10: * This routine actually executes the scanf from the window. ! 11: * ! 12: * This code calls vsscanf, which is like sscanf except ! 13: * that it takes a va_list as an argument pointer instead ! 14: * of the argument list itself. We provide one until ! 15: * such a routine becomes available. ! 16: */ ! 17: ! 18: __sscans(win, fmt, ap) ! 19: WINDOW *win; ! 20: char *fmt; ! 21: va_list ap; ! 22: { ! 23: char buf[256]; ! 24: ! 25: if (wgetstr(win, buf) == ERR) ! 26: return ERR; ! 27: ! 28: return vsscanf(buf, fmt, ap); ! 29: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.