This is a patch to the OpenLibrary/OpenDevice/OpenDiskFont call.
When installed...
o) OpenLibrary will also look in the "LIBS" and "CLASSES" subdirectories of
the current directory, and in "PROGDIR:", "PROGDIR:Libs" and
"PROGDIR:Classes".
o) OpenDevice will try to find devices in "DEVS", "PROGDIR:" and
"PROGDIR:DEVS"
o) OpenDiskFont will load fonts from the "FONTS", "PROGDIR:" and
"PROGDIR:FONTS" directory.
Thus, BetterOpenLibs supports the use of private libraries, devices and
fonts for a program, stored in the directory of the program
instead in the global drawers. No need to mess up your global library/
devices or fonts dirs with tons of private and otherwise useless stuff.
____________________________________________________________________________
Changes made to 1.04:
Added local devices and fonts support.
Rewrote parts of the patch. It uses now more stack, but is a
"cleaner" solution compared to the previous versions.
The diskfont.library is not permanenty locked in the memory,
but only patched when needed.
____________________________________________________________________________
There's already one patch (the OpenLibEnhancer) on the net that does
this work, but after testing for a while I found that it does not
work well with some software, and after looking into the code I found
that this utility is quite broken
(the stack is used wrongly, plus some more).
So I decided to fill this gap and write my own... and the problems I had
before were gone....
Installation:
Copy to your C: drawer.
Invokation:
BetterOpenLibs NOLIBS/S,NOCLASSES/S,NOPROGDIR/S
NOPROGDIRLIBS/S,NOPROGDIRCLASSES/S
NODEVS/S,NOPROGDIRD/S,NOPROGDIRDEVS/S
NOFONTS/S,NOPROGDIRF/S,NOPROGDIRFONTS/S:
library-related flags:
NOLIBS: Do not look into the libs directory of the current dir.
NOCLASSES: Same, but ignore "Classes"
NOPROGDIR: Do not search in "PROGDIR:"
NOPROGDIRLIBS: Do not search in "PROGDIR:Libs"
NOPROGDIRCLASSES: Do not search in "PROGDIR:Classes"
device-related flags:
NODEVS: Do not scan "Devs"
NOPROGDIRD: Do not scan "PROGDIR:"
NOPROGDIRDEVS: Do not scan "PROGDIR:Devs"
font-related flags:
NOFONTS: Do not look in "Fonts"
NOPROGDIRF: Do not look in "PROGDIR:"
NOPROGDIRFONTS: Do not look in "PROGDIR:Fonts"
Especially, the "PROGDIR:" and its subdirectories are not searched if
the invoking process has no home directory, and the enhanced features
are disabled if called from a task. (Since they don't make sense in
this case). No PROGDIR: assign is made.
Be careful with the fonts-patch: The AvailFonts() function of the
diskfont.library WON'T tell you about the additional fonts in the directories
LOCAL to the program, it returns ONLY information about fonts available for
all programs - so all fonts in the FONTS: drawer. No implicit "ASSIGN ADD" is
performed! The font patch WILL NOT help for programs that load or scan fonts
by other methods than using the diskfont.library.
The patch mechanism used for the diskfont.library is a bit tricky, but
explicitly compatible to the mechanism esablished with MY version of
"SaferPatches". I can't give any guarantee that it works with "dumber"
implementations of the "SaferPatches" program. In cases of doubt, try
my program...
____________________________________________________________________________
The THOR-Software Licence
This License applies to the computer programs known as "BetterOpenLibs".
The "Program", below, refers to such program.
The programs and files in this distribution are freely distributable
under the restrictions stated below, but are also Copyright (c)
Thomas Richter.
Distribution of the Program by a commercial organization without written
permission from the author to any third party is prohibited if any payment
is made in connection with such distribution, whether directly
(as in payment for a copy of the Program) or indirectly (as in payment
for some service related to the Program, or payment for some product
or service that includes a copy of the Program "without charge";
these are only examples, and not an exhaustive enumeration of prohibited
activities). However, the following methods of distribution involving
payment shall not in and of themselves be a violation of this restriction:
(i) Posting the Program on a public access information storage and
retrieval service for which a fee is received for retrieving information
(such as an on-line service), provided that the fee is not
content-dependent (i.e., the fee would be the same for retrieving the same
volume of information consisting of random data).
(ii) Distributing the Program on a CD-ROM, provided that the files
containing the Program are reproduced entirely and verbatim on such
CD-ROM, and provided further that all information on such CD-ROM be
redistributable for non-commercial purposes without charge.
Everything in this distribution must be kept together, in original
and unmodified form.
Limitations.
THE PROGRAM IS PROVIDED TO YOU "AS IS," WITHOUT WARRANTY. THERE IS NO
WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD
THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING, REPAIR OR CORRECTION.
IF YOU DO NOT ACCEPT THIS LICENCE, YOU MUST DELETE ALL FILES CONTAINED IN
THIS ARCHIVE.
_____________________________________________________________________________
Thomas,
October 1997