home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
programs
/
fonts
/
a_q
/
fontmsg
/
!FontMsg
/
RunImageRB
< prev
Wrap
Text File
|
1993-10-25
|
2KB
|
77 lines
REM> FontMsg v1.01
REM#Turbo
REM#Register X%
ONERROR PRINTREPORT$;" at ";ERL:END
DIMFONT$(1001)
YY%=OPENIN("<FontMsg$Dir>.FontApps")
IF YY%<=0 THEN OSCLI("ERROR File "+CHR$34+"FontApps"+CHR$34+" is missing"):END
REPEAT
F$=GET$#YY%
MAX%=1
FOR X%= 1 TO 1000
FONT$(X%)=""
NEXT
XX%=OPENOUT(F$+".Messages1")
PROCscan(F$,LEN(F$)+1)
PROCwrite
CLOSE#XX%
OSCLI("SETTYPE "+F$+".Messages1 TEXT")
PRINT''"Font dir ";F$;" scanned and Messages1 file created"''
UNTIL EOF#YY%
CLOSE#YY%
END
DEF PROCscan(root$,L%)
LOCAL block%,off%,name$,J%,dir%,num%
DIM block% 40
off% = 0
REPEAT
SYS "OS_GBPB",10,root$,block%,1,off%,40,"*" TO ,,,num%,off%
IF num%=1 THEN
J% = 20 : REPEAT : J% += 1 : UNTIL block%?J%=0
block%?J% = 13 : name$ = $(block%+20)
dir% = (block%!16=2)
TYPE$=FNreadtype(root$+"."+name$)
r$=RIGHT$(root$,LEN(root$)-L%)
IF r$<>"" THEN r$+="."
IF name$<>"Encodings" THEN
A$=FNupper(name$)
IF A$="INTMETRICS" THEN
FONT$(MAX%)=r$+name$
FONT$(MAX%)=LEFT$(FONT$(MAX%),LEN(FONT$(MAX%))-11)
MAX%+=1
ENDIF
PRINT "Writting messages detail for font ";r$;".";name$
ENDIF
IF dir% THEN
PROCscan(root$+"."+name$,L%)
ENDIF
ENDIF
UNTIL off%<0
ENDPROC
:
DEFFNreadtype(name$)
SYS "OS_File",5,name$ TO ,,loadaddr
=MID$(STR$~(loadaddr),4,3)
:
REM#NOTurbo
:
DEFPROCwrite
FOR X%=1 TO MAX%
IF FONT$(X%)<>"" THEN BPUT#XX%,"Font_"+FONT$(X%)+":"+FONT$(X%)
NEXT
ENDPROC
:
DEFFNupper(n$)
nn$=""
:
FORX%=1 TO LEN(n$)
A$=MID$(n$,X%,1)
IF ASC(A$)>96 THEN
IF ASC(A$)<123 THEN
A$=CHR$(ASC(A$)-32)
ENDIF
ENDIF
nn$+=A$
NEXT
=nn$