home *** CD-ROM | disk | FTP | other *** search
-
- * Maxon C++:
- * Bibliotheksmodul "errstr"
- * Jens Gelhar 19.03.93
-
- xdef _strerror,strerror__i
- xdef _perror,perror__PCc
-
- xref _std__err,_errno,__Writefile
-
- _perror:
- perror__PCc:
- movem.l d2/d3/a2/a6,-(a7)
- move.l 4*4+4(a7),a1
- bsr.b .put
- lea kolonStr(pc),a1
- bsr.b .put
- move.l _errno,-(a7)
- bsr.b _strerror
- addq.l #4,a7
- move.l d0,a1
- bsr.b .put
- lea LFStr(pc),a1
- bsr.b .put
- movem.l (a7)+,d2/d3/a2/a6
- rts
-
- .put ; String a1
- move.l a1,d2
- moveq #-1,d3
- .cnt addq.l #1,d3
- tst.b (a1)+
- bne.b .cnt
- lea _std__err,a0
- jmp __Writefile
-
- _strerror:
- strerror__i:
- move.l a0,-(a7)
- move.l 8(a7),d0
- cmp.w #1000,d0
- beq.b err1000
- cmp.w #1001,d0
- beq.b err1001
- cmp.w #1002,d0
- beq.b err1002
- cmp.w #400,d0
- bhs.b noerr
- lea errstr(pc),a0
- errL: cmp.b (a0)+,d0
- beq.b errret
- err1: tst.b (a0)+
- bne.b err1
- tst.b (a0)
- bne.b errL
- bra.b noerr
- err1000: lea err1000str(pc),a0
- bra.b errret
- err1001: lea err1001str(pc),a0
- bra.b errret
- err1002: lea err1002str(pc),a0
- bra.b errret
- noerr: lea noerrstr(pc),a0
- errret: move.l a0,d0
- move.l (a7)+,a0
- rts
-
- err1000str: dc.b 'Out of range',0
- err1001str: dc.b 'Not a number',0
- err1002str: dc.b 'Out of memory'
- noerrstr: dc.b 0
-
- errstr: dc.b 103,'No free store',0
- dc.b 105,'Task table full',0
- dc.b 114,'Bad template',0
- dc.b 115,'Bad number',0
- dc.b 116,'Required arg missing',0
- dc.b 117,'Key needs arg',0
- dc.b 118,'Too many args',0
- dc.b 119,'Unmatched quotes',0
- dc.b 120,'Line too long',0
- dc.b 121,'File not object',0
- dc.b 122,'Invalid resident library',0
- dc.b 201,'No default dir',0
- dc.b 202,'Object in use',0
- dc.b 203,'Object exists',0
- dc.b 204,'Dir not found',0
- dc.b 205,'Object not found',0
- dc.b 206,'Bad stream name',0
- dc.b 207,'Object too large',0
- dc.b 209,'Action not known',0
- dc.b 210,'Invalid component name',0
- dc.b 211,'Invalid lock',0
- dc.b 212,'Object wrong type',0
- dc.b 213,'Disk not validated',0
- dc.b 214,'Disk write protected',0
- dc.b 215,'Rename across devices',0
- dc.b 216,'Directory not empty',0
- dc.b 217,'Too many levels',0
- dc.b 218,'Device not mounted',0
- dc.b 219,'Seek error',0
- dc.b 220,'Comment too big',0
- dc.b 221,'Disk full',0
- dc.b 222,'Delete protected',0
- dc.b 223,'Write protected',0
- dc.b 224,'Read protected',0
- dc.b 225,'Not a DOS disk',0
- dc.b 226,'No disk',0
- dc.b 232,'No more entries',0
- dc.b 233,'Is soft link',0
- dc.b 234,'Object linked',0
- dc.b 235,'Bad hunk',0
- dc.b 240,'Record not locked',0
- dc.b 241,'Lock collision',0
- dc.b 242,'Lock timeout',0
- dc.b 243,'Unlock error',0
- dc.b 303&255,'Buffer overflow',0
- dc.b 304&255,'Break',0
- dc.b 305&255,'Not executable',0
- dc.b 0
-
- kolonStr: dc.b ': ',0
- LFStr: dc.b '.',10,0
-
- end
-