diff options
Diffstat (limited to 'Master/texmf-dist/metapost/metauml/util_shade.mp')
-rw-r--r-- | Master/texmf-dist/metapost/metauml/util_shade.mp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Master/texmf-dist/metapost/metauml/util_shade.mp b/Master/texmf-dist/metapost/metauml/util_shade.mp index 2cc6f99af91..f8c7b1bdcdb 100644 --- a/Master/texmf-dist/metapost/metauml/util_shade.mp +++ b/Master/texmf-dist/metapost/metauml/util_shade.mp @@ -15,12 +15,24 @@ % along with this program; if not, write to the Free Software % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -if known _metauml_shade_mp: +if known _util_shade_mp: expandafter endinput fi; -_metauml_shade_mp:=1; +_util_shade_mp:=1; -input util_log; +% Sadly, this copy of the macro is needed to prevent multiple file loads being shown by MetaPost. +% The guard values (such as _metauml_mp) do ensure that the file isn't loaded multiple times, +% but this macro makes sure that MetaPost won't try to load the file and display a message for that. +def inputonce text libraryFile= + if not known scantokens ("_" & str libraryFile & "_mp"): + %includeonce% show "Loading " & str libraryFile; + scantokens ("input " & str libraryFile); + else: + %includeonce% show str libraryFile & " already loaded."; + fi; +enddef; + +inputonce util_log; vardef ShadeInfo@#= _n_ := str @#; |