summaryrefslogtreecommitdiff
path: root/ipl/gpacks/weaving/pat2tie.icn
blob: e46a504d73a101bf2ead5ce4b1a055a04781c72a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
############################################################################
#
#	File:     pat2tie.icn
#
#	Subject:  Program to convert patterns to tie-ups
#
#	Author:   Ralph E. Griswold
#
#	Date:     January 29, 1999
#
############################################################################
#
#  This file is in the public domain.
#
############################################################################
#
#  AD HOC
#
############################################################################
#
#  Links:  patutils, tieutils
#
############################################################################

link patutils
link tieutils

procedure main()
   local tieup, pat, matrix

   while pat := read() do {
      matrix := pat2rows(pat)
      tieup := tie(*matrix[1], *matrix, matrix)
      write(tier2string(tieup))
      }

end