3 * Keith Bostic. All rights reserved.
5 * Sven Verdoolaege. All rights reserved.
7 * See the LICENSE file for redistribution information.
11 static const char sccsid
[] = "$Id: perlsfio.c,v 8.3 2000/04/30 17:00:15 skimo Exp $ (Berkeley) $Date: 2000/04/30 17:00:15 $";
14 #include <sys/types.h>
15 #include <sys/queue.h>
18 #include <bitstring.h>
32 /* perl redefines them
35 #undef USE_DYNAMIC_LOADING
43 #include "../common/common.h"
47 * PUBLIC: #ifdef USE_SFIO
51 #define NIL(type) ((type)0)
54 sfnviwrite(f
, buf
, n
, disc
)
55 Sfio_t
* f
; /* stream involved */
56 char* buf
; /* buffer to read into */
57 int n
; /* number of bytes to read */
58 Sfdisc_t
* disc
; /* discipline */
62 scrp
= (SCR
*)SvIV((SV
*)SvRV(perl_get_sv("curscr", FALSE
)));
63 msgq(scrp
, M_INFO
, "%.*s", n
, buf
);
69 * Create nvi discipline
71 * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*));
80 MALLOC(scrp
, disc
, Sfdisc_t
*, sizeof(Sfdisc_t
));
81 if (!disc
) return disc
;
83 disc
->readf
= (Sfread_f
)NULL
;
84 disc
->writef
= sfnviwrite
;
85 disc
->seekf
= (Sfseek_f
)NULL
;
86 disc
->exceptf
= (Sfexcept_f
)NULL
;