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
36 #undef USE_DYNAMIC_LOADING
44 #include "../common/common.h"
48 * PUBLIC: #ifdef USE_SFIO
52 #define NIL(type) ((type)0)
55 sfnviwrite(f
, buf
, n
, disc
)
56 Sfio_t
* f
; /* stream involved */
57 char* buf
; /* buffer to read into */
58 int n
; /* number of bytes to read */
59 Sfdisc_t
* disc
; /* discipline */
63 scrp
= (SCR
*)SvIV((SV
*)SvRV(perl_get_sv("curscr", FALSE
)));
64 msgq(scrp
, M_INFO
, "%.*s", n
, buf
);
70 * Create nvi discipline
72 * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*));
81 MALLOC(scrp
, disc
, Sfdisc_t
*, sizeof(Sfdisc_t
));
82 if (!disc
) return disc
;
84 disc
->readf
= (Sfread_f
)NULL
;
85 disc
->writef
= sfnviwrite
;
86 disc
->seekf
= (Sfseek_f
)NULL
;
87 disc
->exceptf
= (Sfexcept_f
)NULL
;