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
[] = "$Id: perlsfio.c,v 8.1 1996/09/24 21:33:20 bostic Exp $ (Berkeley) $Date: 1996/09/24 21:33:20 $";
16 #include <sys/types.h>
17 #include <sys/queue.h>
20 #include <bitstring.h>
30 #include "../common/common.h"
36 #include "perl_extern.h"
39 * PUBLIC: #ifdef USE_SFIO
43 #define NIL(type) ((type)0)
46 sfnviwrite(f
, buf
, n
, disc
)
47 Sfio_t
* f
; /* stream involved */
48 char* buf
; /* buffer to read into */
49 int n
; /* number of bytes to read */
50 Sfdisc_t
* disc
; /* discipline */
54 scrp
= (SCR
*)SvIV((SV
*)SvRV(perl_get_sv("curscr", FALSE
)));
55 msgq(scrp
, M_INFO
, "%.*s", n
, buf
);
61 * Create nvi discipline
63 * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*));
72 MALLOC(scrp
, disc
, Sfdisc_t
*, sizeof(Sfdisc_t
));
73 if (!disc
) return disc
;
75 disc
->readf
= (Sfread_f
)NULL
;
76 disc
->writef
= sfnviwrite
;
77 disc
->seekf
= (Sfseek_f
)NULL
;
78 disc
->exceptf
= (Sfexcept_f
)NULL
;