home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++ Library:
- * Modul "stream_in"
- * Jens Gelhar 24.04.92, 31.08.93, 15.04.94, 17.04.94
-
- xdef op__rightshift__istream__TPc,op__rightshift__istream__TRc
- xdef op__rightshift__istream__TPUc
- xdef get__istream__TRc,get__istream__T
- xdef get__istream__TRUc
-
- xref fgetc__P06stream
-
- op__rightshift__istream__TPc: ; Stack-Parameter: istream&, char*
- op__rightshift__istream__TPUc: ; Stack-Parameter: istream&, unsigned char*
- move.l a2,-(a7)
- move.l 12(a7),d0
- beq.b oikeia
- move.l d0,a2
- moveq #79,d1
- move.l 8(a7),-(a7)
- skipit bsr.b get__istream__T
- bsr.b Delim
- beq.b skipit
- readit cmp.l #-1,d0
- beq.b done
- move.b d0,(a2)+
- subq.w #1,d1
- beq.b done
- bsr.b get__istream__T
- bsr.b Delim
- bne.b readit
- done clr.b (a2)
- addq.l #4,a7
- oikeia move.l (a7)+,a2
- move.l 4(a7),d0
- rts
-
- op__rightshift__istream__TRc: ; Stack-Parameter: istream&, char&
- move.l 4(a7),-(a7)
- again bsr.b get__istream__T
- bsr.b Delim
- beq.b again
- addq.l #4,a7
- move.l 8(a7),a0
- move.b d0,(a0)
- move.l 4(a7),d0
- rts
-
- Delim cmp.b #' ',d0
- beq.b .0
- cmp.b #10,d0
- beq.b .0
- cmp.b #9,d0
- .0 rts
-
- get__istream__T: ; Stack-Parameter: istream&
- move.l 4(a7),a0
- move.l (a0),a0
- move.l (a0),-(a7)
- jsr fgetc__P06stream
- addq.l #4,a7
- rts
-
- get__istream__TRc: ; Stack-Parameter: istream&, char&
- get__istream__TRUc: ; Stack-Parameter: istream&, unsigned char&
- move.l 4(a7),-(a7)
- bsr.b get__istream__T
- addq.l #4,a7
- move.l 8(a7),a0
- move.b d0,(a0)
- move.l 4(a7),d0
- rts
-
- end
-
-