v08i012: xfig -- X Drawing Tool, Part03/21

Brian V. Smith envbvs at epb2.lbl.gov
Tue Jul 3 07:25:33 AEST 1990


Submitted-by: envbvs at epb2.lbl.gov (Brian V. Smith)
Posting-number: Volume 8, Issue 12
Archive-name: xfig2.8/part03

#! /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 3 (of 21)."
# Contents:  @figs/damper.fig @figs/filenames.fig @figs/houseB.fig
#   @figs/schemat.fig char.c curve.c fig.icon.X font.c grid.c
#   latex_line.c move.c msgsw.c remove.c turn.c
# Wrapped by envbvs at epb2.lbl.gov on Thu Jun 28 08:50:53 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f '@figs/damper.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/damper.fig'\"
else
echo shar: Extracting \"'@figs/damper.fig'\" \(3442 characters\)
sed "s/^X//" >'@figs/damper.fig' <<'END_OF_FILE'
X#FIG 1.5
X80 2
X1 3 0 1 0 0 0 21 0.000 1 0.000 244 421 2 2 244 421 246 422
X1 3 0 1 0 0 0 21 0.000 1 0.000 518 421 2 2 518 421 520 422
X1 3 0 1 0 0 0 21 0.000 1 0.000 436 136 2 2 436 136 438 137
X1 3 0 1 0 0 0 21 0.000 1 0.000 326 136 2 2 326 136 328 137
X2 1 0 1 0 0 0 0 0.000 0 0
X	 204 624 204 624 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 237 414 249 426 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 512 414 524 426 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 430 130 442 142 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 320 130 332 142 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 308 155 308 146 372 146 372 457 253 457 253 430 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 235 430 235 476 528 476 528 430 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 454 155 454 146 390 146 390 457 509 457 509 430 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 290 155 290 127 354 127 354 91 409 91 409 127 473 127 473 155 9999 9999
X2 2 0 2 0 0 0 5 0.000 0 0
X	 390 155 454 155 454 173 390 173 390 155 9999 9999
X2 3 0 2 0 0 0 5 0.000 0 0
X	 253 411 345 411 345 338 363 338 363 411 372 411 372 430 253 430 253 411 9999 9999
X2 2 0 2 0 0 0 5 0.000 0 0
X	 390 411 509 411 509 430 390 430 390 411 9999 9999
X2 3 0 2 0 0 0 5 0.000 0 0
X	 308 155 372 155 372 173 363 173 363 265 345 265 345 173 308 173 308 155 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 299 196 299 159 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 463 201 463 164 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 518 407 518 370 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 244 407 244 370 9999 9999
X2 3 0 2 0 0 0 5 0.000 0 0
X	 290 155 290 173 198 173 198 411 235 411 235 430 198 430 198 503 564 503 564 430 528 430 528 411 564 411 564 173 473 173 473 155 582 155 582 521 180 521 180 155 290 155 9999 9999
X2 3 0 2 0 0 0 3 0.000 0 0
X	 161 155 290 155 290 127 354 127 354 91 409 91 409 127 473 127 473 155 601 155 381 45 161 155 9999 9999
X2 2 0 1 0 0 0 3 0.000 0 0
X	 308 146 372 146 372 155 308 155 308 146 9999 9999
X2 2 0 1 0 0 0 3 0.000 0 0
X	 390 146 454 146 454 155 390 155 390 146 9999 9999
X3 3 0 1 0 0 0 0 0.000 0 0
X	 381 95 372 104 381 114 390 123 381 132 372 123 381 114 390 104 381 95 9999 9999
X	 386.153 95.250 376.085 95.250 371.966 99.375 371.966 109.458 379.034 111.495 383.204 115.671 390.271 117.708 390.271 127.792 386.153 131.917 376.085 131.917 371.966 127.792 371.966 117.708 379.034 115.671 383.204 111.495 390.271 109.458 390.271 99.375 386.153 95.250 376.085 95.250
X3 2 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 326 123 335 86 390 72 518 68 9999 9999
X	 15.932 -9.250 326.940 101.387 329.228 92.220 347.611 73.809 377.334 74.164 412.249 69.224 444.283 68.078 15.932 -9.250
X3 2 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 431 123 441 100 518 72 9999 9999
X	 15.932 -9.250 434.630 109.111 436.918 103.382 452.970 87.954 472.419 81.079 15.932 -9.250
X3 2 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 253 407 271 356 294 329 9999 9999
X	 15.932 -9.250 261.986 377.337 266.563 364.733 274.441 351.006 280.162 344.131 15.932 -9.250
X3 2 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 505 402 473 370 422 334 349 324 9999 9999
X	 15.932 -9.250 486.581 383.345 478.572 375.324 461.784 360.956 436.499 339.204 409.686 328.585 391.380 326.293 15.932 -9.250
X4 0 0 12 0 0 0 0.000 1 12 88 523 72 Return Dampers?
X4 0 0 12 0 0 0 0.000 1 12 34 290 315 Supply
X4 0 0 12 0 0 0 0.000 1 12 46 303 334 Dampers
X4 1 0 16 0 0 0 0.000 1 17 357 381 22 Schematic of Two-Zone Dampered Installation
END_OF_FILE
echo shar: 4 control characters may be missing from \"'@figs/damper.fig'\"
if test 3442 -ne `wc -c <'@figs/damper.fig'`; then
    echo shar: \"'@figs/damper.fig'\" unpacked with wrong size!
fi
# end of '@figs/damper.fig'
fi
if test -f '@figs/filenames.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/filenames.fig'\"
else
echo shar: Extracting \"'@figs/filenames.fig'\" \(3022 characters\)
sed "s/^X//" >'@figs/filenames.fig' <<'END_OF_FILE'
X#FIG 1.4X
X80 2
X2 1 0 1 0 0 0 0 0.000 0 0
X	 139 179 139 114 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 199 179 199 159 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 299 189 314 204 314 214 414 214 414 234 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 329 189 314 204 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 269 189 254 204 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 189 254 204 254 224 294 224 294 254 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 169 189 169 239 264 239 264 314 214 314 214 329 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 84 189 84 314 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 189 109 249 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 319 184 339 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 289 184 309 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 184 279 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 229 184 249 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 189 184 209 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 159 184 179 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 129 184 149 184 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 99 184 119 184 9999 9999
X4 0 2 16 0 0 0 0.000 1 15 27 344 184 .inp
X4 0 2 16 0 0 0 0.000 1 2 9 214 184 -
X4 0 2 16 0 0 0 0.000 1 11 18 79 184 b-
X4 0 0 12 0 0 0 0.000 1 9 130 109 269 1 = Kleines Gebaude PSZ
X4 0 0 12 0 0 0 0.000 1 9 69 109 284 2 = Hochhaus
X4 0 0 12 0 0 0 0.000 1 9 140 109 299 3 = Kleines Gebaude RHFS
X4 0 2 14 0 0 0 0.000 1 10 90 414 254 Abschaltwerte
X4 0 0 12 0 0 0 0.000 1 9 114 414 274 00 = Ohne Economizer
X4 0 0 12 0 0 0 0.000 1 9 108 414 289 11 = Diff. Economizer
X4 0 0 12 0 0 0 0.000 1 12 78 414 309 60 = 15,6 deg C
X4 0 0 12 0 0 0 0.000 1 12 78 414 324 68 = 20,0 deg C
X4 0 0 12 0 0 0 0.000 1 12 78 414 339 73 = 22,8 deg C
X4 0 0 12 0 0 0 0.000 1 12 78 414 354 78 = 25,6 deg C
X4 0 0 12 0 0 0 0.000 1 12 40 414 374 44 kJ/kg
X4 0 0 12 0 0 0 0.000 1 12 40 414 389 48 kJ/kg
X4 0 0 12 0 0 0 0.000 1 12 40 414 404 52 kJ/kg
X4 0 2 14 0 0 0 0.000 1 13 69 294 274 Raumtemp
X4 0 0 12 0 0 0 0.000 1 12 78 294 294 75 = 23,9 deg C
X4 0 0 12 0 0 0 0.000 1 12 78 294 309 78 = 25,6 deg C
X4 0 2 14 0 0 0 0.000 1 13 64 214 349 Einbautyp
X4 0 0 12 0 0 0 0.000 1 9 108 214 364 1 = Ohne Economizer
X4 0 0 12 0 0 0 0.000 1 12 127 214 379 2 = Tempdiff. Economizer
X4 0 0 12 0 0 0 0.000 1 12 151 214 394 3 = Abschalttemp Economizer
X4 0 0 12 0 0 0 0.000 1 9 123 214 409 4 = Enthdiff. Economizer
X4 0 0 12 0 0 0 0.000 1 9 151 214 424 5 = Abschaltenth. Economizer
X4 0 0 12 0 0 0 0.000 1 9 51 139 104 2 = RHFS
X4 0 0 12 0 0 0 0.000 1 12 93 139 89 1 = CEC - Anlage
X4 0 0 12 0 0 0 0.000 1 12 106 199 149 1 = Mit Entfeuchtung
X4 0 0 12 0 0 0 0.000 1 12 115 199 134 0 = Ohne Entfeuchtung
X4 0 2 14 0 0 0 0.000 1 10 33 84 334 Stadt
X4 0 0 12 0 0 0 0.000 1 9 68 84 454 h = Hannover
X4 0 0 12 0 0 0 0.000 1 12 66 84 439 g = Frankfurt
X4 0 0 12 0 0 0 0.000 1 9 59 84 424 f  = Phoenix
X4 0 0 12 0 0 0 0.000 1 12 71 84 409 e = San Diego
X4 0 0 12 0 0 0 0.000 1 9 65 84 394 d = Red Bluff
X4 0 0 12 0 0 0 0.000 1 12 77 84 379 c = Long Beach
X4 0 0 12 0 0 0 0.000 1 9 86 84 364 b = Lake Charles
X4 0 0 12 0 0 0 0.000 1 9 53 84 349 a = Arcata
END_OF_FILE
echo shar: 38 control characters may be missing from \"'@figs/filenames.fig'\"
if test 3022 -ne `wc -c <'@figs/filenames.fig'`; then
    echo shar: \"'@figs/filenames.fig'\" unpacked with wrong size!
