Category : Miscellaneous Language Source Code
Archive   : MENDFONT.ZIP
Filename : MENDFONT.BAS

 
Output of file : MENDFONT.BAS contained in archive : MENDFONT.ZIP

DECLARE SUB Getargs (args$(), maxArgs!, argsFound!)
CLS
PRINT "MENDFONT Rev 1.1"

maxArgs = 2
found = 0
DIM comline$(1 TO maxArgs)
CALL Getargs(comline$(), maxArgs, found)
IF found <> 2 THEN
PRINT "USEAGE: MENDFONT source_font_file mended_font_file"
END
END IF

overwrite% = 0

f$ = comline$(1)
f2$ = comline$(2)
IF f$ = f2$ THEN
overwrite% = 1
f2$ = "TEMP.#$%"
END IF


PRINT "Mending Font file "; f$; " ==> "; comline$(2)


OPEN f$ FOR BINARY AS #1
OPEN f2$ FOR OUTPUT AS #2



a$ = INPUT$(&H50, #1)
PRINT #2, a$;

a$ = "ational" + CHR$(&HD) + CHR$(&HA) + CHR$(&H1A)
PRINT #2, a$;

a$ = INPUT$(&H26, #1)
PRINT #2, a$;

a$ = INPUT$(&H66, #1)
REM Scrap this data !!!

a$ = ""
WHILE NOT EOF(1)
a$ = INPUT$(1, #1)
PRINT #2, a$;
WEND

CLOSE #1
CLOSE #2

IF overwrite% = 1 THEN
cmd$ = "DEL " + comline$(2)
SHELL cmd$
cmd$ = "RENAME " + f2$ + " " + comline$(2)
SHELL cmd$
END IF



END

SUB Getargs (args$(), maxArgs, argsFound) STATIC
CONST TRUE = -1, FALSE = 0
argsFound = 0
in = FALSE
cmdline$ = COMMAND$
comlength = LEN(cmdline$)
FOR char = 1 TO comlength
char$ = MID$(cmdline$, char, 1)
IF (char$ <> " " AND char$ <> CHR$(9)) THEN
IF NOT in THEN
IF argsFound = maxArgs THEN EXIT FOR
argsFound = argsFound + 1
in = TRUE
END IF
args$(argsFound) = args$(argsFound) + char$
ELSE
in = FALSE
END IF
NEXT char
END SUB



  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : MENDFONT.ZIP
Filename : MENDFONT.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/