~ubuntu-branches/ubuntu/karmic/grace/karmic

« back to all changes in this revision

Viewing changes to arch/os2/dotest.cmd

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-19 14:19:58 UTC
  • Revision ID: james.westby@ubuntu.com-20020319141958-5gxna6vo1ek3zjml
Tags: upstream-5.1.7
ImportĀ upstreamĀ versionĀ 5.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* dotest.cmd, the REXX-based equivalent to shell-script 'dotest' */
 
2
/* demos for GRACE      */
 
3
/* define the location  */
 
4
 
 
5
curdir = Directory()
 
6
curdir = Strip(curdir, 'T', '\') /* handle worst case: root */
 
7
 
 
8
/* find binary */
 
9
guess = Stream('..\src\xmgrace.exe', 'C', 'QUERY EXISTS')
 
10
if guess = '' then
 
11
  do
 
12
  x11root = Value('X11ROOT', , 'OS2ENVIRONMENT')
 
13
  guess = Stream(x11root'/XFree86/bin/xmgrace.exe', 'C', 'QUERY EXISTS')
 
14
  if guess <> '' then 
 
15
    do
 
16
    GRACE = guess
 
17
    end
 
18
  else
 
19
     do
 
20
     say 'No binary found'
 
21
     exit
 
22
     end
 
23
  end
 
24
 
 
25
/* find examples */
 
26
gracehome = Value('GRACE_HOME', , 'OS2ENVIRONMENT')
 
27
guess = Stream(gracehome'/examples/explain.agr', 'C', 'QUERY EXISTS')
 
28
if guess = '' then 
 
29
  do
 
30
  say 'No examples found'
 
31
  exit
 
32
  end
 
33
else
 
34
  do
 
35
  exampledir = gracehome'/examples'
 
36
  end
 
37
 
 
38
/* switch to example dir */
 
39
newdir=directory(exampledir)
 
40
 
 
41
/* command line parameters */
 
42
call ExecuteCmd GRACE' -usage'
 
43
 
 
44
/* call ExecuteCmd sleep 3 */
 
45
 
 
46
/* don't ask stupid questions */
 
47
GRACE = "xmgrace -noask"
 
48
 
 
49
/* explain the row of single character buttons and a few other things */
 
50
GRACE" explain.agr"
 
51
 
 
52
/* display the various axes available */
 
53
GRACE" axes.agr"
 
54
 
 
55
/* display the symbols and line styles */
 
56
GRACE" symslines.agr"
 
57
 
 
58
/* display various fill styles */
 
59
GRACE" fills.agr"
 
60
 
 
61
/* some graph stuff and ticks */
 
62
GRACE" -p graphs.par"
 
63
 
 
64
/* some graph stuff and ticks */
 
65
GRACE" props.agr"
 
66
 
 
67
/* demonstration of many graphs */
 
68
GRACE" manygraphs.agr"
 
69
 
 
70
/* some graph stuff and ticks */
 
71
GRACE" brw.dat -p regions.par"
 
72
 
 
73
/* test of a graph inset */
 
74
GRACE" tinset.agr"
 
75
 
 
76
/* some time and date formats */
 
77
GRACE" times.agr"
 
78
 
 
79
/* some more tick label formats */
 
80
GRACE" -p tforms.par"
 
81
 
 
82
/* Australia map */
 
83
GRACE" au.agr"
 
84
 
 
85
/* log plots */
 
86
GRACE" -autoscale none -p logtest.par log.dat -graph 1 log.dat"
 
87
 
 
88
/* more log plots */
 
89
GRACE" tlog.agr"
 
90
 
 
91
/* a log2 example */
 
92
GRACE" log2.agr"
 
93
 
 
94
/* a logit scale sample */
 
95
GRACE" logit.agr"
 
96
 
 
97
/* display fonts and font mappings */
 
98
GRACE" tfonts.agr"
 
99
 
 
100
/* text transforms */
 
101
GRACE" txttrans.agr"
 
102
 
 
103
/* advaned typesetting */
 
104
GRACE" typeset.agr"
 
105
 
 
106
/* example of world stack */
 
107
GRACE" tstack.agr"
 
108
 
 
109
/* a graph with a parameter file */
 
110
GRACE" -p test1.par -autoscale xy test.dat"
 
111
 
 
112
/* a graph with a parameter file in reverse video */
 
113
GRACE" -rvideo -p test1.par -autoscale xy test.dat"
 
114
 
 
115
GRACE" test2.agr"
 
116
 
 
117
/* explanation of arrow shape parameters */
 
118
GRACE" arrows.agr"
 
119
 
 
120
/* multiple graphs with a parameter file */
 
121
GRACE" mlo.dat -graph 1 brw.dat -p co2.par"
 
122
 
 
123
/* multiple graphs created with arrange feature */
 
124
GRACE" co2.agr"
 
125
 
 
126
/* a nice sample */
 
127
GRACE" spectrum.agr"
 
128
 
 
129
/* a graph with alternate axes */
 
130
GRACE" -p altaxis.par test.dat -autoscale xy"
 
131
 
 
132
/* a graph with error bars */
 
133
GRACE" terr.agr"
 
134
 
 
135
/* a fixed graph with XY RADIUS format */
 
136
GRACE" txyr.agr"
 
137
 
 
138
/* string annotations */
 
139
GRACE" motif.agr"
 
140
 
 
141
/* a graph with an XYZ set */
 
142
GRACE" xyz.agr"
 
143
 
 
144
/* a graph with HILO data */
 
145
GRACE" hilo.agr"
 
146
 
 
147
/* a graph with BOXPLOT data */
 
148
GRACE" boxplot.agr"
 
149
 
 
150
/* polar plots */
 
151
GRACE" polar.agr"
 
152
 
 
153
/* bar charts */
 
154
 
 
155
/* a bar graph demonstrating specified ticks and tick labels */
 
156
GRACE" bar.agr"
 
157
 
 
158
/* a stacked bar chart */
 
159
GRACE" stackedb.agr"
 
160
 
 
161
/* a bar chart with error bars */
 
162
GRACE" chartebar.agr"
 
163
 
 
164
/* display all types of XY charts */
 
165
GRACE" charts.agr"
 
166
 
 
167
/* pie charts */
 
168
GRACE" pie.agr"
 
169
 
 
170
/* vector map */
 
171
GRACE" vmap.agr"
 
172
 
 
173
/* a bubble plot */
 
174
GRACE" xysize.agr"
 
175
 
 
176
/* non-linear curve fitting */
 
177
GRACE" logistic.agr"
 
178
 
 
179
/* some interesting stuff */
 
180
GRACE" -b test.com"
 
181
 
 
182
/* need a program */
 
183
/* modified from previous versions, a thank you goes to Bruce Barnett */
 
184
/* this modification allows others without write permission */
 
185
/* to run the demos. */
 
186
 
 
187
say
 
188
rs = Stream('tmc.exe', 'C', 'QUERY EXISTS')
 
189
if rs = '' then
 
190
  do
 
191
  say "Compiling a short program to test the -pipe option"
 
192
  say "Executing 'gcc tmc.c -o tmc.exe'"
 
193
  '@gcc tmc.c -o tmc.exe'
 
194
  say "Done compilation"
 
195
  say
 
196
  end
 
197
 
 
198
/* a graph with the -pipe option */
 
199
say "Testing -pipe option, executing './tmc | $GRACE -pipe' "
 
200
'.\tmc.exe | 'GRACE' -pipe'
 
201
call ExecuteCmd 'rm -f tmc.exe'
 
202
 
 
203
/* switch back */
 
204
newdir=directory(curdir)
 
205
 
 
206
exit /* end of main program */
 
207
 
 
208
 
 
209
/* Procedures */
 
210
 
 
211
ExecuteCmd: PROCEDURE
 
212
Parse Arg EC_param
 
213
_silent_pre = "@"
 
214
ADDRESS CMD _silent_pre""EC_param
 
215
return rc