fi
# end of '@figs/filenames.fig'
fi
if test -f '@figs/houseB.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/houseB.fig'\"
else
echo shar: Extracting \"'@figs/houseB.fig'\" \(4036 characters\)
sed "s/^X//" >'@figs/houseB.fig' <<'END_OF_FILE'
X#FIG 1.4X
X80 2
X5 1 0 1 0 0 0 0 0.000 1 0 0 366.000 205.000 359 244 394 232 404 199
X1 2 0 1 0 0 0 0 0.000 0 0.000 341 121 11 15 332 138 352 106
X1 1 0 1 0 0 0 0 0.000 1 0.000 459 169 11 16 459 169 469 184
X1 1 0 1 0 0 0 0 0.000 1 0.000 460 124 11 16 460 124 470 139
X2 1 0 2 0 0 0 0 0.000 0 0
X	 359 244 359 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 332 114 332 103 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 350 112 350 103 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 328 103 328 91 354 91 354 103 328 103 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 439 89 439 189 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 449 84 474 84 474 92 449 92 449 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 174 374 174 444 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 304 89 304 189 9999 9999
X2 4 0 1 0 0 7 0 0.000 0 0
X	 254 94 254 184 299 184 299 94 254 94 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 169 79 99 79 99 319 169 319 169 309 109 309 109 89 169 89 169 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 179 169 179 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 194 169 194 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 209 169 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 224 169 224 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 239 169 239 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 254 169 254 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 269 169 269 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 284 169 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 364 84 419 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 99 99 109 99 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 99 129 109 129 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 104 99 104 129 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 119 79 119 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 149 79 149 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 119 84 149 84 9999 9999
X2 1 0 1 0 0 0 0 0.000 1 0
X	0 0 1.000 4.000 8.000
X	 209 189 209 119 139 119 139 294 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 374 169 374 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 169 444 179 444 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 164 169 164 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 109 149 169 149 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 457 372 457 429 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 460 423 461 486 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 542 101 542 144 9999 9999
X2 1 0 2 0 0 0 0 0.000 0 0
X	 545 136 545 177 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 464 369 454 369 454 349 519 349 519 499 709 499 709 89 549 89 549 99 539 99 539 89 499 89 499 189 539 189 539 179 549 179 549 199 404 199 404 189 479 189 479 89 474 89 474 84 449 84 449 89 249 89 249 189 359 189 359 199 239 199 239 89 169 89 169 79 719 79 719 509 169 509 169 149 179 149 179 499 454 499 454 489 464 489 464 499 509 499 509 359 464 359 464 369 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 419 79 419 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 364 79 364 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 149 239 149 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 174 149 174 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 164 239 164 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 179 239 179 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 179 194 239 194 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 504 299 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 299 499 299 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 499 239 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 619 504 679 504 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 619 499 619 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 679 499 679 509 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 409 714 469 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 409 719 409 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 469 719 469 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 714 149 714 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 209 719 209 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 709 149 719 149 9999 9999
X2 4 0 1 0 0 4 0 0.000 0 0
X	 204 464 329 464 329 354 204 354 204 464 9999 9999
X2 4 0 1 0 0 3 0 0.000 0 0
X	 204 349 189 349 189 469 204 469 204 349 9999 9999
X4 0 0 12 0 0 0 0.000 1 11 60 59 399 houseB.fig
X4 0 0 12 0 0 0 0.000 1 9 24 364 149 BATH
X4 0 0 12 0 0 0 0.000 1 9 24 200 211 DOWN
X4 0 0 12 0 0 0 0.000 1 9 84 268 305 MASTER BEDROOM
X4 0 0 12 0 0 0 0.000 1 9 30 604 304 STUDY
END_OF_FILE
echo shar: 5 control characters may be missing from \"'@figs/houseB.fig'\"
if test 4036 -ne `wc -c <'@figs/houseB.fig'`; then
    echo shar: \"'@figs/houseB.fig'\" unpacked with wrong size!
fi
# end of '@figs/houseB.fig'
fi
if test -f '@figs/schemat.fig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'@figs/schemat.fig'\"
else
echo shar: Extracting \"'@figs/schemat.fig'\" \(3814 characters\)
sed "s/^X//" >'@figs/schemat.fig' <<'END_OF_FILE'
X#FIG 1.4
X80 2
X5 1 0 1 0 0 0 0 0.000 0 1 1 259.000 139.000 259 119 279 139 259 159
X	393216 524296 0.000 0.000 0.000
X	458752 458760 0.000 0.000 0.000
X5 1 0 1 0 0 0 0 0.000 0 0 0 259.000 79.000 259 59 279 79 259 99
X1 3 0 1 0 0 0 0 0.000 1 0.000 339 419 4 4 339 419 343 420
X1 3 0 1 0 0 0 0 0.000 1 0.000 399 419 4 4 399 419 403 419
X1 3 0 1 0 0 0 0 0.000 1 0.000 284 139 5 5 284 139 289 139
X1 3 0 1 0 0 0 0 0.000 1 0.000 244 364 5 5 244 364 244 369
X1 3 0 1 0 0 0 0 0.000 1 0.000 244 274 5 5 244 274 244 279
X2 1 0 1 0 0 0 0 0.000 0 0
X	 334 419 319 419 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 404 419 419 419 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 439 284 439 264 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 439 309 439 329 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 396 99 396 118 389 129 404 139 389 149 404 159 389 169 404 179 389 189 404 199 396 209 396 229 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 244 369 244 384 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 244 269 244 254 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 279 79 299 79 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 219 219 219 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 199 239 239 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 229 259 239 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 209 259 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 119 229 119 229 159 259 159 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 229 129 204 129 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 229 149 204 149 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 289 139 304 139 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 229 89 204 89 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 229 69 204 69 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 59 229 59 229 99 259 99 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 219 309 229 319 219 329 9999 9999
X2 2 0 1 0 0 0 0 0.000 0 0
X	 219 279 219 359 269 359 269 279 219 279 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 219 319 199 319 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 219 289 199 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 219 349 199 349 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 269 289 289 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 269 349 289 349 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 299 229 319 239 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 299 209 319 199 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 299 199 299 239 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 299 219 279 219 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 559 161 540 161 529 154 519 169 509 154 499 169 489 154 479 169 469 154 459 169 449 161 429 161 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 1
X	0 0 1.000 4.000 8.000
X	 489 154 489 124 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 419 284 459 284 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 424 289 454 289 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 424 299 454 299 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 419 294 459 294 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 419 304 459 304 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 424 309 454 309 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 239 419 254 429 239 439 239 419 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 259 414 254 419 254 439 249 444 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 429 219 429 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 254 429 274 429 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 254 464 274 464 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 239 464 219 464 9999 9999
X2 1 0 1 0 0 0 0 0.000 0 0
X	 254 454 254 474 9999 9999
X2 3 0 1 0 0 0 0 0.000 0 0
X	 239 454 254 464 239 474 239 454 9999 9999
X3 2 0 1 0 0 0 0 0.000 0 0
X	 341 416 359 399 379 439 397 421 9999 9999
X	 0.000 0.000 348.504 402.189 353.004 397.939 373.441 401.555 364.804 436.696 385.061 439.983 389.561 435.483 0.000 0.000
X4 0 0 12 0 0 0 0.000 1 1 6 429 319 -
X4 0 0 12 0 0 0 0.000 1 5 6 429 279 +
X4 0 0 12 0 0 0 0.000 1 9 6 241 290 S
X4 0 0 12 0 0 0 0.000 1 9 6 241 356 R
X4 0 0 12 0 0 0 0.000 1 10 6 259 354 Q
X4 0 0 12 0 0 0 0.000 1 10 6 259 294 Q
X4 0 0 12 0 0 0 0.000 1 9 6 224 354 K
X4 0 0 12 0 0 0 0.000 1 9 6 224 294 J
END_OF_FILE
echo shar: 8 control characters may be missing from \"'@figs/schemat.fig'\"
if test 3814 -ne `wc -c <'@figs/schemat.fig'`; then
    echo shar: \"'@figs/schemat.fig'\" unpacked with wrong size!
