3 * Keith Bostic. All rights reserved.
5 * Sven Verdoolaege. All rights reserved.
7 * See the LICENSE file for redistribution information.
13 static const char sccsid[] = "@(#)perlsfio.c 8.1 (Berkeley) 9/24/96";
16 #include <sys/types.h>
17 #include <sys/param.h>
18 #include <sys/queue.h>
21 #include <bitstring.h>
32 #include "../common/common.h"
38 #include "perl_extern.h"
41 * PUBLIC: #ifdef USE_SFIO
45 #define NIL(type) ((type)0)
48 sfnviwrite(f, buf, n, disc)
49 Sfio_t* f; /* stream involved */
50 char* buf; /* buffer to read into */
51 int n; /* number of bytes to read */
52 Sfdisc_t* disc; /* discipline */
56 scrp = (SCR *)SvIV((SV*)SvRV(perl_get_sv("curscr", FALSE)));
57 msgq(scrp, M_INFO, "%.*s", n, buf);
63 * Create nvi discipline
65 * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*));
74 MALLOC(scrp, disc, Sfdisc_t*, sizeof(Sfdisc_t));
75 if (!disc) return disc;
77 disc->readf = (Sfread_f)NULL;
78 disc->writef = sfnviwrite;
79 disc->seekf = (Sfseek_f)NULL;
80 disc->exceptf = (Sfexcept_f)NULL;