5 * Keith Bostic. All rights reserved.
7 * Sven Verdoolaege. All rights reserved.
9 * See the LICENSE file for redistribution information.
13 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";
16 #include <sys/types.h>
17 #include <sys/queue.h>
20 #include <bitstring.h>
34 /* perl redefines them
37 #undef USE_DYNAMIC_LOADING
45 #include "../common/common.h"
49 * PUBLIC: #ifdef USE_SFIO
53 #define NIL(type) ((type)0)
56 sfnviwrite(f
, buf
, n
, disc
)
57 Sfio_t
* f
; /* stream involved */
58 char* buf
; /* buffer to read into */
59 int n
; /* number of bytes to read */
60 Sfdisc_t
* disc
; /* discipline */
64 scrp
= (SCR
*)SvIV((SV
*)SvRV(perl_get_sv("curscr", FALSE
)));
65 msgq(scrp
, M_INFO
, "%.*s", n
, buf
);
71 * Create nvi discipline
73 * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*));
82 MALLOC(scrp
, disc
, Sfdisc_t
*, sizeof(Sfdisc_t
));
83 if (!disc
) return disc
;
85 disc
->readf
= (Sfread_f
)NULL
;
86 disc
->writef
= sfnviwrite
;
87 disc
->seekf
= (Sfseek_f
)NULL
;
88 disc
->exceptf
= (Sfexcept_f
)NULL
;