fi
# end of '@figs/schemat.fig'
fi
if test -f 'char.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'char.c'\"
else
echo shar: Extracting \"'char.c'\" \(3949 characters\)
sed "s/^X//" >'char.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 "font.h"
X#include "paintop.h"
X#include "object.h"
X
Xextern int		cur_x, cur_y;
Xextern int		cur_font, cur_fontsize;
Xextern int		cur_textjust;
X
X#define			BLINK_INTERVAL	700	/* milliseconds blink rate */
X#define			BUF_SIZE	400
X	
Xchar			prefix[BUF_SIZE],	/* part of string left of mouse click */
X			suffix[BUF_SIZE];	/* part to right of click */
Xint			leng_prefix, leng_suffix;
X
Xstatic PIXWIN		pw;
Xstatic int		char_ht;
Xstatic int		char_received;
Xstatic int		cbase_x, cbase_y;
Xstatic float		rbase_x, rcur_x;
Xstatic int		obase_x;
X
Xstatic			(*cr_proc)();
X
Xstatic
Xdraw_cursor(x, y)
Xint	x, y;
X{
X	pw_vector(pw, x, y, x, y-char_ht, INV_PAINT, 1, SOLID_LINE, 0.0);
X	}
X
Xinitialize_char_handler(p, cr, bx, by)
XPIXWIN		p;
Xint		(*cr)();
Xint		bx, by;
X{
X	pw = p;
X	cr_proc = cr;
X	rbase_x = obase_x = cbase_x = bx;	/* keep real base so dont have roundoff */
X	rcur_x = cur_x;
X	cbase_y = by;
X
X	char_ht = char_height(canvas_font);
X	char_received = 0;
X	turn_on_blinking_cursor(draw_cursor, draw_cursor,
X				cur_x, cur_y, (long)BLINK_INTERVAL);
X	}
X
Xterminate_char_handler()
X{
X	turn_off_blinking_cursor();
X	cr_proc = NULL;
X	return(char_received);
X	}
X
Xerase_char_string()
X{
X	pw_text(pw, cbase_x, cbase_y, INV_PAINT, 
X		cur_font, cur_fontsize, prefix);
X	if (leng_suffix) 
X		pw_text(pw, cur_x, cbase_y, INV_PAINT, 
X			cur_font, cur_fontsize, suffix);
X	}
X
Xdraw_char_string()
X{
X	pw_text(pw, cbase_x, cbase_y, INV_PAINT, 
X		cur_font, cur_fontsize, prefix);
X	if (leng_suffix) 
X		pw_text(pw, cur_x, cbase_y, INV_PAINT, 
X			cur_font, cur_fontsize, suffix);
X	move_blinking_cursor(cur_x, cur_y);
X	}
X
Xchar_handler(c)
Xunsigned char c;
X{
X	int cwidth; 
X
X	if (cr_proc == NULL)
X	    return;
X
X	if (c == CR) {
X	    erase_char_string();
X	    cr_proc();
X	    }
X	else if (c == DEL || c == CTRL_H) {
X	    if (leng_prefix > 0) {
X		erase_char_string();
X		char_received = 1;
X		cwidth = char_advance(canvas_font,prefix[leng_prefix-1]);
X		if (cur_textjust == T_LEFT_JUSTIFIED)
X		    rcur_x -= cwidth;	/* move the suffix to the left */
X		else if (cur_textjust == T_CENTER_JUSTIFIED)
X		    {
X		    rbase_x += cwidth/2.0;	/* advance right by half cwidth */
X		    rcur_x -= cwidth/2.0;	/* move suffix left half cwidth */
X		    }
X		if (cur_textjust == T_RIGHT_JUSTIFIED)
X		    rbase_x += (float) cwidth;	/* move the prefix to the right */
X		prefix[--leng_prefix] = '\0';
X		cbase_x = rbase_x;		/* fix */
X		cur_x = rcur_x;
X		draw_char_string();
X		}
X	    }
X	else if (c == CTRL_U || c == CTRL_X) {
X	    if (leng_prefix > 0) {
X		erase_char_string();
X		char_received = 1;
X		if (cur_textjust == T_CENTER_JUSTIFIED)
X		    {
X		    while (leng_prefix--) /* subtract half of the character widths */
X			rcur_x -= char_advance(canvas_font,prefix[leng_prefix])/2.0;
X		    cur_x = cbase_x = rbase_x = rcur_x ;
X		    }
X		else if (cur_textjust == T_RIGHT_JUSTIFIED)
X		    cbase_x = rbase_x = cur_x = rcur_x;
X		else
X		    cur_x = rcur_x = cbase_x = rbase_x;
X		leng_prefix = 0;
X		*prefix = '\0';
X		draw_char_string();
X		}
X	    }
X	else if (c < SP) {
X	    }
X	else if (leng_prefix+leng_suffix == BUF_SIZE) {
X	    put_msg("Text buffer is full, character is ignored");
X	    }
X	else {
X	    erase_char_string();
X	    cwidth = char_advance(canvas_font,c);
X	    if (cur_textjust == T_LEFT_JUSTIFIED)
X	    	rcur_x += cwidth;	/* move the suffix to the right */
X	    else if (cur_textjust == T_CENTER_JUSTIFIED)
X		{
X		rbase_x -= cwidth/2.0;		/* advance left by half cwidth */
X		rcur_x += cwidth/2.0;		/* move suffix right half cwidth */
X		}
X	    if (cur_textjust == T_RIGHT_JUSTIFIED)
X		    rbase_x -= cwidth;	/* move the prefix to the left */
X	    char_received = 1;
X	    prefix[leng_prefix++] = c;
X	    prefix[leng_prefix] = '\0';
X	    cbase_x = rbase_x;			/* fix */
X	    cur_x = rcur_x;
X	    draw_char_string();
X	    }
X	}
END_OF_FILE
if test 3949 -ne `wc -c <'char.c'`; then
    echo shar: \"'char.c'\" unpacked with wrong size!
