summaryrefslogtreecommitdiff
path: root/ipl/gprogs/wif2isd.icn
blob: a5a05a0ad24eb7b820ae414193804230fa4dc612 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
############################################################################
#
#	File:     wif2isd.icn
#
#	Subject:  Program to convert WIFs to ISDs
#
#	Author:   Ralph E. Griswold
#
#	Date:     May 2, 2001
#
############################################################################
#
#  This file is in the public domain.
#
############################################################################
#
#  The following option is supported:
#
#	-n s	name; default "untitled"
#
#  Note:  The output is an xencoded ISD. 
#
#  There is a problem where there is treadling with multiple treadles
#  and no liftplan.  *Presumably* that treadling can be used like a
#  liftplan, but without, necessarily, a direct tie-up.  This problem
#  problem has not been addressed yet.
#
#  If there is a liftplan, then a direct tie-up is implied by the
#  wording in the WIF documentation.  However, that's in the interpretation
#  of the draft.  The tie-up produced here is the one given in the
#
#  If there is a liftplan and a treadling with multiple treadles,
#  the treadling is ignored.
#
#  Also not handled is the possibility of multiple shafts per thread.
#  This could be dealt with as for the liftplan.  The idea is that
#  instead of a threading corresponding to a single shaft, there are
#  some number of different shaft patterns, like there are liftplan
#  patterns.
#
#  The liftplan is represented as concatenated rows of shaft patterns in
#  the order they first appear.  Thus, the symbols used for them can be
#  reconstructed with the ISD is processed.
#
#  This program does not attempt to detect or correct errors in WIFs,
#  but it does try to work around some common problems.
#
############################################################################
#
#  Links:  options, wifisd
#
############################################################################

link options
link wifisd

global data_default
global data_entries
global sections
global wif

procedure main(args)
   local opts, title, palette

   opts := options(args, "n:")

   title := \opts["n"] | "untitled"

   wif2isd(&input, title)

end