3 * Keith Bostic. All rights reserved.
5 * Sven Verdoolaege. All rights reserved.
7 * See the LICENSE file for redistribution information.
10 #include <sys/cdefs.h>
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 __RCSID("$NetBSD: perlsfio.c,v 1.3 2014/01/26 21:43:45 christos Exp $");
19 #include <sys/types.h>
20 #include <sys/queue.h>
23 #include <bitstring.h>
37 /* perl redefines them
40 #undef USE_DYNAMIC_LOADING
48 #include "../common/common.h"
49 #include "perl_api_extern.h"
52 * PUBLIC: #ifdef USE_SFIO
56 #define NIL(type) ((type)0)
59 sfnviwrite(f
, buf
, n
, disc
)
60 Sfio_t
* f
; /* stream involved */
61 char* buf
; /* buffer to read into */
62 int n
; /* number of bytes to read */
63 Sfdisc_t
* disc
; /* discipline */
67 scrp
= (SCR
*)SvIV((SV
*)SvRV(perl_get_sv("curscr", FALSE
)));
68 msgq(scrp
, M_INFO
, "%.*s", n
, buf
);
74 * Create nvi discipline
76 * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*));
85 MALLOC(scrp
, disc
, Sfdisc_t
*, sizeof(Sfdisc_t
));
86 if (!disc
) return disc
;
88 disc
->readf
= (Sfread_f
)NULL
;
89 disc
->writef
= sfnviwrite
;
90 disc
->seekf
= (Sfseek_f
)NULL
;
91 disc
->exceptf
= (Sfexcept_f
)NULL
;