fi
# end of 'char.c'
fi
if test -f 'curve.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'curve.c'\"
else
echo shar: Extracting \"'curve.c'\" \(3295 characters\)
sed "s/^X//" >'curve.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 "paintop.h"
X
X#define		round(a)	((int)((a) + .5))
X
X/*	This routine plot two dimensional curve defined by a second degree
X	polynomial of the form :
X			    2    2
X		f(x, y) = ax + by + g = 0
X
X	(x0,y0) is the starting point as well as ending point of the curve.
X	The curve will translate with the offset xoff and yoff.
X
X	This algorithm is derived from the eight point algorithm in :
X	"An Improved Algorithm for the generation of Nonparametric Curves"
X	by Bernard W. Jordan, William J. Lennon and Barry D. Holm, IEEE
X	Transaction on Computers Vol C-22, No. 12 December 1973.
X
X	Will fill the curve if area_fill is != 0
X*/
X
X
Xcurve(window, xstart, ystart, xend, yend, direction, 
X		a, b, xoff, yoff, val, thick, style, style_val, area_fill)
XWindow	window;
Xint	xstart, ystart, xend, yend, a, b, xoff, yoff;
Xint	direction, val, thick, style, area_fill;
Xfloat	style_val;
X{
X	int	dfx, dfy, dfxx, dfyy;
X	int	falpha, fx, fy, fxy, absfx, absfy, absfxy;
X	int	margin, test_succeed, x, y, deltax, deltay, inc, dec;
X	int	npoints;
X	int	max_points;
X	XPoint	*points;
X	
X	if (a == 0 || b == 0) 
X		return;
X
X	max_points = a + b + 1;		/* 1 for end point */
X	if (max_points > 4000)
X		max_points = 4000;
X	if ((points = (XPoint *) malloc(max_points*sizeof(XPoint))) == 0)
X		{
X		fprintf(stderr,"curve(): No memory\n");
X		return;
X		}
X
X	x    = xstart;
X	y    = ystart;
X	dfx  = 2 * a * xstart;
X	dfy  = 2 * b * ystart;
X	dfxx = 2 * a;
X	dfyy = 2 * b;
X
X	falpha = 0;
X	if (direction) {
X	    inc = 1;  dec = -1;
X	    }
X	else {
X	    inc = -1;  dec = 1;
X	    }
X	if (xstart == xend && ystart == yend) {
X	    test_succeed = margin = 1;
X	    }
X	else {
X	    test_succeed = 3; margin = 3; 
X	    }
X
X	npoints = 0;
X	while (test_succeed) {
X	    if (npoints >= (max_points-1))
X	        {
X		XPoint	*tmp_p;
X
X		max_points += a + b;
X		if (max_points > 4000)
X			break;		/* stop!  It is not closing */
X
X		if ((tmp_p = (XPoint *) realloc(points, max_points*sizeof(XPoint))) == 0)
X		    {
X		    fprintf(stderr,"curve(): No memory(realloc)\n");
X		    break;
X		    }
X		free(points);
X		points = tmp_p;
X	        }
X	    points[npoints].x = (short) xoff+x;
X	    points[npoints].y = (short) yoff-y;
X	    npoints++;
X
X	    if (dfy < 0) 
X		deltax = inc; 
X	    else 
X		deltax = dec;
X	    if (dfx < 0) 
X		deltay = dec; 
X	    else 
X		deltay = inc;
X	    fx  = falpha + dfx * deltax + a;
X	    fy  = falpha + dfy * deltay + b;
X	    fxy = fx + fy - falpha;
X	    absfx  = abs(fx); absfy  = abs(fy); absfxy = abs(fxy);
X
X	    if ((absfxy <= absfx) && (absfxy <= absfy))
X		falpha = fxy;
X	    else if (absfy <= absfx) {
X		deltax = 0; falpha = fy;
X		}
X	    else {
X		deltay = 0; falpha = fx;
X		}
X	    x = x + deltax;  y = y + deltay;
X	    dfx = dfx + dfxx * deltax;
X	    dfy = dfy + dfyy * deltay;
X	    if (abs(x - xend) < margin && abs(y - yend) < margin) 
X		test_succeed--;
X	    }
X
X	if (margin == 1)	/* end points should touch */
X		{
X		points[npoints].x = (short) xoff+xstart;
X		points[npoints].y = (short) yoff-ystart;
X		}
X	pw_lines(window, points, npoints, val? PAINT: ERASE,
X			thick, style, style_val, area_fill);
X	free(points);
X	}
END_OF_FILE
if test 3295 -ne `wc -c <'curve.c'`; then
    echo shar: \"'curve.c'\" unpacked with wrong size!
