summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost/mfpic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-12 23:28:12 +0000
committerKarl Berry <karl@freefriends.org>2010-06-12 23:28:12 +0000
commit5d4c8dc9b9eedf00ef981be81f2ac073102fb67f (patch)
treeb100dd5470942272e3c2a2c7200c9596df09ae36 /Master/texmf-dist/metapost/mfpic
parent641952c28af814cb2ba30f4f57dc83222e8ba80f (diff)
mfpic update (11jun10)
git-svn-id: svn://tug.org/texlive/trunk@18920 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost/mfpic')
-rw-r--r--Master/texmf-dist/metapost/mfpic/dvipsnam.mp4
-rw-r--r--Master/texmf-dist/metapost/mfpic/grafbase.mp39
2 files changed, 18 insertions, 25 deletions
diff --git a/Master/texmf-dist/metapost/mfpic/dvipsnam.mp b/Master/texmf-dist/metapost/mfpic/dvipsnam.mp
index 2d0552256c1..2a3ae21c8a8 100644
--- a/Master/texmf-dist/metapost/mfpic/dvipsnam.mp
+++ b/Master/texmf-dist/metapost/mfpic/dvipsnam.mp
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2009, Daniel H. Luecking
+%% Copyright 2002--2010, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -22,7 +22,7 @@
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
%%% File: grafbase.dtx
-%%% A part of mfpic 1.04 2010/03/30
+%%% A part of mfpic 1.05 2010/06/10
%%%
if unknown grafbaseversion:
if unknown mpversion:
diff --git a/Master/texmf-dist/metapost/mfpic/grafbase.mp b/Master/texmf-dist/metapost/mfpic/grafbase.mp
index d67ae28f685..1b7cf501f82 100644
--- a/Master/texmf-dist/metapost/mfpic/grafbase.mp
+++ b/Master/texmf-dist/metapost/mfpic/grafbase.mp
@@ -8,7 +8,7 @@
%%
%% -------------------------------------------------------------------
%%
-%% Copyright 2002--2009, Daniel H. Luecking
+%% Copyright 2002--2010, Daniel H. Luecking
%%
%% Mfpic may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
@@ -22,7 +22,7 @@
%% with mfpic: plain TeX, LaTeX, plain Metafont and plain MetaPost.
%%
%%% File: grafbase.dtx
-%%% A part of mfpic 1.04 2010/03/30
+%%% A part of mfpic 1.05 2010/06/10
%%%
if (known grafbaseversion) or (known grafbase):
message "Grafbase (" & jobname & "): You have loaded grafbase more "
@@ -32,10 +32,10 @@ fi
boolean grafbase; grafbase := true;
string fileversion, filedate;
-fileversion := "1.04"; filedate := "2010/03/30";
+fileversion := "1.05"; filedate := "2010/06/10";
-message " Loading grafbase macros version " &
- fileversion & ", " & filedate & ".";
+message " Loading grafbase macros, version " & fileversion & ", " &
+ filedate & ".";
message " ";
def GBmsg expr s = message "Grafbase (" & jobname & "): " & s; enddef;
@@ -60,7 +60,7 @@ def checkversions (expr g)=
fi
enddef;
-checkversions (104);
+checkversions (105);
if unknown base_name : input plain;
elseif not string base_name: input plain;
@@ -245,7 +245,7 @@ else:
(rgbtogray (redpart clr, greenpart clr, bluepart clr))
enddef;
def makecmyk = makergb enddef;
- vardef iscolor expr clr = (color clr) enddef;
+ vardef iscolor expr clr = (color clr) enddef;
fi
vardef knowncolor expr clr = (known clr) and (iscolor clr) enddef;
@@ -549,8 +549,7 @@ else:
def setoutputtemplate text garbage = enddef;
fi
-def romannumeral = _romannumeral (true) enddef;
-vardef _romannumeral (expr prefix, X) =
+vardef GBromannumeral (expr X) =
save Y, _tmp, U; string U;
Y.m := X div 1000; % thousands digit
@@ -561,30 +560,24 @@ vardef _romannumeral (expr prefix, X) =
Y.i := _tmp - 10Y.x; % units
strrepeat("m", Y.m) &
- romandigit(prefix, "c", "d", "m", Y.c) &
- romandigit(prefix, "x", "l", "c", Y.x) &
- romandigit(prefix, "i", "v", "x", Y.i)
+ GBromandigit("c", "d", "m", Y.c) &
+ GBromandigit("x", "l", "c", Y.x) &
+ GBromandigit("i", "v", "x", Y.i)
enddef;
-vardef romandigit (expr prefix, bot, mid, top, n) =
+vardef GBromandigit (expr bot, mid, top, n) =
if n > 9 : top & strrepeat(bot, n-10) % shouldn't happen
elseif n > 8 :
- if prefix: bot & top % "ix"
- else: mid & bot & bot & bot & bot % "viiii"
- fi
+ bot & top % "ix"
elseif n > 4 : mid & strrepeat (bot, n-5) % "v"--"viii"
elseif n > 3 :
- if prefix: bot & mid % "iv"
- else: bot & bot & bot & bot % "iiii"
- fi
+ bot & mid % "iv"
else: strrepeat (bot, n) % ""--"iii" for 0--3
fi
enddef;
vardef strrepeat (expr st, rep) =
- setstring (_sr) "";
- for i = 1 upto rep: _sr := _sr & st; endfor
- _sr
+ "" for i = 1 upto rep: & st endfor
enddef;
transform ztr, vtr;
@@ -3487,7 +3480,7 @@ def setdatacolors (text lst) =
string colortype[], _tmpstr;
for _itm = _datacolors: %
% Each string is the name of some color variable
- _tmpstr := "colortype_"&romannumeral(colortype);
+ _tmpstr := "colortype_" & GBromannumeral(colortype);
setcolor (scantokens(_tmpstr)) _itm;
colortype[colortype] := _tmpstr;
next colortype;