v08i011: xfig -- X Drawing Tool, Part02/21
Brian V. Smith
envbvs at epb2.lbl.gov
Tue Jul 3 07:25:21 AEST 1990
Submitted-by: envbvs at epb2.lbl.gov (Brian V. Smith)
Posting-number: Volume 8, Issue 11
Archive-name: xfig2.8/part02
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 2 (of 21)."
# Contents: @figs/deltat.fig @figs/flowchart.fig @figs/gold.fig
# @figs/network.fig @figs/resistor.fig @figs/roundboxes.fig
# @figs/window2.fig arcbox.c box.c file.c free.c func.h graphics.c
# list.c print.c psfonts.c redisplay.c trans.c
# Wrapped by envbvs at epb2.lbl.gov on Thu Jun 28 08:50:39 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f '@figs/deltat.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/deltat.fig'\"
else
echo shar: Extracting \"'@figs/deltat.fig'\" \(2482 characters\)
sed "s/^X//" >'@figs/deltat.fig' <<'END_OF_FILE'
X#FIG 1.5
X80 2
X2 1 0 1 0 0 0 0 0.000 0 0
X 354 164 439 164 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 204 314 124 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 204 134 219 119 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 324 369 354 339 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 289 349 354 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 289 169 339 119 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 289 229 354 164 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 289 289 354 224 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 364 269 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 304 209 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 244 204 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 184 204 254 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 124 204 194 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 354 119 354 369 9999 9999
X2 1 0 2 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 149 269 409 269 9999 9999
X2 1 0 2 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 149 369 459 369 9999 9999
X2 1 0 2 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 204 434 204 109 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 119 274 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 289 119 289 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 159 289 159 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 354 289 354 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 339 289 339 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 324 289 324 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 309 289 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 294 289 294 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 279 289 279 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 264 289 264 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 249 289 249 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 234 289 234 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 219 289 219 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 204 289 204 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 189 289 189 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 174 289 174 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 144 289 144 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 274 129 289 129 9999 9999
X4 0 0 12 0 0 0 0.000 1 7 4 189 114 t
X4 0 0 12 0 0 0 0.000 1 9 3 452 173 i
X4 0 0 12 0 0 0 0.000 1 6 6 114 324 o
X4 0 0 12 0 0 0 0.000 1 7 4 444 169 t
X4 0 0 12 0 0 0 0.000 1 7 4 109 319 t
X4 1 0 12 0 0 0 0.000 1 6 6 362 388 o
X4 1 0 12 0 0 0 0.000 1 9 8 354 384 R
X4 1 0 12 0 0 0 0.000 1 9 14 279 384 dR
X4 1 0 14 0 0 0 0.000 1 2 3 424 264 .
X4 0 0 12 0 0 0 0.000 1 11 60 454 719 crack.fig6
X4 0 0 12 0 0 0 0.000 1 9 6 454 384 R
X4 1 0 12 0 0 0 0.000 1 6 9 424 274 m
X4 0 0 12 0 0 0 0.000 1 9 12 274 109 dR
END_OF_FILE
echo shar: 13 control characters may be missing from \"'@figs/deltat.fig'\"
if test 2482 -ne `wc -c <'@figs/deltat.fig'`; then
echo shar: \"'@figs/deltat.fig'\" unpacked with wrong size!
fi
# end of '@figs/deltat.fig'
fi
if test -f '@figs/flowchart.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/flowchart.fig'\"
else
echo shar: Extracting \"'@figs/flowchart.fig'\" \(2984 characters\)
sed "s/^X//" >'@figs/flowchart.fig' <<'END_OF_FILE'
X#FIG 1.4
X80 2
X2 2 0 1 0 0 0 0 0.000 0 0
X 474 529 474 559 604 559 604 529 474 529 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 199 154 199 214 399 214 399 154 199 154 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 199 254 199 314 399 314 399 254 199 254 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 199 354 199 414 399 414 399 354 199 354 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 199 514 199 574 399 574 399 514 199 514 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 519 154 519 214 719 214 719 154 519 154 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 519 254 519 314 719 314 719 254 519 254 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 519 354 519 414 719 414 719 354 519 354 9999 9999
X2 1 0 3 0 0 0 0 0.000 0 0
X 459 134 459 334 9999 9999
X2 1 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 399 544 469 544 9999 9999
X2 4 0 2 0 0 7 0 0.000 0 0
X 354 54 354 114 554 114 554 54 354 54 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 134 34 134 64 264 64 264 34 134 34 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 459 334 459 354 454 369 439 384 404 384 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 459 174 459 254 439 284 404 284 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 459 114 459 154 439 184 404 184 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 459 114 459 154 479 184 514 184 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 459 194 459 254 479 284 514 284 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 459 349 459 354 464 369 479 384 514 384 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 199 184 149 184 144 204 144 234 144 439 144 454 154 474 194 474 224 474 224 509 9999 9999
X3 0 0 3 0 0 0 0 0.000 0 0
X 199 284 159 284 144 299 144 324 9999 9999
X3 0 0 3 0 0 0 0 0.000 0 0
X 199 384 159 384 144 399 144 424 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 719 184 769 184 774 204 774 234 774 424 774 454 769 474 719 474 439 474 374 474 374 509 9999 9999
X3 0 0 3 0 0 0 0 0.000 0 0
X 719 284 759 284 774 299 774 324 9999 9999
X3 0 0 3 0 0 0 0 0.000 0 0
X 719 384 759 384 774 399 774 439 9999 9999
X3 0 0 3 0 0 0 0 0.000 1 0
X 0 0 2.000 8.000 16.000
X 234 64 234 84 254 84 349 84 9999 9999
X4 0 0 14 0 0 0 0.000 1 20 355 79 14 Module 4.2 Flow Equations. Level 2.
X4 0 0 14 0 0 0 0.000 1 20 71 269 559 per Link
X4 0 0 14 0 0 0 0.000 1 20 190 204 534 4.2.7 Place Results
X4 0 0 14 0 0 0 0.000 1 20 70 574 399 Effects
X4 0 0 14 0 0 0 0.000 1 20 198 524 374 4.2.6 Large Opening
X4 0 0 14 0 0 0 0.000 1 20 200 204 374 4.2.5 Flow Controller
X4 0 0 14 0 0 0 0.000 1 20 106 524 274 4.2.4 Duct
X4 0 0 14 0 0 0 0.000 1 20 96 204 274 4.2.3 Fan
X4 0 0 14 0 0 0 0.000 1 20 213 524 174 4.2.2 Combined Crack
X4 0 0 14 0 0 0 0.000 1 20 184 204 174 4.2.1 Simple Crack
X4 0 0 14 0 0 0 0.000 1 20 137 479 549 All Parameters
X4 0 0 14 0 0 0 0.000 1 20 55 359 74 4.2.0
X4 0 0 14 0 0 0 0.000 1 20 137 139 54 All Parameters
X4 0 0 14 0 0 0 0.000 1 20 129 419 74 Select Module
X4 0 0 14 0 0 0 0.000 1 20 119 419 99 for Link Type
END_OF_FILE
echo shar: 15 control characters may be missing from \"'@figs/flowchart.fig'\"
if test 2984 -ne `wc -c <'@figs/flowchart.fig'`; then
echo shar: \"'@figs/flowchart.fig'\" unpacked with wrong size!
fi
# end of '@figs/flowchart.fig'
fi
if test -f '@figs/gold.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/gold.fig'\"
else
echo shar: Extracting \"'@figs/gold.fig'\" \(2761 characters\)
sed "s/^X//" >'@figs/gold.fig' <<'END_OF_FILE'
X#FIG 1.4X
X80 2
X2 2 0 1 0 0 0 0 0.000 0 0
X 554 439 554 431 562 431 562 439 554 439 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 154 439 154 431 161 431 161 439 154 439 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 79 224 239 224 239 384 79 384 79 224 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 79 284 239 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 79 224 239 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 179 284 139 384 9999 9999
X2 1 0 3 0 0 0 0 0.000 1 0
X 0 0 3.000 12.000 24.000
X 299 304 379 304 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 419 244 679 244 679 344 419 344 419 244 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 519 282 519 344 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 579 244 579 306 9999 9999
X2 3 0 1 0 0 0 2 0.000 0 0
X 79 224 119 194 279 194 239 224 79 224 9999 9999
X2 3 0 1 0 0 0 2 0.000 0 0
X 279 194 279 354 239 384 239 224 279 194 9999 9999
X2 3 0 1 0 0 0 2 0.000 0 0
X 419 244 459 214 719 214 679 244 419 244 9999 9999
X2 3 0 1 0 0 0 2 0.000 0 0
X 719 214 719 314 679 344 679 244 719 214 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 119 174 119 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 279 174 279 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 119 179 179 179 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 279 179 209 179 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 59 224 69 224 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 59 284 69 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 59 384 69 384 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 64 224 64 244 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 64 284 64 264 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 64 284 64 324 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 64 384 64 344 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 459 194 459 204 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 719 194 719 204 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 459 199 574 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 719 199 604 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 399 244 409 244 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 399 344 409 344 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 404 244 404 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 404 344 404 304 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 419 244 679 344 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 579 244 619 214 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 239 284 279 254 9999 9999
X4 0 0 12 0 0 0 0.000 1 9 36 539 439 65 "
X4 0 0 12 0 0 0 0.000 1 9 36 139 439 64 "
X4 0 0 12 0 0 0 0.000 1 9 12 59 259 3"
X4 0 0 12 0 0 0 0.000 1 9 12 59 339 5"
X4 0 0 12 0 0 0 0.000 1 9 18 579 204 13"
X4 0 0 12 0 0 0 0.000 1 9 12 399 299 5"
X4 0 0 12 0 0 0 0.000 1 9 12 189 184 8"
X4 1 0 18 0 0 0 0.000 1 17 358 349 124 How to create matter (using gold as an example)
END_OF_FILE
echo shar: 8 control characters may be missing from \"'@figs/gold.fig'\"
if test 2761 -ne `wc -c <'@figs/gold.fig'`; then
echo shar: \"'@figs/gold.fig'\" unpacked with wrong size!
fi
# end of '@figs/gold.fig'
fi
if test -f '@figs/network.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/network.fig'\"
else
echo shar: Extracting \"'@figs/network.fig'\" \(2771 characters\)
sed "s/^X//" >'@figs/network.fig' <<'END_OF_FILE'
X#FIG 1.4
X80 2
X1 3 0 1 0 0 0 21 0.000 1 0.000 279 19 3 3 279 19 281 20
X1 3 0 1 0 0 0 21 0.000 1 0.000 439 19 3 3 439 19 441 20
X1 3 0 1 0 0 0 21 0.000 1 0.000 599 19 3 3 599 19 601 20
X1 3 0 1 0 0 0 21 0.000 1 0.000 439 159 3 3 439 159 441 160
X1 3 0 1 0 0 0 21 0.000 1 0.000 279 299 3 3 279 299 281 300
X1 3 0 1 0 0 0 21 0.000 1 0.000 439 299 3 3 439 299 441 300
X1 3 0 1 0 0 0 21 0.000 1 0.000 599 299 3 3 599 299 601 300
X1 3 0 1 0 0 0 21 0.000 1 0.000 279 479 3 3 279 479 281 440
X1 3 0 1 0 0 0 21 0.000 1 0.000 439 479 3 3 439 479 441 440
X1 3 0 1 0 0 0 21 0.000 1 0.000 599 479 3 3 599 479 601 440
X2 1 0 1 0 0 0 0 0.000 0 0
X 279 119 279 339 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 269 59 289 59 289 119 269 119 269 59 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 279 19 279 59 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 19 439 59 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 429 59 449 59 449 119 429 119 429 59 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 119 439 159 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 599 119 599 159 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 589 59 609 59 609 119 589 119 589 59 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 599 19 599 59 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 259 439 299 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 429 199 449 199 449 259 429 259 429 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 159 439 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 279 299 319 299 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 319 309 319 289 379 289 379 309 319 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 379 299 439 299 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 299 499 299 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 499 309 499 289 559 289 559 309 499 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 559 299 599 299 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 439 439 479 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 424 379 424 439 454 439 454 379 424 379 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 439 299 439 379 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 599 159 599 379 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 589 379 609 379 609 439 589 439 589 379 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 599 439 599 479 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 279 339 279 379 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 269 379 289 379 289 439 269 439 269 379 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 279 439 279 479 9999 9999
X4 0 0 12 0 0 0 0.000 1 9 12 565 414 D9
X4 0 0 12 0 0 0 0.000 1 9 12 401 414 D8
X4 0 0 12 0 0 0 0.000 1 9 12 245 414 D7
X4 0 0 12 0 0 0 0.000 1 9 6 262 302 I
X4 0 0 12 0 0 0 0.000 1 9 18 609 302 III
X4 0 0 12 0 0 0 0.000 1 9 12 525 279 D6
X4 0 0 12 0 0 0 0.000 1 9 12 449 289 IV
X4 0 0 12 0 0 0 0.000 1 9 12 344 279 D4
X4 0 0 12 0 0 0 0.000 1 9 12 405 239 D5
X4 0 0 12 0 0 0 0.000 1 9 12 449 163 II
X4 0 0 12 0 0 0 0.000 1 9 12 565 94 D3
X4 0 0 12 0 0 0 0.000 1 9 12 405 94 D2
X4 0 0 12 0 0 0 0.000 1 9 12 245 94 D1
END_OF_FILE
echo shar: 13 control characters may be missing from \"'@figs/network.fig'\"
if test 2771 -ne `wc -c <'@figs/network.fig'`; then
echo shar: \"'@figs/network.fig'\" unpacked with wrong size!
fi
# end of '@figs/network.fig'
fi
if test -f '@figs/resistor.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/resistor.fig'\"
else
echo shar: Extracting \"'@figs/resistor.fig'\" \(2493 characters\)
sed "s/^X//" >'@figs/resistor.fig' <<'END_OF_FILE'
X#FIG 1.5
X80 2
X1 3 0 1 0 0 0 0 0.000 1 0.000 249 149 11 11 249 149 259 154
X1 4 0 1 0 0 0 21 0.000 1 0.000 249 229 3 3 247 229 252 229
X1 4 0 1 0 0 0 21 0.000 1 0.000 159 229 3 3 157 229 162 229
X1 4 0 1 0 0 0 21 0.000 1 0.000 339 229 3 3 337 229 342 229
X1 4 0 1 0 0 0 21 0.000 1 0.000 249 79 3 3 247 79 252 79
X2 1 0 1 0 0 0 0 0.000 0 0
X 376 319 381 319 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 374 314 384 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 369 309 389 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 104 309 124 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 109 314 119 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 111 319 116 319 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 249 144 249 156 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 339 79 339 124 334 129 344 134 334 139 344 144 334 149 344 154 334 159 344 164 339 169 339 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 159 79 339 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 249 79 249 139 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 249 159 249 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 159 229 159 289 229 289 234 294 239 284 244 294 249 284 254 294 259 284 264 294 269 284 274 289 339 289 339 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 159 229 179 229 184 234 189 224 194 234 199 224 204 234 209 224 214 234 219 224 224 229 249 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 339 229 379 229 379 249 374 254 384 259 374 264 384 269 374 274 384 279 374 284 384 289 379 294 379 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 159 229 114 229 114 249 109 254 119 259 109 264 119 269 109 274 119 279 109 284 119 289 114 294 114 309 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 159 79 159 124 154 129 164 134 154 139 164 144 154 149 164 154 154 159 164 164 159 169 159 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X 249 229 269 229 274 234 279 224 284 234 289 224 294 234 299 224 304 234 309 224 314 229 339 229 9999 9999
X4 1 0 16 0 0 0 0.000 1 17 263 244 35 Building Airflow Resistive Network
X4 1 0 12 0 0 0 0.000 1 9 8 284 254 R
X4 0 0 10 0 0 0 0.000 1 7 31 289 259 return1
X4 1 0 12 0 0 0 0.000 1 9 8 184 254 R
X4 0 0 10 0 0 0 0.000 1 7 33 189 259 return 2
X4 1 0 12 0 0 0 0.000 1 9 8 399 269 R
X4 0 0 10 0 0 0 0.000 1 9 41 404 274 envelope1
X4 1 0 12 0 0 0 0.000 1 9 8 364 149 R
X4 0 0 10 0 0 0 0.000 1 9 33 369 154 supply1
X4 1 0 12 0 0 0 0.000 1 9 8 99 149 R
X4 0 0 10 0 0 0 0.000 1 9 33 104 154 supply2
X4 0 0 10 0 0 0 0.000 1 9 41 49 274 envelope2
X4 1 0 12 0 0 0 0.000 1 9 8 44 269 R
X4 1 0 12 0 0 0 0.000 1 9 8 229 319 R
X4 0 0 10 0 0 0 0.000 1 7 39 234 324 interzone
END_OF_FILE
echo shar: 15 control characters may be missing from \"'@figs/resistor.fig'\"
if test 2493 -ne `wc -c <'@figs/resistor.fig'`; then
echo shar: \"'@figs/resistor.fig'\" unpacked with wrong size!
fi
# end of '@figs/resistor.fig'
fi
if test -f '@figs/roundboxes.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/roundboxes.fig'\"
else
echo shar: Extracting \"'@figs/roundboxes.fig'\" \(2353 characters\)
sed "s/^X//" >'@figs/roundboxes.fig' <<'END_OF_FILE'
X#FIG 1.4X
X80 2
X2 4 0 1 0 0 23 21 0.000 0 0
X 39 44 39 259 719 259 719 44 39 44 9999 9999
X2 4 0 1 0 0 22 20 0.000 0 0
X 49 54 49 259 709 259 709 54 49 54 9999 9999
X2 4 0 1 0 0 21 19 0.000 0 0
X 699 259 699 64 59 64 59 259 699 259 9999 9999
X2 4 0 1 0 0 20 18 0.000 0 0
X 69 74 69 259 689 259 689 74 69 74 9999 9999
X2 4 0 1 0 0 19 17 0.000 0 0
X 79 84 79 259 679 259 679 84 79 84 9999 9999
X2 4 0 1 0 0 18 16 0.000 0 0
X 89 94 89 259 669 259 669 94 89 94 9999 9999
X2 4 0 1 0 0 17 15 0.000 0 0
X 99 104 99 259 659 259 659 104 99 104 9999 9999
X2 4 0 1 0 0 16 14 0.000 0 0
X 109 114 109 259 649 259 649 114 109 114 9999 9999
X2 4 0 1 0 0 15 13 0.000 0 0
X 119 124 119 259 639 259 639 124 119 124 9999 9999
X2 4 0 1 0 0 14 12 0.000 0 0
X 129 134 129 259 629 259 629 134 129 134 9999 9999
X2 4 0 1 0 0 13 11 0.000 0 0
X 139 144 139 259 619 259 619 144 139 144 9999 9999
X2 4 0 1 0 0 12 10 0.000 0 0
X 149 154 149 259 609 259 609 154 149 154 9999 9999
X2 4 0 1 0 0 11 9 0.000 0 0
X 159 164 159 259 599 259 599 164 159 164 9999 9999
X2 4 0 1 0 0 10 8 0.000 0 0
X 169 174 169 259 589 259 589 174 169 174 9999 9999
X2 4 0 1 0 0 9 7 0.000 0 0
X 179 184 179 259 579 259 579 184 179 184 9999 9999
X2 4 0 1 0 0 8 6 0.000 0 0
X 189 194 189 259 569 259 569 194 189 194 9999 9999
X2 4 0 1 0 0 7 5 0.000 0 0
X 199 204 199 259 559 259 559 204 199 204 9999 9999
X2 4 0 1 0 0 6 4 0.000 0 0
X 209 214 209 259 549 259 549 214 209 214 9999 9999
X2 4 0 1 0 0 5 3 0.000 0 0
X 219 224 219 259 539 259 539 224 219 224 9999 9999
X2 4 0 1 0 0 4 2 0.000 0 0
X 229 234 229 259 529 259 529 234 229 234 9999 9999
X2 4 0 1 0 0 3 1 0.000 0 0
X 239 244 239 259 519 259 519 244 239 244 9999 9999
X2 4 0 1 0 0 14 5 0.000 0 0
X 399 459 399 579 519 579 519 459 399 459 9999 9999
X2 4 0 1 0 0 14 5 0.000 0 0
X 399 299 399 419 519 419 519 299 399 299 9999 9999
X2 4 0 1 0 0 14 5 0.000 0 0
X 239 459 239 579 359 579 359 459 239 459 9999 9999
X2 4 0 1 0 0 14 5 0.000 0 0
X 239 299 239 419 359 419 359 299 239 299 9999 9999
X2 4 0 1 0 0 12 7 0.000 0 0
X 354 414 354 464 404 464 404 414 354 414 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X 239 424 239 454 349 454 349 424 239 424 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X 364 299 364 409 394 409 394 299 364 299 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X 409 424 409 454 519 454 519 424 409 424 9999 9999
X2 4 0 1 0 0 10 0 0.000 0 0
X 364 469 364 579 394 579 394 469 364 469 9999 9999
END_OF_FILE
if test 2353 -ne `wc -c <'@figs/roundboxes.fig'`; then
echo shar: \"'@figs/roundboxes.fig'\" unpacked with wrong size!
fi
# end of '@figs/roundboxes.fig'
fi
if test -f '@figs/window2.fig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'@figs/window2.fig'\"
else
echo shar: Extracting \"'@figs/window2.fig'\" \(2496 characters\)
sed "s/^X//" >'@figs/window2.fig' <<'END_OF_FILE'
X#FIG 1.5
X80 2
X5 1 0 1 0 0 0 0 0.000 0 1 0 142.119 321.367 189 219 239 264 254 334
X 0 0 1.000 4.000 8.000
X5 1 0 1 0 0 0 0 0.000 0 1 0 151.500 514.000 264 539 239 589 199 619
X 0 0 1.000 4.000 8.000
X2 1 0 1 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 429 444 399 444 389 454 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 239 444 269 444 279 454 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X 0 0 1.000 4.000 8.000
X 269 259 409 259 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X 404 524 444 524 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X 264 364 224 364 9999 9999
X2 3 0 2 0 0 0 11 0.000 0 0
X 244 624 424 624 424 699 419 704 409 704 399 704 388 700 384 695 377 697 361 700 354 690 334 695 333 695 330 698 327 703 317 703 307 693 303 690 303 690 303 690 295 694 284 702 275 703 269 696 262 693 254 695 247 694 245 684 244 624 9999 9999
X2 3 0 2 0 0 0 11 0.000 0 0
X 244 144 244 204 424 204 424 134 413 133 398 132 388 124 379 133 364 130 355 128 343 131 336 128 331 124 325 126 320 129 310 134 301 134 296 128 281 124 272 125 268 130 260 135 256 133 249 135 247 139 244 144 9999 9999
X2 2 0 2 0 0 0 0 0.000 0 0
X 279 204 279 209 294 209 294 204 279 204 9999 9999
X2 2 0 2 0 0 0 0 0.000 0 0
X 279 619 279 624 294 624 294 619 279 619 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 284 209 289 209 289 619 284 619 284 209 9999 9999
X2 2 0 2 0 0 0 0 0.000 0 0
X 374 204 374 209 389 209 389 204 374 204 9999 9999
X2 2 0 2 0 0 0 0 0.000 0 0
X 374 619 374 624 389 624 389 619 374 619 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X 379 209 384 209 384 619 379 619 379 209 9999 9999
X3 0 0 2 0 0 0 0 0.000 0 0
X 264 364 274 369 280 404 293 403 294 421 297 453 374 451 374 484 388 483 390 490 389 519 404 524 9999 9999
X3 0 0 1 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 299 364 299 294 304 239 319 214 344 214 364 234 369 294 369 344 9999 9999
X3 0 0 1 0 0 0 0 0.000 1 0
X 0 0 1.000 4.000 8.000
X 369 519 369 569 359 599 324 604 299 584 299 494 9999 9999
X4 0 0 12 0 0 0 0.000 1 7 29 399 440 storm
X4 2 0 12 0 0 0 0.000 1 12 28 269 437 prime
X4 1 0 14 0 0 0 0.000 1 2 3 418 256 .
X4 1 0 12 0 0 0 0.000 1 6 9 418 264 m
X4 0 0 12 0 0 0 0.000 1 6 6 335 449 a
X4 0 0 12 0 0 0 0.000 1 8 6 328 444 t
X4 0 0 12 0 0 0 0.000 1 6 6 427 521 o
X4 0 0 12 0 0 0 0.000 1 8 6 420 517 t
X4 0 0 12 0 0 0 0.000 1 9 3 233 358 i
X4 0 0 12 0 0 0 0.000 1 8 6 227 355 t
X4 0 0 10 0 0 0 0.000 1 7 5 402 231 2
X4 0 0 12 0 0 0 0.000 1 8 6 395 226 t
X4 0 0 10 0 0 0 0.000 1 7 5 300 232 1
X4 0 0 12 0 0 0 0.000 1 8 6 294 227 t
X4 0 0 12 0 0 0 0.000 1 11 60 54 729 crack.fig4
END_OF_FILE
echo shar: 15 control characters may be missing from \"'@figs/window2.fig'\"
if test 2496 -ne `wc -c <'@figs/window2.fig'`; then
echo shar: \"'@figs/window2.fig'\" unpacked with wrong size!
fi
# end of '@figs/window2.fig'
fi
if test -f 'arcbox.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'arcbox.c'\"
else
echo shar: Extracting \"'arcbox.c'\" \(2583 characters\)
sed "s/^X//" >'arcbox.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Adapted by Brian V. Smith from box.c originally writen by:
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "alloc.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern int line_style, line_thickness;
Xextern float cur_styleval;
Xextern int cur_color;
Xextern int cur_areafill;
Xextern int cur_radius;
Xextern int fill_mode;
Xextern int fix_x, fix_y, cur_x, cur_y;
Xextern (*canvas_kbd_proc)();
Xextern (*canvas_locmove_proc)();
Xextern (*canvas_leftbut_proc)();
Xextern (*canvas_middlebut_proc)();
Xextern (*canvas_rightbut_proc)();
Xextern null_proc();
Xextern set_popupmenu();
X
Xextern F_compound objects;
X
X/*************************** locally global procedures *********************/
X
Xextern int elastic_box();
Xextern int create_arc_boxobject();
Xextern int init_arc_box_drawing();
X
Xarc_box_drawing_selected()
X{
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = init_arc_box_drawing;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = set_popupmenu;
X set_cursor(&arrow_cursor);
X reset_action_on();
X }
X
Xinit_arc_box_drawing(x, y)
Xint x, y;
X{
X cur_x = fix_x = x;
X cur_y = fix_y = y;
X canvas_locmove_proc = elastic_box;
X canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
X canvas_middlebut_proc = create_arc_boxobject;
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
X set_temp_cursor(&null_cursor);
X set_action_on();
X }
X
Xcreate_arc_boxobject(x, y)
Xint x, y;
X{
X F_line *box;
X F_point *point;
X
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
X
X
X if ((Point_malloc(point)) == NULL) {
X blink_msg();
X put_msg(Err_mem);
X return;
X }
X point->x = x;
X point->y = y;
X point->next = NULL;
X
X Line_malloc(box);
X box->type = T_ARC_BOX;
X box->style = line_style;
X box->thickness = line_thickness;
X box->color = cur_color;
X box->depth = 0;
X box->pen = 0;
X box->area_fill = fill_mode? cur_areafill : 0;
X box->style_val = cur_styleval;
X box->radius = cur_radius; /* corner radius */
X box->for_arrow = NULL;
X box->back_arrow = NULL;
X box->points = point;
X box->next = NULL;
X append_point(x, fix_y, &point);
X append_point(fix_x, fix_y, &point);
X append_point(fix_x, y, &point);
X append_point(x, y, &point);
X draw_line(box, PAINT);
X clean_up();
X set_action_object(F_CREATE, O_POLYLINE);
X insert_line(&objects.lines, box);
X set_latestline(box);
X set_modifiedflag();
X arc_box_drawing_selected();
X }
END_OF_FILE
if test 2583 -ne `wc -c <'arcbox.c'`; then
echo shar: \"'arcbox.c'\" unpacked with wrong size!
fi
# end of 'arcbox.c'
fi
if test -f 'box.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'box.c'\"
else
echo shar: Extracting \"'box.c'\" \(3030 characters\)
sed "s/^X//" >'box.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "alloc.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern int line_style, line_thickness;
Xextern float cur_styleval;
Xextern int cur_color;
Xextern int cur_areafill;
Xextern int fill_mode;
Xextern int fix_x, fix_y, cur_x, cur_y;
Xextern (*canvas_kbd_proc)();
Xextern (*canvas_locmove_proc)();
Xextern (*canvas_leftbut_proc)();
Xextern (*canvas_middlebut_proc)();
Xextern (*canvas_rightbut_proc)();
Xextern null_proc();
Xextern set_popupmenu();
X
Xextern F_compound objects;
X
X/*************************** locally global procedures *********************/
X
Xextern int elastic_box();
Xextern int create_boxobject();
Xextern int init_box_drawing();
X
Xbox_drawing_selected()
X{
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = init_box_drawing;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = set_popupmenu;
X set_cursor(&arrow_cursor);
X reset_action_on();
X }
X
Xinit_box_drawing(x, y)
Xint x, y;
X{
X cur_x = fix_x = x;
X cur_y = fix_y = y;
X canvas_locmove_proc = elastic_box;
X canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
X canvas_middlebut_proc = create_boxobject;
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
X set_temp_cursor(&null_cursor);
X set_action_on();
X }
X
Xdraw_rectbox(x1, y1, x2, y2, op)
Xint x1, y1, x2, y2, op;
X{
X pw_vector(canvas_win, x1, y1, x1, y2, op, 1, SOLID_LINE, 0.0);
X pw_vector(canvas_win, x1, y2, x2, y2, op, 1, SOLID_LINE, 0.0);
X pw_vector(canvas_win, x2, y2, x2, y1, op, 1, SOLID_LINE, 0.0);
X pw_vector(canvas_win, x2, y1, x1, y1, op, 1, SOLID_LINE, 0.0);
X }
X
Xelastic_box(x, y)
Xint x, y;
X{
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
X cur_x = x;
X cur_y = y;
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
X }
X
Xcreate_boxobject(x, y)
Xint x, y;
X{
X F_line *box;
X F_point *point;
X
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT);
X
X
X if ((Point_malloc(point)) == NULL) {
X blink_msg();
X put_msg(Err_mem);
X return;
X }
X point->x = fix_x;
X point->y = fix_y;
X point->next = NULL;
X
X if ((Line_malloc(box)) == NULL) {
X blink_msg();
X put_msg(Err_mem);
X free((char *)point);
X return;
X }
X box->type = T_BOX;
X box->style = line_style;
X box->thickness = line_thickness;
X box->color = cur_color;
X box->depth = NULL;
X box->pen = 0;
X box->area_fill = fill_mode? cur_areafill : 0;
X box->style_val = cur_styleval;
X box->radius = 0;
X box->for_arrow = NULL;
X box->back_arrow = NULL;
X box->points = point;
X box->next = NULL;
X append_point(x, fix_y, &point);
X append_point(x, y, &point);
X append_point(fix_x, y, &point);
X append_point(fix_x, fix_y, &point);
X draw_line(box, PAINT);
X clean_up();
X set_action_object(F_CREATE, O_POLYLINE);
X insert_line(&objects.lines, box);
X set_latestline(box);
X set_modifiedflag();
X box_drawing_selected();
X }
END_OF_FILE
if test 3030 -ne `wc -c <'box.c'`; then
echo shar: \"'box.c'\" unpacked with wrong size!
fi
# end of 'box.c'
fi
if test -f 'file.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'file.c'\"
else
echo shar: Extracting \"'file.c'\" \(2974 characters\)
sed "s/^X//" >'file.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * March 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "func.h"
X#include "object.h"
X
X#define PROMPT 1
X#define NO_PROMPT 0
X
Xextern int figure_modified;
Xextern char current_file[];
Xextern char directory[];
Xextern int num_object;
X
Xedit_file(file)
Xchar *file;
X{
X extern F_compound objects, saved_objects;
X int s;
X F_compound c;
X
X if (*file == 0) {
X put_msg("Empty name");
X return;
X }
X c.arcs = NULL;
X c.compounds = NULL;
X c.ellipses = NULL;
X c.lines = NULL;
X c.splines = NULL;
X c.texts = NULL;
X c.next = NULL;
X set_temp_cursor(&wait_cursor);
X s = read_fig(file, &c);
X if (s == 0) { /* Successful read */
X clean_up();
X (void)strcpy(current_file, file);
X saved_objects = objects;
X objects = c;
X redisplay_canvas();
X put_msg("Edit \"%s\" %d objects", file, num_object);
X set_action(F_EDIT);
X }
X else if (s == ENOENT) {
X clean_up();
X saved_objects = objects;
X objects = c;
X redisplay_canvas();
X put_msg("\"%s\" new file", file);
X (void)strcpy(current_file, file);
X set_action(F_EDIT);
X }
X else if (s > 0)
X read_fail_message(file, s);
X reset_cursor();
X figure_modified = 0;
X }
X
Xread_file(file)
Xchar *file;
X{
X extern F_compound objects, saved_objects, object_tails;
X int s;
X F_compound c;
X
X if (*file == 0) {
X put_msg("Empty name");
X return;
X }
X
X c.arcs = NULL;
X c.compounds = NULL;
X c.ellipses = NULL;
X c.lines = NULL;
X c.splines = NULL;
X c.texts = NULL;
X c.next = NULL;
X set_temp_cursor(&wait_cursor);
X s = read_fig(file, &c);
X if (s == 0) { /* Successful read */
X clean_up();
X saved_objects = c;
X tail(&objects, &object_tails);
X append_objects(&objects, &saved_objects, &object_tails);
X redisplay_canvas();
X put_msg("File \"%s\" %d objects", file, num_object);
X set_action_object(F_CREATE, O_ALL_OBJECT);
X }
X else if (s > 0)
X read_fail_message(file, s);
X reset_cursor();
X }
X
Xsave_and_exit(file)
Xchar *file;
X{
X if (0 == write_file(file, PROMPT)) quit();
X }
X
Xsave_current_file()
X{
X return(write_file(current_file, NO_PROMPT));
X }
X
Xsave_file(file)
Xchar *file;
X{
X if (*current_file=='\0') /* no current file, make this the current one */
X strcpy(current_file, file);
X return(write_file(file, PROMPT));
X }
X
Xstatus()
X{
X#ifdef SYSV
X extern char *getcwd();
X#else
X extern char *getwd();
X#endif
X if (*directory == NULL) {
X#ifdef SYSV
X if (NULL == getcwd(directory, 1024)) {
X put_msg("%s", "Can't get current directory");
X#else
X if (NULL == getwd(directory)) {
X put_msg("%s", directory); /* err msg is in directory */
X#endif
X *directory = '\0';
X return;
X }
X }
X
X if (*current_file == '\0')
X put_msg("No file; directory \"%s\"", directory);
X else
X put_msg("file \"%s\" %s; directory \"%s\"", current_file,
X (figure_modified ? "[modified]" : ""), directory);
X }
END_OF_FILE
if test 2974 -ne `wc -c <'file.c'`; then
echo shar: \"'file.c'\" unpacked with wrong size!
fi
# end of 'file.c'
fi
if test -f 'free.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'free.c'\"
else
echo shar: Extracting \"'free.c'\" \(2336 characters\)
sed "s/^X//" >'free.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * Febuary 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "object.h"
X
Xfree_arc(list)
XF_arc **list;
X{
X F_arc *a, *arc;
X
X for (a = *list; a != NULL;) {
X arc = a;
X a = a->next;
X if (arc->for_arrow) free((char*)arc->for_arrow);
X if (arc->back_arrow) free((char*)arc->back_arrow);
X free((char*)arc);
X }
X *list = NULL;
X }
X
Xfree_compound(list)
XF_compound **list;
X{
X F_compound *c, *compound;
X
X for (c = *list; c != NULL;) {
X compound = c;
X c = c->next;
X free_arc(&compound->arcs);
X free_compound(&compound->compounds);
X free_ellipse(&compound->ellipses);
X free_line(&compound->lines);
X free_spline(&compound->splines);
X free_text(&compound->texts);
X free((char*)compound);
X }
X *list = NULL;
X }
X
Xfree_ellipse(list)
XF_ellipse **list;
X{
X F_ellipse *e, *ellipse;
X
X for (e = *list; e != NULL;) {
X ellipse = e;
X e = e->next;
X free((char*)ellipse);
X }
X *list = NULL;
X }
X
Xfree_line(list)
XF_line **list;
X{
X F_line *l, *line;
X
X for (l = *list; l != NULL;) {
X line = l;
X l = l->next;
X free_linestorage(line);
X }
X *list = NULL;
X }
X
Xfree_text(list)
XF_text **list;
X{
X F_text *t, *text;
X
X for (t = *list; t != NULL;) {
X text = t;
X t = t->next;
X cfree(text->cstring);
X free((char*)text);
X }
X *list = NULL;
X }
X
Xfree_spline(list)
XF_spline **list;
X{
X F_spline *s, *spline;
X
X for (s = *list; s != NULL;) {
X spline = s;
X s = s->next;
X free_splinestorage(spline);
X }
X *list = NULL;
X }
X
Xfree_splinestorage(s)
XF_spline *s;
X{
X F_point *p, *q;
X F_control *a, *b;
X
X for (p = s->points; p != NULL; p = q) {
X q = p->next;
X free((char*)p);
X }
X for (a = s->controls; a != NULL; a = b) {
X b = a->next;
X free((char*)a);
X }
X if (s->for_arrow) free((char*)s->for_arrow);
X if (s->back_arrow) free((char*)s->back_arrow);
X free((char*)s);
X }
X
Xfree_linestorage(l)
XF_line *l;
X{
X F_point *p, *q;
X
X for (p = l->points; p != NULL; p = q) {
X q = p->next;
X free((char*)p);
X }
X if (l->for_arrow) free((char*)l->for_arrow);
X if (l->back_arrow) free((char*)l->back_arrow);
X free((char*)l);
X }
END_OF_FILE
if test 2336 -ne `wc -c <'free.c'`; then
echo shar: \"'free.c'\" unpacked with wrong size!
fi
# end of 'free.c'
fi
if test -f 'func.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'func.h'\"
else
echo shar: Extracting \"'func.h'\" \(2630 characters\)
sed "s/^X//" >'func.h' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * November 1985.
X *
X * %W% %G%
X*/
X
X/****************** Functions ******************/
X#define F_NULL 0
X#define F_ELLIPSE_BY_RAD 1
X#define F_ELLIPSE_BY_DIA 2
X#define F_CIRCLE_BY_RAD 3
X#define F_CIRCLE_BY_DIA 4
X#define F_CIRCULAR_ARC 5
X#define F_POLYLINE 6
X#define F_BOX 7
X#define F_POLYGON 8
X#define F_TEXT 9
X#define F_SPLINE 10
X#define F_CLOSED_SPLINE 11
X#define F_COMPOUND 13
X#define F_INTSPLINE 14
X#define F_CLOSED_INTSPLINE 15
X#define F_ARC_BOX 16
X
X#define F_CREATE 30
X#define F_COPY 31
X#define F_MOVE 32
X#define F_REPEAT 33
X#define F_REMOVE 34
X#define F_MOVE_POINT 35
X#define F_DELETE_POINT 36
X#define F_ADD_POINT 37
X#define F_DELETE_ARROW_HEAD 38
X#define F_ADD_ARROW_HEAD 39
X#define F_FLIP_XAXIS 40
X#define F_FLIP_YAXIS 41
X#define F_ROTATE90 42
X#define F_ROTATE270 43
X#define F_ROTATE 45
X#define F_FLIP 46
X#define F_AUTOARROW 47
X#define F_TURN 48
X#define F_GLUE 51
X#define F_BREAK 52
X#define F_SCALE 53
X#define F_CHANGE_THICK 54
X#define F_CHANGE_STYLE 55
X#define F_CHANGE_TEXT 56
X#define F_CHANGE 57
X
X#define F_SET_PEN_SIZE 70 /* set pen size */
X#define F_SET_LINE_STYLE 71 /* set line style */
X#define F_SET_DASH_LINE 72
X#define F_SET_DOTTED_LINE 73
X#define F_SET_SOLID_LINE 74
X
X#define F_READ 101
X#define F_EDIT 103
X#define F_SAVE_IN 104
X#define F_SAVE 105
X#define F_UNDO 107
X#define F_REDISPLAY 109
X#define F_QUIT 111
X#define F_REMOVE_ALL 113
X#define F_SAVE_N_EXIT 115
X#define F_CHDIR 117
X#define F_PWDIR 118
X#define F_SAVE_BITMAP 121
X#define F_STATUS 123
X#define F_PRINT 124
X#define F_LAND 125
X#define F_FONT 126
X#define F_JUST 127
X#define F_SIZE 128
X#define F_PRINTSEL 129
X
X/**************** Drawing aids *****************/
X#define F_GRID1 250
X#define F_GRID2 251
X#define F_RULER 252
X#define F_MANHATTAN 253
X#define F_MOUNTAIN 254
X#define F_AUTOF_ARROW 255
X#define F_AUTOB_ARROW 256
X#define F_MAGNET 257
X#define F_FILL 258
X#define F_INCDECTHICK 260 /* increase/decreas line thickness */
X#define F_FILLCOLOR 261 /* darken/lighten area fill color */
X#define F_INCDECRADIUS 263 /* inc/dec round-corner box radius */
X
X#define F_UNCONSTRAINT 270 /*fs*/
X#define F_MOUNTHATTAN 271 /*fs*/
X
X#define F_LATEX_LINE 280 /*fs*/
X#define F_LATEX_ARROW 281 /*fs*/
X
X#define F_NOP 999
END_OF_FILE
if test 2630 -ne `wc -c <'func.h'`; then
echo shar: \"'func.h'\" unpacked with wrong size!
fi
# end of 'func.h'
fi
if test -f 'graphics.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'graphics.c'\"
else
echo shar: Extracting \"'graphics.c'\" \(2953 characters\)
sed "s/^X//" >'graphics.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : March 1988
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "paintop.h"
X
X/****************************************************************************
X
X The following spline drawing routine is from
X
X "An Algorithm for High-Speed Curve Generation"
X by George Merrill Chaikin,
X Computer Graphics and Image Processing, 3, Academic Press,
X 1974, 346-349.
X
X and
X
X "On Chaikin's Algorithm" by R. F. Riesenfeld,
X Computer Graphics and Image Processing, 4, Academic Press,
X 1975, 304-310.
X
X*****************************************************************************/
X
X#define round(x) ((int) (x + .5))
X#define half(z1, z2) ((z1+z2)/2.0)
X#define THRESHOLD 5
X
X/* iterative version */
X/* because we draw the spline with small line segments, the style
X parameter doesn't work */
X
Xquadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4, op, thick, style, style_val)
Xfloat a1, b1, a2, b2, a3, b3, a4, b4;
Xint op, thick, style;
Xfloat style_val;
X{
X float x1, y1, x2, y2, x3, y3, x4, y4;
X float xmid, ymid;
X
X clear_stack();
X push(a1, b1, a2, b2, a3, b3, a4, b4);
X
X while(pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) {
X xmid = half(x2, x3);
X ymid = half(y2, y3);
X if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD) {
X pw_vector(canvas_win, round(x1), round(y1),
X round(xmid), round(ymid), op, thick, style, style_val);
X }
X else {
X push(x1, y1, half(x1, x2), half(y1, y2),
X half(x2, xmid), half(y2, ymid), xmid, ymid);
X }
X
X if (fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) {
X pw_vector(canvas_win, round(xmid), round(ymid),
X round(x4), round(y4), op, thick, style, style_val);
X }
X else {
X push(xmid, ymid, half(xmid, x3), half(ymid, y3),
X half(x3, x4), half(y3, y4), x4, y4);
X }
X }
X }
X
X/* because we draw the spline with small line segments, the style
X parameter doesn't work */
X
Xbezier_spline(a0, b0, a1, b1, a2, b2, a3, b3, op, thick, style, style_val)
Xfloat a0, b0, a1, b1, a2, b2, a3, b3;
Xint op, thick, style;
Xfloat style_val;
X{
X float x0, y0, x1, y1, x2, y2, x3, y3;
X float sx1, sy1, sx2, sy2, tx, ty, tx1, ty1, tx2, ty2, xmid, ymid;
X
X clear_stack();
X push(a0, b0, a1, b1, a2, b2, a3, b3);
X
X while(pop(&x0, &y0, &x1, &y1, &x2, &y2, &x3, &y3)) {
X if (fabs(x0 - x3) < THRESHOLD && fabs(y0 - y3) < THRESHOLD) {
X pw_vector(canvas_win, round(x0), round(y0),
X round(x3), round(y3), op, thick, style, style_val);
X }
X else {
X tx = half(x1, x2); ty = half(y1, y2);
X sx1 = half(x0, x1); sy1 = half(y0, y1);
X sx2 = half(sx1, tx); sy2 = half(sy1, ty);
X tx2 = half(x2, x3); ty2 = half(y2, y3);
X tx1 = half(tx2, tx); ty1 = half(ty2, ty);
X xmid = half(sx2, tx1); ymid = half(sy2, ty1);
X
X push(x0, y0, sx1, sy1, sx2, sy2, xmid, ymid);
X push(xmid, ymid, tx1, ty1, tx2, ty2, x3, y3);
X }
X }
X }
END_OF_FILE
if test 2953 -ne `wc -c <'graphics.c'`; then
echo shar: \"'graphics.c'\" unpacked with wrong size!
fi
# end of 'graphics.c'
fi
if test -f 'list.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'list.c'\"
else
echo shar: Extracting \"'list.c'\" \(2980 characters\)
sed "s/^X//" >'list.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * Febuary 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "object.h"
X
Xdelete_arc(arc_list, arc)
XF_arc **arc_list, *arc;
X{
X F_arc *a, *aa;
X
X if (*arc_list == NULL) return;
X if (arc == NULL) return;
X
X for (a = aa = *arc_list; aa != NULL; a = aa, aa = aa->next) {
X if (aa == arc) {
X if (aa == *arc_list)
X *arc_list = (*arc_list)->next;
X else
X a->next = aa->next;
X break;
X }
X }
X arc->next = NULL;
X }
X
Xdelete_ellipse(ellipse_list, ellipse)
XF_ellipse **ellipse_list, *ellipse;
X{
X F_ellipse *q, *r;
X
X if (*ellipse_list == NULL) return;
X if (ellipse == NULL) return;
X
X for (q = r = *ellipse_list; r != NULL; q = r, r = r->next) {
X if (r == ellipse) {
X if (r == *ellipse_list)
X *ellipse_list = (*ellipse_list)->next;
X else
X q->next = r->next;
X break;
X }
X }
X ellipse->next = NULL;
X }
X
Xdelete_line(line_list, line)
XF_line *line, **line_list;
X{
X F_line *q, *r;
X
X if (*line_list == NULL) return;
X if (line == NULL) return;
X
X for (q = r = *line_list; r != NULL; q = r, r = r->next) {
X if (r == line) {
X if (r == *line_list)
X *line_list = (*line_list)->next;
X else
X q->next = r->next;
X break;
X }
X }
X line->next = NULL;
X }
X
Xdelete_spline(spline_list, spline)
XF_spline **spline_list, *spline;
X{
X F_spline *q, *r;
X
X if (*spline_list == NULL) return;
X if (spline == NULL) return;
X
X for (q = r = *spline_list; r != NULL; q = r, r = r->next) {
X if (r == spline) {
X if (r == *spline_list)
X *spline_list = (*spline_list)->next;
X else
X q->next = r->next;
X break;
X }
X }
X spline->next = NULL;
X }
X
Xdelete_text(text_list, text)
XF_text **text_list, *text;
X{
X F_text *q, *r;
X
X if (*text_list == NULL) return;
X if (text == NULL) return;
X
X for (q = r = *text_list; r != NULL; q = r, r = r->next)
X if (r == text) {
X if (r == *text_list)
X *text_list = text->next;
X else
X q->next = text->next;
X break;
X }
X text->next = NULL;
X }
X
Xdelete_compound(list, compound)
XF_compound **list, *compound;
X{
X F_compound *c, *cc;
X
X if (*list == NULL) return;
X if (compound == NULL) return;
X
X for (cc = c = *list; c != NULL; cc = c, c = c->next) {
X if (c == compound) {
X if (c == *list)
X *list = (*list)->next;
X else
X cc->next = c->next;
X break;
X }
X }
X compound->next = NULL;
X }
X
Xinsert_arc(arc_list, a)
XF_arc **arc_list, *a;
X{
X a->next = *arc_list;
X *arc_list = a;
X }
X
Xinsert_ellipse(ellipse_list, e)
XF_ellipse **ellipse_list, *e;
X{
X e->next = *ellipse_list;
X *ellipse_list = e;
X }
X
Xinsert_line(line_list, l)
XF_line **line_list, *l;
X{
X l->next = *line_list;
X *line_list = l;
X }
X
Xinsert_spline(spline_list, s)
XF_spline **spline_list, *s;
X{
X s->next = *spline_list;
X *spline_list = s;
X }
X
Xinsert_text(text_list, t)
XF_text **text_list, *t;
X{
X t->next = *text_list;
X *text_list = t;
X }
X
X
Xinsert_compound(list, c)
XF_compound **list, *c;
X{
X c->next = *list;
X *list = c;
X }
END_OF_FILE
if test 2980 -ne `wc -c <'list.c'`; then
echo shar: \"'list.c'\" unpacked with wrong size!
fi
# end of 'list.c'
fi
if test -f 'print.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'print.c'\"
else
echo shar: Extracting \"'print.c'\" \(2575 characters\)
sed "s/^X//" >'print.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * print.c
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X
X/******************* imported global variables and procedures **************/
X
Xextern char current_file[];
Xextern int print_landscape;
Xextern int figure_modified;
Xextern char *printer;
X
Xextern put_msg();
Xextern wmgr_confirm();
X
Xstatic char prcmd[200];
Xstatic char *conf_prnt =
X "Figure hasn't been saved, PRINT with LEFT button, CANCEL with MIDDLE or RIGHT";
X
Xprint_figure()
X{
Xint print_to_specified_printer();
Xint print_to_file();
X if (current_file[0]==0) {
X put_msg("NO FILE TO PRINT");
X XBell(tool_d,50);
X }
X else {
X if (figure_modified) /* modified without saving, confirm print */
X if (wmgr_confirm(canvas_win, conf_prnt) != -1)
X return;
X
X if (! strcmp("Default", printer)) {
X put_msg("Print figure %s on printer %s in %s mode",
X current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
X sprintf(prcmd,"f2ps -c %s %s | lpr -J %s",
X print_landscape? "-L":"-P",
X current_file,
X current_file);
X }
X else if (! strcmp("File", printer))
X init_msg_receiving(print_to_file, "Output file : ");
X else if (! strcmp("Specify", printer))
X init_msg_receiving(print_to_specified_printer, "Printer : ");
X else { /* default */
X put_msg("Print figure %s on printer %s in %s mode",
X current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
X sprintf(prcmd,"f2ps -c %s %s | lpr -J %s -P%s",
X print_landscape? "-L":"-P",
X current_file,
X current_file,
X printer);
X }
X if (system(prcmd)==127)
X put_msg("Error in printing");
X }
X}
X
Xprint_to_file(file)
Xchar *file;
X{
X if (*file == 0) {
X put_msg("Empty name");
X return;
X }
X sprintf(prcmd,"f2ps -c %s %s > %s",
X print_landscape? "-L":"-P",
X current_file,
X file);
X put_msg("Print figure %s to file %s in %s mode",
X current_file,file,print_landscape? "LANDSCAPE":"PORTRAIT");
X}
X
Xprint_to_specified_printer(specified_printer)
Xchar *specified_printer;
X{
X if (*specified_printer == 0) {
X put_msg("Empty name");
X return;
X }
X put_msg("Print figure %s on printer %s in %s mode",
X current_file,specified_printer,print_landscape? "LANDSCAPE":"PORTRAIT");
X sprintf(prcmd,"f2ps -c %s %s | lpr -J %s -P%s",
X print_landscape? "-L":"-P",
X current_file,
X current_file,
X specified_printer);
X}
END_OF_FILE
if test 2575 -ne `wc -c <'print.c'`; then
echo shar: \"'print.c'\" unpacked with wrong size!
fi
# end of 'print.c'
fi
if test -f 'psfonts.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'psfonts.c'\"
else
echo shar: Extracting \"'psfonts.c'\" \(2605 characters\)
sed "s/^X//" >'psfonts.c' <<'END_OF_FILE'
X#include <X11/Xlib.h>
X#include "psfonts.h"
X
X#define NULL 0
X
X/* printer font names for indicator window */
X
X#ifndef TFX
Xstruct _fstruct fontnames[NUMFONTS] = {
X {"Times-Roman", "-adobe-times-medium-r-*--*", NULL},
X {"Times-Italic", "-adobe-times-medium-i-*--*", NULL},
X {"Times-Bold", "-adobe-times-bold-r-*--*", NULL},
X {"Times-BoldItalic", "-adobe-times-bold-i-*--*", NULL},
X {"AvantGarde-Book", "-schumacher-clean-medium-r-*--*", NULL} ,
X {"AvantGarde-BookOblique", "-schumacher-clean-medium-i-*--*", NULL} ,
X {"AvantGarde-Demi", "-schumacher-clean-bold-r-*--*", NULL},
X {"AvantGarde-DemiOblique", "-schumacher-clean-bold-i-*--*", NULL},
X {"Bookman-Light", "NONE", NULL},
X {"Bookman-LightItalic", "NONE", NULL},
X {"Bookman-Demi", "NONE", NULL},
X {"Bookman-DemiItalic", "NONE", NULL},
X {"Courier", "-adobe-courier-medium-r-*--*", NULL},
X {"Courier-Oblique", "-adobe-courier-medium-o-*--*", NULL},
X {"Courier-Bold", "-adobe-courier-bold-r-*--*", NULL},
X {"Courier-BoldOblique", "-adobe-courier-bold-o-*--*", NULL},
X {"Helvetica", "-adobe-helvetica-medium-r-*--*", NULL},
X {"Helvetica-Oblique", "-adobe-helvetica-medium-o-*--*", NULL},
X {"Helvetica-Bold", "-adobe-helvetica-bold-r-*--*", NULL},
X {"Helvetica-BoldOblique", "-adobe-helvetica-bold-o-*--*", NULL},
X {"Helvetica-Narrow", "NONE", NULL},
X {"Helvetica-Narrow-Oblique", "NONE", NULL},
X {"Helvetica-Narrow-Bold", "NONE", NULL},
X {"Helvetica-Narrow-BoldOblique","NONE", NULL},
X {"NewCenturySchlbk-Roman", "-adobe-new century schoolbook-medium-r-*--*", NULL},
X {"NewCenturySchlbk-Italic", "-adobe-new century schoolbook-medium-i-*--*", NULL},
X {"NewCenturySchlbk-Bold", "-adobe-new century schoolbook-bold-r-*--*", NULL},
X {"NewCenturySchlbk-BoldItalic", "-adobe-new century schoolbook-bold-i-*--*", NULL},
X {"Palatino-Roman", "-*-lucidabright-medium-r-*--*", NULL},
X {"Palatino-Italic", "-*-lucidabright-medium-i-*--*", NULL},
X {"Palatino-Bold", "-*-lucidabright-demibold-r-*--*", NULL} ,
X {"Palatino-BoldItalic", "-*-lucidabright-demibold-i-*--*", NULL} ,
X {"Symbol", "*-symbol-medium-r-*--*", NULL},
X {"ZapfChancery-MediumItalic", "-*-zapfchancery-medium-i-*--*", NULL},
X {"ZapfDingbats", "-*-zapfdingbats-*-*-*--*", NULL},
X };
X#else
Xstruct _fstruct fontnames[NUMFONTS] = {
X {"Times-Roman", "-adobe-times-medium-r-*--*", NULL},
X {"Times-Roman", "-adobe-times-medium-r-*--*", NULL},
X {"Times-Bold", "-adobe-times-bold-r-*--*", NULL},
X {"Times-Italic", "-adobe-times-medium-i-*--*", NULL},
X {"Helvetica", "-adobe-helvetica-medium-r-*--*", NULL},
X {"Courier", "-adobe-courier-medium-r-*--*", NULL},
X };
X#endif
END_OF_FILE
if test 2605 -ne `wc -c <'psfonts.c'`; then
echo shar: \"'psfonts.c'\" unpacked with wrong size!
fi
# end of 'psfonts.c'
fi
if test -f 'redisplay.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'redisplay.c'\"
else
echo shar: Extracting \"'redisplay.c'\" \(2826 characters\)
sed "s/^X//" >'redisplay.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * Febuary 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern int pointmarker_shown;
Xextern int compoundbox_shown;
Xextern int foreground_color, background_color;
X
Xredisplay_objects(objects)
XF_compound *objects;
X{
X int fill;
X
X if (objects == NULL)
X return;
X for (fill=1; fill >= 0; fill--)
X {
X redisplay_arcobject(objects->arcs,fill);
X redisplay_compoundobject(objects->compounds,fill);
X redisplay_ellipseobject(objects->ellipses,fill);
X redisplay_lineobject(objects->lines,fill);
X redisplay_splineobject(objects->splines,fill);
X }
X if (pointmarker_shown) /* show the point markers if they are on */
X toggle_pointmarker();
X if (compoundbox_shown) {
X F_compound *c;
X for (c = objects->compounds; c != NULL; c = c->next)
X draw_compoundbox(c, INV_PAINT); /* show the compound boxes */
X }
X /* text doesn't have fill mode */
X redisplay_textobject(objects->texts);
X }
X
Xredisplay_arcobject(arcs,fill)
XF_arc *arcs;
Xint fill;
X{
X F_arc *arc;
X
X for (arc = arcs; arc != NULL; arc = arc->next)
X {
X if ((fill && arc->area_fill) ||
X (fill==0 && arc->area_fill == 0))
X draw_arc(arc, foreground_color);
X }
X }
X
Xredisplay_ellipseobject(ellipses,fill)
XF_ellipse *ellipses;
Xint fill;
X{
X F_ellipse *e;
X
X for (e = ellipses; e != NULL; e = e->next)
X {
X if ((fill && e->area_fill) ||
X (fill==0 && e->area_fill == 0))
X draw_ellipse(e, foreground_color);
X }
X }
X
Xredisplay_lineobject(lines,fill)
XF_line *lines;
Xint fill;
X{
X F_line *line;
X
X for (line = lines; line != NULL; line = line->next)
X {
X if ((fill && line->area_fill) ||
X (fill==0 && line->area_fill == 0))
X draw_line(line, PAINT);
X }
X }
X
Xredisplay_splineobject(splines,fill)
XF_spline *splines;
Xint fill;
X{
X F_spline *s;
X
X for (s = splines; s != NULL; s = s->next)
X {
X if ((fill && s->area_fill) ||
X (fill==0 && s->area_fill == 0))
X draw_spline(s, PAINT);
X }
X }
X
Xredisplay_textobject(texts)
XF_text *texts;
X{
X F_text *t;
X
X for (t = texts; t != NULL; t = t->next)
X draw_text(t, PAINT);
X }
X
Xredisplay_compoundobject(compounds,fill)
XF_compound *compounds;
Xint fill;
X{
X F_compound *c;
X
X for(c = compounds; c != NULL; c = c->next) {
X redisplay_arcobject(c->arcs,fill);
X redisplay_compoundobject(c->compounds,fill);
X redisplay_ellipseobject(c->ellipses,fill);
X redisplay_lineobject(c->lines,fill);
X redisplay_splineobject(c->splines,fill);
X
X /* no filled text mode, just do text on non-filled pass */
X if(fill==0) {
X redisplay_textobject(c->texts);
X }
X }
X }
X
Xredisplay_canvas()
X{
X extern F_compound objects;
X
X clear_canvas();
X set_temp_cursor(&wait_cursor);
X redisplay_objects(&objects);
X redisplay_grid();
X reset_cursor();
X }
END_OF_FILE
if test 2826 -ne `wc -c <'redisplay.c'`; then
echo shar: \"'redisplay.c'\" unpacked with wrong size!
fi
# end of 'redisplay.c'
fi
if test -f 'trans.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'trans.c'\"
else
echo shar: Extracting \"'trans.c'\" \(2859 characters\)
sed "s/^X//" >'trans.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "object.h"
X
Xtranslate_ellipse(ellipse, dx, dy)
XF_ellipse *ellipse;
Xint dx, dy;
X{
X ellipse->center.x += dx;
X ellipse->center.y += dy;
X ellipse->start.x += dx;
X ellipse->start.y += dy;
X ellipse->end.x += dx;
X ellipse->end.y += dy;
X }
X
Xtranslate_arc(arc, dx, dy)
XF_arc *arc;
Xint dx, dy;
X{
X arc->center.x += (float)dx;
X arc->center.y += (float)dy;
X arc->point[0].x += dx;
X arc->point[0].y += dy;
X arc->point[1].x += dx;
X arc->point[1].y += dy;
X arc->point[2].x += dx;
X arc->point[2].y += dy;
X }
X
Xtranslate_line(line, dx, dy)
XF_line *line;
Xint dx, dy;
X{
X F_point *point;
X
X for (point = line->points; point != NULL; point = point->next) {
X point->x += dx;
X point->y += dy;
X }
X }
X
Xtranslate_text(text, dx, dy)
XF_text *text;
Xint dx, dy;
X{
X text->base_x += dx;
X text->base_y += dy;
X }
X
Xtranslate_spline(spline, dx, dy)
XF_spline *spline;
Xint dx, dy;
X{
X F_point *point;
X F_control *cp;
X
X for (point = spline->points; point != NULL; point = point->next) {
X point->x += dx;
X point->y += dy;
X }
X for (cp = spline->controls; cp != NULL; cp = cp->next) {
X cp->lx += dx;
X cp->ly += dy;
X cp->rx += dx;
X cp->ry += dy;
X }
X }
X
Xtranslate_compound(compound, dx, dy)
XF_compound *compound;
Xint dx, dy;
X{
X compound->nwcorner.x += dx;
X compound->nwcorner.y += dy;
X compound->secorner.x += dx;
X compound->secorner.y += dy;
X
X translate_lines(compound->lines, dx, dy);
X translate_splines(compound->splines, dx, dy);
X translate_ellipses(compound->ellipses, dx, dy);
X translate_arcs(compound->arcs, dx, dy);
X translate_texts(compound->texts, dx, dy);
X translate_compounds(compound->compounds, dx, dy);
X }
X
Xtranslate_arcs(arcs, dx, dy)
XF_arc *arcs;
Xint dx, dy;
X{
X F_arc *a;
X
X for (a = arcs; a != NULL; a = a-> next)
X translate_arc(a, dx, dy);
X }
X
Xtranslate_compounds(compounds, dx, dy)
XF_compound *compounds;
Xint dx, dy;
X{
X F_compound *c;
X
X for (c = compounds; c != NULL; c = c->next)
X translate_compound(c, dx, dy);
X }
X
Xtranslate_ellipses(ellipses, dx, dy)
XF_ellipse *ellipses;
Xint dx, dy;
X{
X F_ellipse *e;
X
X for (e = ellipses; e != NULL; e = e-> next)
X translate_ellipse(e, dx, dy);
X }
X
Xtranslate_lines(lines, dx, dy)
XF_line *lines;
Xint dx, dy;
X{
X F_line *l;
X
X for (l = lines; l != NULL; l = l->next) translate_line(l, dx, dy);
X }
X
Xtranslate_splines(splines, dx, dy)
XF_spline *splines;
Xint dx, dy;
X{
X F_spline *s;
X
X for (s = splines; s != NULL; s = s->next)
X translate_spline(s, dx, dy);
X }
X
Xtranslate_texts(texts, dx, dy)
XF_text *texts;
Xint dx, dy;
X{
X F_text *t;
X
X for (t = texts; t != NULL; t = t->next)
X translate_text(t, dx, dy);
X }
X
END_OF_FILE
if test 2859 -ne `wc -c <'trans.c'`; then
echo shar: \"'trans.c'\" unpacked with wrong size!
fi
# end of 'trans.c'
fi
echo shar: End of archive 2 \(of 21\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 21 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
dan
----------------------------------------------------
O'Reilly && Associates argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.
More information about the Comp.sources.x
mailing list