fi
# end of 'curve.c'
fi
if test -f 'fig.icon.X' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fig.icon.X'\"
else
echo shar: Extracting \"'fig.icon.X'\" \(3314 characters\)
sed "s/^X//" >'fig.icon.X' <<'END_OF_FILE'
X#define fig_width 64
X#define fig_height 64
X#define fig_x_hot -1
X#define fig_y_hot -1
Xstatic char fig_bits[] = {
X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80,
X   0x01, 0x7f, 0x8e, 0x0f, 0x00, 0x60, 0x03, 0x80, 0x01, 0x42, 0x44, 0x08,
X   0x00, 0x10, 0x04, 0x80, 0x01, 0x12, 0x44, 0x00, 0x00, 0x18, 0x08, 0x80,
X   0x01, 0x1e, 0x44, 0x1e, 0x00, 0x04, 0x08, 0x80, 0x01, 0x12, 0x44, 0x08,
X   0x00, 0x04, 0x10, 0x80, 0x01, 0x02, 0x44, 0x08, 0x00, 0x03, 0x10, 0x80,
X   0x01, 0x02, 0x44, 0x0c, 0x00, 0x01, 0x10, 0x80, 0x01, 0x07, 0x8e, 0x0b,
X   0x80, 0x00, 0x10, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x83,
X   0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x88, 0x8c, 0x61, 0x00, 0x00, 0x00,
X   0x40, 0x00, 0x48, 0xf0, 0x81, 0x07, 0x00, 0x00, 0x40, 0x40, 0x38, 0xc0,
X   0x01, 0x78, 0x00, 0x00, 0x38, 0x20, 0x00, 0x80, 0x01, 0x80, 0x07, 0xfc,
X   0x47, 0x20, 0x00, 0x80, 0xe1, 0x00, 0xf8, 0x03, 0x40, 0x10, 0x00, 0x81,
X   0x01, 0x0f, 0x00, 0x00, 0x0e, 0x0c, 0xd0, 0x80, 0x01, 0xf0, 0xe0, 0xe0,
X   0x87, 0x00, 0x06, 0x80, 0x01, 0x00, 0xbf, 0xff, 0x40, 0xf1, 0x00, 0x80,
X   0x01, 0x00, 0x90, 0x38, 0xa0, 0x06, 0x00, 0x80, 0x01, 0x00, 0x58, 0x08,
X   0x80, 0x08, 0x00, 0x80, 0x01, 0x00, 0x48, 0x08, 0x18, 0x11, 0x00, 0x80,
X   0x01, 0x00, 0x4c, 0x08, 0x04, 0x21, 0xe0, 0x83, 0x01, 0x00, 0x22, 0x04,
X   0x03, 0x41, 0x10, 0x82, 0x01, 0x00, 0x21, 0x02, 0x00, 0x01, 0x10, 0x84,
X   0x01, 0x00, 0x11, 0x01, 0x00, 0x81, 0xe1, 0xe4, 0x01, 0x80, 0x90, 0x00,
X   0x1c, 0x00, 0x01, 0x99, 0x01, 0x80, 0x90, 0x80, 0x23, 0x01, 0x02, 0x82,
X   0x01, 0x40, 0x90, 0x81, 0x38, 0x01, 0x02, 0x82, 0x01, 0x20, 0x10, 0x7f,
X   0x04, 0x01, 0x04, 0x84, 0x01, 0x10, 0x20, 0x00, 0x82, 0x00, 0x04, 0x84,
X   0x01, 0x08, 0x20, 0x80, 0x81, 0x00, 0x00, 0x88, 0x01, 0x08, 0x40, 0x40,
X   0x80, 0x00, 0x08, 0x90, 0x01, 0x04, 0x40, 0x40, 0x40, 0x00, 0x00, 0x90,
X   0x01, 0x02, 0x80, 0x40, 0x20, 0x0c, 0x10, 0x90, 0x01, 0x01, 0x80, 0x20,
X   0x10, 0x12, 0x10, 0xa0, 0x01, 0x01, 0x00, 0x21, 0x00, 0x11, 0x10, 0xa0,
X   0x81, 0x20, 0x00, 0x31, 0x00, 0x09, 0x10, 0xa0, 0x81, 0x10, 0x00, 0x12,
X   0x00, 0x09, 0x00, 0xa0, 0x41, 0x00, 0x00, 0x12, 0x00, 0x05, 0x20, 0xa0,
X   0x41, 0x08, 0x00, 0x12, 0x80, 0x04, 0x00, 0xa0, 0x21, 0x00, 0x00, 0x12,
X   0x40, 0x04, 0x20, 0xa0, 0x21, 0x04, 0x00, 0x14, 0x20, 0x04, 0x20, 0xa0,
X   0x11, 0x00, 0x00, 0x24, 0x18, 0x04, 0x00, 0xa0, 0x11, 0x04, 0x00, 0xc4,
X   0x07, 0x04, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x90,
X   0x09, 0x04, 0x00, 0x08, 0x00, 0x04, 0x00, 0x90, 0x09, 0x00, 0x00, 0x08,
X   0x00, 0x04, 0x00, 0x98, 0x09, 0x08, 0x00, 0x08, 0x00, 0x08, 0x00, 0x88,
X   0x11, 0x00, 0x00, 0x08, 0x00, 0x18, 0x00, 0x88, 0x11, 0x00, 0x00, 0x08,
X   0x00, 0x10, 0x00, 0x84, 0x11, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x86,
X   0x11, 0xe0, 0x00, 0x04, 0x00, 0x60, 0x00, 0x81, 0x21, 0x20, 0x01, 0x02,
X   0x00, 0x80, 0x81, 0x80, 0x21, 0xc0, 0x00, 0x01, 0x00, 0x00, 0xc1, 0x80,
X   0x41, 0x00, 0x80, 0x00, 0x00, 0x00, 0x62, 0x80, 0x81, 0x00, 0xc0, 0x00,
X   0x00, 0x00, 0x1c, 0x80, 0x01, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x80,
X   0x01, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xf8, 0x01, 0x00,
X   0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
END_OF_FILE
if test 3314 -ne `wc -c <'fig.icon.X'`; then
    echo shar: \"'fig.icon.X'\" unpacked with wrong size!
fi
# end of 'fig.icon.X'
fi
if test -f 'font.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'font.c'\"
else
echo shar: Extracting \"'font.c'\" \(3848 characters\)
sed "s/^X//" >'font.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
X#include "const.h"
X#include "fig.h"
X#include "resources.h"
X#include "font.h"
X#include "psfonts.h"
X
XPIX_FONT		bold_font;
XPIX_FONT		roman_font;
XPIX_FONT		button_font;
X
Xextern	struct _fstruct fontnames[NUMFONTS];
Xextern	appresStruct	appres;
X
XXFontStruct *XLoadQueryFont();
X#define MAXNAMES 30
X
Xstatic struct {
X	char *fn;
X	int s;
X	} flist[MAXNAMES];
X
Xinit_font()
X	{
X	struct	xfont *newfont, *nf;
X	int	f,count,i,p,ss;
X	char	**fontlist,**fname;
X
X	if( appres.boldFont == NULL || *appres.boldFont == NULL)
X		appres.boldFont = BOLD_FONT;
X	if( appres.normalFont == NULL || *appres.normalFont == NULL)
X		appres.normalFont = NORMAL_FONT;
X	
X	roman_font = XLoadQueryFont(tool_d, appres.normalFont);
X	if ((bold_font = XLoadQueryFont(tool_d, appres.boldFont)) ==0)
X		{
X		fprintf(stderr,"Can't load font: %s, using %s\n",
X			appres.boldFont,appres.normalFont);
X		bold_font = XLoadQueryFont(tool_d, appres.normalFont);
X		}
X	button_font = XLoadQueryFont(tool_d, NORMAL_FONT);
X
X	for (i=0; i<0x10; i++)
X		{
X		gc_font[i] = -1;
X		gc_fontsize[i] = 0;
X		}
X
X	/* Now initialize the font structure for the X fonts corresponding
X	   to the Postscript fonts for the canvas */
X
X	for (f=0; f < NUMFONTS; f++)
X	    {
X	    nf = NULL;
X	    if (fontlist = XListFonts(tool_d, fontnames[f].template, MAXNAMES, &count))
X		{
X		fname = fontlist;	/* go through the list finding point sizes */
X		p=0;
X		while (count--)
X		    {
X		    ss = parsesize(*fname);	/* get the point size from the name */
X		    flist[p].fn = *fname++;	/* save name of this size font */
X		    flist[p++].s = ss;		/* and save size */
X		    }
X		for (ss=4; ss<=40; ss++)
X		    {
X		    for (i=0; i<p; i++)
X			if (flist[i].s == ss)
X				break;
X		    if (i<p && flist[i].s == ss)
X			{
X			newfont = (struct xfont *) malloc(sizeof(struct xfont));
X			if (nf==NULL)
X				fontnames[f].xfontlist = newfont;
X			else
X				nf-> next = newfont;
X			nf = newfont;		/* keep current ptr */
X			nf->size = ss;		/* store the size here */
X			nf->fid = NULL;		/* haven't loaded the font yet */
X			nf->fstruct = NULL;	/* ditto */
X			nf->fname = flist[i].fn;	/* keep actual name */
X			nf->next = NULL;
X			}
X		    }
X		}
X	    } /* next font, f */
X	}
X
X/* parse the point size of font 'name' */
X/* e.g. -adobe-courier-bold-o-normal--10-100-75-75-m-60-iso8859-1 */
X
Xint
Xparsesize(name)
Xchar *name;
X	{
X	int s;
X	char *np;
X
X	for (np = name; *(np+1); np++)
X		if (*np=='-' && *(np+1)=='-')	/* look for the -- */
X			break;
X	s=0;
X	if (*(np+1))
X		{
X		np += 2;	/* point past the -- */
X		s = atoi(np);	/* get the point size */
X		}
X	else 
X		fprintf(stderr,"Can't parse '%s'\n",name);
X	return s;
X	}
X
X/* Lookup an X font corresponding to a Postscript font style that is close in size */
X
XPIX_FONT
Xlookfont(f,s)
Xint f,s;
X	{
X	struct	xfont *xf;
X	XFontStruct *fontst;
X
X	if (f<0)			/* use font 0 for default font (-1) */
X		f=0;
X	if (s<0)
X		s=DEF_PRINTFONTSIZE;	/* default font size */
X	xf = fontnames[f].xfontlist;	/* go through the linked list looking for match */
X	if (xf == NULL)
X		return roman_font;	/* use a default font */
X	while (1)
X		{
X		if (s <= xf->size)	/* exact or larger point size */
X			break;
X		if (xf->next != NULL)	/* keep ptr to last if not found */
X			xf = xf->next;
X		else
X			break;		/* not found, use largest point size in the list */
X		}
X	if (xf->fid == NULL)		/* if the font is not yet loaded, load it */
X		{
X		if (appres.DEBUG)
X			fprintf(stderr,"Loading font %s\n",xf->fname);
X		if (fontst = XLoadQueryFont(tool_d, xf->fname))	/* load it */
X			{
X			xf->fid = fontst->fid;		/* save the id */
X			xf->fstruct = fontst;		/* and the XFontStruct ptr */
X			}
X		else
X			fprintf(stderr,"What!!?!?! Can't find font %s\n",xf->fname);
X		}
X	return xf->fstruct;
X	}
END_OF_FILE
if test 3848 -ne `wc -c <'font.c'`; then
    echo shar: \"'font.c'\" unpacked with wrong size!
fi
# end of 'font.c'
fi
if test -f 'grid.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'grid.c'\"
else
echo shar: Extracting \"'grid.c'\" \(3987 characters\)
sed "s/^X//" >'grid.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 "const.h"
X#include "func.h"
X#include "paintop.h"
X
Xstatic int	cur_grid = -1;
Xextern int	CANVAS_WIDTH, CANVAS_HEIGHT;
Xextern appresStruct	appres;
X
X#define null_width 32
X#define null_height 32
Xstatic char null_bits[null_width * null_height / 8] = { 0 };
X
X#define quarter_width 20
X#define quarter_height 20
Xstatic char quarter_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x42, 0x08};
X
X#define half_width 40
X#define half_height 40
Xstatic char half_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x10, 0x42, 0x08, 0x21, 0x84};
X
X#define half_cm_width 15
X#define half_cm_height 15
Xstatic char half_cm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x10, 0x42, 0x00, 0x00};
X
Xstatic Pixmap	null_pm, quarter_pm, half_pm, half_cm_pm;
X
Xinit_grid()
X{
X	unsigned long bg, fg;
X	Arg	tmp_arg[3];
X
X	XtSetArg(tmp_arg[0], XtNbackground, &bg);
X	XtSetArg(tmp_arg[1], XtNforeground, &fg);
X	XtGetValues(canvas_sw, tmp_arg, 2);
X	
X	null_pm = XCreatePixmapFromBitmapData(tool_d, canvas_win,
X		null_bits, null_width, null_height,
X		fg, bg,	DefaultDepthOfScreen(tool_s));
X	quarter_pm = XCreatePixmapFromBitmapData(tool_d, canvas_win,
X		quarter_bits, quarter_width, quarter_height,
X		fg, bg,	DefaultDepthOfScreen(tool_s));
X	half_pm = XCreatePixmapFromBitmapData(tool_d, canvas_win,
X		half_bits, half_width, half_height,
X		fg, bg,	DefaultDepthOfScreen(tool_s));
X	half_cm_pm = XCreatePixmapFromBitmapData(tool_d, canvas_win,
X		half_cm_bits, half_cm_width, half_cm_height,
X		fg, bg, DefaultDepthOfScreen(tool_s));
X}
X
X/* grid in X11 is simply the background of the canvas */
X
Xsetup_grid(grid)
X	int		grid;
X{
X	static Arg	grid_args[] =
X	{
X		{ XtNbackgroundPixmap, (XtArgVal)NULL },
X	};
X
X	if (grid == cur_grid)
X	{
X		grid_args[0].value = (XtArgVal)null_pm;
X		grid = -1;
X	}
X	if( appres.INCHES )
X	{
X		if (grid == F_GRID1)
X			grid_args[0].value = (XtArgVal)quarter_pm;
X		else if (grid == F_GRID2)
X			grid_args[0].value = (XtArgVal)half_pm;
X	}else if (grid == F_GRID1 || grid == F_GRID2)
X		grid_args[0].value = (XtArgVal)half_cm_pm;
X	cur_grid = grid;
X	XtSetValues(canvas_sw, grid_args, XtNumber(grid_args));
X}
X
Xredisplay_grid()
X{
X}
END_OF_FILE
if test 3987 -ne `wc -c <'grid.c'`; then
    echo shar: \"'grid.c'\" unpacked with wrong size!
