home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++ Library:
- * Modul "filestream"
- * Jens Gelhar 08.06.92, 08.04.94
-
- xdef _0ct__ostream__TP06stream,_0ct__istream__TP06stream
- xdef _0ct__ios__TP06stream
- xdef _0ct__fstreambase__TP06stream
- xdef eof__istream__T,putback__istream__Tc
- xdef getstream__ios__T
- xdef _0opPv__istream__T
- xdef _0opPv__ios__T
-
- xref feof__P06stream,ferror__P06stream,ungetc__iP06stream
-
- _0ct__fstreambase__TP06stream:
- _0ct__istream__TP06stream: ; Stack-Parameter: istream*, stream*
- _0ct__ostream__TP06stream: ; Stack-Parameter: ostream*, stream*
- move.l a0,-(a7)
- move.l 8(a7),a0 ; "this"
- clr.b 5(a0) ; istream.Errorflag bzw. ostream.Basis bzw _extstreamclass.Unused
- btst #0,4(a0)
- beq.s ct1
- move.l (a0),a0 ; Basisklasse initialisieren
- move.l 12(a7),(a0)
- ct1: move.l (a7)+,a0
- rts
-
- _0ct__ios__TP06stream:
- move.l a0,-(a7)
- move.l 8(a7),a0 ; "this"
- move.l 12(a7),(a0)
- bra.b ct1
-
- eof__istream__T:
- move.l 4(a7),a0
- move.l (a0),a0 ; virtuelle Basisklasse "ios"
- move.l (a0),-(a7) ; C-Filestruktur
- jsr feof__P06stream
- addq.l #4,a7
- rts
-
- putback__istream__Tc:
- move.l a0,-(a7)
- moveq #0,d0
- move.l 8(a7),a0 ; istream
- move.l (a0),a0 ; baseclass
- move.b 12(a7),d0
- move.l (a0),-(a7)
- move.l d0,-(a7)
- jsr ungetc__iP06stream
- addq.l #8,a7
- move.l (a7)+,a0
- move.l 4(a7),d0
- rts
-
- getstream__ios__T:
- move.l 4(a7),a0 ; _filebufclass
- move.l (a0),a0
- rts
-
- _0opPv__ios__T:
- move.l 4(a7),a0 ; _filebufclass
- conIn: move.l (a0),d0
- beq.b con0
- move.l d0,-(a7)
- jsr feof__P06stream
- tst.l d0
- bne.b conErr
- jsr ferror__P06stream
- tst.l d0
- bne.b conErr
- move.l (a7)+,d0
- con0 rts
- conErr addq.l #4,a7
- moveq #0,d0
- rts
-
- _0opPv__istream__T:
- move.l 4(a7),a0
- moveq #0,d0
- tst.b 5(a0) ; noch ein Error-Flag
- bne.b con0
- move.l (a0),a0
- bra.b conIn
-
- end
-
-