home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!abqhh!keihh!kt
- From: kt@keihh.hanse.de (Kei Thomsen)
- Newsgroups: comp.os.os9
- Subject: Program for filenames with all (' '..'~') F$PrsNam
- Message-ID: <315@keihh.hanse.de>
- Distribution: world
- Date: 28 Dec 1992 06:39:42 GMT
- Lines: 111
-
-
- This is a system-state-program which replaces the F$PrsNam call of
- the kernel to allow all characters in your filename except / @
- The module can be installed as a system-extention in your init module.
- Enjoy it...
-
- Kei, Stephan, Guido
-
- ------------ Makefile --------------
-
- RFLAGS=
- RC = r68
-
- prsnam:
- l68 -gO=$* $*.r -l=/h0/lib/sys.l
-
- ------------ prsnam.a --------------
- *
- * PrsNam for filenames with all characters ! - ~
- * 26.12.92 Stephan Paschedag, Kei Thomsen, Guidoh Scheil
- *
-
- use <oskdefs.d>
-
-
- Edition equ 1 current Edition number
- Typ_Lang set (Systm<<8)+Objct
- Attr_Rev set ((ReEnt+SupStat)<<8)+0
-
- psect prsnam,Typ_Lang,Attr_Rev,Edition,0,Entry
-
- vsect
- ds.l 1
- ends
-
- Entry: move.l a1,-(a7)
- lea SvcTab(pc),a1
- os9 F$SSvc
- movem.l (a7)+,a1
- rts
-
- SvcTab: dc.w F$PrsNam
- dc.w PrsNam-*-2
- dc.w F$PrsNam+SysTrap
- dc.w PrsNam-*-2
- dc.w -1
-
- *
- * Input : (a0) = name
- *
- * Output : d0 = pathlist delimiter
- * d1 = length of pathlist element
- * a0 = pathlist pointer updated past the optional "/" char
- * a1 = address of the last character of the name + 1
- *
- PrsNam: moveq.l #0,d0 clear char counter
- move.b (a0)+,d0 get first char
- cmpi.b #'/',d0 absolute path ?
- bne.b Prs1 ..no
- move.b (a0)+,d0 get next char
- Prs1 lea.l -1(a0),a1 adjust pointer
- moveq.l #0,d1
- bsr.b PrsTst
- bcs.b Prs2
- Prs3 addq.w #1,d1
- move.b (a0)+,d0
- bsr.b PrsTst
- bcc.b Prs3
- move.b -(a0),d0
- bclr #31,d1
- bne.b Prs4
- move.b (a1),d0
- Prs2 movea.l a1,a0
- move.w #E$BNam,d1
- ori.b #Carry,ccr
- Prs4 exg a1,a0
- movem.l d0-d1,R$d0(a5)
- movem.l a0-a1,R$a0(a5)
- rts
-
- PrsTst cmpi.b #'~',d0
- bhi.b PrsErr
- cmpi.b #' ',d0
- bls.b PrsErr
- cmpi.b #'@',d0
- beq.s PrsErr
- cmpi.b #'.',d0
- beq.b PrsT3
- cmpi.b #'/',d0
- beq.b PrsErr
- PrsOK bset #31,d1
- PrsT3 andi.b #255-Carry,ccr
- rts
- PrsErr ori.b #Carry,ccr
- rts
-
- ends
-
- /\
- |^^|
- |{}|
- _______________/~~\________________
- / Kei Thomsen | | keihh.hanse.de \
- `========--------. .---------========'
- ||||
- Wildermuthring 90 || kt@keihh.hanse.de
- 2000 Hamburg 62 || OS-9 68030
- Home: 040/5205921 || Modem: 040/5200428
- FH-Wedel: || 1200-14400 Baud
- 04103/804841 ,---||---, (V32bis)
- '---<>---'
-