fi
# end of 'grid.c'
fi
if test -f 'latex_line.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'latex_line.c'\"
else
echo shar: Extracting \"'latex_line.c'\" \(3275 characters\)
sed "s/^X//" >'latex_line.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 "math.h"
X
Xint  pgcd(a,b)
X    int a, b;
X/*
X *  compute greatest common divisor, assuming 0 < a <= b
X */
X{
X    b = b % a;
X    return (b)? gcd(b, a): a;
X}
X
Xint  gcd(a, b)
X    int a, b;
X/*
X *  compute greatest common divisor
X */
X{
X    if (a < 0) a = -a;
X    if (b < 0) b = -b;
X    return (a <= b)? pgcd(a, b): pgcd(b, a);
X}
X
X
Xint  lcm(a, b)
X    int a, b;
X/*
X *  compute least common multiple
X */
X{
X    return abs(a*b)/gcd(a,b);
X}
X
X
Xdouble rad2deg = 57.295779513082320877;
X
Xstruct angle_table {
X    int    x, y;
X    double angle;
X};
X
Xstruct angle_table line_angles[25] =
X  { {0, 1, 90.0}, 
X    {1, 0,  0.0},
X    {1, 1, 45.0}, 
X    {1, 2, 63.434948822922010648},
X    {1, 3, 71.565051177077989351},
X    {1, 4, 75.963756532073521417},
X    {1, 5, 78.690067525979786913},
X    {1, 6, 80.537677791974382609},
X    {2, 1, 26.565051177077989351},
X    {2, 3, 56.309932474020213086},
X    {2, 5, 68.198590513648188229}, 
X    {3, 1, 18.434948822922010648},
X    {3, 2, 33.690067525979786913},
X    {3, 4, 53.130102354155978703},
X    {3, 5, 59.036243467926478582},
X    {4, 1, 14.036243467926478588},
X    {4, 3, 36.869897645844021297},
X    {4, 5, 51.340191745909909396},
X    {5, 1, 11.309932474020213086},
X    {5, 2, 21.801409486351811770},
X    {5, 3, 30.963756532073521417},
X    {5, 4, 38.659808254090090604},
X    {5, 6, 50.194428907734805993},
X    {6, 1, 9.4623222080256173906},
X    {6, 5, 39.805571092265194006}
X  };
X
Xstruct angle_table arrow_angles[13] =
X  { {0, 1, 90.0}, 
X    {1, 0,  0.0},
X    {1, 1, 45.0}, 
X    {1, 2, 63.434948822922010648},
X    {1, 3, 71.565051177077989351},
X    {1, 4, 75.963756532073521417},
X    {2, 1, 26.565051177077989351},
X    {2, 3, 56.309932474020213086},
X    {3, 1, 18.434948822922010648},
X    {3, 2, 33.690067525979786913},
X    {3, 4, 53.130102354155978703},
X    {4, 1, 14.036243467926478588},
X    {4, 3, 36.869897645844021297},
X  };
X
Xget_slope(dx, dy, sxp, syp, arrow)
X    int  dx, dy, *sxp, *syp, arrow;
X{
X    double angle;
X    int    i, s, max;
X    double d, d1;
X    struct angle_table *st;
X
X    if (dx == 0) {
X	*sxp = 0;
X	*syp = (dy < 0)? -1: 1;
X	return;
X    }
X    angle = atan((double)abs(dy) / (double)abs(dx)) * rad2deg;
X    if (arrow) {
X	st = arrow_angles;
X	max = 13;
X    } else {
X	st = line_angles;
X	max = 25;
X    }
X    s = 0;
X    d = 9.9e9;
X    for (i = 0; i < max; i++) {
X	d1 = fabs(angle - st[i].angle);
X	if (d1 < d) {
X	    s = i;
X	    d = d1;
X	} 
X    }
X    *sxp = st[s].x;
X    if (dx < 0) *sxp = -*sxp;
X    *syp = st[s].y;
X    if (dy < 0) *syp = -*syp;
X}
X
Xlatex_endpoint(x1, y1, x2, y2, xout, yout, arrow, magnet)
X    int  x1, y1, x2, y2;
X    int  *xout, *yout;
X    int  arrow, magnet;
X{
X    int    dx, dy, sx, sy, ds, dsx, dsy;
X
X    dx = x2-x1;
X    dy = y2-y1;
X    get_slope(dx, dy, &sx, &sy, arrow);
X    if (abs(sx) >= abs(sy)) {
X	ds = lcm(sx, magnet*gcd(sx,magnet));
X	dsx = (2*abs(dx)/ds + 1)/2;
X	dsx = (dx >= 0)? dsx*ds: -dsx*ds;
X	*xout = x1 + dsx;
X	*yout = y1 + dsx*sy/sx;
X    } else {
X	ds = lcm(sy, magnet*gcd(sy,magnet));
X	dsy = (2*abs(dy)/ds + 1)/2;
X	dsy = (dy >= 0)? dsy*ds: -dsy*ds;
X	*yout = y1 + dsy;
X	*xout = x1 + dsy*sx/sy;
X    }
X}
END_OF_FILE
if test 3275 -ne `wc -c <'latex_line.c'`; then
    echo shar: \"'latex_line.c'\" unpacked with wrong size!
