Overview
Comment:Added strip_comments
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: a42fa3ac31e34c720593e4f61474117cb7672071cfe64ccb96e4295b77a83960
User & Date: gawthrop@users.sourceforge.net on 2000-04-05 08:02:47.000
Other Links: branch diff | manifest | tags
Context
2000-04-05
08:04:01
Minor reorganisation check-in: 25200ea518 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:02:47
Added strip_comments check-in: a42fa3ac31 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
07:37:27
*** empty log message *** check-in: 8debb765ca user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
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
system=$dirname

cat<<EOF
# Default system
set system "$system"

# Arguments to mtt
set args "-q"

# Default the again command
set mtt "mtt warranty"

# The top level menu
button .mtt -text "$title \n Directory: $dirname \n NO WARRANTY (press for details)" -command "exec mtt warranty &"
#button .again -text "Again" -command "exec $mtt &"
menubutton .man -text "Manual" -menu .man.man
menubutton .util  -text "Utilities" -menu .util.util
menubutton .opt  -text "Options" -menu .opt.opt
menubutton .sys -text "Systems" -menu .sys.sys
menubutton .rep -text "Representations (major)" -menu .rep.rep
menubutton .repall -text "Representations (all)" -menu .repall.repall
menubutton .exam -text "Examples" -menu .exam.exam

button .mtt_quit -text "Quit" -command exit
pack .mtt  .exam .rep  .repall .sys  .util .opt  .man .mtt_quit

 
menu .man.man
.man.man add command -label "Browser (html)" -command "exec mtt -q hinfo &"
.man.man add command -label "Info" -command "exec xterm -e mtt -q info &"
.man.man add command -label "Text (pdf)" -command "exec mtt -q manual &"

menu .util.util
# .mtt.opt.util add command -label "copy example" -command 
# .mtt.opt.util add command -label "copy" 
.util.util add command -label "clean" -command "exec mtt -q Clean &"
.util.util add command -label "recursive clean" -command "exec mtt -q rclean &"








|


|


|
<







>

|





|







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
system=$dirname

cat<<EOF
# Default system
set system "$system"

# Arguments to mtt
set args {-q}

# Default the again command
set mtt {mtt \$args warranty}

# The top level menu
button .mtt -text "$title \n Directory: $dirname \n NO WARRANTY \n (press for details)" -command "exec mtt warranty &"

menubutton .man -text "Manual" -menu .man.man
menubutton .util  -text "Utilities" -menu .util.util
menubutton .opt  -text "Options" -menu .opt.opt
menubutton .sys -text "Systems" -menu .sys.sys
menubutton .rep -text "Representations (major)" -menu .rep.rep
menubutton .repall -text "Representations (all)" -menu .repall.repall
menubutton .exam -text "Examples" -menu .exam.exam
#button .again -text "Again" -command "exec echo \$mtt &; exec \$mtt  &"
button .mtt_quit -text "Quit" -command exit
pack .mtt .exam .rep  .repall .sys  .util .opt  .man .mtt_quit

 
menu .man.man
.man.man add command -label "Browser (html)" -command "exec mtt -q hinfo &"
.man.man add command -label "Info" -command "exec xterm -e mtt -q info &"
.man.man add command -label "Text (ps)" -command "exec mtt -q manual &"

menu .util.util
# .mtt.opt.util add command -label "copy example" -command 
# .mtt.opt.util add command -label "copy" 
.util.util add command -label "clean" -command "exec mtt -q Clean &"
.util.util add command -label "recursive clean" -command "exec mtt -q rclean &"

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Create the options menu
mtt |  awk '{
  if (Options) {
    option=substr($1,2);
    label="";
    for (i=2;i<=NF;i++)
      label = sprintf("%s %s",label,$i);
    printf(".opt.opt add check -label \"%s (-%s)\" -variable %s -command {set args \"$args -%s\"}\n", label, option, option, option); 
  }
  if ($1=="Options:") Options = 1;
}'

# Examples menu
cat <<EOF
menu .exam.exam
EOF

examples_txt2tk< $MTTPATH/EXAMPLES


cat<<EOF
menu .rep.rep
menu .repall.repall
EOF

reps_txt2tk <$MTTPATH/REPS 




















|









|

>





|
<
<
<
<
<
<
<
<
<
<
<
<
<
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96













# Create the options menu
mtt |  awk '{
  if (Options) {
    option=substr($1,2);
    label="";
    for (i=2;i<=NF;i++)
      label = sprintf("%s %s",label,$i);
    printf(".opt.opt add check -label \"%s (-%s)\" -variable %s -command {set args \"$args -%s\" }\n", label, option, option, option); 
  }
  if ($1=="Options:") Options = 1;
}'

# Examples menu
cat <<EOF
menu .exam.exam
EOF

strip_comments $MTTPATH/EXAMPLES | examples_txt2tk

# Representations menu
cat<<EOF
menu .rep.rep
menu .repall.repall
EOF

strip_comments $MTTPATH/REPS  | reps_txt2tk 














MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]