home *** CD-ROM | disk | FTP | other *** search
- ***********************************************************
- ** **
- ** Another cheezy hack from The Animation Station Inc. **
- ** **
- ** The Animation Station Inc. **
- ** 150 Graydon Hall Drive, Suite 2602 **
- ** Don Mills, ON, M3A 3B3 **
- ** 416-443-8670 **
- ** **
- ** Or leave mail to Ken Rockson on CRS. **
- ** **
- ***********************************************************
-
- use tsortdef
- fon=tpath
- igthe=ignore_the
- remthe=remove_the
- clear
- @ 11,17 say "Path To Telix Files:" get fon picture "@!"
- @ 12,17 say "Ignore 'The'? (Y/N):" get igthe picture "!" valid igthe$"YN"
- @ 13,17 say "Remove 'The'? (Y/N):" get remthe picture "!" valid remthe$"YN"
- read
- if lastkey()=27
- quit
- endif
- if igthe!=ignore_the .or. remthe!=remove_the .or. fon!=tpath
- replace tpath with fon, remove_the with remthe, ignore_the with igthe
- endif
- use
- fon=trim(fon)
- copy file &fon.telix.fon to &fon.\telix.fn2
- fon=fon+"telix.fon"
- hand=fopen(fon,0)
- ?"reading"
- flen=fseek(hand,0,2)
- rex=(flen-64)/86
- declare a[rex],key[rex]
- ?"filling array"
- fseek(hand,0)
- head=space(64)
- fread(hand,@head,64)
- s=space(86)
- for x=0 to rex-1
- fseek(hand,64+(86*x))
- s=space(86)
- fread(hand,@s,86)
- if remthe=="Y" .and. upper(left(s,4))=="THE "
- a[x+1]=substr(s,5,21)+space(4)+substr(s,26,61)
- else
- a[x+1]=s
- endif
- if upper(left(s,4))=="THE " .and. igthe=="Y"
- key[x+1]=upper(substr(s,5,21))
- else
- key[x+1]=upper(left(s,25))
- endif
- next x
- ?"outputting"
- fclose(hand)
- hand=fcreate(fon)
- fwrite(hand,head,64)
- z="zzzzzzzzzzzzzzzzzzzzzzzzz"
- y=0
- for x=1 to rex
- s=z
- for w=1 to rex
- if key[w]<s
- y=w
- s=key[w]
- endif
- next w
- fwrite(hand,a[y],86)
- ? left(key[y],25)
- key[y]=z
- next x
- fclose(hand)
-
-