fi
# end of 'latex_line.c'
fi
if test -f 'move.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'move.c'\"
else
echo shar: Extracting \"'move.c'\" \(3987 characters\)
sed "s/^X//" >'move.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 "font.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
X#define			TOLERANCE	3
X
Xextern			(*canvas_kbd_proc)();
Xextern			(*canvas_locmove_proc)();
Xextern			(*canvas_leftbut_proc)();
Xextern			(*canvas_middlebut_proc)();
Xextern			(*canvas_rightbut_proc)();
Xextern			(*return_proc)();
Xextern			null_proc();
Xextern			set_popupmenu();
X
Xextern F_line		*line_search();
Xextern F_arc		*arc_search();
Xextern F_ellipse	*ellipse_search();
Xextern F_text		*text_search();
Xextern F_spline		*spline_search();
Xextern F_compound	*compound_search();
X
Xextern int		foreground_color, background_color;
Xextern int		pointmarker_shown, compoundbox_shown;
Xextern int		last_object;
Xextern int		last_action;
X
Xextern int		init_move();
X
Xmove_selected()
X{
X	canvas_kbd_proc = null_proc;
X	canvas_locmove_proc = null_proc;
X	canvas_leftbut_proc = init_move;
X	canvas_middlebut_proc = null_proc;
X	canvas_rightbut_proc = set_popupmenu;
X	return_proc = move_selected;
X	set_cursor(&pick9_cursor);
X	reset_action_on();
X	}
X
Xinit_move(x, y)
Xint	x, y;
X{
X	F_line		*l;
X	F_arc		*a;
X	F_ellipse	*e;
X	F_text		*t;
X	F_spline	*s;
X	F_compound	*c;
X	int		px, py;
X	PR_SIZE		size;
X
X	if ((c = compound_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X	    set_temp_cursor(&wait_cursor);
X	    win_setmouseposition(canvas_win, px, py);
X	    if (compoundbox_shown) draw_compoundbox(c, INV_PAINT);
X	    erase_compound(c);
X	    init_compounddragging(c, px, py);
X	    set_temp_cursor(&null_cursor);
X	    clean_up();
X	    set_action_object(F_MOVE, O_COMPOUND);
X	    set_latestcompound(c);
X	    }
X	else if ((l = line_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X	    set_temp_cursor(&wait_cursor);
X	    erase_pointmarker();
X	    win_setmouseposition(canvas_win, px, py);
X	    draw_line(l, ERASE);
X	    init_linedragging(l, px, py);
X	    set_temp_cursor(&null_cursor);
X	    clean_up();
X	    set_action_object(F_MOVE, O_POLYLINE);
X	    set_latestline(l);
X	    }
X	else if ((t = text_search(x, y)) != NULL) {
X	    set_temp_cursor(&wait_cursor);
X	    erase_pointmarker();
X	    px = 0;
X	    if (t->type == T_CENTER_JUSTIFIED || t->type == T_RIGHT_JUSTIFIED)
X		{
X		size = pf_textwidth(t->font, t->size, strlen(t->cstring), t->cstring);
X		if (t->type == T_CENTER_JUSTIFIED)
X			px = size.x/2;
X		else
X			px = size.x;
X		}
X	    pw_text(canvas_win, t->base_x - px, t->base_y, INV_PAINT, 
X			t->font, t->size, t->cstring);
X	    init_textdragging(t, x, y);
X	    set_temp_cursor(&null_cursor);
X	    clean_up();
X	    set_action_object(F_MOVE, O_TEXT);
X	    set_latesttext(t);
X	    }
X	else if ((e = ellipse_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X	    set_temp_cursor(&wait_cursor);
X	    erase_pointmarker();
X	    set_temp_cursor(&null_cursor);
X	    win_setmouseposition(canvas_win, px, py);
X	    draw_ellipse(e, background_color);
X	    init_ellipsedragging(e, px, py);
X	    set_temp_cursor(&null_cursor);
X	    clean_up();
X	    set_action_object(F_MOVE, O_ELLIPSE);
X	    set_latestellipse(e);
X	    }
X	else if ((a = arc_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X	    set_temp_cursor(&wait_cursor);
X	    erase_pointmarker();
X	    win_setmouseposition(canvas_win, px, py);
X	    draw_arc(a, background_color);
X	    init_arcdragging(a, px, py);
X	    set_temp_cursor(&null_cursor);
X	    clean_up();
X	    set_action_object(F_MOVE, O_ARC);
X	    set_latestarc(a);
X	    }
X	else if ((s = spline_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X	    set_temp_cursor(&wait_cursor);
X	    win_setmouseposition(canvas_win, px, py);
X	    erase_pointmarker();
X	    draw_spline(s, ERASE);
X	    init_splinedragging(s, px, py);
X	    set_temp_cursor(&null_cursor);
X	    clean_up();
X	    set_action_object(F_MOVE, O_SPLINE);
X	    set_latestspline(s);
X	    }
X	else
X	    return;
X	canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
X	}
END_OF_FILE
if test 3987 -ne `wc -c <'move.c'`; then
    echo shar: \"'move.c'\" unpacked with wrong size!
fi
# end of 'move.c'
fi
if test -f 'msgsw.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'msgsw.c'\"
else
echo shar: Extracting \"'msgsw.c'\" \(3253 characters\)
sed "s/^X//" >'msgsw.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 *	2nd revision : Feb 1988.
X *
X *	%W%	%G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "const.h"
X#include "font.h"
X#include "paintop.h"
X#include "psfonts.h"
X
Xextern int		errno;
Xextern int		action_on;
Xextern			null_proc();
X
Xextern int		CANVAS_WIDTH;
Xextern int		PANEL_WID;
Xextern int		SIDERULER_WIDTH;
Xextern char		prefix[], suffix[];
Xextern int		leng_prefix, leng_suffix;
Xextern int		cur_x, cur_y;
X
Xextern			(*canvas_kbd_proc)();
Xextern			(*canvas_locmove_proc)();
Xextern			(*canvas_leftbut_proc)();
Xextern			(*canvas_middlebut_proc)();
Xextern			(*canvas_rightbut_proc)();
X
X/*****************  exported  variables and procedures   *****************/
X
Xextern int		put_msg();
Xextern int		put_fmsg();
Xextern int		init_msgreceiving();
X
X/************************  local variables and routines ******************/
X
X#define			BUF_SIZE		80
X
Xstatic char		prompt[BUF_SIZE];
X
Xstatic			msg_selected();
Xstatic			msg_sighandler();
X
Xstatic Arg      msg_args[] =
X{
X	/* 0 */ { XtNwidth, (XtArgVal) 0 },
X	/* 1 */ { XtNheight, (XtArgVal)MSG_HEIGHT },
X	/* 2 */ { XtNlabel, (XtArgVal)"" },
X	/* 3 */ { XtNfromHoriz, (XtArgVal)NULL },
X	/* 4 */ { XtNhorizDistance, (XtArgVal) 2 },
X	/* 5 */ { XtNfromVert, (XtArgVal)NULL },
X	/* 6 */ { XtNvertDistance, (XtArgVal) -1 },
X	/* 7 */ { XtNleft, (XtArgVal) XtChainLeft },
X	/* 8 */ { XtNinput, (XtArgVal) True },
X};
X
Xint init_msg(tool)
X	TOOL		tool;
X{
X	/* width */
X	msg_args[0].value = PANEL_WID+CANVAS_WIDTH+SIDERULER_WIDTH -
X				FONT_PANE_WIDTH;
X	msg_args[3].value = (XtArgVal)psfont;	  /* to the right of font ind. */
X	msg_args[5].value = (XtArgVal)canvas_sw;  /* just below the canvas */
X	msg_sw = XtCreateManagedWidget("message", commandWidgetClass, tool,
X		msg_args, XtNumber(msg_args));
X	return (1);
X}
X
X/*
X**	We have to do this after realizing the widget otherwise
X**	the width is computed wrong and you get a tiny text box.
X*/
Xsetup_msg()
X{
X	static Arg      addn_args[] =
X	{
X		{ XtNfont, (XtArgVal)NULL },
X	};
X
X	if (bold_font != NULL)
X	{
X		addn_args[0].value = (XtArgVal)bold_font;
X		XtSetValues(msg_sw, addn_args, XtNumber(addn_args));
X	}
X	msg_win = XtWindow(msg_sw);
X	XDefineCursor(tool_d, msg_win, (Cursor)pencil_cursor.bitmap);
X}
X
X/*VARARGS1*/
Xput_msg(format, arg1, arg2, arg3, arg4, arg5)
X	char	*format;
X	int	arg1, arg2, arg3, arg4, arg5;
X{
X	sprintf(prompt, format, arg1, arg2, arg3, arg4, arg5);
X	msg_args[2].value = (XtArgVal)prompt;
X	XtSetValues(msg_sw, &msg_args[2], 1);
X}
X
X/* floating point version - MIPS (DEC3100) doesn't like ints where floats are used */
X
X/*VARARGS1*/
Xput_fmsg(format, arg1, arg2, arg3, arg4, arg5)
X	char	*format;
X	double	arg1, arg2, arg3, arg4, arg5;
X{
X	sprintf(prompt, format, arg1, arg2, arg3, arg4, arg5);
X	msg_args[2].value = (XtArgVal)prompt;
X	XtSetValues(msg_sw, &msg_args[2], 1);
X}
X
Xclear_message()
X{
X	msg_args[2].value = (XtArgVal)"";
X	XtSetValues(msg_sw, &msg_args[2], 1);
X}
X
Xinit_msg_receiving(msg_recipient, p)
X	int		(*msg_recipient)();
X	char		*p;
X{
X	char		reply[100];
X
X	prompt_string(p, reply);
X	(*msg_recipient)(reply);
X}
X
Xblink_msg()
X{
X	int	i;
X
X	for (i = 0; i < 2000; i++)
X		;
X	clear_message();
X	}
END_OF_FILE
if test 3253 -ne `wc -c <'msgsw.c'`; then
    echo shar: \"'msgsw.c'\" unpacked with wrong size!
fi
# end of 'msgsw.c'
fi
if test -f 'remove.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'remove.c'\"
else
echo shar: Extracting \"'remove.c'\" \(3369 characters\)
sed "s/^X//" >'remove.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 "func.h"
X#include "object.h"
X#include "paintop.h"
X
X#define			TOLERANCE	7
X
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
X
Xextern int		foreground_color, background_color;
X
Xextern int		init_remove();
X
Xremove_selected()
X{
X	canvas_kbd_proc = null_proc;
X	canvas_locmove_proc = null_proc;
X	canvas_leftbut_proc = init_remove;
X	canvas_middlebut_proc = null_proc;
X	canvas_rightbut_proc = set_popupmenu;
X	set_cursor(&buster_cursor);
X	}
X
Xinit_remove(x, y)
Xint	x, y;
X{
X	extern F_line		*line_search();
X	extern F_arc		*arc_search();
X	extern F_ellipse	*ellipse_search();
X	extern F_text		*text_search();
X	extern F_spline		*spline_search();
X	extern F_compound	*compound_search();
X	extern F_compound	objects;
X	F_line		*l;
X	F_arc		*a;
X	F_ellipse	*e;
X	F_text		*t;
X	F_spline	*s;
X	F_compound	*c;
X	int		dummy;
X
X	if ((c = compound_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL) {
X	    draw_compoundbox(c, INV_PAINT);
X	    erase_compound(c);
X	    delete_compound(&objects.compounds, c);
X	    clean_up();
X	    set_action_object(F_REMOVE, O_COMPOUND);
X	    set_latestcompound(c);
X	    set_modifiedflag();
X	    }
X	else if ((l = line_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL) {
X	    toggle_linepointmarker(l);
X	    draw_line(l, ERASE);
X	    delete_line(&objects.lines, l);
X	    clean_up();
X	    set_action_object(F_REMOVE, O_POLYLINE);
X	    set_latestline(l);
X	    set_modifiedflag();
X	    }
X	else if ((t = text_search(x, y)) != NULL) {
X	    draw_text(t, INV_PAINT);
X	    delete_text(&objects.texts, t);
X	    clean_up();
X	    set_action_object(F_REMOVE, O_TEXT);
X	    set_latesttext(t);
X	    set_modifiedflag();
X	    }
X	else if ((e = ellipse_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL){
X	    toggle_ellipsepointmarker(e);
X	    draw_ellipse(e, background_color);
X	    delete_ellipse(&objects.ellipses, e);
X	    clean_up();
X	    set_action_object(F_REMOVE, O_ELLIPSE);
X	    set_latestellipse(e);
X	    set_modifiedflag();
X	    }
X	else if ((a = arc_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL){
X	    toggle_arcpointmarker(a);
X	    draw_arc(a, background_color);
X	    delete_arc(&objects.arcs, a);
X	    clean_up();
X	    set_action_object(F_REMOVE, O_ARC);
X	    set_latestarc(a);
X	    set_modifiedflag();
X	    }
X	else if ((s = spline_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL) {
X	    toggle_splinepointmarker(s);
X	    draw_spline(s, ERASE);
X	    delete_spline(&objects.splines, s);
X	    clean_up();
X	    set_action_object(F_REMOVE, O_SPLINE);
X	    set_latestspline(s);
X	    set_modifiedflag();
X	    }
X	remove_selected();
X	}
X
Xremove_all()
X{
X	extern F_compound	objects;
X	extern F_compound	saved_objects;
X	extern int		last_action;
X
X	clean_up();
X	set_action_object(F_REMOVE, O_ALL_OBJECT);
X
X	/* Aggregate assignment between variables is allowed,
X	but not from constant (weird!?) */
X
X	saved_objects = objects;
X
X	objects.arcs = NULL;
X	objects.compounds = NULL;
X	objects.ellipses = NULL;
X	objects.lines = NULL;
X	objects.splines = NULL;
X	objects.texts = NULL;
X	}
END_OF_FILE
if test 3369 -ne `wc -c <'remove.c'`; then
    echo shar: \"'remove.c'\" unpacked with wrong size!
fi
# end of 'remove.c'
fi
if test -f 'turn.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'turn.c'\"
else
echo shar: Extracting \"'turn.c'\" \(3467 characters\)
sed "s/^X//" >'turn.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
X#define			TOLERANCE	7
X
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 int		pointmarker_shown;
X
Xextern F_compound	objects;
Xextern F_line		*line_search();
Xextern F_spline		*spline_search();
X
Xextern int		init_turn();
X
Xturn_selected()
X{
X	canvas_kbd_proc = null_proc;
X	canvas_locmove_proc = null_proc;
X	canvas_leftbut_proc = init_turn;
X	canvas_middlebut_proc = null_proc;
X	canvas_rightbut_proc = set_popupmenu;
X	set_cursor(&pick15_cursor);
X	}
X
Xinit_turn(x, y)
Xint	x, y;
X{
X	F_line		*l;
X	F_spline	*s;
X	int		dummy;
X
X	if ((l = line_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL) {
X	    if (l->type == T_BOX || l->type == T_ARC_BOX) return;
X	    line_2_spline(l);
X	    turn_selected();
X	    }
X	else if ((s = spline_search(x, y, TOLERANCE, &dummy, &dummy)) != NULL) {
X	    spline_2_line(s);
X	    turn_selected();
X	    }
X	}
X
Xline_2_spline(l)
XF_line	*l;
X{
X	F_spline	*s;
X
X	if (num_points(l->points) < 3) {
X	    put_msg("Can't turn this line into spline");
X	    return(-1);
X	    }
X	if (pointmarker_shown) toggle_linepointmarker(l);
X	draw_line(l, ERASE);
X	delete_line(&objects.lines, l);
X
X	if (NULL == (Spline_malloc(s))) {
X	    put_msg(Err_mem);
X	    return(-1);
X	    }
X
X	if (l->type == T_POLYGON)
X	    s->type = T_CLOSED_INTERPOLATED;
X	else
X	    s->type = T_OPEN_INTERPOLATED;
X	s->style = l->style;
X	s->thickness = l->thickness;
X	s->color = l->color;
X	s->depth = l->depth;
X	s->style_val = l->style_val;
X	s->pen = l->pen;
X	s->area_fill = l->area_fill;
X	s->for_arrow = l->for_arrow;
X	s->back_arrow = l->back_arrow;
X	s->points = l->points;
X	s->controls = NULL;
X	s->next = NULL;
X
X	l->for_arrow = l->back_arrow = NULL;
X	l->pen = 0;
X	l->points = NULL;
X
X	if (-1 == create_control_list(s)) {
X	    free(s);
X	    return(-1);
X	    }
X
X	remake_control_points(s);
X	draw_spline(s, PAINT);
X	if (pointmarker_shown) toggle_splinepointmarker(s);
X	clean_up();
X	set_action_object(F_TURN, O_POLYLINE);
X	insert_spline(&objects.splines, s);
X	set_latestspline(s);
X	set_latestline(l);
X	return(1);
X	}
X
Xspline_2_line(s)
XF_spline	*s;
X{
X	F_line	*l;
X
X	if (pointmarker_shown) toggle_splinepointmarker(s);
X	draw_spline(s, ERASE);
X	delete_spline(&objects.splines, s);
X
X	/* Now we turn s into a line */
X	if (NULL == (Line_malloc(l))) {
X	    put_msg(Err_mem);
X	    return(-1);
X	    }
X
X	if (s->type == T_OPEN_INTERPOLATED)
X	    l->type = T_POLYLINE;
X	else if (s->type == T_CLOSED_INTERPOLATED)
X	    l->type = T_POLYGON;
X	l->style = s->style;
X	l->thickness = s->thickness;
X	l->color = s->color;
X	l->depth = s->depth;
X	l->style_val = s->style_val;
X	l->pen = s->pen;
X	l->radius = 0;
X	l->area_fill = s->area_fill;
X	l->for_arrow = s->for_arrow;
X	l->back_arrow = s->back_arrow;
X	l->points = s->points;
X	l->next = NULL;
X
X	s->for_arrow = s->back_arrow = NULL;
X	s->area_fill = 0;
X	s->pen = 0;
X	s->points = NULL;
X
X	draw_line(l, PAINT);
X	if (pointmarker_shown) toggle_linepointmarker(l);
X	clean_up();
X	set_action_object(F_TURN, O_SPLINE);
X	insert_line(&objects.lines, l);
X	set_latestspline(s);
X	set_latestline(l);
X	return(1);
X	}
END_OF_FILE
if test 3467 -ne `wc -c <'turn.c'`; then
    echo shar: \"'turn.c'\" unpacked with wrong size!
fi
# end of 'turn.c'
fi
echo shar: End of archive 3 \(of 21\).
cp /dev/null ark3isdone
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