summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pstricks
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-23 22:40:33 +0000
committerKarl Berry <karl@freefriends.org>2011-04-23 22:40:33 +0000
commitc41e14a6ed15b3e1fa667aaf5d14b58f0a057ffc (patch)
tree1f3aa190d1152eb1fa32702e29c544976599fba0 /Master/texmf-dist/dvips/pstricks
parent0c7d6abf80d6c8ae90936dfed87abd179341bdc4 (diff)
pstricks 2.20 (23apr11)
git-svn-id: svn://tug.org/texlive/trunk@22178 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips/pstricks')
-rw-r--r--Master/texmf-dist/dvips/pstricks/pst-tools.pro64
-rw-r--r--Master/texmf-dist/dvips/pstricks/pstricks.pro10
2 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/dvips/pstricks/pst-tools.pro b/Master/texmf-dist/dvips/pstricks/pst-tools.pro
new file mode 100644
index 00000000000..d4dc3795266
--- /dev/null
+++ b/Master/texmf-dist/dvips/pstricks/pst-tools.pro
@@ -0,0 +1,64 @@
+% $Id: pst-tools.pro 490 2011-04-23 09:25:30Z herbert $
+%
+%% PostScript tools prologue for pstricks.tex.
+%% Version 0.01, 2011/04/23
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%
+%
+%%%%% ### bubblesort ###
+%% syntax : array bubblesort --> array2 trie par ordre croissant
+%% code de Bill Casselman
+%% http://www.math.ubc.ca/people/faculty/cass/graphics/text/www/
+/bubblesort {
+4 dict begin
+ /a exch def
+ /n a length 1 sub def
+ n 0 gt {
+ % at this point only the n+1 items in the bottom of a remain to
+ % the sorted largest item in that blocks is to be moved up into
+ % position n
+ n {
+ 0 1 n 1 sub {
+ /i exch def
+ a i get a i 1 add get gt {
+ % if a[i] > a[i+1] swap a[i] and a[i+1]
+ a i 1 add
+ a i get
+ a i a i 1 add get
+ % set new a[i] = old a[i+1]
+ put
+ % set new a[i+1] = old a[i]
+ put
+ } if
+ } for
+ /n n 1 sub def
+ } repeat
+ } if
+ a
+end
+} def
+%
+/concatstringarray{ % [(a) (b) ... (z)] --> (ab...z) 20100422
+ 0 1 index { length add } forall
+ string
+ 0 3 2 roll
+ { 3 copy putinterval length add }forall
+ pop
+} bind def
+%
+/dot2comma {% on stack a string (...)
+ 2 dict begin
+ /Output exch def
+ 0 1 Output length 1 sub {
+ /Index exch def
+ Output Index get 46 eq { Output Index 44 put } if
+ } for
+ Output
+ end
+} def
+%
+%-----------------------------------------------------------------------------%
+% END pst-tools.pro
diff --git a/Master/texmf-dist/dvips/pstricks/pstricks.pro b/Master/texmf-dist/dvips/pstricks/pstricks.pro
index ea18f469bc8..dc8abde2aee 100644
--- a/Master/texmf-dist/dvips/pstricks/pstricks.pro
+++ b/Master/texmf-dist/dvips/pstricks/pstricks.pro
@@ -995,6 +995,16 @@ end
pop
} bind def
%
+/dot2comma {% on stack a string (...)
+ 2 dict begin
+ /Output exch def
+ 0 1 Output length 1 sub {
+ /Index exch def
+ Output Index get 46 eq { Output Index 44 put } if
+ } for
+ Output
+ end
+} def
%
end
%-----------------------------------------------------------------------------%