#! /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 'TRACE/README' <<'END_OF_FILE' This directory contains the source code for the trace facility for the SCHEDULE package. It has been implemented in both Sunview and X. To make an executable, go to the desired directory X(SUNVIEW or X) and type make. I have tried to keep the window dependent code down to a minimum. The majority of the code is in the directory "src", which both versions use. The X version is not as functional as the SUNVIEW version; it does not have menus implemented. Both versions will run on either monochrome or color Suns. Of course, the X version should run on any workstation that supports X. However, with System V there is an incompatiblity in the module src/load.c (when sched.trace searches a directory for trace files). The structures used for directory descriptors are different. There are example trace file included. X X Orlie Brewer X Mathematics and Computer Science Division, Argonne National Laboratory X 9700 South Cass Avenue, Argonne, Illinois 60439 X (312) 972 - 5094, brewer@mcs.anl.gov END_OF_FILE if test 1002 -ne `wc -c <'TRACE/README'`; then echo shar: \"'TRACE/README'\" unpacked with wrong size! fi # end of 'TRACE/README' fi if test ! -d 'TRACE/SUNVIEW' ; then echo shar: Creating directory \"'TRACE/SUNVIEW'\" mkdir 'TRACE/SUNVIEW' fi if test ! -d 'TRACE/X' ; then echo shar: Creating directory \"'TRACE/X'\" mkdir 'TRACE/X' fi if test -f 'TRACE/shar_me' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/shar_me'\" else echo shar: Extracting \"'TRACE/shar_me'\" \(92 characters\) sed "s/^X//" >'TRACE/shar_me' <<'END_OF_FILE' shar TRACE TRACE/X TRACE/src TRACE/trace.* TRACE/README TRACE/X/* TRACE/src/* > TRACE.shar END_OF_FILE if test 92 -ne `wc -c <'TRACE/shar_me'`; then echo shar: \"'TRACE/shar_me'\" unpacked with wrong size! fi chmod +x 'TRACE/shar_me' # end of 'TRACE/shar_me' fi if test ! -d 'TRACE/src' ; then echo shar: Creating directory \"'TRACE/src'\" mkdir 'TRACE/src' fi if test -f 'TRACE/trace.100' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.100'\" else echo shar: Extracting \"'TRACE/trace.100'\" \(1389 characters\) sed "s/^X//" >'TRACE/trace.100' <<'END_OF_FILE' X 8 X 0 3 1 1 2 aaa X 0 2 1 1 1 aaa X 0 5 1 1 4 aaa X 0 4 1 1 1 aaa X 0 7 1 1 6 aaa X 0 6 1 1 1 aaa X 0 9 1 1 8 aaa X 0 8 1 1 1 aaa X 0 11 1 1 10 aaa X 0 10 1 1 1 aaa X 0 1 5 0 xxx X 0 12 0 5 3 5 7 9 11 zzz X 1 12 7.90000021E-01 1 X 2 12 7.90000021E-01 X 1 3 7.90000021E-01 1 X 1 5 7.90000021E-01 2 X 1 7 7.90000021E-01 3 X 1 9 7.90000021E-01 4 X 1 11 7.90000021E-01 5 X 2 7 1.38999999E+00 X 1 6 1.38999999E+00 3 X 2 6 1.40999997E+00 X 2 11 1.41999996E+00 X 1 10 1.41999996E+00 3 X 2 9 1.41999996E+00 X 1 8 1.41999996E+00 4 X 2 10 1.44000006E+00 X 2 3 1.44000006E+00 X 2 8 1.44000006E+00 X 1 2 1.44000006E+00 3 X 2 2 1.47000003E+00 X 2 5 1.47000003E+00 X 1 4 1.47000003E+00 2 X 2 4 1.49000001E+00 X 1 1 1.49000001E+00 2 X 2 1 1.50000000E+00 END_OF_FILE if test 1389 -ne `wc -c <'TRACE/trace.100'`; then echo shar: \"'TRACE/trace.100'\" unpacked with wrong size! fi # end of 'TRACE/trace.100' fi if test -f 'TRACE/trace.b21eig' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.b21eig'\" else echo shar: Extracting \"'TRACE/trace.b21eig'\" \(8160 characters\) sed "s/^X//" >'TRACE/trace.b21eig' <<'END_OF_FILE' X 20 X 0 1 2 0 X sesupd X 0 2 2 1 1 X sesupd X 0 3 2 1 1 X sesupd X 0 4 2 1 2 X sesupd X 0 5 2 1 2 X sesupd X 0 6 2 1 3 X sesupd X 0 7 2 1 3 X sesupd X 0 8 0 1 4 X tql2 X 0 9 0 1 4 X tql2 X 0 10 0 1 5 X tql2 X 0 11 0 1 5 X tql2 X 0 12 0 1 6 X tql2 X 0 13 0 1 6 X tql2 X 0 14 0 1 7 X tql2 X 0 15 0 1 7 X tql2 X 1 8 3.36000000E+00 9 X 1 15 1.25000000E+00 16 X 1 14 1.56000000E+00 15 X 1 9 3.06000000E+00 10 X 1 13 1.86000000E+00 14 X 1 10 2.76000000E+00 11 X 1 12 2.16000000E+00 13 X 1 11 2.47000000E+00 12 X 2 14 2.09000000E+00 X 2 10 3.31000000E+00 X 2 12 2.68000000E+00 X 2 8 3.96000000E+00 X 2 15 1.92000000E+00 X 1 7 1.33000000E+00 18 X 2 9 3.75000000E+00 X 2 11 3.15000000E+00 X 2 13 2.55000000E+00 X 1 4 1.95000000E+00 16 X 1 5 4.96000000E+00 6 X 1 6 1.06000000E+00 19 X 3 7 17 evdrv X 4 7 17 1.72000000E+00 17 X 3 7 18 evdrv X 4 7 18 2.03390000E+02 1 X 3 7 19 evdrv X 4 7 19 3.21000000E+00 12 X 3 7 20 evdrv X 4 7 20 3.54000000E+00 11 X 3 4 21 evdrv X 3 4 22 evdrv X 4 4 21 4.76000000E+00 7 X 4 4 22 2.64000000E+00 14 X 3 4 23 evdrv X 3 4 24 evdrv X 4 4 23 4.16000000E+00 9 X 3 4 25 evdrv X 3 6 26 evdrv X 4 4 24 6.24000000E+00 2 X 4 4 25 5.97000000E+00 3 X 3 5 27 evdrv X 4 6 26 5.37000000E+00 5 X 3 6 28 evdrv X 3 5 29 evdrv X 4 5 27 5.67000000E+00 4 X 3 5 30 evdrv X 3 6 31 evdrv X 3 5 32 evdrv X 4 6 28 4.47000000E+00 8 X 3 6 33 evdrv X 4 5 29 2.94000000E+00 13 X 4 5 30 2.36000000E+00 15 X 4 6 31 8.60000100E-01 20 X 4 5 32 3.85000000E+00 10 X 5 7 20 3.84000000E+00 X 4 6 33 3.84000000E+00 11 X 6 7 1.69000000E+00 X 5 4 23 4.44000000E+00 X 5 7 18 2.03720000E+02 X 5 4 22 2.91000000E+00 X 5 4 21 5.02000000E+00 X 5 5 32 4.15000000E+00 X 6 4 2.33000000E+00 X 6 5 5.34000000E+00 X 6 6 1.43000000E+00 X 5 4 24 6.52000000E+00 X 5 7 17 2.04000000E+00 X 5 4 25 6.28000000E+00 X 1 4 2.93000000E+00 14 X 5 7 19 3.55000000E+00 X 1 7 4.48000000E+00 9 X 5 6 26 5.68000000E+00 X 5 5 29 3.28000000E+00 X 5 6 28 4.81000000E+00 X 5 5 30 2.70000000E+00 X 5 5 27 6.01000000E+00 X 2 4 2.98000000E+00 X 1 5 2.39000000E+00 16 X 5 6 31 1.21000000E+00 X 2 7 4.53000000E+00 X 2 5 2.40000000E+00 X 1 2 1.57000000E+00 19 X 5 6 33 4.13000000E+00 X 1 6 2.52000000E+00 16 X 3 2 34 evdrv X 3 2 35 evdrv X 4 2 34 2.36000000E+00 17 X 3 2 36 evdrv X 4 2 35 6.27000000E+00 4 X 3 2 37 evdrv X 4 2 36 3.55000000E+00 13 X 3 2 38 evdrv X 4 2 37 3.25000000E+00 14 X 3 2 39 evdrv X 4 2 38 6.60000000E+00 3 X 4 2 39 2.04070000E+02 1 X 3 2 40 evdrv X 2 6 2.54000000E+00 X 3 2 41 evdrv X 4 2 41 5.09000000E+00 8 X 3 2 42 evdrv X 4 2 40 2.06000000E+00 18 X 4 2 42 2.98000000E+00 15 X 1 3 3.87000000E+00 12 X 3 2 43 evdrv X 4 2 43 1.49000000E+00 20 X 3 3 44 evdrv X 4 3 44 4.94000000E+00 9 X 3 3 45 evdrv X 3 3 46 evdrv X 4 3 45 4.38000000E+00 11 X 3 3 47 evdrv X 3 3 48 evdrv X 3 3 49 evdrv X 4 3 46 2.72000000E+00 16 X 3 3 50 evdrv X 4 3 47 5.85000000E+00 6 X 3 3 51 evdrv X 4 3 48 7.03000000E+00 2 X 4 3 49 5.55000000E+00 7 X 3 3 52 evdrv X 4 3 50 4.68000000E+00 10 X 3 3 53 evdrv X 4 3 51 6.15000000E+00 5 X 5 2 39 2.04850000E+02 X 4 3 52 2.04850000E+02 1 X 5 2 42 3.77000000E+00 X 5 2 41 5.86000000E+00 X 4 3 53 3.78000000E+00 15 X 5 2 40 2.87000000E+00 X 6 2 2.69000000E+00 X 5 2 37 4.20000000E+00 X 5 2 36 4.49000000E+00 X 5 2 35 7.24000000E+00 X 5 3 51 6.93000000E+00 X 5 2 38 7.58000000E+00 X 5 3 49 6.30000000E+00 X 5 2 34 3.33000000E+00 X 5 3 50 5.48000000E+00 X 5 2 43 2.53000000E+00 X 1 2 2.53000000E+00 20 X 6 3 4.95000000E+00 X 5 3 45 5.35000000E+00 X 5 3 46 3.70000000E+00 X 5 3 44 5.93000000E+00 X 5 3 47 6.84000000E+00 X 5 3 48 8.04000000E+00 X 2 2 2.64000000E+00 X 5 3 52 2.05660000E+02 X 5 3 53 4.58000000E+00 X 1 3 3.43000000E+00 19 X 2 3 3.57000000E+00 X 1 1 4.42000000E+00 16 X 3 1 54 evdrv X 3 1 55 evdrv X 3 1 56 evdrv X 4 1 54 6.68000000E+00 13 X 3 1 57 evdrv X 4 1 55 5.21000000E+00 18 X 3 1 58 evdrv X 4 1 56 9.77000100E+00 3 X 4 1 57 4.55000000E+00 20 X 4 1 58 7.65000000E+00 10 X 3 1 59 evdrv X 4 1 59 8.84000100E+00 6 X 3 1 60 evdrv X 3 1 61 evdrv X 4 1 60 7.39000000E+00 11 X 3 1 62 evdrv X 4 1 61 9.44000000E+00 4 X 3 1 63 evdrv X 4 1 62 1.00200000E+01 2 X 4 1 63 8.22000100E+00 8 X 5 1 59 1.02000000E+01 X 5 1 60 8.74000000E+00 X 5 1 61 1.07900000E+01 X 5 1 62 1.16300000E+01 X 5 1 63 9.87000000E+00 X 6 1 7.37000000E+00 X 5 1 57 6.25000000E+00 X 5 1 58 9.35000100E+00 X 5 1 55 6.91000000E+00 X 5 1 54 8.37000000E+00 X 5 1 56 1.14500000E+01 X 1 1 1.11200000E+01 4 X 2 1 1.18500000E+01 END_OF_FILE if test 8160 -ne `wc -c <'TRACE/trace.b21eig'`; then echo shar: \"'TRACE/trace.b21eig'\" unpacked with wrong size! fi # end of 'TRACE/trace.b21eig' fi if test -f 'TRACE/trace.dandc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.dandc'\" else echo shar: Extracting \"'TRACE/trace.dandc'\" \(8160 characters\) sed "s/^X//" >'TRACE/trace.dandc' <<'END_OF_FILE' X 8 X 0 1 2 0 X sesupd X 0 2 2 1 1 X sesupd X 0 3 2 1 1 X sesupd X 0 4 2 1 2 X sesupd X 0 5 2 1 2 X sesupd X 0 6 2 1 3 X sesupd X 0 7 2 1 3 X sesupd X 0 8 0 1 4 X tql2 X 0 9 0 1 4 X tql2 X 0 10 0 1 5 X tql2 X 0 11 0 1 5 X tql2 X 0 12 0 1 6 X tql2 X 0 13 0 1 6 X tql2 X 0 14 0 1 7 X tql2 X 0 15 0 1 7 X tql2 X 1 9 2.66212010E+00 2 X 1 11 2.66212010E+00 4 X 1 14 2.66212010E+00 7 X 1 15 2.66212010E+00 8 X 1 10 2.66212010E+00 3 X 1 13 2.66212010E+00 6 X 1 8 2.66212010E+00 1 X 1 12 2.66212010E+00 5 X 2 14 2.67880011E+00 X 2 10 2.67880011E+00 X 2 9 2.67880011E+00 X 2 8 2.68306994E+00 X 2 15 2.68306994E+00 X 2 12 2.68306994E+00 X 1 4 2.68306994E+00 3 X 2 11 2.68306994E+00 X 1 7 2.68306994E+00 1 X 2 13 2.68306994E+00 X 1 5 2.68306994E+00 7 X 1 6 2.68306994E+00 2 X 3 5 17 evdrv X 3 4 18 evdrv X 3 7 19 evdrv X 3 6 20 evdrv X 4 5 17 2.68904996E+00 6 X 3 5 21 evdrv X 3 4 22 evdrv X 3 7 23 evdrv X 4 4 18 2.69208002E+00 4 X 4 7 19 2.69208002E+00 8 X 3 5 24 evdrv X 3 6 25 evdrv X 3 4 26 evdrv X 4 6 20 2.69208002E+00 5 X 3 7 27 evdrv X 3 5 28 evdrv X 3 6 29 evdrv X 3 4 30 evdrv X 3 7 31 evdrv X 3 6 32 evdrv X 3 4 33 evdrv X 6 5 2.70321989E+00 X 6 6 2.70321989E+00 X 5 4 18 2.70321989E+00 X 4 4 22 2.70321989E+00 7 X 4 6 25 2.70612001E+00 2 X 4 7 27 2.70619988E+00 4 X 5 5 17 2.70636010E+00 X 6 7 2.70643997E+00 X 4 5 21 2.70652008E+00 6 X 4 5 24 2.70658994E+00 1 X 6 4 2.70725012E+00 X 5 6 20 2.70725012E+00 X 4 4 26 2.70725012E+00 3 X 5 7 19 2.70750999E+00 X 4 5 28 2.70750999E+00 5 X 4 7 23 2.70750999E+00 8 X 5 4 22 2.71099997E+00 X 4 4 30 2.71200991E+00 7 X 5 7 27 2.71393991E+00 X 5 6 25 2.71393991E+00 X 4 6 29 2.71393991E+00 4 X 4 4 33 2.71393991E+00 2 X 5 5 21 2.71393991E+00 X 5 4 26 2.71759009E+00 X 4 7 31 2.71759009E+00 6 X 4 6 32 2.71919990E+00 3 X 5 5 28 2.71919990E+00 X 5 5 24 2.71968007E+00 X 1 5 2.71968007E+00 1 X 5 7 23 2.71968007E+00 X 2 5 2.72290993E+00 X 5 4 30 2.72290993E+00 X 5 4 33 2.72659993E+00 X 1 4 2.72659993E+00 1 X 5 6 29 2.72659993E+00 X 5 6 32 2.72659993E+00 X 2 4 2.73140001E+00 X 1 6 2.73140001E+00 8 X 5 7 31 2.73140001E+00 X 1 2 2.73140001E+00 7 X 1 7 2.73140001E+00 1 X 2 6 2.73486996E+00 X 2 7 2.73486996E+00 X 1 3 2.73734999E+00 5 X 3 2 34 evdrv X 3 2 35 evdrv X 4 2 34 2.73734999E+00 1 X 4 2 35 2.73734999E+00 8 X 3 2 36 evdrv X 4 2 36 2.73734999E+00 2 X 3 2 37 evdrv X 3 2 38 evdrv X 4 2 37 2.73734999E+00 3 X 3 2 39 evdrv X 4 2 38 2.73734999E+00 4 X 3 2 40 evdrv X 4 2 39 2.73734999E+00 6 X 3 2 41 evdrv X 3 2 42 evdrv X 3 2 43 evdrv X 3 3 44 evdrv X 3 3 45 evdrv X 3 3 46 evdrv X 3 3 47 evdrv X 3 3 48 evdrv X 3 3 49 evdrv X 3 3 50 evdrv X 3 3 51 evdrv X 3 3 52 evdrv X 3 3 53 evdrv X 5 2 39 2.75049996E+00 X 4 3 45 2.75049996E+00 6 X 5 2 34 2.75049996E+00 X 6 2 2.75049996E+00 X 4 2 40 2.75049996E+00 1 X 5 2 35 2.75049996E+00 X 5 2 36 2.75049996E+00 X 4 3 46 2.75049996E+00 7 X 5 2 37 2.77981997E+00 X 5 2 38 2.75049996E+00 X 4 3 47 2.75049996E+00 8 X 4 2 43 2.78005004E+00 4 X 6 3 2.77981997E+00 X 4 2 41 2.78005004E+00 2 X 4 2 42 2.77981997E+00 3 X 4 3 44 2.78005004E+00 5 X 5 2 40 2.78005004E+00 X 4 3 48 2.78005004E+00 1 X 5 3 45 2.78005004E+00 X 4 3 53 2.78005004E+00 6 X 5 3 46 2.78005004E+00 X 4 3 49 2.78005004E+00 7 X 5 2 41 2.78005004E+00 X 5 3 47 2.78005004E+00 X 5 2 43 2.78005004E+00 X 4 3 50 2.78005004E+00 2 X 4 3 51 2.78005004E+00 8 X 4 3 52 2.78005004E+00 4 X 5 3 44 2.80822992E+00 X 5 2 42 2.80822992E+00 X 1 2 2.80822992E+00 3 X 2 2 2.80822992E+00 X 5 3 53 2.80822992E+00 X 5 3 49 2.80822992E+00 X 5 3 48 2.80822992E+00 X 5 3 50 2.80822992E+00 X 5 3 51 2.80822992E+00 X 5 3 52 2.80822992E+00 X 1 3 2.80822992E+00 3 X 2 3 2.80822992E+00 X 1 1 2.80822992E+00 2 X 3 1 54 evdrv X 4 1 54 2.80822992E+00 3 X 3 1 55 evdrv X 4 1 55 2.80822992E+00 1 X 3 1 56 evdrv X 3 1 57 evdrv X 4 1 56 2.89660001E+00 6 X 4 1 57 2.89660001E+00 5 X 3 1 58 evdrv X 4 1 58 2.89660001E+00 4 X 3 1 59 evdrv X 3 1 60 evdrv X 4 1 59 2.89660001E+00 7 X 4 1 60 2.89660001E+00 8 X 3 1 61 evdrv X 3 1 62 evdrv X 3 1 63 evdrv X 5 1 60 2.90708995E+00 X 5 1 59 2.90708995E+00 X 4 1 63 2.90708995E+00 8 X 4 1 62 2.90708995E+00 7 X 5 1 54 2.90708995E+00 X 5 1 55 2.90708995E+00 X 4 1 61 2.90708995E+00 3 X 6 1 2.90708995E+00 X 5 1 56 2.93770003E+00 X 5 1 58 2.90708995E+00 X 5 1 57 2.93770003E+00 X 5 1 62 2.93770003E+00 X 5 1 63 2.93770003E+00 X 5 1 61 2.93770003E+00 X 1 1 2.93770003E+00 4 X 2 1 2.93770003E+00 END_OF_FILE if test 8160 -ne `wc -c <'TRACE/trace.dandc'`; then echo shar: \"'TRACE/trace.dandc'\" unpacked with wrong size! fi # end of 'TRACE/trace.dandc' fi if test -f 'TRACE/trace.eth' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.eth'\" else echo shar: Extracting \"'TRACE/trace.eth'\" \(5520 characters\) sed "s/^X//" >'TRACE/trace.eth' <<'END_OF_FILE' X 8 X 0 1 0 2 2 3 X circ X 0 2 1 19 4 5 6 7 8 9 10 11 12 13 X 14 15 16 17 18 19 20 21 22 X compgg X 0 3 1 19 4 5 6 7 8 9 10 11 12 13 X 14 15 16 17 18 19 20 21 22 X sort X 0 4 2 1 23 X oldev X 0 5 2 2 23 24 X oldev X 0 6 2 2 24 25 X oldev X 0 7 2 2 25 26 X oldev X 0 8 2 2 26 27 X oldev X 0 9 2 2 27 28 X oldev X 0 10 2 2 28 29 X oldev X 0 11 2 2 29 30 X oldev X 0 12 2 2 30 31 X oldev X 0 13 2 2 31 32 X oldev X 0 14 2 2 32 33 X oldev X 0 15 2 2 33 34 X oldev X 0 16 2 2 34 35 X oldev X 0 17 2 2 35 36 X oldev X 0 18 2 2 36 37 X oldev X 0 19 2 2 37 38 X oldev X 0 20 2 2 38 39 X oldev X 0 21 2 2 39 40 X oldev X 0 22 2 1 40 X oldev X 0 23 2 1 41 X newev X 0 24 2 1 41 X newev X 0 25 2 1 41 X newev X 0 26 2 1 41 X newev X 0 27 2 1 41 X newev X 0 28 2 1 41 X newev X 0 29 2 1 41 X newev X 0 30 2 1 41 X newev X 0 31 2 1 41 X newev X 0 32 2 1 41 X newev X 0 33 2 1 41 X newev X 0 34 2 1 41 X newev X 0 35 2 1 41 X newev X 0 36 2 1 41 X newev X 0 37 2 1 41 X newev X 0 38 2 1 41 X newev X 0 39 2 1 41 X newev X 0 40 2 1 41 X newev X 0 41 18 0 X final X 1 1 4.83600013E-02 2 X 2 1 6.56199977E-02 X 1 2 6.56199977E-02 3 X 1 3 6.56199977E-02 4 X 2 2 7.62199983E-02 X 2 3 9.66999978E-02 X 1 4 1.55880004E-01 1 X 1 5 1.55880004E-01 3 X 1 6 1.55880004E-01 2 X 1 7 1.55880004E-01 6 X 1 8 1.55880004E-01 5 X 1 9 1.55880004E-01 8 X 1 10 1.55880004E-01 7 X 1 11 1.55880004E-01 4 X 2 4 1.57049999E-01 X 1 16 1.57120004E-01 1 X 2 5 1.57199994E-01 X 2 10 1.57199994E-01 X 2 9 1.62190005E-01 X 2 7 1.57199994E-01 X 1 18 1.57199994E-01 3 X 2 11 1.62190005E-01 X 1 14 1.62190005E-01 7 X 2 6 1.62190005E-01 X 1 13 1.57199994E-01 6 X 2 8 1.62190005E-01 X 2 16 1.62190005E-01 X 1 15 1.62190005E-01 8 X 1 19 1.62190005E-01 4 X 1 17 1.62499994E-01 1 X 2 18 1.62499994E-01 X 1 12 1.62499994E-01 5 X 2 13 1.62499994E-01 X 1 25 1.62499994E-01 2 X 2 14 1.62499994E-01 X 1 26 1.62499994E-01 3 X 1 22 1.62499994E-01 7 X 2 15 1.62499994E-01 X 2 19 1.62499994E-01 X 2 22 1.67710006E-01 X 1 23 1.67710006E-01 8 X 1 27 1.62499994E-01 4 X 1 21 1.67710006E-01 6 X 2 17 1.62499994E-01 X 2 12 1.67710006E-01 X 1 24 1.67710006E-01 1 X 1 32 1.67710006E-01 7 X 2 23 1.68029994E-01 X 1 20 1.68029994E-01 5 X 1 31 1.68029994E-01 8 X 2 21 1.68029994E-01 X 2 31 1.68029994E-01 X 1 29 1.68029994E-01 6 X 1 40 1.68029994E-01 8 X 2 40 1.68029994E-01 X 2 20 1.73130006E-01 X 1 33 1.73130006E-01 8 X 1 28 1.73449993E-01 5 X 2 28 1.74300000E-01 X 1 36 1.74549997E-01 5 X 2 27 1.74549997E-01 X 1 35 1.74549997E-01 4 X 2 35 1.74549997E-01 X 1 37 1.74549997E-01 4 X 2 32 1.74549997E-01 X 1 30 1.74549997E-01 7 X 2 24 1.74549997E-01 X 1 34 1.74549997E-01 1 X 2 29 3.68050009E-01 X 1 38 3.68050009E-01 6 X 2 25 3.68050009E-01 X 2 38 3.68050009E-01 X 1 39 3.68050009E-01 2 X 2 39 3.68050009E-01 X 2 36 4.93369997E-01 X 2 33 7.53820002E-01 X 2 34 7.53820002E-01 X 2 37 9.19709980E-01 X 2 26 9.19709980E-01 X 2 30 9.45649981E-01 X 1 41 9.45649981E-01 1 X 2 41 9.45649981E-01 X END_OF_FILE if test 5520 -ne `wc -c <'TRACE/trace.eth'`; then echo shar: \"'TRACE/trace.eth'\" unpacked with wrong size! fi # end of 'TRACE/trace.eth' fi if test -f 'TRACE/trace.simple' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.simple'\" else echo shar: Extracting \"'TRACE/trace.simple'\" \(1365 characters\) sed "s/^X//" >'TRACE/trace.simple' <<'END_OF_FILE' X 8 X 0 1 0 1 11 X @ X 0 2 0 1 11 X @ X 0 3 0 1 11 X @ X 0 4 0 1 11 X @ X 0 5 0 1 11 X @ X 0 6 0 1 11 X @ X 0 7 0 1 11 X @ X 0 8 0 1 11 X @ X 0 9 0 1 11 X @ X 0 10 0 1 11 X @ X 0 11 10 0 X @ X 1 1 3.80599983E-02 2 X 1 2 3.80599983E-02 3 X 1 3 3.89599986E-02 4 X 1 5 3.89599986E-02 6 X 1 4 3.80599983E-02 5 X 1 8 3.80599983E-02 1 X 1 6 4.01999988E-02 7 X 1 7 3.93400006E-02 8 X 2 1 4.01999988E-02 X 2 2 3.93400006E-02 X 2 4 3.89599986E-02 X 2 8 4.01999988E-02 X 2 5 3.93400006E-02 X 1 9 3.93400006E-02 5 X 2 3 4.01999988E-02 X 1 10 3.93400006E-02 6 X 2 9 4.01999988E-02 X 2 10 4.01999988E-02 X 2 7 4.01999988E-02 X 2 6 4.01999988E-02 X 1 11 4.01999988E-02 6 X 2 11 4.01999988E-02 END_OF_FILE if test 1365 -ne `wc -c <'TRACE/trace.simple'`; then echo shar: \"'TRACE/trace.simple'\" unpacked with wrong size! fi # end of 'TRACE/trace.simple' fi if test -f 'TRACE/trace.tsnew' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.tsnew'\" else echo shar: Extracting \"'TRACE/trace.tsnew'\" \(4698 characters\) sed "s/^X//" >'TRACE/trace.tsnew' <<'END_OF_FILE' X8 X 0 1 0 7 2 3 4 5 6 7 8 X stuff1 X 0 2 1 1 9 X stuff2 X 0 3 1 1 16 X stuff2 X 0 4 1 1 22 X stuff2 X 0 5 1 1 27 X stuff2 X 0 6 1 1 31 X stuff2 X 0 7 1 1 34 X stuff2 X 0 8 1 1 36 X stuff2 X 0 9 1 6 10 11 12 13 14 15 X stuff1 X 0 10 1 1 16 X stuff2 X 0 11 1 1 22 X stuff2 X 0 12 1 1 27 X stuff2 X 0 13 1 1 31 X stuff2 X 0 14 1 1 34 X stuff2 X 0 15 1 1 36 X stuff2 X 0 16 2 5 17 18 19 20 21 X stuff1 X 0 17 1 1 22 X stuff2 X 0 18 1 1 27 X stuff2 X 0 19 1 1 31 X stuff2 X 0 20 1 1 34 X stuff2 X 0 21 1 1 36 X stuff2 X 0 22 3 4 23 24 25 26 X stuff1 X 0 23 1 1 27 X stuff2 X 0 24 1 1 31 X stuff2 X 0 25 1 1 34 X stuff2 X 0 26 1 1 36 X stuff2 X 0 27 4 3 28 29 30 X stuff1 X 0 28 1 1 31 X stuff2 X 0 29 1 1 34 X stuff2 X 0 30 1 1 36 X stuff2 X 0 31 5 2 32 33 X stuff1 X 0 32 1 1 34 X stuff2 X 0 33 1 1 36 X stuff2 X 0 34 6 1 35 X stuff1 X 0 35 1 1 36 X stuff2 X 0 36 7 0 X stuff1 X 1 1 4.92299981E-02 2 X 2 1 5.13899997E-02 X 1 2 5.30899987E-02 4 X 1 3 5.43799996E-02 7 X 1 4 5.45700006E-02 5 X 1 5 5.43799996E-02 3 X 1 6 5.35000004E-02 8 X 1 7 5.35000004E-02 1 X 1 8 5.43799996E-02 6 X 2 2 5.35000004E-02 X 2 7 5.35000004E-02 X 1 9 5.43799996E-02 2 X 2 6 5.43799996E-02 X 2 5 5.43799996E-02 X 2 9 5.43799996E-02 X 2 8 5.45700006E-02 X 2 3 5.45700006E-02 X 1 10 5.45700006E-02 4 X 1 11 5.45700006E-02 1 X 1 12 5.45700006E-02 3 X 2 10 5.45700006E-02 X 2 4 5.45700006E-02 X 2 12 5.45700006E-02 X 1 13 5.45700006E-02 2 X 1 14 5.45700006E-02 3 X 2 11 5.45700006E-02 X 2 13 5.47900014E-02 X 1 15 5.53199984E-02 8 X 2 14 5.53199984E-02 X 1 16 5.53199984E-02 1 X 2 16 5.53199984E-02 X 2 15 5.61500005E-02 X 1 17 5.63200004E-02 5 X 1 18 5.63200004E-02 3 X 1 19 5.63200004E-02 7 X 1 20 5.61500005E-02 4 X 1 21 5.63200004E-02 2 X 2 20 5.63200004E-02 X 2 19 5.63200004E-02 X 2 18 5.63200004E-02 X 2 21 5.63200004E-02 X 2 17 5.63200004E-02 X 1 22 5.63200004E-02 6 X 2 22 5.63200004E-02 X 1 23 6.16700016E-02 7 X 1 24 6.16700016E-02 2 X 1 25 6.16700016E-02 5 X 1 26 6.16700016E-02 8 X 2 23 6.16700016E-02 X 2 24 6.25000000E-02 X 2 26 6.25000000E-02 X 1 27 6.25000000E-02 4 X 2 25 6.25000000E-02 X 2 27 6.25000000E-02 X 1 28 6.26799986E-02 6 X 1 29 6.26799986E-02 7 X 1 30 6.26799986E-02 1 X 2 30 6.26799986E-02 X 2 28 6.26799986E-02 X 2 29 6.26799986E-02 X 1 31 6.59800023E-02 8 X 2 31 6.69900030E-02 X 1 32 6.72399998E-02 6 X 1 33 6.72399998E-02 3 X 2 33 6.72399998E-02 X 2 32 6.72399998E-02 X 1 34 6.99400008E-02 8 X 2 34 7.07700029E-02 X 1 35 7.09600002E-02 6 X 2 35 7.09600002E-02 X 1 36 7.29900002E-02 8 X 2 36 7.38100037E-02 END_OF_FILE if test 4698 -ne `wc -c <'TRACE/trace.tsnew'`; then echo shar: \"'TRACE/trace.tsnew'\" unpacked with wrong size! fi # end of 'TRACE/trace.tsnew' fi if test -f 'TRACE/trace.tsspawn' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/trace.tsspawn'\" else echo shar: Extracting \"'TRACE/trace.tsspawn'\" \(15953 characters\) sed "s/^X//" >'TRACE/trace.tsspawn' <<'END_OF_FILE' X 8 X 0 1 0 1 2 X stuff1 X 0 2 1 1 3 X stuff1 X 0 3 1 1 4 X stuff1 X 0 4 1 1 5 X stuff1 X 0 5 1 1 6 X stuff1 X 0 6 1 1 7 X stuff1 X 0 7 1 1 8 X stuff1 X 0 8 1 0 X stuff1 X 1 1 3.35600004E-02 2 X 3 1 10 stuff2 X 4 1 10 3.35600004E-02 4 X 3 1 11 stuff2 X 4 1 11 3.95900011E-02 1 X 3 1 12 stuff2 X 3 1 13 stuff2 X 4 1 12 3.95900011E-02 8 X 4 1 13 4.04700004E-02 3 X 3 1 14 stuff2 X 4 1 14 4.03899997E-02 5 X 3 1 15 stuff2 X 4 1 15 3.95900011E-02 7 X 3 1 16 stuff2 X 4 1 16 4.05500010E-02 6 X 5 1 15 4.08000015E-02 X 5 1 13 4.08000015E-02 X 5 1 14 4.08000015E-02 X 5 1 11 4.08000015E-02 X 5 1 10 4.08000015E-02 X 5 1 12 4.08000015E-02 X 6 1 4.08000015E-02 X 5 1 16 4.08000015E-02 X 1 1 4.08000015E-02 2 X 3 1 17 stuff3 X 4 1 17 4.08000015E-02 5 X 3 1 18 stuff3 X 4 1 18 4.08000015E-02 7 X 3 1 19 stuff3 X 4 1 19 4.08000015E-02 3 X 3 1 20 stuff3 X 4 1 20 4.83300015E-02 4 X 3 1 21 stuff3 X 5 1 17 4.91599999E-02 X 4 1 21 4.83300015E-02 8 X 3 1 22 stuff3 X 3 1 23 stuff3 X 5 1 18 4.83300015E-02 X 4 1 22 4.91599999E-02 6 X 4 1 23 4.91599999E-02 1 X 6 1 4.91599999E-02 X 5 1 19 4.91599999E-02 X 5 1 21 4.91599999E-02 X 5 1 20 4.91599999E-02 X 5 1 23 4.91599999E-02 X 5 1 22 4.91599999E-02 X 1 1 4.91599999E-02 3 X 2 1 4.91599999E-02 X 1 2 5.62199987E-02 8 X 3 2 24 stuff2 X 4 2 24 5.62199987E-02 1 X 3 2 25 stuff2 X 4 2 25 5.62199987E-02 2 X 3 2 26 stuff2 X 3 2 27 stuff2 X 4 2 26 5.62199987E-02 4 X 4 2 27 6.00599982E-02 7 X 3 2 28 stuff2 X 5 2 24 5.62199987E-02 X 4 2 28 6.00599982E-02 6 X 3 2 29 stuff2 X 3 2 30 stuff2 X 5 2 25 6.00599982E-02 X 4 2 29 6.00599982E-02 5 X 6 2 6.00599982E-02 X 4 2 30 6.00599982E-02 3 X 5 2 26 6.00599982E-02 X 5 2 27 6.00599982E-02 X 5 2 30 6.00599982E-02 X 5 2 29 6.00599982E-02 X 5 2 28 6.00599982E-02 X 1 2 6.00599982E-02 1 X 3 2 31 stuff3 X 4 2 31 6.00599982E-02 2 X 3 2 32 stuff3 X 4 2 32 6.00599982E-02 4 X 3 2 33 stuff3 X 4 2 33 6.00599982E-02 6 X 3 2 34 stuff3 X 4 2 34 6.82799965E-02 5 X 3 2 35 stuff3 X 5 2 31 6.82799965E-02 X 3 2 36 stuff3 X 4 2 35 6.00599982E-02 3 X 4 2 36 6.82799965E-02 7 X 3 2 37 stuff3 X 5 2 32 6.82799965E-02 X 4 2 37 6.82799965E-02 8 X 6 2 6.82799965E-02 X 5 2 33 6.82799965E-02 X 5 2 35 6.82799965E-02 X 5 2 34 6.82799965E-02 X 5 2 36 6.82799965E-02 X 5 2 37 6.91199973E-02 X 1 2 6.91199973E-02 6 X 2 2 6.91199973E-02 X 1 3 7.16499984E-02 8 X 3 3 38 stuff2 X 3 3 39 stuff2 X 4 3 38 7.16499984E-02 2 X 4 3 39 7.16499984E-02 3 X 3 3 40 stuff2 X 4 3 40 7.16499984E-02 1 X 3 3 41 stuff2 X 3 3 42 stuff2 X 4 3 41 7.16499984E-02 5 X 5 3 38 7.54299983E-02 X 3 3 43 stuff2 X 4 3 42 7.54299983E-02 7 X 4 3 43 7.54299983E-02 6 X 3 3 44 stuff2 X 5 3 39 7.54299983E-02 X 4 3 44 7.54299983E-02 4 X 6 3 7.54299983E-02 X 5 3 40 7.54299983E-02 X 5 3 41 7.54299983E-02 X 5 3 44 7.54299983E-02 X 5 3 42 7.54299983E-02 X 5 3 43 7.54299983E-02 X 1 3 7.54299983E-02 2 X 3 3 45 stuff3 X 4 3 45 7.54299983E-02 3 X 3 3 46 stuff3 X 3 3 47 stuff3 X 4 3 46 8.41099992E-02 1 X 4 3 47 8.45799968E-02 8 X 3 3 48 stuff3 X 5 3 45 8.45799968E-02 X 4 3 48 8.45799968E-02 6 X 3 3 49 stuff3 X 3 3 50 stuff3 X 4 3 49 8.54199976E-02 4 X 5 3 46 8.54199976E-02 X 3 3 51 stuff3 X 4 3 50 8.54199976E-02 5 X 4 3 51 8.54199976E-02 7 X 6 3 8.54199976E-02 X 5 3 47 8.54199976E-02 X 5 3 48 8.54199976E-02 X 5 3 50 8.54199976E-02 X 5 3 51 8.54199976E-02 X 5 3 49 8.54199976E-02 X 1 3 8.54199976E-02 7 X 2 3 8.54199976E-02 X 1 4 8.54199976E-02 3 X 3 4 52 stuff2 X 4 4 52 8.54199976E-02 1 X 3 4 53 stuff2 X 4 4 53 8.54199976E-02 4 X 3 4 54 stuff2 X 3 4 55 stuff2 X 4 4 54 9.65500027E-02 8 X 4 4 55 9.65500027E-02 2 X 3 4 56 stuff2 X 5 4 52 9.65500027E-02 X 4 4 56 9.73799974E-02 5 X 3 4 57 stuff2 X 3 4 58 stuff2 X 5 4 53 9.73799974E-02 X 4 4 57 9.73799974E-02 6 X 4 4 58 9.73799974E-02 7 X 6 4 9.73799974E-02 X 5 4 54 9.73799974E-02 X 5 4 55 9.73799974E-02 X 5 4 56 9.73799974E-02 X 5 4 57 9.73799974E-02 X 5 4 58 9.73799974E-02 X 1 4 9.73799974E-02 4 X 3 4 59 stuff3 X 3 4 60 stuff3 X 4 4 59 9.73799974E-02 6 X 4 4 60 9.73799974E-02 2 X 3 4 61 stuff3 X 4 4 61 9.73799974E-02 1 X 3 4 62 stuff3 X 3 4 63 stuff3 X 4 4 62 9.73799974E-02 3 X 5 4 59 1.02640003E-01 X 4 4 63 1.02640003E-01 7 X 3 4 64 stuff3 X 4 4 64 1.02640003E-01 5 X 3 4 65 stuff3 X 5 4 60 1.03469998E-01 X 4 4 65 1.02640003E-01 8 X 6 4 1.03469998E-01 X 5 4 61 1.02640003E-01 X 5 4 62 1.03469998E-01 X 5 4 63 1.03469998E-01 X 5 4 65 1.03469998E-01 X 5 4 64 1.03469998E-01 X 1 4 1.03469998E-01 3 X 2 4 1.03469998E-01 X 1 5 1.03469998E-01 2 X 3 5 66 stuff2 X 4 5 66 1.03469998E-01 1 X 3 5 67 stuff2 X 4 5 67 1.03469998E-01 7 X 3 5 68 stuff2 X 4 5 68 1.03469998E-01 4 X 3 5 69 stuff2 X 3 5 70 stuff2 X 4 5 69 1.03469998E-01 6 X 5 5 66 1.12910002E-01 X 3 5 71 stuff2 X 4 5 70 1.12070002E-01 3 X 4 5 71 1.12070002E-01 5 X 3 5 72 stuff2 X 5 5 67 1.12070002E-01 X 4 5 72 1.12070002E-01 8 X 6 5 1.12070002E-01 X 5 5 68 1.12070002E-01 X 5 5 69 1.12070002E-01 X 5 5 71 1.12070002E-01 X 5 5 70 1.12070002E-01 X 5 5 72 1.12910002E-01 X 1 5 1.12910002E-01 2 X 3 5 73 stuff3 X 4 5 73 1.12910002E-01 7 X 3 5 74 stuff3 X 3 5 75 stuff3 X 4 5 74 1.12910002E-01 5 X 4 5 75 1.12910002E-01 1 X 3 5 76 stuff3 X 3 5 77 stuff3 X 4 5 76 1.17040001E-01 3 X 5 5 73 1.17870003E-01 X 3 5 78 stuff3 X 4 5 77 1.17040001E-01 4 X 4 5 78 1.17040001E-01 8 X 3 5 79 stuff3 X 5 5 74 1.17040001E-01 X 4 5 79 1.17040001E-01 6 X 6 5 1.17870003E-01 X 5 5 75 1.17870003E-01 X 5 5 76 1.17040001E-01 X 5 5 77 1.17040001E-01 X 5 5 78 1.17870003E-01 X 5 5 79 1.17870003E-01 X 1 5 1.17870003E-01 2 X 2 5 1.17870003E-01 X 1 6 1.17870003E-01 3 X 3 6 80 stuff2 X 4 6 80 1.17870003E-01 6 X 3 6 81 stuff2 X 4 6 81 1.17870003E-01 5 X 3 6 82 stuff2 X 3 6 83 stuff2 X 4 6 82 1.23259999E-01 8 X 4 6 83 1.23259999E-01 4 X 3 6 84 stuff2 X 5 6 80 1.23259999E-01 X 3 6 85 stuff2 X 4 6 84 1.24090001E-01 7 X 3 6 86 stuff2 X 5 6 81 1.24090001E-01 X 4 6 85 1.24090001E-01 2 X 4 6 86 1.24090001E-01 1 X 6 6 1.24090001E-01 X 5 6 82 1.24090001E-01 X 5 6 83 1.26900002E-01 X 5 6 84 1.26900002E-01 X 5 6 86 1.26900002E-01 X 5 6 85 1.26900002E-01 X 1 6 1.26900002E-01 7 X 3 6 87 stuff3 X 4 6 87 1.26900002E-01 6 X 3 6 88 stuff3 X 4 6 88 1.32080004E-01 8 X 3 6 89 stuff3 X 3 6 90 stuff3 X 4 6 89 1.32080004E-01 4 X 4 6 90 1.32929996E-01 5 X 3 6 91 stuff3 X 5 6 87 1.32929996E-01 X 3 6 92 stuff3 X 4 6 91 1.32080004E-01 3 X 3 6 93 stuff3 X 4 6 92 1.32929996E-01 1 X 5 6 88 1.32929996E-01 X 4 6 93 1.32929996E-01 2 X 6 6 1.32929996E-01 X 5 6 89 1.32929996E-01 X 5 6 91 1.32929996E-01 X 5 6 92 1.32929996E-01 X 5 6 93 1.32929996E-01 X 5 6 90 1.32929996E-01 X 1 6 1.32929996E-01 1 X 2 6 1.32929996E-01 X 1 7 1.32929996E-01 3 X 3 7 94 stuff2 X 4 7 94 1.32929996E-01 5 X 3 7 95 stuff2 X 3 7 96 stuff2 X 4 7 95 1.32929996E-01 7 X 4 7 96 1.44769996E-01 6 X 3 7 97 stuff2 X 3 7 98 stuff2 X 4 7 97 1.44769996E-01 8 X 5 7 94 1.45590007E-01 X 3 7 99 stuff2 X 4 7 98 1.44769996E-01 1 X 4 7 99 1.44769996E-01 2 X 3 7 100 stuff2 X 5 7 95 1.45590007E-01 X 6 7 1.45590007E-01 X 4 7 100 1.45590007E-01 4 X 5 7 96 1.45590007E-01 X 5 7 97 1.45590007E-01 X 5 7 98 1.45590007E-01 X 5 7 99 1.45590007E-01 X 5 7 100 1.45590007E-01 X 1 7 1.45590007E-01 5 X 3 7 101 stuff3 X 4 7 101 1.45590007E-01 2 X 3 7 102 stuff3 X 4 7 102 1.45590007E-01 3 X 3 7 103 stuff3 X 3 7 104 stuff3 X 4 7 103 1.52769998E-01 6 X 4 7 104 1.52769998E-01 8 X 3 7 105 stuff3 X 5 7 101 1.53600007E-01 X 3 7 106 stuff3 X 4 7 105 1.53600007E-01 1 X 3 7 107 stuff3 X 4 7 106 1.52769998E-01 7 X 5 7 102 1.53600007E-01 X 6 7 1.53600007E-01 X 4 7 107 1.53600007E-01 4 X 5 7 103 1.52769998E-01 X 5 7 104 1.53600007E-01 X 5 7 106 1.53600007E-01 X 5 7 107 1.53600007E-01 X 5 7 105 1.53600007E-01 X 1 7 1.53600007E-01 4 X 2 7 1.53600007E-01 X 1 8 1.53600007E-01 6 X 3 8 108 stuff2 X 3 8 109 stuff2 X 4 8 108 1.53600007E-01 2 X 4 8 109 1.53600007E-01 4 X 3 8 110 stuff2 X 3 8 111 stuff2 X 4 8 110 1.59970000E-01 3 X 3 8 112 stuff2 X 4 8 111 1.59970000E-01 8 X 5 8 108 1.59970000E-01 X 4 8 112 1.59970000E-01 7 X 3 8 113 stuff2 X 3 8 114 stuff2 X 4 8 113 1.60799995E-01 5 X 5 8 109 1.60799995E-01 X 6 8 1.60799995E-01 X 4 8 114 1.60799995E-01 1 X 5 8 110 1.59970000E-01 X 5 8 111 1.60799995E-01 X 5 8 112 1.60799995E-01 X 5 8 113 1.60799995E-01 X 5 8 114 1.60799995E-01 X 1 8 1.65560007E-01 3 X 3 8 115 stuff3 X 4 8 115 1.65560007E-01 2 X 3 8 116 stuff3 X 3 8 117 stuff3 X 4 8 116 1.68170005E-01 8 X 4 8 117 1.69019997E-01 7 X 3 8 118 stuff3 X 4 8 118 1.68170005E-01 4 X 3 8 119 stuff3 X 5 8 115 1.68170005E-01 X 3 8 120 stuff3 X 4 8 119 1.69019997E-01 5 X 4 8 120 1.69019997E-01 1 X 3 8 121 stuff3 X 5 8 116 1.69019997E-01 X 4 8 121 1.69019997E-01 6 X 6 8 1.69019997E-01 X 5 8 118 1.69019997E-01 X 5 8 121 1.69019997E-01 X 5 8 117 1.69019997E-01 X 5 8 120 1.69019997E-01 X 5 8 119 1.69019997E-01 X 1 8 1.69019997E-01 6 X 2 8 1.69019997E-01 END_OF_FILE if test 15953 -ne `wc -c <'TRACE/trace.tsspawn'`; then echo shar: \"'TRACE/trace.tsspawn'\" unpacked with wrong size! fi # end of 'TRACE/trace.tsspawn' fi if test -f 'TRACE/SUNVIEW/color_stuff.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/color_stuff.c'\" else echo shar: Extracting \"'TRACE/SUNVIEW/color_stuff.c'\" \(1967 characters\) sed "s/^X//" >'TRACE/SUNVIEW/color_stuff.c' <<'END_OF_FILE' X/* This program prepares the colors in a pixwin. */ X/* Richard Keene, SUN Microsystems, Rochester N.Y. office */ X/* Modified by Orlie Brewer, ANL, Argonne, IL */ X X#include "sched.trace.h" X static int color_array_set = 0; /* flag to show the array is initialized */ unsigned char red[NUM_COLORS],green[NUM_COLORS],blue[NUM_COLORS]; X set_colormap() X{ X X if(color_array_set) X return; X X red[8] = 255; X green[8] = 255; X blue[8] = 255; X my_color_map[WHITE] = 8; X X red[0] = 170; X green[0] = 220; X blue[0] = 255; X my_color_map[BACKGROUND] = 0; X X /* red */ X red[RED] = 255; X green[RED] = 150; X blue[RED] = 150; X my_color_map[RED] = RED; X X /* green */ X red[GREEN] = 0; X green[GREEN] = 255; X blue[GREEN] = 150; X my_color_map[GREEN] = GREEN; X X /* blue */ X red[BLUE] = 0; X green[BLUE] = 0; X blue[BLUE] = 255; X my_color_map[BLUE] = BLUE; X X /* yellow */ X red[YELLOW] = 255; X green[YELLOW] = 255; X blue[YELLOW] = 160; X my_color_map[YELLOW] = YELLOW; X X /* turquoise sic? */ X red[TURQUOISE] = 0; X green[TURQUOISE] = 255; X blue[TURQUOISE] = 255; X my_color_map[TURQUOISE] = TURQUOISE; X X /* magenta (purple) */ X red[MAGENTA] = 255; X green[MAGENTA] = 0; X blue[MAGENTA] = 255; X my_color_map[MAGENTA] = MAGENTA; X X /* black foreground */ X red[BLACK] = 0; X green[BLACK] = 0; X blue[BLACK] = 0; X my_color_map[BLACK] = BLACK; X X color_array_set = 1; X} X set_pw_map(pw, name) X Pixwin *pw; X char *name; X{ X X set_colormap(); X pw_setcmsname(pw,name); X pw_putcolormap(pw,0,NUM_COLORS,red,green,blue); X} X X /* This routine returns a colored button image */ struct pixrect *color_button(pr,color) X struct pixrect *pr; X int color; X{ X struct pixrect *color_pr; X X if(pr == NULL) X return(NULL); X X /* make new pixrect */ X color_pr = mem_create(pr->pr_size.x, pr->pr_size.y, 8); X X /* copy pr to color_pr with color added */ X pr_rop(color_pr, 0, 0, pr->pr_size.x, pr->pr_size.y, X PIX_SRC | PIX_COLOR(color), pr, 0, 0); X X return(color_pr); X} END_OF_FILE if test 1967 -ne `wc -c <'TRACE/SUNVIEW/color_stuff.c'`; then echo shar: \"'TRACE/SUNVIEW/color_stuff.c'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/color_stuff.c' fi if test -f 'TRACE/SUNVIEW/main.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/main.c'\" else echo shar: Extracting \"'TRACE/SUNVIEW/main.c'\" \(1314 characters\) sed "s/^X//" >'TRACE/SUNVIEW/main.c' <<'END_OF_FILE' X#include "sched.trace.h" X main(argc,argv) int argc; char **argv; X{ X if (argc == 1) X { X window_init(); X program_init(); X sunloop(); X } X else X { X printf("No graphics.\n"); X exit(1); X } X} X program_init() X{ X XOFFSET = 20; X YOFFSET = 50; X XSIZE = 40; X YSIZE = 20; X DYNZONE = 60; X forward = TRUE; X event_list = (struct event *) malloc(sizeof(struct event)); X trailer_event = (struct event *) malloc(sizeof(struct event)); X event_list->previous_event = NULL_PTR; X event_list->next_event = trailer_event; X trailer_event->previous_event = event_list; X trailer_event->next_event = NULL_PTR; X trailer_event->time = 1.0e+60; /* Used for sorting events by time. */ X file_table[0] = NULL; X directory_table[0] = NULL; X load_tables(); X} X sunloop() X{ X pw_text(pw, 15, 150, PIX_SRC, 0, X "Hello, this is a graphics tool to trace the execution of programs that used SCHEDULE."); X pw_text(pw, 15, 170, PIX_SRC, 0, X "Select your file, click LOAD, and then click GO or STEP."); X pw_text(pw, 15, 190, PIX_SRC, 0, X "If you choose GO, you may stop execution at any time by clicking STOP or STEP."); X pw_text(pw, 15, 210, PIX_SRC, 0, X "You may then step through the execution by using STEP or continue execution by clicking GO."); X X window_main_loop(frame); X} X END_OF_FILE if test 1314 -ne `wc -c <'TRACE/SUNVIEW/main.c'`; then echo shar: \"'TRACE/SUNVIEW/main.c'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/main.c' fi if test -f 'TRACE/SUNVIEW/makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/makefile'\" else echo shar: Extracting \"'TRACE/SUNVIEW/makefile'\" \(2379 characters\) sed "s/^X//" >'TRACE/SUNVIEW/makefile' <<'END_OF_FILE' X# CFLAGS = -g -DSUNVIEW -I./../src LFLAGS = X# OBJS = main.o \ X active.o \ X assign_xy.o \ X atlevel.o \ X build_levels.o \ X c_time.o \ X color_stuff.o \ X drawing.o \ X draw_level.o \ X draw_path.o \ X draw_subtree.o \ X dumps.o \ X events.o \ X find_parents.o \ X get_path_len.o \ X legend.o \ X load.o \ X new_tree.o \ X open_tracefi.o \ X pathes.o \ X procs.o \ X rebuild.o \ X searches.o \ X wd_drawing.o \ X window_init.o LIBS = -lsuntool -lsunwindow -lpixrect -lm X# sched.trace: $(OBJS) X cc $(CFLAGS) $(LFLAGS) -o sched.trace $(OBJS) $(LIBS) X# clean: X rm -f *.o *~ X# main.o: main.c X cc $(CFLAGS) -c main.c active.o: ./../src/active.c X cc $(CFLAGS) -c ./../src/active.c assign_xy.o: ./../src/assign_xy.c X cc $(CFLAGS) -c ./../src/assign_xy.c atlevel.o: ./../src/atlevel.c X cc $(CFLAGS) -c ./../src/atlevel.c build_levels.o: ./../src/build_levels.c X cc $(CFLAGS) -c ./../src/build_levels.c c_time.o: ./../src/c_time.c X cc $(CFLAGS) -c ./../src/c_time.c color_stuff.o: color_stuff.c X cc $(CFLAGS) -c color_stuff.c drawing.o: ./../src/drawing.c X cc $(CFLAGS) -c ./../src/drawing.c draw_level.o: ./../src/draw_level.c X cc $(CFLAGS) -c ./../src/draw_level.c draw_subtree.o: ./../src/draw_subtree.c X cc $(CFLAGS) -c ./../src/draw_subtree.c draw_path.o: ./../src/draw_path.c X cc $(CFLAGS) -c ./../src/draw_path.c dumps.o: ./../src/dumps.c X cc $(CFLAGS) -c ./../src/dumps.c events.o: ./../src/events.c X cc $(CFLAGS) -c ./../src/events.c find_parents.o: ./../src/find_parents.c X cc $(CFLAGS) -c ./../src/find_parents.c get_path_len.o: ./../src/get_path_len.c X cc $(CFLAGS) -c ./../src/get_path_len.c legend.o: ./../src/legend.c X cc $(CFLAGS) -c ./../src/legend.c load.o: ./../src/load.c X cc $(CFLAGS) -c ./../src/load.c new_tree.o: ./../src/new_tree.c X cc $(CFLAGS) -c ./../src/new_tree.c open_tracefi.o: ./../src/open_tracefi.c X cc $(CFLAGS) -c ./../src/open_tracefi.c pathes.o: ./../src/pathes.c X cc $(CFLAGS) -c ./../src/pathes.c procs.o: procs.c X cc $(CFLAGS) -c procs.c rebuild.o: ./../src/rebuild.c X cc $(CFLAGS) -c ./../src/rebuild.c searches.o: ./../src/searches.c X cc $(CFLAGS) -c ./../src/searches.c wd_drawing.o: wd_drawing.c X cc $(CFLAGS) -c wd_drawing.c window_init.o: window_init.c X cc $(CFLAGS) -c window_init.c X# X#.c.o: X# cc $(CFLAGS) -c $*.c X# END_OF_FILE if test 2379 -ne `wc -c <'TRACE/SUNVIEW/makefile'`; then echo shar: \"'TRACE/SUNVIEW/makefile'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/makefile' fi if test -f 'TRACE/SUNVIEW/procs.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/procs.c'\" else echo shar: Extracting \"'TRACE/SUNVIEW/procs.c'\" \(7679 characters\) sed "s/^X//" >'TRACE/SUNVIEW/procs.c' <<'END_OF_FILE' X#include "sched.trace.h" X extern Notify_error notify_dispatch(); extern int errno; X void load_notify_proc(item,event) Panel_item item; XEvent *event; X{ X open_tracefile(file_table[ft_index]); X} X void go_notify_proc(item,event) Panel_item item; XEvent *event; X{ X char msg[50]; X if (file_loaded) X if (nodraw) X { X sprintf(msg, "Skipping forward to %d.",start_draw_mark); X display_message(msg); X } X else X { X display_message("Processing events."); X go = TRUE; X while (go) X { X proc_event(); X if (button_hit()) go = FALSE; X } X } X else X display_message("You have to select a file first."); X} X button_hit() X X{ X return ((int) window_get(panel, WIN_EVENT_STATE, MS_LEFT)); X} X void stop_notify_proc(item,event) Panel_item item; XEvent *event; X{ X go = FALSE; X} X void step_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (file_loaded) X { X go = FALSE; X display_message("Stepping through one event."); X proc_event(); X } X else X display_message("You have to select a file first."); X} X void quit_notify_proc(item,event) Panel_item item; XEvent *event; X{ X window_set(frame, FRAME_NO_CONFIRM, FALSE, 0); X done = window_destroy(frame); X if (!done) X { X window_return(NOTIFY_DONE); X } X else X { X window_set(histogram_frame, FRAME_NO_CONFIRM, TRUE, 0); X window_set(processor_frame, FRAME_NO_CONFIRM, TRUE, 0); X window_destroy(histogram_frame); X window_destroy(processor_frame); X } X} X void direction_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (forward) X { X forward = FALSE; X panel_set(direction_button, PANEL_LABEL_IMAGE, X panel_button_image(panel, "Backward", 0, NULL), X 0); X panel_set(directiontext, PANEL_LABEL_STRING, X "Direction : backward", X 0); X current_event = current_event->next_event; X } X else X { X forward = TRUE; X panel_set(direction_button, PANEL_LABEL_IMAGE, X panel_button_image(panel, "Forward ", 0, NULL), X 0); X panel_set(directiontext, PANEL_LABEL_STRING, X "Direction : forward", X 0); X current_event = current_event->previous_event; X } X} X void full_notify_proc(item,event) Panel_item item; XEvent *event; X{ X size_factor = 1 + size_factor; X if ( size_factor > 2 ) size_factor = 1; X} X void timing_notify_proc(item,event) Panel_item item; XEvent *event; X{ X time_flag = TRUE; X proc_event(); X} X void subtree_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (file_loaded) X { X if (CURRENT_NODE != -1) X { X ++DEPTH; X draw_subtree(); X } X } X else X display_message("You have to select a file first."); X} X void c_time_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (file_loaded) X c_time(event); X else X display_message("You have to select a file first."); X} X void name_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (file_loaded) X create_names_menu(event); X else X display_message("You have to select a file first."); X} X void contrast_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (fb_depth == 1) X { X if (screen_toggle) X { X screen_toggle = FALSE; X pw_blackonwhite (pw, 0, 1); X } X else X { X screen_toggle = TRUE; X pw_whiteonblack (pw, 0, 1); X } X if (file_loaded) redraw_all(); X } X} X void redraw_notify_proc(item,event) Panel_item item; XEvent *event; X{ X if (file_loaded) X redraw_all(); X else X display_message("You have to select a file first."); X} X void t_speed_notify_proc(item,value,event) Panel_item item; int value; XEvent *event; X{ X t_speed = value; X} X void e_speed_notify_proc(item,value,event) Panel_item item; int value; XEvent *event; X{ X e_speed = value; X} X void count_notify_proc(item,value,event) Panel_item item; int value; XEvent *event; X{ X/* X if (value < event_count) X { X display_message("can't go backwards yet"); X } X else X { X nodraw = 1; X start_draw_mark = value; X } X*/ X} X void file_notify_proc(item,value,event) Panel_item item; int value; XEvent *event; X{ X static char current_file[150]; X X if (ft_index != value) X { X ft_index = value; X strcpy(current_file, "Trace file: "); X strcpy(current_file + 12, file_table[ft_index]); X panel_set(file_choice,PANEL_LABEL_STRING, current_file, 0); X display_message("File selection changed but not yet loaded."); X } X} X void directory_notify_proc(item,value,event) Panel_item item; int value; XEvent *event; X{ X if (value < enter_new_directory) X { X chdir(directory_table[value]); X load_tables(); X } X/* X else X { X Frame popup_frame; X popup_frame = window_create(frame, FRAME, X WIN_ROWS, 1, X WIN_COLUMNS, 80, X 0); X window_fit(popup_frame); X popup_panel = window_create(popup_frame, PANEL, 0); X panel_text = panel_create_item(popup_panel, PANEL_TEXT, X PANEL_LABEL_STRING, "New directory: ", X 0); X panel_button = panel_create_item(popup_frame, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(popup_panel, "Ready", 0, NULL); X PANEL_NOTIFY_PROC, ready_notify_proc, X 0); X window_set(popup_frame, WIN_SHOW, TRUE, 0); X X } X if (chdir(directory_table[value]) == -1) X printf("chdir failed with error number %d\n", errno); X else X*/ X} X void histogram_notify_proc() X{ X if (HISTOGRAM) X { X HISTOGRAM = FALSE; X window_set(histogram_frame, WIN_SHOW, FALSE, 0); X } X else X { X HISTOGRAM = TRUE; X plot_active(); X } X} X void processor_notify_proc() X{ X show_processor = !((int) window_get(processor_frame, WIN_SHOW)); X window_set(processor_frame, WIN_SHOW, show_processor, 0); X} X void legend_notify_proc() X{ X show_legend = !((int) window_get(legend_frame, WIN_SHOW)); X window_set(legend_frame, WIN_SHOW, show_legend, 0); X} X void screendump_notify_proc() X{ X char command[50]; X X if (fb_depth == 1) X { X display_message("Sending the screen image to the default printer."); X strcpy(command, "screendump | pssun -r -2 | lpr"); X system(command); X display_message("Done."); X } X else X display_message("Unable to dump color screen."); X} X void handle_event(canvas, event, arg) Canvas canvas; XEvent *event; caddr_t arg; X{ X int x, y; X char str[20]; X X x = event_x(event); X y = event_y(event); X switch (event_id(event)) X { X case MS_LEFT : X/* X printf("Left mouse x %d y %d \n",x,y); X*/ X if ( (CURRENT_NODE = node_search(x,y)) != -1 ) X { X sprintf(str,"Current node is %d", X NODE[0][CURRENT_NODE][ID]); X display_node(str); X }; X break; X case MS_MIDDLE : X/* X printf("Middle mouse x %d y %d \n",x,y); X*/ X if ( (CURRENT_NODE = node_search(x,y)) != -1 ) X { X sprintf(str,"Current node is %d", X NODE[0][CURRENT_NODE][ID]); X display_node(str); X }; X break; X case MS_RIGHT : X/* X printf("Right mouse x %d y %d \n",x,y); X*/ X if ( (CURRENT_NODE = node_search(x,y)) != -1 ) X { X sprintf(str,"Current node is %d", X NODE[0][CURRENT_NODE][ID]); X display_node(str); X }; X if (event_is_down(event)) prdata(); X break; X default : X break; X } X} X END_OF_FILE if test 7679 -ne `wc -c <'TRACE/SUNVIEW/procs.c'`; then echo shar: \"'TRACE/SUNVIEW/procs.c'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/procs.c' fi if test -f 'TRACE/SUNVIEW/sched.trace.icon' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/sched.trace.icon'\" else echo shar: Extracting \"'TRACE/SUNVIEW/sched.trace.icon'\" \(1933 characters\) sed "s/^X//" >'TRACE/SUNVIEW/sched.trace.icon' <<'END_OF_FILE' X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16 X */ X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001, X 0x8000,0x0000,0x0000,0x0001,0x80F3,0xC93C,0xE248,0x3C01, X 0x8082,0x0920,0x9248,0x2001,0x80F2,0x0F38,0x9248,0x3801, X 0x8012,0x0920,0x9248,0x2001,0x80F3,0xC93C,0xE3CF,0x3C01, X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001, X 0x8000,0x0000,0x0000,0x0001,0x81F3,0x821E,0x489E,0x0001, X 0x8042,0x4510,0x4C90,0x0001,0x8043,0x8890,0x4A96,0x0001, X 0x8042,0x8F90,0x4992,0x0001,0x8042,0x489E,0x489E,0x0001, X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001, X 0x8000,0x0000,0x0000,0x0001,0x80F0,0x8792,0x09F2,0x2001, X 0x8081,0x4412,0x0841,0x4001,0x80E2,0x2412,0x0840,0x8001, X 0x8083,0xE412,0x0840,0x8001,0x8082,0x2793,0xC840,0x8001, X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001, X 0x8000,0x0000,0x0000,0x0001,0x80FF,0xFFFF,0xFFFF,0xE001, X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001, X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0001,0x8000,0x0001, X 0x8000,0x0001,0x8000,0x0001,0x8000,0x0002,0x4000,0x0001, X 0x8000,0x0004,0x2000,0x0001,0x8000,0x0008,0x1000,0x0001, X 0x8000,0x0010,0x0800,0x0001,0x8000,0x0020,0x0400,0x0001, X 0x8000,0x0040,0x0200,0x0001,0x8000,0x0080,0x0100,0x0001, X 0x8000,0x0100,0x0080,0x0001,0x8000,0x0200,0x0040,0x0001, X 0x8000,0x0C00,0x0030,0x0001,0x8000,0x0C00,0x0030,0x0001, X 0x8000,0x1200,0x0048,0x0001,0x8000,0x1200,0x0048,0x0001, X 0x8000,0x2100,0x0084,0x0001,0x8000,0x2100,0x0084,0x0001, X 0x8000,0x4080,0x0102,0x0001,0x8000,0x4080,0x0102,0x0001, X 0x8000,0x8040,0x0201,0x0001,0x8000,0x8040,0x0201,0x0001, X 0x8003,0x0030,0x0C00,0xC001,0x8003,0x0030,0x0C00,0xC001, X 0x8004,0x8048,0x1201,0x2001,0x8004,0x8048,0x1201,0x2001, X 0x8004,0x8048,0x1201,0x2001,0x8008,0x4084,0x2102,0x1001, X 0x8008,0x4084,0x2102,0x1001,0x8008,0x4084,0x2102,0x1001, X 0x8018,0x6186,0x6186,0x1801,0x8018,0x6186,0x6186,0x1801, X 0x8000,0x0000,0x0000,0x0001,0xFFFF,0xFFFF,0xFFFF,0xFFFF END_OF_FILE if test 1933 -ne `wc -c <'TRACE/SUNVIEW/sched.trace.icon'`; then echo shar: \"'TRACE/SUNVIEW/sched.trace.icon'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/sched.trace.icon' fi if test -f 'TRACE/SUNVIEW/wd_drawing.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/wd_drawing.c'\" else echo shar: Extracting \"'TRACE/SUNVIEW/wd_drawing.c'\" \(5885 characters\) sed "s/^X//" >'TRACE/SUNVIEW/wd_drawing.c' <<'END_OF_FILE' X/* This file contains the window dependent drawing routines. X*/ X#include "sched.trace.h" X point(surface, x, y, color, xormode) Surface surface; int x, y, color, xormode; X{ X int op; X X if (xormode == XOR) X pw_rop(surface, x, y, 1, 1, PIX_SRC ^ PIX_DST | PIX_COLOR(color), X NULL, 0, 0); X else X pw_put(surface, x, y, color); X} X line(surface, x1, y1, x2, y2, color) Surface surface; int x1, y1, x2, y2, color; X{ X pw_vector(surface, x1, y1, x2, y2, PIX_SRC, color); X} X fillcircle(surface, x, y, radius, color, xormode) Surface surface; int x,y, radius, color, xormode; X{ X pw_vector(surface, x, y, x+radius, y+radius, PIX_SRC, color); X} X verline(surface, x, y, ydistance, color, xormode) Surface surface; int x, y, ydistance, color, xormode; X{ X int op; X X op = PIX_SRC; X if (xormode == XOR) X op ^= PIX_DST; X pw_vector(surface, x, y, x, y+ydistance, op, color); X} X horline(surface, x, y, xdistance, color, xormode) Surface surface; int x, y, xdistance, color, xormode; X{ X int op; X X op = PIX_SRC; X if (xormode == XOR) X op ^= PIX_DST; X pw_vector(surface, x, y, x+xdistance, y, op, color); X} X text(surface, x, y, string) Surface surface; int x, y; char *string; X{ X pw_text(surface, x, y, PIX_SRC, 0, string); X} X put_char(surface, x, y, c) Surface surface; int x, y; char c; X{ X pw_char(surface, x, y, PIX_SRC, 0, c); X} X erase(surface, x, y, w, h) Surface surface; int x, y, w, h; X{ X pw_writebackground(surface, x, y, w, h, PIX_CLR); X} X clearscreen(surface, x, y) Surface surface; int x, y; X{ X pw_writebackground(surface, 0, 0, x, y, PIX_CLR); X} X set_directory_menu() X{ X int i; X char current_dir[150]; X panel_set(directory_choice, PANEL_CHOICE_STRINGS, "", 0, 0); X for (i = 0; directory_table[i] != NULL; i++) X panel_set(directory_choice, PANEL_CHOICE_STRING, X i, directory_table[i], 0); X panel_set(directory_choice, PANEL_CHOICE_STRING, X i, "Enter new directory.", 0); X enter_new_directory = i; X strcpy(current_dir, "Directory: "); X getwd(current_dir + 11); X panel_set(directory_choice, PANEL_LABEL_STRING, current_dir, 0); X} X set_file_menu() X{ X int i; X char current_file[150]; X panel_set(file_choice,PANEL_CHOICE_STRINGS, "", 0, 0); X for (i = 0; file_table[i] != NULL; i++) X panel_set(file_choice, PANEL_CHOICE_STRING, i, file_table[i], 0); X ft_index = 0; X if (file_table[ft_index] != NULL) X { X strcpy(current_file, "Trace file: "); X strcpy(current_file + 12, file_table[ft_index]); X panel_set(file_choice,PANEL_LABEL_STRING, current_file, 0); X display_message("Select file & click load."); X } X else X { X strcpy(current_file, "Trace file: "); X strcpy(current_file + 12, ""); X panel_set(file_choice,PANEL_LABEL_STRING, current_file, 0); X display_message("No trace files in the current directory."); X } X} X set_label(item, string) Panel_item item; char *string; X{ X panel_set(item, PANEL_LABEL_STRING, string, 0); X} X display_node(text) X char *text; X{ X panel_set(nodetext, PANEL_LABEL_STRING, text, 0); X} X display_path(text) X char *text; X{ X panel_set(pathtext, PANEL_LABEL_STRING, text, 0); X} X display_message(text) X char *text; X{ X panel_set(msgtext, PANEL_LABEL_STRING, text, 0); X} X update_event_counter(time) float time; X{ X panel_set(count_slider, PANEL_VALUE, ROUND(time), 0); X} X update_active_counter(count) int count; X{ X panel_set(cw_slider, PANEL_VALUE, count, 0); X} X reset_values() X{ X panel_set(directiontext, PANEL_LABEL_STRING, "Direction : forward", 0); X panel_set(direction_button, PANEL_LABEL_IMAGE, X panel_button_image(panel, "Forward ", 0, NULL), X 0); X panel_set(count_slider, PANEL_VALUE, 0, 0); X panel_set(cw_slider, PANEL_VALUE, pending, 0); X panel_set(t_speed_slider, PANEL_VALUE, t_speed, 0); X panel_set(e_speed_slider, PANEL_VALUE, e_speed, 0); X} X plot_active() X{ X X window_set(histogram_frame, WIN_SHOW, TRUE, 0); X scrollbar_scroll_to(v_bar, 300, 0); X scrollbar_scroll_to(h_bar, 395, 0); X plot_active2(); X} X get_text_width(string) char *string; X{ X struct pr_size size; X size = pf_textwidth(strlen(string), pf_default(), string); X return(size.x); X} X get_text_height() X{ X int height; X struct pixfont *pf; X pf = pf_default(); X height = (pf->pf_defaultsize.y)/2; X pf_close(pf); X return(height); X} X create_path_menu(event) XEvent *event; X{ X int i, path_number; X struct critical_path *cp_ptr; X i = 0; X path_menu = menu_create(0); X cp_ptr = c_path; X while (cp_ptr != NULL_PTR) X { X char *string; X string = (char *) malloc(80); X sprintf (string, X "Time = %f, Leaf node = %d.", X cp_ptr->time, X NODE[0][cp_ptr->path->index][ID]); X menu_set(path_menu, MENU_STRING_ITEM, string, ++i, 0); X cp_ptr = cp_ptr->next_path; X } X path_number = (int) menu_show(path_menu, panel, event, 0); X return(path_number); X} X create_names_menu(event) XEvent *event; X{ X int i, j; X Menu name_menu, dyname_menus[MAXNODES]; X X name_menu = menu_create(0); X for (i = 0; i < HINOD; i++) X { X char *string; X string = (char *) malloc(80); X sprintf (string, X "Node # %d = %s.", X NODE[0][i][ID], X &NAMES[i][0][0]); X menu_set(name_menu, MENU_STRING_ITEM, string, i+1, 0); X if (DYNNODE[i][0][0] > 1) X { X dyname_menus[i] = menu_create(0); X menu_set(menu_get(name_menu, MENU_NTH_ITEM, i+1), X MENU_PULLRIGHT, dyname_menus[i], 0); X for (j = 1; j < DYNNODE[i][0][0]; j++) X { X string = (char *) malloc(80); X sprintf (string, X "Dynamic node # %d = %s.", X DYNNODE[i][j][ID], X &NAMES[i][j][0]); X menu_set(dyname_menus[i], MENU_STRING_ITEM, string, j, 0); X } X } X } X menu_show(name_menu, panel, event, 0); X} END_OF_FILE if test 5885 -ne `wc -c <'TRACE/SUNVIEW/wd_drawing.c'`; then echo shar: \"'TRACE/SUNVIEW/wd_drawing.c'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/wd_drawing.c' fi if test -f 'TRACE/SUNVIEW/window_init.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/SUNVIEW/window_init.c'\" else echo shar: Extracting \"'TRACE/SUNVIEW/window_init.c'\" \(12363 characters\) sed "s/^X//" >'TRACE/SUNVIEW/window_init.c' <<'END_OF_FILE' X#include "sched.trace.h" X extern void load_notify_proc(), X go_notify_proc(), X step_notify_proc(), X stop_notify_proc(), X direction_notify_proc(), X full_notify_proc(), X timing_notify_proc(), X subtree_notify_proc(), X prepath_notify_proc(), X c_time_notify_proc(), X name_notify_proc(), X path_notify_proc(), X redraw_notify_proc(), X histogram_notify_proc(), X contrast_notify_proc(), X processor_notify_proc(), X legend_notify_proc(), X screendump_notify_proc(), X quit_notify_proc(), X e_speed_notify_proc(), X t_speed_notify_proc(), X count_notify_proc(), X directory_notify_proc(), X file_notify_proc(), X handle_event(); X static short icon_image[] = X{ X#include "sched.trace.icon" X}; X DEFINE_ICON_FROM_IMAGE (sched_trace_icon, icon_image); X window_init() X { X X Pixwin *panel_pw; X int i, height, yoffset; X struct pixfont *title_font, *pf; X X frame = window_create(NULL, FRAME, X WIN_ROWS, 45, X WIN_COLUMNS, 95, X FRAME_ICON, &sched_trace_icon, X WIN_X, 200, X WIN_Y, 170, X 0); X panel = window_create(frame, PANEL, X WIN_PERCENT_HEIGHT, 30, X 0); X if (((Pixwin *) window_get(panel, WIN_PIXWIN))->pw_pixrect->pr_depth > 1) X { X panel_pw = (Pixwin *) window_get(panel, WIN_PIXWIN); X set_pw_map(panel_pw, "Panel_color_map"); X } X histogram_frame = window_create(NULL, FRAME, X WIN_ROWS, 11, X WIN_COLUMNS, 60, X WIN_X, 0, X WIN_Y, 0, X 0); X processor_frame = window_create(NULL, FRAME, X WIN_ROWS, 8, X WIN_COLUMNS, 60, X WIN_X, 500, X WIN_Y, 0, X 0); X legend_frame = window_create(frame, FRAME, X WIN_ROWS, 11, X WIN_COLUMNS, 50, X WIN_X, 550, X WIN_Y, 550, X 0); X window_fit(histogram_frame); X window_fit(processor_frame); X window_fit(legend_frame); X title_font = pf_open("/usr/lib/fonts/fixedwidthfonts/gallant.r.19"); X title = panel_create_item(panel, PANEL_MESSAGE, X PANEL_ITEM_X, ATTR_COL(23), X PANEL_ITEM_Y, ATTR_ROW(0), X PANEL_LABEL_STRING, "Schedule Tracing Facility", X PANEL_LABEL_FONT, title_font, X 0); X directory_choice = panel_create_item(panel, PANEL_CHOICE, X PANEL_ITEM_X, ATTR_COL(1), X PANEL_ITEM_Y, ATTR_ROW(1), X PANEL_LABEL_STRING, "Directory: ", X PANEL_DISPLAY_LEVEL, PANEL_NONE, X PANEL_NOTIFY_PROC, directory_notify_proc, X 0); X file_choice = panel_create_item(panel, PANEL_CHOICE, X PANEL_ITEM_X, ATTR_COL(1), X PANEL_ITEM_Y, ATTR_ROW(2), X PANEL_LABEL_STRING, "Trace file: ", X PANEL_DISPLAY_LEVEL, PANEL_NONE, X PANEL_NOTIFY_PROC, file_notify_proc, X 0); X count_slider = panel_create_item(panel, PANEL_SLIDER, X PANEL_ITEM_X, ATTR_COL(5), X PANEL_ITEM_Y, ATTR_ROW(3), X PANEL_VALUE, 0, X PANEL_MIN_VALUE, 0, X PANEL_MAX_VALUE, 100, X PANEL_SLIDER_WIDTH, 400, X PANEL_SHOW_RANGE, TRUE, X PANEL_SHOW_VALUE, TRUE, X PANEL_LABEL_STRING, "Time ", X PANEL_NOTIFY_PROC, count_notify_proc, X 0); X cw_slider = panel_create_item(panel, PANEL_SLIDER, X PANEL_ITEM_X, ATTR_COL(5), X PANEL_ITEM_Y, ATTR_ROW(4), X PANEL_VALUE, 0, X PANEL_MIN_VALUE, 0, X PANEL_MAX_VALUE, 100, X PANEL_SLIDER_WIDTH, 400, X PANEL_SHOW_RANGE, FALSE, X PANEL_SHOW_VALUE, TRUE, X PANEL_LABEL_STRING, "Active Processes", X 0); X t_speed_slider = panel_create_item(panel, PANEL_SLIDER, X PANEL_ITEM_X, ATTR_COL(5), X PANEL_ITEM_Y, ATTR_ROW(5), X PANEL_VALUE, 100, X PANEL_MIN_VALUE, 0, X PANEL_MAX_VALUE, 100, X PANEL_SLIDER_WIDTH, 400, X PANEL_SHOW_RANGE, TRUE, X PANEL_SHOW_VALUE, TRUE, X PANEL_LABEL_STRING, "Timing Speed", X PANEL_NOTIFY_PROC, t_speed_notify_proc, X 0); X e_speed_slider = panel_create_item(panel, PANEL_SLIDER, X PANEL_ITEM_X, ATTR_COL(5), X PANEL_ITEM_Y, ATTR_ROW(6), X PANEL_VALUE, 100, X PANEL_MIN_VALUE, 0, X PANEL_MAX_VALUE, 100, X PANEL_SLIDER_WIDTH, 400, X PANEL_SHOW_RANGE, TRUE, X PANEL_SHOW_VALUE, TRUE, X PANEL_LABEL_STRING, "Event Speed", X PANEL_NOTIFY_PROC, e_speed_notify_proc, X 0); X window_set(panel, PANEL_ITEM_X_GAP, 5, 0); X load_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_ITEM_X, ATTR_COL(1), X PANEL_ITEM_Y, ATTR_ROW(7), X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Load",0,NULL), X PANEL_NOTIFY_PROC, load_notify_proc, X 0); X go_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Go",0,NULL), X PANEL_NOTIFY_PROC, go_notify_proc, X 0); X stop_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Stop",0,NULL), X PANEL_NOTIFY_PROC, stop_notify_proc, X 0); X direction_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel, "Forward ", 0, NULL), X PANEL_NOTIFY_PROC, direction_notify_proc, X 0); X step_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Step",0,NULL), X PANEL_NOTIFY_PROC, step_notify_proc, X 0); X full_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Full",0,NULL), X PANEL_NOTIFY_PROC, full_notify_proc, X 0); X c_time_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Critical time",0,NULL), X PANEL_NOTIFY_PROC, c_time_notify_proc, X 0); X name_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Process name",0,NULL), X PANEL_NOTIFY_PROC, name_notify_proc, X 0); X quit_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_ITEM_X, ATTR_COL(85), X PANEL_ITEM_Y, ATTR_ROW(7), X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Quit",0,NULL), X PANEL_NOTIFY_PROC, quit_notify_proc, X 0); X subtree_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_ITEM_X, ATTR_COL(1), X PANEL_ITEM_Y, ATTR_ROW(8), X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Subtree",0,NULL), X PANEL_NOTIFY_PROC, subtree_notify_proc, X 0); X redraw_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Redraw",0,NULL), X PANEL_NOTIFY_PROC, redraw_notify_proc, X 0); X histogram_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Histogram",0,NULL), X PANEL_NOTIFY_PROC, histogram_notify_proc, X 0); X processor_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Processor",0,NULL), X PANEL_NOTIFY_PROC, processor_notify_proc, X 0); X legend_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Legend",0,NULL), X PANEL_NOTIFY_PROC, legend_notify_proc, X 0); X contrast_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Contrast",0,NULL), X PANEL_NOTIFY_PROC, contrast_notify_proc, X 0); X screendump_button = panel_create_item(panel, PANEL_BUTTON, X PANEL_LABEL_IMAGE, X panel_button_image(panel,"Screen dump",0,NULL), X PANEL_NOTIFY_PROC, screendump_notify_proc, X 0); X window_set(panel, PANEL_ITEM_X_GAP, 10, 0); X nodetext = panel_create_item(panel, PANEL_MESSAGE, X PANEL_ITEM_X, ATTR_COL(50), X PANEL_ITEM_Y, ATTR_ROW(9), X PANEL_LABEL_STRING, "Current node ", X 0); X pathtext = panel_create_item(panel, PANEL_MESSAGE, X PANEL_ITEM_X, ATTR_COL(5), X PANEL_ITEM_Y, ATTR_ROW(9), X PANEL_LABEL_STRING, " ", X 0); X msgtext = panel_create_item(panel, PANEL_MESSAGE, X PANEL_ITEM_X, ATTR_COL(60), X PANEL_ITEM_Y, ATTR_ROW(1), X PANEL_LABEL_STRING, "No active file", X 0); X directiontext = panel_create_item(panel, PANEL_MESSAGE, X PANEL_ITEM_X, ATTR_COL(60), X PANEL_ITEM_Y, ATTR_ROW(2), X PANEL_LABEL_STRING, "Direction : forward", X 0); X canvas = window_create(frame,CANVAS, X CANVAS_WIDTH, 1000, X CANVAS_HEIGHT, 1000, X WIN_PERCENT_HEIGHT, 70, X CANVAS_AUTO_SHRINK, FALSE, X WIN_VERTICAL_SCROLLBAR, scrollbar_create(0), X WIN_HORIZONTAL_SCROLLBAR, scrollbar_create(0), X WIN_EVENT_PROC, handle_event, X 0); X histogram_canvas = window_create(histogram_frame, CANVAS, X CANVAS_WIDTH, 1000, X CANVAS_HEIGHT, 400, X CANVAS_AUTO_SHRINK, FALSE, X WIN_VERTICAL_SCROLLBAR, v_bar=scrollbar_create(0), X WIN_HORIZONTAL_SCROLLBAR, h_bar=scrollbar_create(0), X 0); X processor_canvas = window_create(processor_frame, CANVAS, X CANVAS_AUTO_SHRINK, FALSE, X 0); X legend_canvas = window_create(legend_frame, CANVAS, X CANVAS_AUTO_SHRINK, FALSE, X 0); X pw = canvas_pixwin(canvas); X pw2 = canvas_pixwin(histogram_canvas); X pw_processor = canvas_pixwin(processor_canvas); X pw_legend = canvas_pixwin(legend_canvas); X fb_depth = pw->pw_pixrect->pr_depth; X if (fb_depth > 1) X { X set_pw_map(pw, "Canvas_color_map"); X set_pw_map(pw_legend, "Legend_color_map"); X } X else X { X my_color_map[WHITE] = my_color_map[BACKGROUND] = 0; X my_color_map[BLACK] = 1; X } X legend(); X} END_OF_FILE if test 12363 -ne `wc -c <'TRACE/SUNVIEW/window_init.c'`; then echo shar: \"'TRACE/SUNVIEW/window_init.c'\" unpacked with wrong size! fi # end of 'TRACE/SUNVIEW/window_init.c' fi if test -f 'TRACE/X/Slider.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/Slider.c'\" else echo shar: Extracting \"'TRACE/X/Slider.c'\" \(7332 characters\) sed "s/^X//" >'TRACE/X/Slider.c' <<'END_OF_FILE' X#include X#include X#include X#include X#include X#include X#include "SliderP.h" X extern Display display; X static Boolean defFalse = False; static Boolean defTrue = True; static int def100 = 100; static int def0 = 0; X X#define offset(field) XtOffset(SliderWidget,slider.field) static XtResource resources[] = X{ X {XtNlabel, XtCLabel, XtRString, sizeof(String), X offset(label), XtRString, NULL}, X {XtNmaxValue, XtCValue, XtRInt, sizeof(int), X offset(max_value), XtRInt, (caddr_t)&def100}, X {XtNminValue, XtCValue, XtRInt, sizeof(int), X offset(min_value), XtRInt, (caddr_t)&def0}, X {XtNshowRange, XtCBoolean, XtRBoolean, sizeof(Boolean), X offset(show_range), XtRBoolean, (caddr_t)&defTrue}, X {XtNshowValue, XtCBoolean, XtRBoolean, sizeof(Boolean), X offset(show_value), XtRBoolean, (caddr_t)&defTrue}, X {XtNsliderValue, XtCValue, XtRInt, sizeof(int), X offset(current_value), XtRInt, (caddr_t)&def0}, X {XtNsliderWidth, XtCWidth, XtRInt, sizeof(int), X offset(width), XtRInt, (caddr_t)&def100}, X}; X#undef offset X static void Initialize(), ConstraintInitialize(); static Boolean SetValues(); X X#define superclass (&formClassRec) SliderClassRec sliderClassRec = { X { /* core_class fields */ X /* superclass */ (WidgetClass) superclass, X /* class_name */ "Slider", X /* widget_size */ sizeof(SliderRec), X /* class_initialize */ NULL, X /* class_part_init */ NULL, X /* class_inited */ FALSE, X /* initialize */ Initialize, X /* initialize_hook */ NULL, X /* realize */ XtInheritRealize, X /* actions */ NULL, X /* num_actions */ 0, X /* resources */ resources, X /* num_resources */ XtNumber(resources), X /* xrm_class */ NULLQUARK, X /* compress_motion */ TRUE, X /* compress_exposure */ TRUE, X /* compress_enterleave*/ TRUE, X /* visible_interest */ FALSE, X /* destroy */ NULL, X /* resize */ XtInheritResize, X /* expose */ XtInheritExpose, X /* set_values */ SetValues, X /* set_values_hook */ NULL, X /* set_values_almost */ XtInheritSetValuesAlmost, X /* get_values_hook */ NULL, X /* accept_focus */ NULL, X /* version */ XtVersion, X /* callback_private */ NULL, X /* tm_table */ NULL, X /* query_geometry */ XtInheritQueryGeometry, X /* display_accelerator*/ XtInheritDisplayAccelerator, X /* extension */ NULL X }, X { /* composite_class fields */ X /* geometry_manager */ XtInheritGeometryManager, X /* change_managed */ XtInheritChangeManaged, X /* insert_child */ XtInheritInsertChild, X /* delete_child */ XtInheritDeleteChild, X /* extension */ NULL X }, X { /* constraint_class fields */ X /* subresourses */ NULL, X /* subresource_count */ 0, X /* constraint_size */ sizeof(SliderConstraintsRec), X /* initialize */ ConstraintInitialize, X /* destroy */ NULL, X /* set_values */ NULL, X /* extension */ NULL X }, X { /* form_class fields */ X /* empty */ 0 X }, X { /* slider_class fields */ X /* empty */ 0 X } X}; X X WidgetClass sliderWidgetClass = (WidgetClass)&sliderClassRec; X static void Initialize(request, new) Widget request, new; X{ X char string[10]; X Widget last_widget; X SliderWidget w = (SliderWidget)new; X Arg args[7]; X Pixel value; X X/* X XtSetArg(args[0], XtNbackground, &value); X XtGetValues(new, args, XtNumber(args)); X printf("In init slider: get background color = %d.\n", (int) value); X*/ X X XtSetArg(args[0], XtNborderWidth, (XtArgVal) 0); X/* X XtSetArg(args[1], XtNfont, (XtArgVal)XLoadQueryFont(display, X "-adobe-times-medium-r-*-*-20-*-*-*-*-*-*-*")); X*/ X XtSetArg(args[1], NULL, NULL); X XtSetArg(args[2], NULL, NULL); X XtSetArg(args[3], NULL, NULL); X XtSetArg(args[4], NULL, NULL); X XtSetArg(args[5], NULL, NULL); X X w->slider.name_label = w->slider.current_label X = w->slider.min_label = w->slider.max_label X = (Widget)NULL; X X if (w->slider.label == NULL) X w->slider.label = w->core.name; X else X w->slider.label = strcpy(XtMalloc(strlen(w->slider.label) + 1), X w->slider.label); X last_widget = w->slider.name_label X = XtCreateManagedWidget(w->slider.label, labelWidgetClass, X new, args, XtNumber(args) ); X if(w->slider.show_value) X { X sprintf(string, "[%d]", w->slider.min_value); X XtSetArg(args[1], XtNfromHoriz, (XtArgVal) last_widget); X last_widget = w->slider.current_label X = XtCreateManagedWidget(string, labelWidgetClass, X new, args, XtNumber(args)); X } X if(w->slider.show_range) X { X sprintf(string, "%d", w->slider.min_value); X XtSetArg(args[1], XtNfromHoriz, (XtArgVal) last_widget); X XtSetArg(args[2], XtNhorizDistance, (XtArgVal) 15); X last_widget = w->slider.min_label X = XtCreateManagedWidget(string, labelWidgetClass, X new, args, XtNumber(args)); X } X XtSetArg(args[0], NULL, NULL); X XtSetArg(args[1], XtNfromHoriz, (XtArgVal) last_widget); X XtSetArg(args[2], XtNorientation, (XtArgVal) XtorientHorizontal); X XtSetArg(args[3], XtNlength, (XtArgVal) w->slider.width); X XtSetArg(args[4], XtNthickness, (XtArgVal) 17); X if (!(w->slider.show_range)) X XtSetArg(args[5], XtNhorizDistance, (XtArgVal) 15); X last_widget = w->slider.slider X = XtCreateManagedWidget("slide", scrollbarWidgetClass, X new, args, XtNumber(args)); X XtScrollBarSetThumb(w->slider.slider, 0.0, 0.0); X if(w->slider.show_range) X { X sprintf(string, "%d", w->slider.max_value); X XtSetArg(args[0], XtNborderWidth, (XtArgVal) 0); X XtSetArg(args[1], XtNfromHoriz, (XtArgVal) last_widget); X XtSetArg(args[2], NULL, NULL); X XtSetArg(args[3], NULL, NULL); X XtSetArg(args[4], NULL, NULL); X XtSetArg(args[5], NULL, NULL); X w->slider.max_label = XtCreateManagedWidget(string, labelWidgetClass, X new, args, XtNumber(args)); X } X} X static void ConstraintInitialize(request, new) Widget request, new; X{ X} X static Boolean SetValues(current, request, new) Widget current, request, new; X{ X char string[10]; X float value; X Arg args[1]; X SliderWidget w = (SliderWidget)new; X SliderWidget cw = (SliderWidget)current; X X if (w->slider.current_value != cw->slider.current_value) X { X if(w->slider.show_value) X { X sprintf(string, "[%d]", w->slider.current_value); X XtSetArg(args[0], XtNlabel, (XtArgVal) string); X XtSetValues(w->slider.current_label, args, XtNumber(args)); X } X } X value = (float) (w->slider.current_value - w->slider.min_value) / X (float) (w->slider.max_value - w->slider.min_value); X XtScrollBarSetThumb(w->slider.slider, 0.0, value); X/* X (*w->core.widget_class->core_class.resize)( new ); X return False; X*/ X} END_OF_FILE if test 7332 -ne `wc -c <'TRACE/X/Slider.c'`; then echo shar: \"'TRACE/X/Slider.c'\" unpacked with wrong size! fi # end of 'TRACE/X/Slider.c' fi if test -f 'TRACE/X/Slider.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/Slider.h'\" else echo shar: Extracting \"'TRACE/X/Slider.h'\" \(1417 characters\) sed "s/^X//" >'TRACE/X/Slider.h' <<'END_OF_FILE' X/* Public definitions for Slider widget. Orlie Brewer. */ X X#ifndef _Slider_h X#define _Slider_h X X#include X X/* Resources: X X Name Class RepType Default Value X ---- ----- ------- ------------- X background Background Pixel XtDefaultBackground X border BorderColor Pixel XtDefaultForeground X borderWidth BorderWidth Dimension 1 X destroyCallback Callback Pointer NULL X height Height Dimension 0 X label Label String NULL X mappedWhenManaged MappedWhenManaged Boolean True X sensitive Sensitive Boolean True X width Width Dimension 0 X x Position Position 0 X y Position Position 0 X X*/ X X/* fields added to Form */ X#define XtNmaxValue "maxValue" X#define XtNminValue "minValue" X#define XtNshowRange "showRange" X#define XtNshowValue "showValue" X#define XtNsliderValue "sliderValue" X#define XtNsliderWidth "sliderWidth" X extern WidgetClass sliderWidgetClass; X typedef struct _SliderClassRec *SliderWidgetClass; typedef struct _SliderRec *SliderWidget; X X#endif _Slider_h END_OF_FILE if test 1417 -ne `wc -c <'TRACE/X/Slider.h'`; then echo shar: \"'TRACE/X/Slider.h'\" unpacked with wrong size! fi # end of 'TRACE/X/Slider.h' fi if test -f 'TRACE/X/SliderP.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/SliderP.h'\" else echo shar: Extracting \"'TRACE/X/SliderP.h'\" \(1196 characters\) sed "s/^X//" >'TRACE/X/SliderP.h' <<'END_OF_FILE' X/* Private declarations for SliderWidgetClass. Orlie Brewer. */ X X#ifndef _SliderP_h X#define _SliderP_h X X#include X#include "Slider.h" X typedef struct {int empty;} SliderClassPart; X typedef struct _SliderClassRec X{ X CoreClassPart core_class; X CompositeClassPart composite_class; X ConstraintClassPart constraint_class; X FormClassPart form_class; X SliderClassPart slider_class; X} SliderClassRec; X extern SliderClassRec sliderClassRec; X typedef struct _SliderPart X{ X /* resources */ X int min_value, max_value, current_value, width; X char *label; X Boolean show_range, show_value; X /* private state */ X Widget name_label, current_label, min_label, max_label; X Widget slider; X} SliderPart; X typedef struct _SliderRec X{ X CorePart core; X CompositePart composite; X ConstraintPart constraint; X FormPart form; X SliderPart slider; X} SliderRec; X typedef struct X{ X /* resources */ X X /* private state */ X int empty; X} SliderConstraintsPart; X typedef struct _SliderConstraintsRec X{ X FormConstraintsPart form; X SliderConstraintsPart slider; X} SliderConstraintsRec, *SliderConstraints; X X#endif _SliderP_h END_OF_FILE if test 1196 -ne `wc -c <'TRACE/X/SliderP.h'`; then echo shar: \"'TRACE/X/SliderP.h'\" unpacked with wrong size! fi # end of 'TRACE/X/SliderP.h' fi if test -f 'TRACE/X/c_time.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/c_time.c'\" else echo shar: Extracting \"'TRACE/X/c_time.c'\" \(1763 characters\) sed "s/^X//" >'TRACE/X/c_time.c' <<'END_OF_FILE' X#include "sched.trace.h" X int path_number = -1; X c_time(button) Widget button; X/* XEvent *event; X*/ X{ X/* X int i, leaf_node; X struct path_node *path, *find_critical_path(); X struct critical_path *cp_ptr, *temp_ptr; X X if (find_paths) X { X int first_node = TRUE; X find_paths = FALSE; X for (i = 0; i < HINOD; i++) X if (NODE[0][i][PNCH] == 0) Check all leaf nodes. / X { X temp_ptr = (struct critical_path *) X malloc(sizeof(struct critical_path)); X temp_ptr->time = 0; X temp_ptr->path = find_critical_path(i, &temp_ptr->time); X if (first_node == TRUE) First time through. / X { X first_node = FALSE; X c_path = temp_ptr; X c_path->next_path = NULL_PTR; X } X else Insert temp_ptr in decending time order. / X { X if (temp_ptr->time > c_path->time) X { X temp_ptr->next_path = c_path; X c_path = temp_ptr; X } X else Do insertion sort. / X { X struct critical_path *ptr1, *ptr2; X ptr1 = c_path; X ptr2 = c_path->next_path; X while (ptr2 != NULL_PTR && X ptr2->time > temp_ptr->time) X { X ptr1 = ptr2; X ptr2 = ptr1->next_path; X } X ptr1->next_path = temp_ptr; X temp_ptr->next_path = ptr2; X } X } X } X } X Create the path popup menu. */ X create_path_menu(button); X} END_OF_FILE if test 1763 -ne `wc -c <'TRACE/X/c_time.c'`; then echo shar: \"'TRACE/X/c_time.c'\" unpacked with wrong size! fi # end of 'TRACE/X/c_time.c' fi if test -f 'TRACE/X/color_stuff.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/color_stuff.c'\" else echo shar: Extracting \"'TRACE/X/color_stuff.c'\" \(3035 characters\) sed "s/^X//" >'TRACE/X/color_stuff.c' <<'END_OF_FILE' X#include "sched.trace.h" X static int color_array_set = 0; /* flag to show the array is initialized */ X set_colormap(depth) int depth; X{ X int status; X Colormap color_map; X XColor color_info; X X if(color_array_set) X return; X X if (depth > 1) X { X color_map = XDefaultColormap(display, DefaultScreen(display)); X X color_info.red = 65535; X color_info.blue = 65535; X color_info.green = 65535; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[WHITE] = color_info.pixel; X X color_info.red = 25700; X color_info.green = 56540; X color_info.blue = 65535; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[BACKGROUND] = color_info.pixel; X X /* red */ X color_info.red = 65535; X color_info.green = 38550; X color_info.blue = 38550; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[RED] = color_info.pixel; X X /* green */ X color_info.red = 0; X color_info.green = 65535; X color_info.blue = 44975; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[GREEN] = color_info.pixel; X X /* blue */ X color_info.red = 0; X color_info.green = 0; X color_info.blue = 65535; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[BLUE] = color_info.pixel; X X /* yellow */ X color_info.red = 65535; X color_info.green = 65535; X color_info.blue = 41120; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[YELLOW] = color_info.pixel; X X /* turquoise sic? */ X color_info.red = 0; X color_info.green = 65535; X color_info.blue = 65535; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[TURQUOISE] = color_info.pixel; X X /* magenta (purple) */ X color_info.red = 65535; X color_info.green = 0; X color_info.blue = 65535; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[MAGENTA] = color_info.pixel; X X /* black foreground */ X color_info.red = 0; X color_info.green = 0; X color_info.blue = 0; X status = XAllocColor(display, color_map, &color_info); X if (!status) printf("Status = %d.\n", status); X my_color_map[BLACK] = color_info.pixel; X } X else X { X my_color_map[WHITE] = my_color_map[BACKGROUND] X = WhitePixel(display, XDefaultScreen(display)); X my_color_map[BLACK] = BlackPixel(display, XDefaultScreen(display)); X } X color_array_set = 1; X} END_OF_FILE if test 3035 -ne `wc -c <'TRACE/X/color_stuff.c'`; then echo shar: \"'TRACE/X/color_stuff.c'\" unpacked with wrong size! fi # end of 'TRACE/X/color_stuff.c' fi if test -f 'TRACE/X/main.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/main.c'\" else echo shar: Extracting \"'TRACE/X/main.c'\" \(1061 characters\) sed "s/^X//" >'TRACE/X/main.c' <<'END_OF_FILE' X#include "sched.trace.h" X main(argc,argv) int argc; char **argv; X{ X window_init(&argc, argv); X program_init(); X X_loop(); X} X program_init() X{ X XOFFSET = 20; X YOFFSET = 50; X XSIZE = 40; X YSIZE = 20; X DYNZONE = 60; X forward = TRUE; X event_list = (struct event *) malloc(sizeof(struct event)); X trailer_event = (struct event *) malloc(sizeof(struct event)); X event_list->previous_event = NULL_PTR; X event_list->next_event = trailer_event; X trailer_event->previous_event = event_list; X trailer_event->next_event = NULL_PTR; X file_table[0] = NULL; X directory_table[0] = NULL; X load_tables(); X} X XX_loop() X{ X text(pw, 15, 150, X"Hello, this is a graphics tool to trace the execution of programs that used \ SCHEDULE."); X text(pw, 15, 170, X"Select your file, click LOAD, and then click GO or STEP."); X text(pw, 15, 190, X"If you choose GO, you may stop execution at any time by clicking STOP \ or STEP."); X text(pw, 15, 210, X"You may then step through the execution by using STEP or continue execution \ by clicking GO."); X X XtMainLoop(); X} END_OF_FILE if test 1061 -ne `wc -c <'TRACE/X/main.c'`; then echo shar: \"'TRACE/X/main.c'\" unpacked with wrong size! fi # end of 'TRACE/X/main.c' fi if test -f 'TRACE/X/makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/makefile'\" else echo shar: Extracting \"'TRACE/X/makefile'\" \(2461 characters\) sed "s/^X//" >'TRACE/X/makefile' <<'END_OF_FILE' X# CFLAGS = -D_BSD -g -DX -I./../src LFLAGS = X# OBJS = main.o \ X active.o \ X assign_xy.o \ X atlevel.o \ X build_levels.o \ X color_stuff.o \ X c_time.o \ X drawing.o \ X draw_level.o \ X draw_path.o \ X draw_subtree.o \ X events.o \ X find_parents.o \ X get_path_len.o \ X pathes.o \ X legend.o \ X load.o \ X new_tree.o \ X open_tracefi.o \ X procs.o \ X rebuild.o \ X searches.o \ X Slider.o \ X wd_drawing.o \ X window_init.o X#X11R3: LIBS = -lXaw -lXmu -lXt -lX11 -lm X#X11R2: X#LIBS = libXaw.a -lXt -lX11 -lm X# c_time.o \ X# draw_path.o \ X# dumps.o \ X# pathes.o \ X# X../xsched.trace: $(OBJS) X cc $(CFLAGS) $(LFLAGS) -o ../xsched.trace $(OBJS) $(LIBS) X# clean: X rm -f *.o *~ X# main.o: main.c X cc $(CFLAGS) -c main.c active.o: ./../src/active.c X cc $(CFLAGS) -c ./../src/active.c assign_xy.o: ./../src/assign_xy.c X cc $(CFLAGS) -c ./../src/assign_xy.c atlevel.o: ./../src/atlevel.c X cc $(CFLAGS) -c ./../src/atlevel.c build_levels.o: ./../src/build_levels.c X cc $(CFLAGS) -c ./../src/build_levels.c color_stuff.o: color_stuff.c X cc $(CFLAGS) -c color_stuff.c drawing.o: ./../src/drawing.c X cc $(CFLAGS) -c ./../src/drawing.c draw_path.o: ./../src/draw_path.c X cc $(CFLAGS) -c ./../src/draw_path.c draw_level.o: ./../src/draw_level.c X cc $(CFLAGS) -c ./../src/draw_level.c draw_subtree.o: ./../src/draw_subtree.c X cc $(CFLAGS) -c ./../src/draw_subtree.c events.o: ./../src/events.c X cc $(CFLAGS) -c ./../src/events.c find_parents.o: ./../src/find_parents.c X cc $(CFLAGS) -c ./../src/find_parents.c get_path_len.o: ./../src/get_path_len.c X cc $(CFLAGS) -c ./../src/get_path_len.c legend.o: ./../src/legend.c X cc $(CFLAGS) -c ./../src/legend.c load.o: ./../src/load.c X cc $(CFLAGS) -c ./../src/load.c new_tree.o: ./../src/new_tree.c X cc $(CFLAGS) -c ./../src/new_tree.c open_tracefi.o: ./../src/open_tracefi.c X cc $(CFLAGS) -c ./../src/open_tracefi.c pathes.o: ./../src/pathes.c X cc $(CFLAGS) -c ./../src/pathes.c procs.o: procs.c X cc $(CFLAGS) -c procs.c rebuild.o: ./../src/rebuild.c X cc $(CFLAGS) -c ./../src/rebuild.c c_time.o: c_time.c X cc $(CFLAGS) -c c_time.c searches.o: ./../src/searches.c X cc $(CFLAGS) -c ./../src/searches.c Slider.o: Slider.c X cc $(CFLAGS) -c Slider.c wd_drawing.o: wd_drawing.c X cc $(CFLAGS) -c wd_drawing.c window_init.o: window_init.c X cc $(CFLAGS) -c window_init.c X# X#.c.o: X# cc $(CFLAGS) -c $*.c X# END_OF_FILE if test 2461 -ne `wc -c <'TRACE/X/makefile'`; then echo shar: \"'TRACE/X/makefile'\" unpacked with wrong size! fi # end of 'TRACE/X/makefile' fi if test -f 'TRACE/X/procs.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/procs.c'\" else echo shar: Extracting \"'TRACE/X/procs.c'\" \(10882 characters\) sed "s/^X//" >'TRACE/X/procs.c' <<'END_OF_FILE' X#include "sched.trace.h" X#include X Widget file_menu_popup = NULL; Widget dir_menu_popup = NULL; Widget menu_box, dir_menu_box; unsigned int DELAY = 0; X X void delay_change_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X DELAY = (500000 * (*(float*)call_data)); X} X X void load_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X open_tracefile(file_table[ft_index]); X} void go_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X char msg[50]; X if (file_loaded) X if (nodraw) X { X sprintf(msg, "Skipping forward to %d.",start_draw_mark); X display_message(msg); X } X else X { X display_message("Processing events."); X go = TRUE; X while (go) X { X proc_event(); X usleep(DELAY); X if (button_hit()) go = FALSE; X } X } X else X display_message("You have to select a file first."); X} void stop_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X /*printf("STOP\n");*/ X go = FALSE; X} void direction_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X if (file_loaded) X if (forward) X { X forward = FALSE; X set_label(direction_button, "Backward"); X/* X panel_set(directiontext, PANEL_LABEL_STRING, X "Direction : backward", X 0); X*/ X current_event = current_event->next_event; X } X else X { X forward = TRUE; X set_label(direction_button, "Forward "); X/* X panel_set(directiontext, PANEL_LABEL_STRING, X "Direction : forward", X 0); X*/ X current_event = current_event->previous_event; X } X else X display_message("You have to select a file first."); X} void step_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X if (file_loaded) X { X go = FALSE; X display_message("Stepping through one event."); X proc_event(); X } X else X display_message("You have to select a file first."); X} void full_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X size_factor = 1 + size_factor; X if ( size_factor > 2 ) size_factor = 1; X} void c_time_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X/* printf("C_TIME\n");*/ X/*boom*/ X if (file_loaded) { X c_time(w); X/*printf("C_TIME came back\n");*/ X } else X display_message("You have to select a file first."); X/**/ X} void name_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X/* X printf("NAME\n"); X if (file_loaded) X create_names_menu(event); X else X display_message("You have to select a file first."); X*/ X} void subtree_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X if (file_loaded) X { X if (CURRENT_NODE != -1) X { X ++DEPTH; X draw_subtree(); X } X } X else X display_message("You have to select a file first."); X} void redraw_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X if (file_loaded) X redraw_all(); X else X display_message("You have to select a file first."); X} void histogram_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X Arg args[4]; X void plot_active2(); X HISTOGRAM = !HISTOGRAM; X if (HISTOGRAM) X { X XtPopup(histogram_frame, NULL); X XtSetArg(args[0], XtNheight, (XtArgVal) 400); X XtSetArg(args[1], XtNwidth, (XtArgVal) 1000); X XtSetArg(args[2], XtNx, (XtArgVal) 200); X XtSetArg(args[3], XtNy, (XtArgVal) 200); X histogram_canvas = XtCreateManagedWidget("histogram_canvas", widgetClass, X histogram_vp, args, XtNumber(args)); X XtAddEventHandler(histogram_canvas, X ExposureMask, False, plot_active2, NULL); X pw2 = XtWindow(histogram_canvas); X plot_active2(); X } X else X { X XtPopdown(histogram_frame); X XtDestroyWidget(histogram_canvas); X } X/* X scrollbar_scroll_to(v_bar, 300, 0); X scrollbar_scroll_to(h_bar, 395, 0); X*/ X} void processor_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X show_processor = !show_processor; X if (show_processor) X { X XtPopup(processor_frame, NULL); X pw_processor = XtWindow(processor_canvas); X } X else X XtPopdown(processor_frame); X} void legend_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X show_legend = !show_legend; X if (show_legend) X { X XSetWindowAttributes win_atts; X XtPopup(legend_frame, NULL); X pw_legend = XtWindow(legend_canvas); X win_atts.backing_store = Always; X XChangeWindowAttributes(display, pw_legend, CWBackingStore, &win_atts); X XSetWindowBackground(display, pw_legend, my_color_map[BACKGROUND]); X legend(); X } X else X XtPopdown(legend_frame); X} void contrast_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X/* X printf("CONTRAST\n"); X if (pw->pw_pixrect->pr_depth == 1) X { X if (screen_toggle) X { X screen_toggle = FALSE; X pw_blackonwhite (pw, 0, 1); X } X else X { X screen_toggle = TRUE; X pw_whiteonblack (pw, 0, 1); X } X if (file_loaded) redraw_all(); X } X*/ X} void quit_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X exit(0); X} X button_hit() X X{ X XEvent event; X X if (XPending(display)== 0) X return (FALSE); X XNextEvent(display, &event); X X switch (event.type) { X case ButtonPress: X return (1); X break; X } /* switch */ X return (FALSE); X} X X/* void file_notify_proc(w, closure, call_data) X Widget w; X caddr_t closure; X caddr_t call_data; X{ X static char current_file[150]; X X if (++ft_index > max_file_index) X ft_index = 0; X strcpy(current_file, "Trace file: "); X strcpy(current_file + 12, file_table[ft_index]); X set_label(file_choice, current_file); X} X*/ void file_menu_callback(widget,closure,callData) X Widget widget; X caddr_t closure; X caddr_t callData; X{ X char current_file[100]; X X XUnmapWindow(display, XtWindow(file_menu_popup)); X XtDestroyWidget(file_menu_popup); X file_menu_popup = NULL; X X ft_index = closure; X X strcpy(current_file, "Trace file: "); X strcpy(current_file + 12, file_table[ft_index]); X set_label(file_choice, current_file); X X open_tracefile(file_table[ft_index]); X} void file_notify_proc(button) Widget button; X{ X int i, longest = 0, /* find how many file entries */ X n=0, X height; X static XtCallbackRec callbackList[] = { {file_menu_callback, NULL}, X {NULL, NULL} }; X static Arg box_arg[] = { {XtNvSpace, 0}, X {XtNhSpace, 0} }; X Arg args[4]; X static Arg pop_arg[] = { {XtNx, 450}, /* boom - we should really check the X current mouse position here */ X {XtNy, 100} }; X X XtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X XtSetArg(args[n], XtNcallback,(XtArgVal)callbackList);n++; X XtSetArg(args[n], XtNborderWidth, 0);n++; X X if (file_menu_popup != NULL) { X return; X printf("file_menu_popup != NULL\n"); X } X X file_menu_popup = XtCreatePopupShell("file list", transientShellWidgetClass, X button, pop_arg, 2); X X menu_box = XtCreateManagedWidget("menu_box", boxWidgetClass, X file_menu_popup, box_arg, 2); X X /* find length of table */ X for (i=0; file_table[i] != NULL; i++) { X callbackList[0].closure = i; X XtCreateManagedWidget(file_table[i], commandWidgetClass, X menu_box, args, n); X } X i++; /* for the pad structure */ X X XtRealizeWidget(file_menu_popup); X XMapWindow(display, XtWindow(file_menu_popup)); X X} X X void dir_menu_callback(widget,closure,callData) X Widget widget; X caddr_t closure; X caddr_t callData; X{ X X XUnmapWindow(display, XtWindow(dir_menu_popup)); X XtDestroyWidget(dir_menu_popup); X dir_menu_popup = NULL; X X chdir(directory_table[(int)closure]); X X load_tables(); X} void directory_notify_proc(button) Widget button; X{ X int i, longest = 0, /* find how many file entries */ X n=0, X height; X static XtCallbackRec callbackList[] = { {dir_menu_callback, NULL}, X {NULL, NULL} }; X static Arg box_arg[] = { {XtNvSpace, 0}, X {XtNhSpace, 0} }; X Arg args[4]; X static Arg pop_arg[] = { {XtNx, 350}, /* boom - we should really check the X current mouse position here */ X {XtNy, 100} }; X X XtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X XtSetArg(args[n], XtNcallback,(XtArgVal)callbackList);n++; X XtSetArg(args[n], XtNborderWidth, 0);n++; X X if (dir_menu_popup != NULL) { X return; X } X X dir_menu_popup = XtCreatePopupShell("dir list", transientShellWidgetClass, X button, pop_arg, 2); X X dir_menu_box = XtCreateManagedWidget("dir menu_box", boxWidgetClass, X dir_menu_popup, box_arg, 2); X X /* find length of table */ X for (i=0; directory_table[i] != NULL; i++) { X callbackList[0].closure = i; X XtCreateManagedWidget(directory_table[i], commandWidgetClass, X dir_menu_box, args, n); X } X i++; /* for the pad structure */ X X XtRealizeWidget(dir_menu_popup); X XMapWindow(display, XtWindow(dir_menu_popup)); X X} X X void handle_event(canvas, arg, event) Canvas canvas; XXEvent *event; caddr_t arg; X{ X int x, y; X char str[20]; X X x = ((XButtonPressedEvent *)event)->x; X y = ((XButtonPressedEvent *)event)->y; X switch (((XButtonPressedEvent *)event)->button) X { X case Button1 : X if ( (CURRENT_NODE = node_search(x,y)) != -1 ) X { X sprintf(str,"Current node is %d", X NODE[0][CURRENT_NODE][ID]); X display_node(str); X }; X break; X case Button2 : X if ( (CURRENT_NODE = node_search(x,y)) != -1 ) X { X sprintf(str,"Current node is %d", X NODE[0][CURRENT_NODE][ID]); X display_node(str); X }; X break; X case Button3 : X if ( (CURRENT_NODE = node_search(x,y)) != -1 ) X { X sprintf(str,"Current node is %d", X NODE[0][CURRENT_NODE][ID]); X display_node(str); X }; X/* X if (event_is_down(event)) prdata(); X*/ X break; X default : X break; X } X} END_OF_FILE if test 10882 -ne `wc -c <'TRACE/X/procs.c'`; then echo shar: \"'TRACE/X/procs.c'\" unpacked with wrong size! fi # end of 'TRACE/X/procs.c' fi if test -f 'TRACE/X/wd_drawing.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/wd_drawing.c'\" else echo shar: Extracting \"'TRACE/X/wd_drawing.c'\" \(10594 characters\) sed "s/^X//" >'TRACE/X/wd_drawing.c' <<'END_OF_FILE' X/* This file contains the window dependent drawing routines for X11. X*/ X#include "sched.trace.h" X#include X Widget path_menu_popup = NULL, path_box; extern int path_number; int i, leaf_node; X/*struct path_node *path, *find_critical_path();*/ struct critical_path *cp_ptr, *temp_ptr; X X point(surface, x, y, color, xormode) Surface surface; int x, y, xormode; unsigned long color; X{ X if (color == 0) X XSetFunction(display, gc, GXclear); X else X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, color); X XDrawPoint(display, surface, gc, x, y); X XFlush(display); X} X line(surface, x1, y1, x2, y2, color) Surface surface; int x1, y1, x2, y2; unsigned long color; X{ X if (color == 0) X XSetFunction(display, gc, GXclear); X else X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, color); X XDrawLine(display, surface, gc, x1, y1, x2, y2); X XFlush(display); X} X fillcircle(surface, x, y, radius, color, xormode) Surface surface; int x,y, radius, color, xormode; X{ X if (color == 0) X XSetFunction(display, gc, GXclear); X else X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, color); X XFillArc(display, surface, gc, x-radius, y-radius, 2*radius, 2*radius, X 0, 365 * 64); X XFlush(display); X} X X verline(surface, x, y, ydistance, color, xormode) Surface surface; int x, y, ydistance, xormode; unsigned long color; X{ X if (color == 0) X XSetFunction(display, gc, GXclear); X else X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, color); X XDrawLine(display, surface, gc, x, y, x, y+ydistance); X XFlush(display); X} X horline(surface, x, y, xdistance, color, xormode) Surface surface; int x, y, xdistance, xormode; unsigned long color; X{ X if (color == 0) X XSetFunction(display, gc, GXclear); X else X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, color); X XDrawLine(display, surface, gc, x, y, x+xdistance, y); X XFlush(display); X} X text(surface, x, y, string) Surface surface; int x, y; char *string; X{ X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, my_color_map[BLACK]); X XDrawString(display, surface, gc, x, y, string, strlen(string)); X XFlush(display); X} X put_char(surface, x, y, c) Surface surface; int x, y; char c; X{ X XSetFunction(display, gc, GXcopy); X XSetForeground(display, gc, my_color_map[BLACK]); X XDrawString(display, surface, gc, x, y, &c, 1); X XFlush(display); X} X erase(surface, x, y, w, h) Surface surface; int x, y, w, h; X{ X XClearArea(display, surface, x, y, w, h, False); X} X clearscreen(surface, x, y) Surface surface; int x, y; X{ X XClearArea(display, surface, 0, 0, x, y, False); X} X set_directory_menu() X{ X char current_file[100]; X X strcpy(current_file, "Directory: "); X getwd(current_file + 11); X set_label(directory_choice, current_file); X} X set_file_menu() X{ X static char current_file[150]; X ft_index = 0; X if (file_table[ft_index] != NULL) X { X strcpy(current_file, "Trace file: "); X strcpy(current_file + 12, file_table[ft_index]); X set_label(file_choice, current_file); X display_message("Select file & click load."); X } X else { X set_label(file_choice, "Trace file: "); X display_message("No trace files in the current directory."); X } X} X set_label(widget, string) Widget widget; char *string; X{ X Arg args[2]; X XEvent event; X X if (widget == NULL) X return; X XtUnmanageChild(widget); X args[0].name = XtNlabel; X args[0].value = (XtArgVal) string; X args[1].name = NULL; X args[1].value = (XtArgVal) NULL; X/* X args[1].name = XtNwidth; X args[1].value = (XtArgVal) get_text_width(string); X*/ X XtSetValues(widget, args, XtNumber(args)); X /*printf("In set_label: string = %s\n.", string);*/ X XtManageChild(widget); X XtNextEvent(&event); X XtDispatchEvent(&event); X XFlush(event.xany.display); X/* X XtNextEvent(&event); X XtDispatchEvent(&event); X XFlush(event.xany.display); X*/ X} X display_node(text) X char *text; X{ X/* X panel_set(nodetext, PANEL_LABEL_STRING, text, 0); X*/ X} X display_path(text) X char *text; X{ X/* X panel_set(pathtext, PANEL_LABEL_STRING, text, 0); X*/ X} X display_message(text) X char *text; X{ X set_label(msgtext, text); X} X set_event_counter(max_count) int max_count; X{ X/* X panel_set(count_slider, PANEL_MAX_VALUE, max_count, PANEL_VALUE, 0, 0); X*/ X} X update_event_counter(time) float time; X{ X Arg args[1]; X#ifndef TITAN X/* X XtSetArg(args[0], XtNsliderValue, (XtArgVal) ROUND(time)); X XtSetValues(count_slider, args, XtNumber(args)); X*/ XXtScrollBarSetThumb(count_slider, 0.0, time/100); X#endif X} X update_active_counter(count) int count; X{ X Arg args[1]; X char how_many[20]; X#ifndef TITAN X if (count > 9) X sprintf(how_many, " %d", count); X else X sprintf(how_many, " %d ", count); X XtScrollBarSetThumb(cw_slider, 0.0, (count*1.0)/10); X set_label(cw_slider_num_label, how_many); X#endif X} X reset_values() X{ X Arg args[1]; X set_label(direction_button, "Forward "); X#ifndef TITAN X XtScrollBarSetThumb(count_slider, 0.0, 0.0); X XtScrollBarSetThumb(cw_slider, 0.0, 0.0); X set_label(cw_slider_num_label, " 0 "); X#endif X} X get_text_width(string) char *string; X{ X XFontStruct *font_info; X X font_info = XQueryFont(display, XGContextFromGC(gc)); X return(XTextWidth(font_info, string, strlen(string))); X} X get_text_height() X{ X XFontStruct *font_info; X X font_info = XQueryFont(display, XGContextFromGC(gc)); X return(font_info->ascent + font_info->descent); X} X X void create_path_menu_callback(widget,closure,callData) X Widget widget; X caddr_t closure; X caddr_t callData; X{ X struct path_node *path; X int i; X X XUnmapWindow(display, XtWindow(path_menu_popup)); X XtDestroyWidget(path_menu_popup); X path_menu_popup = NULL; X X path_number = closure; X X if (path_number) X { X int p[MAXNODES]; X cp_ptr = c_path; X for (i = 1; i != path_number; i++) X cp_ptr = cp_ptr->next_path; X i = 0; X for (path = cp_ptr->path; path != NULL_PTR; path = path->parent) X p[++i] = path->index; X redraw_all(); X draw_path(p,i); X } X} void create_path_menu(button) Widget button; X{ X int n; X register int i=1; X struct critical_path *cp_ptr; X XtCallbackRec callback[2]; X static XtCallbackRec callbackList[] = { {create_path_menu_callback, NULL}, X {NULL, NULL} }; X static Arg box_arg[] = { {XtNvSpace, 0}, X {XtNhSpace, 0} }; X Arg arg[5]; X static Arg pop_arg[] = { {XtNx, 450}, /* boom - we should really check the X current mouse position here */ X {XtNy, 100} }; n=0; XXtSetArg(arg[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; XXtSetArg(arg[n], XtNborderWidth, 0);n++; XXtSetArg(arg[n], XtNcallback,(XtArgVal)callbackList);n++; X X X if (path_menu_popup != NULL) X return; X X if (find_paths) X { X int first_node = TRUE; X find_paths = FALSE; X for (i = 0; i < HINOD; i++) X if (NODE[0][i][PNCH] == 0) /* Check all leaf nodes. */ X { X temp_ptr = (struct critical_path *) X malloc(sizeof(struct critical_path)); X temp_ptr->time = 0; X temp_ptr->path = find_critical_path(i, &temp_ptr->time); X if (first_node == TRUE) /* First time through. */ X { X first_node = FALSE; X c_path = temp_ptr; X c_path->next_path = NULL_PTR; X } X else /* Insert temp_ptr in decending time order. */ X { X if (temp_ptr->time > c_path->time) X { X temp_ptr->next_path = c_path; X c_path = temp_ptr; X } X else /* Do insertion sort. */ X { X struct critical_path *ptr1, *ptr2; X ptr1 = c_path; X ptr2 = c_path->next_path; X while (ptr2 != NULL_PTR && X ptr2->time > temp_ptr->time) X { X ptr1 = ptr2; X ptr2 = ptr1->next_path; X } X ptr1->next_path = temp_ptr; X temp_ptr->next_path = ptr2; X } X } X } X } X /* Create the path popup menu. */ X X path_menu_popup = XtCreatePopupShell("path list", transientShellWidgetClass, X button, pop_arg, 2); X X path_box = XtCreateManagedWidget("path_box", boxWidgetClass, X path_menu_popup, box_arg, 2); X X i = 1; X cp_ptr = c_path; X while (cp_ptr != NULL_PTR) X { X char *string; X string = (char *) malloc(80); X sprintf (string, X "Time = %f, Leaf node = %d", X cp_ptr->time, X NODE[0][cp_ptr->path->index][ID]); X cp_ptr = cp_ptr->next_path; X X callbackList[0].closure = i; X XtCreateManagedWidget(string, commandWidgetClass, X path_box, arg, 3); X X i++; X } X i--; X X XtRealizeWidget(path_menu_popup); X XMapWindow(display, XtWindow(path_menu_popup)); X X} X X create_names_menu(event) int *event; X/* XEvent *event; X*/ X{ X/* X int i, j; X Menu name_menu, dyname_menus[MAXNODES]; X X name_menu = menu_create(0); X for (i = 0; i < HINOD; i++) X { X char *string; X string = (char *) malloc(80); X sprintf (string, X "Node # %d = %s.", X NODE[0][i][ID], X &NAMES[i][0][0]); X menu_set(name_menu, MENU_STRING_ITEM, string, i+1, 0); X if (DYNNODE[i][0][0] > 1) X { X dyname_menus[i] = menu_create(0); X menu_set(menu_get(name_menu, MENU_NTH_ITEM, i+1), X MENU_PULLRIGHT, dyname_menus[i], 0); X for (j = 1; j < DYNNODE[i][0][0]; j++) X { X string = (char *) malloc(80); X sprintf (string, X "Dynamic node # %d = %s.", X DYNNODE[i][j][ID], X &NAMES[i][j][0]); X menu_set(dyname_menus[i], MENU_STRING_ITEM, string, j, 0); X } X } X } X menu_show(name_menu, panel, event, 0); X*/ X} X int get_x_size(window) Window window; X{ X XWindowAttributes attributes; X X XGetWindowAttributes(display, window, &attributes); X return(attributes.width); X} X int get_y_size(window) Window window; X{ X XWindowAttributes attributes; X X XGetWindowAttributes(display, window, &attributes); X return(attributes.height); X} END_OF_FILE if test 10594 -ne `wc -c <'TRACE/X/wd_drawing.c'`; then echo shar: \"'TRACE/X/wd_drawing.c'\" unpacked with wrong size! fi # end of 'TRACE/X/wd_drawing.c' fi if test -f 'TRACE/X/window_init.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/X/window_init.c'\" else echo shar: Extracting \"'TRACE/X/window_init.c'\" \(16420 characters\) sed "s/^X//" >'TRACE/X/window_init.c' <<'END_OF_FILE' X#include "sched.trace.h" X X#define TITLE "Schedule Tracing Facility" X#define MAXARGS 10 X extern void load_notify_proc(), X go_notify_proc(), X delay_change_proc(), X stop_notify_proc(), X direction_notify_proc(), X step_notify_proc(), X full_notify_proc(), X c_time_notify_proc(), X name_notify_proc(), X subtree_notify_proc(), X redraw_notify_proc(), X histogram_notify_proc(), X processor_notify_proc(), X legend_notify_proc(), X contrast_notify_proc(), X quit_notify_proc(), X file_notify_proc(), X directory_notify_proc(), X handle_event(), X redraw_all(), X plot_active2(), X legend(); X Arg args[MAXARGS]; XXtCallbackRec callback[2]; Widget delay_label, count_label, cw_slider_label; window_init(argc, argv) int *argc; char *argv[]; X{ X toplevel = XtInitialize(argv[0], "sched.trace", NULL, NULL, argc, argv); X display = XtDisplay(toplevel); X XSynchronize(display, 1); X fb_depth = XDefaultDepth(display, XDefaultScreen(display)); X set_colormap(fb_depth); X frame = XtCreateManagedWidget("frame", boxWidgetClass, toplevel, NULL, NULL); X do_panel(); X do_canvas(); X} X do_panel() X{ X int n; X XtTranslations new_trans; X char string [100]; X X n = 0; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[BACKGROUND]); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X panel = X XtCreateManagedWidget("panel", formWidgetClass, frame, args, n); X X n = 1; X XtSetArg(args[n], XtNlabel, (XtArgVal) TITLE); n++; X XtSetArg(args[n], XtNhorizDistance, (XtArgVal) 375); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT_BOLD));n++; X title_label = X XtCreateManagedWidget("titlelabel", labelWidgetClass, panel, args, n); X X n = 1; X XtSetArg(args[n], XtNhorizDistance, (XtArgVal) 260); n++; X XtSetArg(args[n], XtNfromVert, (XtArgVal) title_label); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT_BOLD));n++; X msgtext = X XtCreateManagedWidget("Message", labelWidgetClass, panel, args, n); X X n = 1; X callback[0].callback = directory_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromVert, (XtArgVal) msgtext); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X directory_choice = X XtCreateManagedWidget("Directory:", commandWidgetClass, panel, args, n); X X n = 1; X callback[0].callback = file_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromVert, (XtArgVal) msgtext); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) directory_choice); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; X file_choice = X XtCreateManagedWidget("File:", commandWidgetClass, panel, args, n); X file_menu_shell = X XtCreatePopupShell("file_menu_shell", transientShellWidgetClass, frame, X NULL, NULL); X /* X boom X XtCreateManagedWidget("Test", labelWidgetClass, file_menu_shell, NULL, NULL); X new_trans = XtParseTranslationTable(": set()\n\ X : notify() unset()"); X strcpy(string, "file menu shell"); X new_trans = XtParseTranslationTable X (":MenuPopup(file_menu_shell) set()\n\ X :MenuPopdown(file_menu_shell) unset()"); X if (new_trans != NULL) X XtAugmentTranslations(file_choice, new_trans); X*/ X X/* X n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) file_choice); n++; X XtSetArg(args[n], XtNsliderWidth, (XtArgVal) 400); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; X count_slider = X XtCreateManagedWidget("Time", sliderWidgetClass, panel, args, n); X*/ X X n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) file_choice); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X count_label= X XtCreateManagedWidget("Time ", labelWidgetClass, panel, args, n); n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) file_choice); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) count_label); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; X XtSetArg(args[n], XtNorientation, (XtArgVal) XtorientHorizontal); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 400); n++; X XtSetArg(args[n], XtNheight, (XtArgVal) 20); n++; X count_slider=XtCreateManagedWidget("time scrollbar", scrollbarWidgetClass, X panel, args, n); X X n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) count_slider); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X delay_label = XtCreateManagedWidget("Execution Delay- fast", X labelWidgetClass, panel, args, n); X n = 1; X callback[0].callback = delay_change_proc; X XtSetArg(args[n], XtNjumpProc, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) delay_label); n++; X XtSetArg(args[n], XtNfromVert, (XtArgVal) count_slider); n++; X XtSetArg(args[n], XtNorientation, (XtArgVal) XtorientHorizontal); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 400); n++; X XtSetArg(args[n], XtNheight, (XtArgVal) 20); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X delay_slider = X XtCreateManagedWidget("Delay scrollbar", scrollbarWidgetClass, X panel, args, n); X n = 1; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) delay_slider); n++; X XtSetArg(args[n], XtNfromVert, (XtArgVal) count_slider); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X XtCreateManagedWidget("slow", labelWidgetClass, panel,args,n); X X n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) delay_slider); n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; X cw_slider_label = X XtCreateManagedWidget("Active Processes- ", X labelWidgetClass, panel,args,n); n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) delay_slider); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) cw_slider_label); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X XtSetArg(args[n], XtNborderWidth, (XtArgVal) 0); n++; X cw_slider_num_label = XtCreateManagedWidget(" 0 ", X labelWidgetClass, panel,args,n); n = 1; X XtSetArg(args[n], XtNfromVert, (XtArgVal) delay_label); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) cw_slider_num_label); n++; X XtSetArg(args[n], XtNbackground, (XtArgVal) my_color_map[WHITE]); n++; X XtSetArg(args[n], XtNorientation, (XtArgVal) XtorientHorizontal); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 400); n++; X XtSetArg(args[n], XtNheight, (XtArgVal) 20); n++; X cw_slider=XtCreateManagedWidget("Processes scrollbar", scrollbarWidgetClass, X panel, args, n); X X X /* First row of buttons. */ X n = 1; X callback[0].callback = load_notify_proc; X XtSetArg(args[n], XtNfromVert, (XtArgVal) cw_slider_label); n++; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X load_button = X XtCreateManagedWidget("Load", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = go_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) load_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X go_button = X XtCreateManagedWidget("Go", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = stop_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) go_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X stop_button = X XtCreateManagedWidget("Stop", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = direction_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) stop_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X direction_button = X XtCreateManagedWidget("Forward ", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = step_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) direction_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X step_button = X XtCreateManagedWidget("Step", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = full_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) step_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X full_button = X XtCreateManagedWidget("Full", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = c_time_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) full_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X c_time_button = X XtCreateManagedWidget("Critical Time", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = name_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) c_time_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X name_button = X XtCreateManagedWidget("Process Name", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = quit_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNhorizDistance, (XtArgVal) 960); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X quit_button = X XtCreateManagedWidget("Quit", commandWidgetClass, panel, args, n); X X /* Second row of buttons. */ X n = 1; X callback[0].callback = subtree_notify_proc; X XtSetArg(args[n], XtNfromVert, (XtArgVal) load_button); n++; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X subtree_button = X XtCreateManagedWidget("Subtree", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = redraw_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) subtree_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X redraw_button = X XtCreateManagedWidget("Redraw", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = histogram_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) redraw_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X histogram_button = X XtCreateManagedWidget("Histogram", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = processor_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) histogram_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X processor_button = X XtCreateManagedWidget("Processor", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = legend_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) processor_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X legend_button = X XtCreateManagedWidget("Legend", commandWidgetClass, panel, args, n); X X n = 2; X callback[0].callback = contrast_notify_proc; X XtSetArg(args[n], XtNcallback, (XtArgVal) callback); n++; X XtSetArg(args[n], XtNfromHoriz, (XtArgVal) legend_button); n++; XXtSetArg(args[n], XtNfont, (XtArgVal) XLoadQueryFont(display, WHAT_FONT));n++; X contrast_button = X XtCreateManagedWidget("Contrast", commandWidgetClass, panel, args, n); X} X do_canvas() X{ X int n; X GC XCreateGC(); X XGCValues xgcvalues; X XSetWindowAttributes win_atts; X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 750); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 1000); n++; X XtSetArg(args[n], XtNforceBars, (XtArgVal) True); n++; X XtSetArg(args[n], XtNallowHoriz, (XtArgVal) True); n++; X XtSetArg(args[n], XtNallowVert, (XtArgVal) True); n++; X vp = X XtCreateManagedWidget("vp", viewportWidgetClass, frame, args, n); X X n = 1; X XtSetArg(args[n], XtNx, (XtArgVal) 0); n++; X XtSetArg(args[n], XtNy, (XtArgVal) 0); n++; X histogram_frame = X XtCreatePopupShell X ("histogram_frame", transientShellWidgetClass, frame, args, n); X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 170); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 400); n++; X XtSetArg(args[n], XtNforceBars, (XtArgVal) True); n++; X XtSetArg(args[n], XtNallowHoriz, (XtArgVal) True); n++; X XtSetArg(args[n], XtNallowVert, (XtArgVal) True); n++; X histogram_vp = X XtCreateManagedWidget X ("histogram_vp", viewportWidgetClass, histogram_frame, args, n); X X n = 1; X XtSetArg(args[n], XtNx, (XtArgVal) 550); n++; X XtSetArg(args[n], XtNy, (XtArgVal) 0); n++; X processor_frame = X XtCreatePopupShell X ("processor_frame", transientShellWidgetClass, frame, args, n); X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 180); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 400); n++; X processor_vp = X XtCreateManagedWidget X ("processor_vp", viewportWidgetClass, processor_frame, args, n); X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 180); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 550); n++; X/*boom - XtNwidth was 400 */ X processor_canvas = X XtCreateManagedWidget X ("processor_canvas", widgetClass, processor_vp, args, n); X X n = 1; X XtSetArg(args[n], XtNx, (XtArgVal) 550); n++; X XtSetArg(args[n], XtNy, (XtArgVal) 550); n++; X legend_frame = X XtCreatePopupShell X ("legend_frame", transientShellWidgetClass, frame, args, n); X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 200); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 450); n++; X legend_vp = X XtCreateManagedWidget X ("legend_vp", viewportWidgetClass, legend_frame, args, n); X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 200); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 300); n++; X legend_canvas = X XtCreateManagedWidget X ("legend_canvas", widgetClass, legend_vp, args, n); X X XtRealizeWidget(toplevel); X X n = 1; X XtSetArg(args[n], XtNheight, (XtArgVal) 1000); n++; X XtSetArg(args[n], XtNwidth, (XtArgVal) 1000); n++; X canvas = XtCreateManagedWidget("canvas", widgetClass, vp, args, n); X XtAddEventHandler(canvas, ButtonPressMask, False, handle_event, NULL); X X pw = XtWindow(canvas); X win_atts.backing_store = Always; X XChangeWindowAttributes(display, pw, CWBackingStore, &win_atts); X xgcvalues.function = GXcopy; X xgcvalues.foreground = BlackPixel(display, XDefaultScreen(display)); X xgcvalues.background = my_color_map[BACKGROUND]; X gc = XCreateGC(display, pw, (GCFunction | GCForeground | GCBackground), X &xgcvalues); X} END_OF_FILE if test 16420 -ne `wc -c <'TRACE/X/window_init.c'`; then echo shar: \"'TRACE/X/window_init.c'\" unpacked with wrong size! fi # end of 'TRACE/X/window_init.c' fi if test -f 'TRACE/src/Slider.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/Slider.h'\" else echo shar: Extracting \"'TRACE/src/Slider.h'\" \(1417 characters\) sed "s/^X//" >'TRACE/src/Slider.h' <<'END_OF_FILE' X/* Public definitions for Slider widget. Orlie Brewer. */ X X#ifndef _Slider_h X#define _Slider_h X X#include X X/* Resources: X X Name Class RepType Default Value X ---- ----- ------- ------------- X background Background Pixel XtDefaultBackground X border BorderColor Pixel XtDefaultForeground X borderWidth BorderWidth Dimension 1 X destroyCallback Callback Pointer NULL X height Height Dimension 0 X label Label String NULL X mappedWhenManaged MappedWhenManaged Boolean True X sensitive Sensitive Boolean True X width Width Dimension 0 X x Position Position 0 X y Position Position 0 X X*/ X X/* fields added to Form */ X#define XtNmaxValue "maxValue" X#define XtNminValue "minValue" X#define XtNshowRange "showRange" X#define XtNshowValue "showValue" X#define XtNsliderValue "sliderValue" X#define XtNsliderWidth "sliderWidth" X extern WidgetClass sliderWidgetClass; X typedef struct _SliderClassRec *SliderWidgetClass; typedef struct _SliderRec *SliderWidget; X X#endif _Slider_h END_OF_FILE if test 1417 -ne `wc -c <'TRACE/src/Slider.h'`; then echo shar: \"'TRACE/src/Slider.h'\" unpacked with wrong size! fi # end of 'TRACE/src/Slider.h' fi if test -f 'TRACE/src/active.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/active.c'\" else echo shar: Extracting \"'TRACE/src/active.c'\" \(3871 characters\) sed "s/^X//" >'TRACE/src/active.c' <<'END_OF_FILE' X#include "sched.trace.h" X plot_active2() X{ X int i, j, h, v, x_offset, x_size; X char string[10]; X struct x_y_point *point; X X h = 3; /* Horizontal scaling */ X v = 5; /* Vertical scaling */ X clearscreen(pw2, XSVAL2, YSVAL2); X /* y-axis */ X line(pw2, 400, 0, 400, 360, 1); X for (i = 10; i <= 40; i += 10) X { /* y-axis labels */ X sprintf(string, "%d", i); X text(pw2, 515, 360 - (v*i + 1), string); X } X /* x-axis */ X line(pw2, 0, 360, 1000, 360, 1); X for (i = 10; i < 950; i += 10) X if (i%20) /* Dashed lines */ X for (j = 10; j <= 40; j += 10) X line(pw2, 45 + (i - 10), 360 - v*j, 45 + i, 360 - v*j, 1); X sprintf(string, "Time"); X x_size = get_text_width(string); X text(pw2, 545 - x_size/2, 395, string); X for (i = 1; i < 10; i++) X { X char c; X switch (i) X { X case 1: c = 'P'; break; X case 2: c = 'r'; break; X case 3: c = 'o'; break; X case 4: c = 'c'; break; X case 5: c = 'e'; break; X case 6: c = 's'; break; X case 7: c = 's'; break; X case 8: c = 'e'; break; X case 9: c = 's'; break; X } X put_char(pw2, 405, 255 + i*11, c); X } X /* Update histogram */ X if (event_count) X { X x_offset = 400 + histo_adj; X /* First point. */ X line(pw2, x_offset, 360, x_offset, 365, 1); X sprintf(string, "0"); X x_size = get_text_width(string); X text(pw2, x_offset - x_size/2, 380, string); X line(pw2, x_offset, 360, X h*point_list->x + x_offset, 360 - v*point_list->y, 1); X for (point = point_list; X point->next_point != NULL; point = point->next_point) X { X line(pw2, h*point->x + x_offset, 360 - v*point->y, X h*point->next_point->x + x_offset, X 360 - v*point->next_point->y, 1); X if (((point->x)%10) == 0) X { /* x-axis labels */ X line(pw2, h*point->x + x_offset, 360, X h*point->x + x_offset, 365, 1); X sprintf(string, "%d", point->x); X x_size = get_text_width(string); X text(pw2, h*point->x + x_offset - x_size/2, 380, string); X } X } X } X} X show_active(active_processes, percent) int active_processes; int percent; X{ X int i, h, v, x_offset, x_size; X char string[10]; X struct x_y_point *point; X X h = 3; /* Horizontal scaling */ X v = 5; /* Vertical scaling */ X point = (struct x_y_point *) malloc(sizeof(struct x_y_point)); X/* X point->x = event_count; X*/ X point->x = percent; X point->y = active_processes; X point->next_point = NULL; X/* X if (h*event_count + histo_adj > 400) X { X histo_adj = histo_adj - 100; X if (HISTOGRAM) X plot_active2(); X } X*/ X if (HISTOGRAM) X { X x_offset = 400 + histo_adj; X if (event_count > 1) X { X line(pw2, h*point->x + x_offset, 360 - v*point->y, X h*last_point->x + x_offset, 360 - v*last_point->y, 1); X } X else /* First point. */ X { X line(pw2, x_offset, 360, x_offset, 365, 1); X sprintf(string, "0"); X x_size = get_text_width(string); X text(pw2, x_offset - x_size/2, 380, string); X line(pw2, x_offset, 360, X h*point->x + x_offset, 360 - v*point->y, 1); X } X if ((point->x)%10 == 0) X { /* x-axis labels */ X line(pw2, h*point->x + x_offset, 360, X h*point->x + x_offset, 365, 1); X sprintf(string, "%d", point->x); X x_size = get_text_width(string); X text(pw2, h*point->x + x_offset - x_size/2, 380, string); X } X } X if (event_count == 1) X point_list = point; X else X last_point->next_point = point; X last_point = point; X update_active_counter(active_processes); X} END_OF_FILE if test 3871 -ne `wc -c <'TRACE/src/active.c'`; then echo shar: \"'TRACE/src/active.c'\" unpacked with wrong size! fi # end of 'TRACE/src/active.c' fi if test -f 'TRACE/src/assign_xy.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/assign_xy.c'\" else echo shar: Extracting \"'TRACE/src/assign_xy.c'\" \(761 characters\) sed "s/^X//" >'TRACE/src/assign_xy.c' <<'END_OF_FILE' X#include "sched.trace.h" X assign_xy(max_level) X int max_level; X{ X int i, xinc, yinc, level, node_index, a, y_value; X X for (i = 0; i < MAXNODES; i++) X { X NODE[DEPTH][i][XNODE] = 0; X NODE[DEPTH][i][YNODE] = 0; X }; X X yinc = (YS*size_factor - 2*YOFFSET)/max_level; X DYNDOWN = yinc/3; X X for (level = 0; level < max_level; level++) X { X xinc = (XS*size_factor - XOFFSET)/LVLS[DEPTH][level]; X node_index = 0; X a = 0; X y_value = YS*size_factor - yinc*level - YOFFSET; X while ((node_index = ATLEVEL(node_index, level)) != -1) X { X NODE[DEPTH][node_index][XNODE] = XOFFSET + a*xinc + xinc/2; X NODE[DEPTH][node_index][YNODE] = y_value; X node_index++; X a++; X }; X }; X} X END_OF_FILE if test 761 -ne `wc -c <'TRACE/src/assign_xy.c'`; then echo shar: \"'TRACE/src/assign_xy.c'\" unpacked with wrong size! fi # end of 'TRACE/src/assign_xy.c' fi if test -f 'TRACE/src/atlevel.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/atlevel.c'\" else echo shar: Extracting \"'TRACE/src/atlevel.c'\" \(204 characters\) sed "s/^X//" >'TRACE/src/atlevel.c' <<'END_OF_FILE' X#include "sched.trace.h" X ATLEVEL(nix, level) X int nix, level; X{ X for (; (nix < HINOD) && (NODE[DEPTH][nix][LVIX] != level); nix++); X if (nix != HINOD) X return(nix); X else X return(-1); X} X END_OF_FILE if test 204 -ne `wc -c <'TRACE/src/atlevel.c'`; then echo shar: \"'TRACE/src/atlevel.c'\" unpacked with wrong size! fi # end of 'TRACE/src/atlevel.c' fi if test -f 'TRACE/src/build_levels.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/build_levels.c'\" else echo shar: Extracting \"'TRACE/src/build_levels.c'\" \(1361 characters\) sed "s/^X//" >'TRACE/src/build_levels.c' <<'END_OF_FILE' X#include "sched.trace.h" X X/* X We start at level 0. All nodes are initially at level 0. All nodes increment the level of their parents by 1. Since no leaf node has children, its level is not incremented (i.e. set to 1). All other nodes have their levels set to 1 because they have children; i.e. by statement X X NODE[0][PARENT[nix][pix][1]][LVIX]= current_level + 1; X Now we go to level 1. All nodes at that level increment the level of their parents. Thus, nodes that have only leaf nodes as children do not have their levels set to 2, and of course, all others do. We then continue as such until only the root node is left, who, of course, has no parents and we finally exit the while loop. X*/ X build_levels() X{ X int parents, current_level; X int nix, pix, level; X X current_level = 0; X parents = TRUE; X while (parents) X { X parents = FALSE; X for (nix = 0; (nix = ATLEVEL(nix, current_level)) != -1; nix++) X for (pix = 0; pix < NODE[0][nix][NPNT]; pix++) X if (PARENT[nix][pix][1] != -1) X { X parents = TRUE; X NODE[0][PARENT[nix][pix][1]][LVIX]= current_level + 1; X } X current_level++; X } X HILVL = current_level; X for (level = 0; level < HILVL; level++) X LVLS[DEPTH][level] = 0; X for (nix = 0; nix < HINOD; nix++) X LVLS[DEPTH][NODE[0][nix][LVIX]]++; X} X END_OF_FILE if test 1361 -ne `wc -c <'TRACE/src/build_levels.c'`; then echo shar: \"'TRACE/src/build_levels.c'\" unpacked with wrong size! fi # end of 'TRACE/src/build_levels.c' fi if test -f 'TRACE/src/c_time.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/c_time.c'\" else echo shar: Extracting \"'TRACE/src/c_time.c'\" \(2093 characters\) sed "s/^X//" >'TRACE/src/c_time.c' <<'END_OF_FILE' X#include "sched.trace.h" X int path_number = -1; X c_time(event) int *event; X/* XEvent *event; X*/ X{ X int i, leaf_node; X struct path_node *path, *find_critical_path(); X struct critical_path *cp_ptr, *temp_ptr; X X if (find_paths) X { X int first_node = TRUE; X find_paths = FALSE; X for (i = 0; i < HINOD; i++) X if (NODE[0][i][PNCH] == 0) /* Check all leaf nodes. */ X { X temp_ptr = (struct critical_path *) X malloc(sizeof(struct critical_path)); X temp_ptr->time = 0; X temp_ptr->path = find_critical_path(i, &temp_ptr->time); X if (first_node == TRUE) /* First time through. */ X { X first_node = FALSE; X c_path = temp_ptr; X c_path->next_path = NULL_PTR; X } X else /* Insert temp_ptr in decending time order. */ X { X if (temp_ptr->time > c_path->time) X { X temp_ptr->next_path = c_path; X c_path = temp_ptr; X } X else /* Do insertion sort. */ X { X struct critical_path *ptr1, *ptr2; X ptr1 = c_path; X ptr2 = c_path->next_path; X while (ptr2 != NULL_PTR && X ptr2->time > temp_ptr->time) X { X ptr1 = ptr2; X ptr2 = ptr1->next_path; X } X ptr1->next_path = temp_ptr; X temp_ptr->next_path = ptr2; X } X } X } X } X /* Create the path popup menu. */ X path_number = create_path_menu(event); X if (path_number) X { X int p[MAXNODES]; X cp_ptr = c_path; X for (i = 1; i != path_number; i++) X cp_ptr = cp_ptr->next_path; X i = 0; X for (path = cp_ptr->path; path != NULL_PTR; path = path->parent) X p[++i] = path->index; X redraw_all(); X draw_path(p,i); X } X} END_OF_FILE if test 2093 -ne `wc -c <'TRACE/src/c_time.c'`; then echo shar: \"'TRACE/src/c_time.c'\" unpacked with wrong size! fi # end of 'TRACE/src/c_time.c' fi if test -f 'TRACE/src/cgiconstants.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/cgiconstants.h'\" else echo shar: Extracting \"'TRACE/src/cgiconstants.h'\" \(3318 characters\) sed "s/^X//" >'TRACE/src/cgiconstants.h' <<'END_OF_FILE' X/* @(#)cgiconstants.h 1.4 87/01/08 */ X X/* X * Copyright (c) 1986 by Sun Microsystems, Inc. X */ X X/* X * CGI Constants -- which must match those in "f77/cgidefs77.h" X */ X X/* errors */ X#define NO_ERROR 0 X#define ENOTCGCL 1 X#define ENOTCGOP 2 X#define ENOTVSOP 3 X#define ENOTVSAC 4 X#define ENOTOPOP 5 X#define EVSIDINV 10 X#define ENOWSTYP 11 X#define EMAXVSOP 12 X#define EVSNOTOP 13 X#define EVSISACT 14 X#define EVSNTACT 15 X#define EINQALTL 16 X#define EBADRCTD 20 X#define EBDVIEWP 21 X#define ECLIPTOL 22 X#define ECLIPTOS 23 X#define EVDCSDIL 24 X#define EBTBUNDL 30 X#define EBBDTBDI 31 X#define EBTUNDEF 32 X#define EBADLINX 33 X#define EBDWIDTH 34 X#define ECINDXLZ 35 X#define EBADCOLX 36 X#define EBADMRKX 37 X#define EBADSIZE 38 X#define EBADFABX 39 X#define EPATARTL 40 X#define EPATSZTS 41 X#define ESTYLLEZ 42 X#define ENOPATNX 43 X#define EPATITOL 44 X#define EBADTXTX 45 X#define EBDCHRIX 46 X#define ETXTFLIN 47 X#define ECEXFOOR 48 X#define ECHHTLEZ 49 X#define ECHRUPVZ 50 X#define ECOLRNGE 51 X#define ENMPTSTL 60 X#define EPLMTWPT 61 X#define EPLMTHPT 62 X#define EGPLISFL 63 X#define EARCPNCI 64 X#define EARCPNEL 65 X#define ECELLATS 66 X#define ECELLPOS 67 X#define ECELLTLS 68 X#define EVALOVWS 69 X#define EPXNOTCR 70 X#define EINDNOEX 80 X#define EINDINIT 81 X#define EINDALIN 82 X#define EINASAEX 83 X#define EINAIIMP 84 X#define EINNTASD 85 X#define EINTRNEX 86 X#define EINNECHO 87 X#define EINECHON 88 X#define EINEINCP 89 X#define EINERVWS 90 X#define EINETNSU 91 X#define EINENOTO 92 X#define EIAEVNEN 93 X#define EINEVNEN 94 X#define EBADDATA 95 X#define ESTRSIZE 96 X#define EINQOVFL 97 X#define EINNTRQE 98 X#define EINNTRSE 99 X#define EINNTQUE 100 X#define EMEMSPAC 110 X#define ENOTCSTD 111 X#define ENOTCCPW 112 X#define EFILACC 113 X#define ECGIWIN 114 X X/* devices */ X#define BW1DD 1 X#define BW2DD 2 X#define CG1DD 3 X#define BWPIXWINDD 4 X#define CGPIXWINDD 5 X#define GP1DD 6 X#define CG2DD 7 X#define CG4DD 8 X#define PIXWINDD 9 X X#define VWSURF_NEWFLG 1 X#define _CGI_KEYBORDS 1 X#define _CGI_LOCATORS 4 X#define _CGI_STROKES 3 X#define _CGI_VALUATRS 3 X#define _CGI_CHOICES 3 X#define _CGI_PICKS 3 X#define MAXVWS 5 X#define MAXTRIG 6 X#define MAXASSOC 5 X#define MAXEVENTS 1024 X X/* limits */ X#define MAXAESSIZE 10 /* maximum number of AES table entries */ X#define MAXNUMPATS 50 /* maximum number of pattern table entries */ X#define MAXPATSIZE 256 /* maximum pattern size */ X X#define MAXPTS 1024 /* maximum number of pts per polygon */ X#define MAXCHAR 256 /* maximum number of chars in a string */ X X#define OUTFUNS 67 /* number of output functions */ X#define INFUNS 22 /* number of input functions */ X X/* attributes */ X X/* fonts */ X#define ROMAN 0 X#define GREEK 1 X#define SCRIPT 2 X#define OLDENGLISH 3 X#define STICK 4 X#define SYMBOLS 5 X X#define DEVNAMESIZE 20 X/* Warning: Because of the ; separators, X * do not use the following macro unless it is surrounded with { }s. X * Beware interactions with if-else and ?: constructs. X */ X#define NORMAL_VWSURF(dev,surf) \ X dev.screenname[0] = '\0'; \ X dev.windowname[0] = '\0'; \ X dev.windowfd = 0; \ X dev.retained = 0; \ X dev.dd = surf; \ X dev.cmapsize = 0; \ X dev.cmapname[0] ='\0'; \ X dev.flags = 0; \ X dev.ptr= '\0' ; END_OF_FILE if test 3318 -ne `wc -c <'TRACE/src/cgiconstants.h'`; then echo shar: \"'TRACE/src/cgiconstants.h'\" unpacked with wrong size! fi # end of 'TRACE/src/cgiconstants.h' fi if test -f 'TRACE/src/cgidefs.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/cgidefs.h'\" else echo shar: Extracting \"'TRACE/src/cgidefs.h'\" \(9628 characters\) sed "s/^X//" >'TRACE/src/cgidefs.h' <<'END_OF_FILE' X/* @(#)cgidefs.h 1.3 87/01/08 */ X X/* X * Copyright (c) 1984 by Sun Microsystems, Inc. X */ X X/* X * CGI Type definitions X */ X X#include "cgiconstants.h" /* defines constants */ X#ifndef PIXRECT_HS.H X#include X#endif X typedef char Cchar; X typedef float Cfloat; X typedef int Cint; X typedef enum X{ X ACTIVE, INACTIVE X} Cactstate; X typedef enum X{ X CLEAR, NO_OP, RETAIN X} Cacttype; X X typedef enum X{ X INDIVIDUAL, BUNDLED X} Casptype; X typedef enum X{ X VALID_DATA, X TIMED_OUT, X DISABLED, X WRONG_STATE, X NOT_SUPPORTED X} Cawresult; X typedef enum X{ X TRANSPARENT, OPAQUE X} Cbmode; X typedef enum X{ X BITNOT, BITTRUE X} Cbitmaptype; X typedef enum X{ X HOLLOW, SOLIDI, PATTERN, HATCH X} Cintertype; X typedef enum X{ X STRING, CHARACTER, STROKE X} Cprectype; X typedef enum X{ X SOLID, DOTTED, DASHED, DASHED_DOTTED, DASH_DOT_DOTTED, LONG_DASHED X} Clintype; X typedef enum X{ X DOT, PLUS, ASTERISK, CIRCLE, X X} Cmartype; X typedef struct X{ X Clintype line_type; X Cfloat line_width; X Cint line_color; X Cmartype marker_type; X Cfloat marker_size; X Cint marker_color; X Cintertype interior_style; X Cint hatch_index; X Cint pattern_index; X Cint fill_color; X Clintype perimeter_type; X Cfloat perimeter_width; X Cint perimeter_color; X Cint text_font; X Cprectype text_precision; X Cfloat character_expansion; X Cfloat character_spacing; X Cint text_color; X} Cbunatt; X typedef struct X{ X unsigned char *ra; X unsigned char *ga; X unsigned char *ba; X Cint n; X} Ccentry; X typedef enum X{ X OPEN, CLOSE X} Ccflag; X typedef enum X{ X YES, NO X} Cchangetype; X typedef enum X{ X NOCLIP, X CLIP, X CLIP_RECTANGLE X} Cclip; X typedef enum X{ X CHORD, PIE X} Cclosetype; X typedef enum X{ X REPLACE, AND, OR, NOT, XOR X} Ccombtype; X typedef struct X{ X Cint x; X Cint y; X} Ccoor; X typedef struct X{ X Ccoor *ptlist; X Cint n; X} Ccoorlist; X typedef struct X{ X Ccoor *upper; X Ccoor *lower; X} Ccoorpair; X typedef enum X{ X IC_LOCATOR, X IC_STROKE, X IC_VALUATOR, X IC_CHOICE, X IC_STRING, X IC_PICK X} Cdevoff; X typedef enum X{ X E_TRACK, X E_ECHO, X E_TRACK_OR_ECHO, X E_TRACK_AND_ECHO X} Cechoav; X typedef enum X{ X ECHO_OFF, ECHO_ON, TRACK_ON X} Cechostate; X typedef enum X{ X NO_ECHO, PRINTERS_FIST, HIGHLIGHT, RUBBER_BAND_BOX, X DOTTED_LINE, SOLID_LINE, STRING_ECHO, XLINE, YLINE X} Cechotype; X typedef struct X{ X Cint n; X Cechoav *elements; X Cechotype *echos; X} Cechotypelst; X typedef struct X{ X Cechostate *echos; X Cint n; X} Cechostatelst; X typedef struct X{ X int segid; /* segment */ X int pickid; /* pick id */ X} Cpick; X typedef struct X{ X Ccoor *xypt; /* LOCATOR */ X Ccoorlist *points; /* STROKE devices */ X Cfloat val; /* VALUATOR device */ X Cint choice; /* CHOICE devices */ X Cchar *string; /* STRING device */ X Cpick *pick; /* PICK devices */ X} Cinrep; X typedef struct X{ X Cinrep *echos; X Cint n; X} Cechodatalst; X typedef enum X{ X NATURAL, POINT, BEST_FIT X} Cendstyle; X typedef enum X{ X NO_OFLO, OFLO X} Ceqflow; X typedef Cint Cerror; X typedef enum X{ X INTERRUPT, NO_ACTION, POLL X} Cerrtype; X typedef enum X{ X CLIP_RECT, VIEWPORT, VIEWSURFACE X} Cexttype; X typedef enum X{ X OFF, ON X} Cflag; X typedef struct X{ X Cintertype style; X Cflag visible; X Cint color; X Cint hatch_index; X Cint pattern_index; X Cint index; X Clintype pstyle; X Cfloat pwidth; X Cint pcolor; X} Cfillatt; X typedef struct X{ X Cint n; X Cint *num; X Casptype *value; X} Cflaglist; X typedef enum X{ X FREEZE, REMOVE X} Cfreeze; X typedef struct X{ X Clintype style; X Cfloat width; X Cint color; X Cint index; X} Clinatt; X typedef enum X{ X L_FALSE, L_TRUE X} Clogical; X typedef struct pixrect Cpixrect; X typedef enum X{ X RELEASE, NO_EVENTS, REQUEST_EVENT, RESPOND_EVENT, QUEUE_EVENT X} Clidstate; X typedef struct X{ X Cmartype type; X Cfloat size; X Cint color; X Cint index; X} Cmarkatt; X typedef enum X{ X NO_INPUT, ALWAYS_ON, SETTABLE, DEPENDS_ON_LID X} Cinputability; X typedef struct X{ X Cint cur_index; X Cint row; X Cint column; X Cint *colorlist; X Ccoor *point; X Cint dx; X Cint dy; X} Cpatternatt; X typedef enum X{ X PROMPT_OFF, PROMPT_ON X} Cpromstate; X typedef enum X{ X ACK_ON, ACK_OFF X} Cackstate; X typedef struct X{ X Cint n; X Cdevoff *class; X Cint *assoc; X} Cassoclid; X typedef struct X{ X Clidstate state; X Cpromstate prompt; X Cackstate acknowledgement; X Cinrep *current; X Cint n; X Cint *triggers; X Cechotype echotyp; X Cechostate echosta; X Cint echodat; X} Cstatelist; X typedef struct X{ X Clogical sample; X Cchangetype change; X Cint numassoc; X Cint *trigassoc; X Cinputability prompt; X Cinputability acknowledgement; X Cechotypelst *echo; X Cchar *classdep; X Cstatelist state; X} Cliddescript; X typedef enum X{ X SIMULTANEOUS_EVENT_FOLLOWS, SINGLE_EVENT X} Cmesstype; X typedef enum X{ X RIGHT, LEFT, UP, DOWN X} Cpathtype; X typedef enum X{ X LFT, CNTER, RGHT, NRMAL, CNT X} Chaligntype; X typedef enum X{ X TOP, CAP, HALF, BASE, BOTTOM, NORMAL, CONT X} Cvaligntype; X typedef enum X{ X NOT_VALID, EMPTY, NON_EMPTY, ALMOST_FULL, FULL X} Cqtype; X typedef enum X{ X ABSOLUTE, SCALED X} Cspecmode; X typedef enum X{ X NONE, REQUIRED_FUNCTIONS_ONLY, SOME_NON_REQUIRED_FUNCTIONS, X ALL_NON_REQUIRED_FUNCTIONS X} Csuptype; X typedef struct X{ X Cint fontset; X Cint index; X Cint current_font; X Cprectype precision; X Cfloat exp_factor; X Cfloat space; X Cint color; X Cint height; X Cfloat basex; X Cfloat basey; X Cfloat upx; X Cfloat upy; X Cpathtype path; X Chaligntype halign; X Cvaligntype valign; X Cfloat hcalind; X Cfloat vcalind; X} Ctextatt; X typedef enum X{ X NOT_FINAL, FINAL X} Ctextfinal; X typedef struct X{ X Cchangetype change; X Cassoclid *numassoc; X Cint maxassoc; X Cpromstate prompt; X Cackstate acknowledgement; X Cchar *name; X Cchar *description; X} Ctrigdis; X typedef struct X{ X Cactstate state; X Cassoclid *assoc; X} Ctrigstate; X typedef enum X{ X INTEGER, REAL, BOTH X} Cvdctype; X typedef struct X{ X Cint numloc; X Cint numval; X Cint numstrk; X Cint numchoice; X Cint numstr; X Cint numtrig; X Csuptype event_queue; X Csuptype asynch; X Csuptype coord_map; X Csuptype echo; X Csuptype tracking; X Csuptype prompt; X Csuptype acknowledgement; X Csuptype trigger_manipulation; X} Ccgidesctab; X typedef struct X{ X Cchar screenname[DEVNAMESIZE]; /* physical screen */ X Cchar windowname[DEVNAMESIZE]; /* window */ X Cint windowfd; /* window file */ X Cint retained; /* retained flag */ X Cint dd; /* device */ X Cint cmapsize; /* color map size */ X Cchar cmapname[DEVNAMESIZE]; /* color map name */ X Cint flags; /* new flag */ X Cchar **ptr; /* CGI tool descriptor */ X} Cvwsurf; X X X X/* define abnormal function calls */ X Cpixrect *inquire_device_bitmap(); Clinatt *inquire_line_attributes(); Cmarkatt *inquire_marker_attributes(); Cfillatt *inquire_fill_area_attributes(); Cpatternatt *inquire_pattern_attributes(); Ctextatt *inquire_text_attributes(); Cflaglist *inquire_aspect_source_flags(); X X/* define abnormal CGIPW function calls */ Clinatt *cgipw_inquire_line_attributes(); Cmarkatt *cgipw_inquire_marker_attributes(); Cfillatt *cgipw_inquire_fill_area_attributes(); Cpatternatt *cgipw_inquire_pattern_attributes(); Ctextatt *cgipw_inquire_text_attributes(); Cflaglist *cgipw_inquire_aspect_source_flags(); END_OF_FILE if test 9628 -ne `wc -c <'TRACE/src/cgidefs.h'`; then echo shar: \"'TRACE/src/cgidefs.h'\" unpacked with wrong size! fi # end of 'TRACE/src/cgidefs.h' fi if test -f 'TRACE/src/cgipw.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/cgipw.h'\" else echo shar: Extracting \"'TRACE/src/cgipw.h'\" \(329 characters\) sed "s/^X//" >'TRACE/src/cgipw.h' <<'END_OF_FILE' X/* @(#)cgipw.h 1.5 87/01/08 */ X X/* X * Copyright (c) 1986 by Sun Microsystems, Inc. X */ X X/* X * CGI Type definitions X */ X X#include "cgidefs.h" /* defines constants */ X#ifndef WINDOW_HS.H X#include X#endif X X/* X * Opaque handle for CGI surface. X */ typedef struct X{ X struct view_surface *vws; X} Ccgiwin; END_OF_FILE if test 329 -ne `wc -c <'TRACE/src/cgipw.h'`; then echo shar: \"'TRACE/src/cgipw.h'\" unpacked with wrong size! fi # end of 'TRACE/src/cgipw.h' fi if test -f 'TRACE/src/draw_level.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/draw_level.c'\" else echo shar: Extracting \"'TRACE/src/draw_level.c'\" \(371 characters\) sed "s/^X//" >'TRACE/src/draw_level.c' <<'END_OF_FILE' X#include "sched.trace.h" X draw_level(level, i) X int level, i; X{ X int nix, flag, FLAG; X X FLAG = 0; X nix = 0; X while ( ((nix = ATLEVEL(nix, level)) != -1) && (FLAG == 0) ) X { X if ((FLAG == 0) && i) draw_node(nix); X flag = connect_nodes(nix,i); X if (flag) FLAG = 1; X if ((FLAG == 0) && i) draw_dynodes(nix); X nix++; X }; X return(FLAG); X} END_OF_FILE if test 371 -ne `wc -c <'TRACE/src/draw_level.c'`; then echo shar: \"'TRACE/src/draw_level.c'\" unpacked with wrong size! fi # end of 'TRACE/src/draw_level.c' fi if test -f 'TRACE/src/draw_path.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/draw_path.c'\" else echo shar: Extracting \"'TRACE/src/draw_path.c'\" \(1217 characters\) sed "s/^X//" >'TRACE/src/draw_path.c' <<'END_OF_FILE' X#include "sched.trace.h" X draw_path(p, m) X int *p, m; X{ X int i, c, b, slope, color; X X color = my_color_map[RED]; X p++; X for (i = 1; i < m; i++) X { X b = *(p); X c = *(++p); X slope = 10; X if ((NODE[DEPTH][b][XNODE] - NODE[DEPTH][c][XNODE]) != 0) X slope = (NODE[DEPTH][b][YNODE] - NODE[DEPTH][c][YNODE]) / X (NODE[DEPTH][b][XNODE] - NODE[DEPTH][c][XNODE]); X slope = slope * slope; X line(pw, NODE[DEPTH][b][XNODE], NODE[DEPTH][b][YNODE]+1, X NODE[DEPTH][c][XNODE], NODE[DEPTH][c][YNODE]+1, color); X line(pw, NODE[DEPTH][b][XNODE], NODE[DEPTH][b][YNODE]+2, X NODE[DEPTH][c][XNODE], NODE[DEPTH][c][YNODE]+2, color); X if (slope > 1) X { X line(pw, NODE[DEPTH][b][XNODE]+1, NODE[DEPTH][b][YNODE], X NODE[DEPTH][c][XNODE]+1, NODE[DEPTH][c][YNODE], color); X line(pw, NODE[DEPTH][b][XNODE]+2, NODE[DEPTH][b][YNODE], X NODE[DEPTH][c][XNODE]+2, NODE[DEPTH][c][YNODE], color); X } X if (slope > 4) X { X line(pw, NODE[DEPTH][b][XNODE]+3, NODE[DEPTH][b][YNODE], X NODE[DEPTH][c][XNODE]+3, NODE[DEPTH][c][YNODE], color); X } X } X} END_OF_FILE if test 1217 -ne `wc -c <'TRACE/src/draw_path.c'`; then echo shar: \"'TRACE/src/draw_path.c'\" unpacked with wrong size! fi # end of 'TRACE/src/draw_path.c' fi if test -f 'TRACE/src/draw_subtree.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/draw_subtree.c'\" else echo shar: Extracting \"'TRACE/src/draw_subtree.c'\" \(1448 characters\) sed "s/^X//" >'TRACE/src/draw_subtree.c' <<'END_OF_FILE' X#include "sched.trace.h" X draw_subtree() X{ X int index, current_level, yincr, level, a, yvalue, xincr, len; X int flag, i; X X/* assign levels relative current node and number of parents */ X X current_level = NODE[0][CURRENT_NODE][LVIX] + 1; X for (index = 0; index < HINOD; index++) X if (get_path_length(index, CURRENT_NODE, &len) == -1) X { X NODE[DEPTH][index][NPNT] = -1; X NODE[DEPTH][index][LVIX] = -1; X NODE[DEPTH][index][NCH] = -1; X } X else X { X NODE[DEPTH][index][LVIX] = NODE[0][index][LVIX]; X NODE[DEPTH][index][NPNT] = NODE[0][index][NPNT]; X NODE[DEPTH][index][NCH] = NODE[0][index][NCH]; X } X NODE[DEPTH][CURRENT_NODE][LVIX] = current_level - 1; X NODE[DEPTH][CURRENT_NODE][NPNT] = 0; X NODE[DEPTH][CURRENT_NODE][NCH] = NODE[0][CURRENT_NODE][NCH]; X X/* prepare to assign x and y coordinates to subtree */ X X for (level = 0; level < HILVL; level++) X LVLS[DEPTH][level] = 0; X for (index = 0; index < HINOD; index++) X if (NODE[DEPTH][index][LVIX] != -1) X LVLS[DEPTH][NODE[DEPTH][index][LVIX]]++; X assign_xy(current_level); X X/* draw levels of subtree */ X X for (i = 0; i < 2; i++) X { X flag = TRUE; X while (flag) X { X if (i) X clearscreen(pw, XSVAL, YSVAL); X flag = FALSE; X for (level = 0; level <= current_level; level++) X if (draw_level(level, i)) X flag = TRUE; X } X } X} END_OF_FILE if test 1448 -ne `wc -c <'TRACE/src/draw_subtree.c'`; then echo shar: \"'TRACE/src/draw_subtree.c'\" unpacked with wrong size! fi # end of 'TRACE/src/draw_subtree.c' fi if test -f 'TRACE/src/drawing.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/drawing.c'\" else echo shar: Extracting \"'TRACE/src/drawing.c'\" \(11854 characters\) sed "s/^X//" >'TRACE/src/drawing.c' <<'END_OF_FILE' X#include "sched.trace.h" X#include X drawcircle(surface, x, y, radius, color, xormode, type, id) Surface surface; int x, y, radius, color, xormode, type, id; X X/* X type : 0 => blank => not ready for execution. X 1 => vertically hashed => ready for execution. X 2 => doubly hashed => currently executing. X 3 => smaller circle within => suspended during execution. X 4 => solid => execution completed. X xormode : 0 => replace X 1 => xor it X*/ X{ X int xdisp, ydisp, radsqr, ydsqr, xdsqr, i, new_radius; X char string[3]; X X if (nodraw || x == 0 || radius <= 0) X return(1); X /* Clear the circle. */ X#ifdef ORIGINAL X xdisp = 0; X ydisp = radius; X radsqr = radius * radius; X ydsqr = radsqr; X do /* Scan until crossing 45 degree line (xdisp = ydisp) */ X { X do /* Scan right until off circle by pythagorean theorem */ X { X reflect_fill(surface, x, y, ydisp, xdisp, 0, xormode); X xdisp++; /* move right one pixel */ X } X while (radius > ((xdisp * xdisp + ydsqr) - radsqr)); X if (xdisp-1 != ydisp) X reflect_fill(surface, x, y, xdisp-1, ydisp, 0, xormode); X ydisp--; /* move down one pixel */ X ydsqr = ydisp * ydisp; X } X while (xdisp <= ydisp); X#else X fillcircle(surface, x, y, radius, 0, xormode); X#endif X#ifdef ORIGINAL X /* Draw a circle. */ X xdisp = 0; X ydisp = radius; X radsqr = radius * radius; X ydsqr = radsqr; X do X { X do X { X creflect(surface, x, y, xdisp, ydisp, color, xormode); X xdisp++; X } X while (radius > ((xdisp * xdisp + ydsqr) - radsqr)); X ydisp--; X ydsqr = ydisp * ydisp; X } X while (xdisp <= ydisp); X#else X fillcircle(surface, x, y, radius, color, xormode); X#endif X /* Draw the node type. */ X switch(type) X { X case 0: X break; X case 1: X case 2: X#ifndef NEWCIRCLE X ydisp = 0; X xdisp = radius - 1; X radsqr = (radius -1) * (radius -1); X xdsqr = radsqr; X do X { X do X { X reflect_up(surface, x, y, ydisp, xdisp, color, xormode); X ydisp += 3; X } X while (radius - 1 > (ydisp * ydisp + xdsqr) - radsqr); X if (ydisp-1 != xdisp) X reflect_up(surface, x, y, xdisp, ydisp-1, color, xormode); X xdisp -= 3; X xdsqr = xdisp * xdisp; X } X while (ydisp <= xdisp); X#else X fillcircle(surface, x, y, radius-1, color, xormode); X#endif X if (type == 1) X break; X#ifndef NEWCIRCLE X xdisp = 0; X ydisp = radius - 1; X radsqr = (radius - 1) * (radius - 1); X ydsqr = radsqr; X do X { X do X { X reflect_fill(surface, x, y, ydisp, xdisp, color, xormode); X xdisp += 2; X } X while (radius - 1 > (xdisp * xdisp + ydsqr) - radsqr); X if (xdisp-1 != ydisp) X reflect_fill(surface, x, y, xdisp-1, ydisp, color, xormode); X ydisp -= 2; X ydsqr = ydisp * ydisp; X } X while (xdisp <= ydisp); X#else X fillcircle(surface, x, y, radius-1, color, xormode); X#endif X break; X case 3: X#ifndef NEWCIRCLE X new_radius = radius/2; X xdisp = 0; X ydisp = new_radius; X radsqr = new_radius * new_radius; X ydsqr = radsqr; X do X { X do X { X creflect(surface, x, y, xdisp, ydisp, color, xormode); X xdisp++; X } X while (new_radius > ((xdisp * xdisp + ydsqr) - radsqr)); X ydisp--; X ydsqr = ydisp * ydisp; X } X while (xdisp <= ydisp); X#else X fillcircle(surface, x, y, new_radius, color, xormode); X#endif X break; X case 4: X#ifdef ORIGINAL X xdisp = 0; X ydisp = radius; X radsqr = radius * radius; X ydsqr = radsqr; X do X { X do X { X reflect_fill(surface, x, y, ydisp, xdisp, color, xormode); X xdisp++; X } X while (radius > ((xdisp * xdisp + ydsqr) - radsqr)); X if (xdisp-1 != ydisp) X reflect_fill(surface, x, y, xdisp-1, ydisp, color, xormode); X ydisp--; X ydsqr = ydisp * ydisp; X } X while (xdisp <= ydisp); X#else X fillcircle(surface, x, y, radius, color, xormode); X#endif X break; X default: X break; X } X if (id >= 0) X { X sprintf(string, "%d", id); X text(surface, x + C_RADIUS + 1, y + C_RADIUS + 1, string); X } X} X/* X * Routine creflect takes advantage of the 8-fold symmetry in a circle. X * It could also be used like the reflect function of Deluxe Paint, X * since it will make 8 reflections of distance (xdisp,ydisp) from (x,y). X * creflect(x1,y1,(x2-x1),(y2-y1)) will reflect (x2,y2) about (x1,y1). X */ creflect(surface, x, y, xdisp, ydisp, color, xormode) Surface surface; int x, y, xdisp, ydisp, color, xormode; X{ X point(surface, x+xdisp, y+ydisp, color, xormode); X point(surface, x+xdisp, y-ydisp, color, xormode); X if (xdisp != 0) X { X point(surface, x-xdisp, y+ydisp, color, xormode); X point(surface, x-xdisp, y-ydisp, color, xormode); X } X if (xdisp != ydisp) X { X point(surface, x+ydisp, y+xdisp, color, xormode); X point(surface, x-ydisp, y+xdisp, color, xormode); X if (xdisp != 0) X { X point(surface, x+ydisp, y-xdisp, color, xormode); X point(surface, x-ydisp, y-xdisp, color, xormode); X } X } X} X X/* X * reflect_fill takes advantage of te same 8-fold symmetry that creflect does, X * except it draws horizontal and vertical stripes instead of only points. X * Notice that the end points are the same as the pixels in creflect. X */ reflect_fill(surface, x, y, xdisp, ydisp, color, xormode) Surface surface; int x, y, xdisp, ydisp, color, xormode; X{ X horline(surface, x-xdisp, y+ydisp, xdisp<<1, color, xormode); X if (ydisp) horline(surface, x-xdisp, y-ydisp, xdisp<<1, color, xormode); X} X reflect_up(surface, x, y, xdisp, ydisp, color, xormode) Surface surface; int x, y, xdisp, ydisp, color, xormode; X{ X verline(surface, x-xdisp, y-ydisp, ydisp<<1, color, xormode); X if(xdisp) verline(surface, x+xdisp, y-ydisp, ydisp<<1, color, xormode); X} X draw_node(index) X int index; X{ X int fill, color, status; X X if (fb_depth > 1) X { X fill = COMPLETED; X status = NODE[0][index][STATUS]; X if (status == NOTREADY) X color = my_color_map[WHITE]; X else if (status == READY) X color = my_color_map[YELLOW]; X else if (status == EXECUTING) X color = my_color_map[GREEN]; X else if (status == SUSPENDED) X color = my_color_map[RED]; X else if (status == COMPLETED) X color = my_color_map[BLACK]; X } X else X { X fill = NODE[0][index][STATUS]; X color = my_color_map[BLACK]; X } X drawcircle(pw, NODE[DEPTH][index][XNODE], NODE[DEPTH][index][YNODE], X C_RADIUS, color, 0, fill, NODE[0][index][ID]); X} X draw_dynodes(index) X int index; X{ X int px, py, status, num, dynzone, i, j, color; X int xmin, xincr, ymin, xsize, value; X X px = NODE[DEPTH][index][XNODE]; X py = NODE[DEPTH][index][YNODE]; X dynzone = 60 ; X xmin = px - dynzone/2; X xincr = 8; X xsize = 4; X ymin = py + DYNDOWN; X j = DYNNODE[index][0][0]; X color = my_color_map[BLACK]; X for (i = 1; i < j; i++) X { X status = DYNNODE[index][i][1]; X if (!nodraw && status != -1) X { X box(pw, xmin, ymin, xmin+xsize, ymin + 10, status); X line(pw, xmin + xsize/2, ymin, px, py + C_RADIUS, color); X } X xmin = xmin + xincr; X } X} X draw_1_dynode(index, dyindex) X int index, dyindex; X{ X int px, py, status, xpos, color; X int num, xmin, xincr, ymin, xsize, dynzone; X X px = NODE[DEPTH][index][XNODE]; X py = NODE[DEPTH][index][YNODE]; X dynzone = 60; X xmin = px - dynzone/2; X xincr = 8; X xsize = 4; X ymin = py + DYNDOWN; X xpos = xmin + xincr*(dyindex - 1); X status = DYNNODE[index][dyindex][1]; X box(pw, xpos, ymin, xpos+xsize, ymin+10, status); X if (!nodraw) X { X if (status == -1) X color = my_color_map[BACKGROUND]; X else X color = my_color_map[BLACK]; X line(pw, xpos + xsize/2, ymin, px, py + C_RADIUS, color); X } X} X box(surface, x1, y1, x2, y2, status) X Surface surface; X int x1, y1, x2, y2, status; X{ X int i, x, y, w, h, fill, step, color; X X if (nodraw) X return(1); X if (fb_depth > 1) X { X if (status == 0) X color = my_color_map[YELLOW]; X else if (status == 1) X color = my_color_map[GREEN]; X else if (status == 2) X color = my_color_map[BLACK]; X else X ; X fill = 2; X } X else X { X color = my_color_map[BLACK]; X fill = status; X } X if (!forward) X { /* Erase the box. */ X if (x1 < x2) X { x = x1; w = x2 - x1; } X else X { x = x2; w = x1 - x2; } X if (y1 < y2) X { y = y1; h = y2 - y1; } X else X { y = y2; h = y1 - y2; } X erase(surface, x, y, w, h); X line(surface, x1, y1, x1, y2, 0); /* Left */ X line(surface, x1, y1, x2, y1, 0); /* Top */ X line(surface, x2, y1, x2, y2, 0); /* Right */ X line(surface, x1, y2, x2, y2, 0); /* Bottom */ X } X if (status != -1) X { /* First draw the box. */ X line(surface, x1, y1, x1, y2, color); /* Left */ X line(surface, x1, y1, x2, y1, color); /* Top */ X line(surface, x2, y1, x2, y2, color); /* Right */ X line(surface, x1, y2, x2, y2, color); /* Bottom */ X switch (fill) X { X case 0 : return; X case 1 : step = 2; break; /* Draw two lines. */ X case 2 : step = 1; break; /* Draw four lines. */ X } X for (i = 0; i < 4; i += step) X line(surface, x1 + i, y1, x1 + i, y2, color); /* vertical bar */ X } X} X connect_nodes(index, i) X int index, i; X{ X int x_diff, y_diff, x1, y1, x2, y2; X double distance; X int a, b, c, flag, FLAG, offset, color; X X if (nodraw) X return(1); X a = NODE[DEPTH][index][NPNT]; X if ((a == 0) && DEPTH) X line(pw, NODE[DEPTH][index][XNODE], X NODE[DEPTH][index][YNODE], 0, 0, my_color_map[BLACK]); X b = 0; X FLAG = 0; X while ((b < a) && (FLAG == 0)) X { X c = PARENT[index][b][1]; X if ((c != -1)) X { X flag = chk(NODE[DEPTH][c][XNODE],NODE[DEPTH][index][YNODE], X NODE[DEPTH][c][YNODE]); X if (flag) FLAG = 1; X offset = 10; X if (NODE[DEPTH][c][LVIX] % 2) offset = -10; X NODE[DEPTH][c][XNODE] = NODE[DEPTH][c][XNODE] + offset*flag; X color = my_color_map[BLACK]; X if ((FLAG == 0) && i) X { X x_diff = NODE[DEPTH][c][XNODE] - NODE[DEPTH][index][XNODE]; X y_diff = NODE[DEPTH][c][YNODE] - NODE[DEPTH][index][YNODE]; X distance = sqrt((double)((x_diff*x_diff)+(y_diff*y_diff))); X x1 = (int) (NODE[DEPTH][index][XNODE] + X (C_RADIUS*x_diff/distance)); X y1 = (int) (NODE[DEPTH][index][YNODE] + X (C_RADIUS*y_diff/distance)); X x2 = (int) (NODE[DEPTH][c][XNODE] - X (C_RADIUS*x_diff/distance)); X y2 = (int) (NODE[DEPTH][c][YNODE] - X (C_RADIUS*y_diff/distance)); X line(pw, x1, y1, x2, y2, color); X } X }; X b++; X } X return(FLAG); X} X chk(x, y1, y0) int x, y1, y0; X{ X int index; X X for (index = 0; index < HINOD; index++) X if ((NODE[DEPTH][index][XNODE] == x) && X (y0 < NODE[DEPTH][index][YNODE]) && X (NODE[DEPTH][index][YNODE] < y1) ) X return(1); X return(0); X} END_OF_FILE if test 11854 -ne `wc -c <'TRACE/src/drawing.c'`; then echo shar: \"'TRACE/src/drawing.c'\" unpacked with wrong size! fi # end of 'TRACE/src/drawing.c' fi if test -f 'TRACE/src/dumps.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/dumps.c'\" else echo shar: Extracting \"'TRACE/src/dumps.c'\" \(2004 characters\) sed "s/^X//" >'TRACE/src/dumps.c' <<'END_OF_FILE' X#include "sched.trace.h" X prdata() /* print data structures */ X{ X/* X dump_points(); X dump_parent_array(); X dump_dynnode_array(); X dump_node_array(); X dump_events(); X*/ X} X dump_points() X{ X struct x_y_point *point; X X printf("Histogram points:\n"); X for (point = point_list; point != NULL; point = point->next_point) X printf("%d %d\n", point->x,point->y); X} X dump_node_array() X{ X int i, j, k; X X printf("NODE ARRAY at DEPTH %d\n",DEPTH); X printf("[0]\t[1]\t[2]\t[3]\t[4]\t[5]\t[6]\t[7]\t[8]\n"); X for (i = 0; i < HINOD; i++) X { X for (k = (100-e_speed) * 5000; k > 0; k--); /* wait */ X printf("Index = %d\n", i); X for (j = 0; j < 9; j++) printf("%d\t",NODE[DEPTH][i][j]); X printf("\n"); X }; X} X dump_dynnode_array() X{ int i,j,k; X X printf("DYNNODE ARRAY\n"); X printf("[1]\t[2]\t[3]\t[4]\t[5]\t[6]\t[7]\t[8]\t[9]\t[10]\t"); X printf("\n"); X for (i = 0; i < HINOD; i++) X { X for (k = (100-e_speed) * 5000; k > 0; k--); /* wait */ X printf("Node index = %d\n", i); X for (j = 0; j < 10; j++) printf("%d\t", DYNNODE[i][j][0]); X printf("\n"); X for (j = 0; j < 10; j++) printf("%d\t", DYNNODE[i][j][1]); X printf("\n"); X printf("\n"); X }; X} X dump_parent_array() X{ X int i,j,k; X X printf("PARENTS ARRAY\n"); X printf("[1]\t[2]\t[3]\t[4]\t[5]\t[6]\t[7]\t[8]\t[9]\t[10]\t"); X printf("\n"); X for ( i=0;i 0; k--); /* wait */ X printf("i=%d\n",i); X for (j=0;j<9;j++) printf("%d\t",PARENT[i][j][0]); X printf("\n"); X for (j=0;j<9;j++) printf("%d\t",PARENT[i][j][1]); X printf("\n"); X printf("\n"); X }; X} X dump_events() X X{ X X int k; X struct event *event_ptr; X X printf ("Events.\n"); X for (event_ptr = event_list->next_event; event_ptr != trailer_event; X event_ptr = event_ptr->next_event) X { X for (k = (100-e_speed) * 5000; k > 0; k--); /* wait */ X printf("%d\t%d\t%d\n", event_ptr->type, event_ptr->node_id, X event_ptr->dynode_id); X } X X} X END_OF_FILE if test 2004 -ne `wc -c <'TRACE/src/dumps.c'`; then echo shar: \"'TRACE/src/dumps.c'\" unpacked with wrong size! fi # end of 'TRACE/src/dumps.c' fi if test -f 'TRACE/src/events.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/events.c'\" else echo shar: Extracting \"'TRACE/src/events.c'\" \(8893 characters\) sed "s/^X//" >'TRACE/src/events.c' <<'END_OF_FILE' X#include "sched.trace.h" X proc_event() X X/* This function processes one event from the event list. */ X X{ X int i; X X /* Event speed regulator */ X for (i = 5000 * (100 - e_speed); i > 0; i--); X X if (nodraw && (event_count == start_draw_mark)) X { X nodraw = FALSE; X go = FALSE; X redraw_all(); X display_message("Select GO to continue."); X update_event_counter(100.0*(current_event->time - first_time)/ X (last_time - first_time)); X } X if (forward) X { X if (current_event->next_event == trailer_event) X { X go = FALSE; X display_message("End of execution."); X return(0); X } X else X { X current_event = current_event->next_event; X ETYPE = current_event->type; X if (ETYPE != DYNAMICNODE) X { X ++event_count; X update_event_counter(100.0*(current_event->time - first_time)/ X (last_time - first_time)); X } X } X } X else /* Going backward. */ X { X if (current_event->previous_event == event_list) X { X go = FALSE; X display_message("At the beginning."); X return(0); X } X else X { X current_event = current_event->previous_event; X ETYPE = current_event->type; X if (ETYPE != DYNAMICNODE) X { X --event_count; X update_event_counter(100.0*(current_event->time - first_time)/ X (last_time - first_time)); X } X } X } X switch (ETYPE) X { X case STARTSTATIC : DOSTARTSTATIC(); break; X case STOPSTATIC : DOSTOPSTATIC(); break; X case DYNAMICNODE : DODYNNODE(); break; X case STARTDYN : DOSTARTDYN(); break; X case STOPDYN : DOSTOPDYN(); break; X case WAITSTATIC : DOWAITSTATIC(); break; X default : X printf("I don't know this type, # %d, in event # %d.\n", X ETYPE, event_count); X return(0); X break; X }; X return(ETYPE); X} X DOSTARTSTATIC() X{ X int node_id, node_index, percent; X X node_id = current_event->node_id; X node_index = search(node_id); X plot_processors(current_event->time); X if (forward) X { X current_event->previous_status = NODE[0][node_index][STATUS]; X PROCESSORS[current_event->processor] = 1; X NODE[0][node_index][PROC_ID] = current_event->processor; X NODE[0][node_index][STATUS] = EXECUTING; X ACTIVEPROCS++; X } X else /* Going backwards. */ X { X NODE[0][node_index][STATUS] = current_event->previous_status; X ACTIVEPROCS--; X } X draw_node(node_index); X percent = (int) 100 * (current_event->time - first_time) / X(last_time - first_time); X show_active(ACTIVEPROCS, percent); X} X DOSTOPSTATIC() X{ X int i, node_id, node_index, parent_index, x, y, a, t, percent; X float timing; X X node_id = current_event->node_id; X node_index = search(node_id); X plot_processors(current_event->time); X/* X if (time_flag) X { X timing = time_factor* X (TIMES[node_index][0][1]-TIMES[node_index][0][0]); X if (timing_flag) X { X while ((timing < 1000) && (timing > 0)) X { X timing_flag = 0; X timing = timing * 10; X time_factor = time_factor * 10; X } X } X timing = (100 - t_speed)*timing; X while (timing > 0) timing = timing - 1; X } X*/ X if (forward) X { X current_event->previous_status = NODE[0][node_index][STATUS]; X PROCESSORS[NODE[0][node_index][PROC_ID]] = 0; X NODE[0][node_index][PROC_ID] = 0; X if (NODE[0][node_index][STATUS] == EXECUTING) X ACTIVEPROCS-- ; X NODE[0][node_index][STATUS] = COMPLETED; X } X else /* Going backwards. */ X { X NODE[0][node_index][STATUS] = current_event->previous_status; X if (NODE[0][node_index][STATUS] == EXECUTING) X ACTIVEPROCS++ ; X } X a = -1; X while (PARENT[node_index][++a][0]) X if (PARENT[node_index][a][1] != -1) X { X if (forward) X { X --NODE[0][PARENT[node_index][a][1]][NCH]; X if (DEPTH) --NODE[DEPTH][PARENT[node_index][a][1]][NCH]; X if (NODE[DEPTH][PARENT[node_index][a][1]][NCH] == 0) X { X NODE[DEPTH][PARENT[node_index][a][1]][STATUS] = READY; X draw_node(PARENT[node_index][a][1]); X } X } X else X { X ++NODE[0][PARENT[node_index][a][1]][NCH]; X if (DEPTH) ++NODE[DEPTH][PARENT[node_index][a][1]][NCH]; X if (NODE[DEPTH][PARENT[node_index][a][1]][NCH] == 1) X { X NODE[DEPTH][PARENT[node_index][a][1]][STATUS] = NOTREADY; X draw_node(PARENT[node_index][a][1]); X } X } X } X draw_node(node_index); X percent = (int) 100 * (current_event->time - first_time) / X(last_time - first_time); X show_active(ACTIVEPROCS, percent); X} X DODYNNODE() X{ X int node_id, node_index, dynode_id, dynode_index; X X node_id = current_event->node_id; X dynode_id = current_event->dynode_id; X node_index = search(node_id); X dynode_index = dynode_search(node_index, dynode_id); X if (forward) X { X DYNNODE[node_index][dynode_index][1] = 0; X } X else /* Going backwards. */ X { X DYNNODE[node_index][dynode_index][1] = -1; X } X draw_1_dynode(node_index,dynode_index); X} X DOSTARTDYN() X{ X int node_id, node_index, dynode_id, dynode_index, percent; X X node_id = current_event->node_id; X dynode_id = current_event->dynode_id; X node_index = search(node_id); X dynode_index = dynode_search(node_index, dynode_id); X plot_processors(current_event->time); X if (forward) X { X PROCESSORS[current_event->processor] = 1; X DYNNODE[node_index][dynode_index][2] = current_event->processor; X DYNNODE[node_index][dynode_index][1] = 1; X ACTIVEPROCS++; X } X else /* Going backwards. */ X { X DYNNODE[node_index][dynode_index][1] = 0; X ACTIVEPROCS--; X } X draw_1_dynode(node_index, dynode_index); X percent = (int) 100 * (current_event->time - first_time) / X (last_time - first_time); X show_active(ACTIVEPROCS, percent); X} X DOSTOPDYN() X{ X int node_id, node_index, dynode_id, dynode_index, percent; X int last_one_to_finish; X float timing; X X node_id = current_event->node_id; X dynode_id = current_event->dynode_id; X node_index = search(node_id); X dynode_index = dynode_search(node_index, dynode_id); X plot_processors(current_event->time); X/* X if (time_flag) X { X timing = time_factor * X (TIMES[node_index][dynode_index][1] - X TIMES[node_index][dynode_index][0]); X if (timing_flag) X while ((timing < 1000) && (timing > 0)) X { X timing_flag = 0; X timing = timing * 10; X time_factor = time_factor * 10; X } X timing = (100 - t_speed)*timing; X while (timing > 0) timing = timing - 1; X } X*/ X if (forward) X { X PROCESSORS[DYNNODE[node_index][dynode_index][2]] = 0; X DYNNODE[node_index][dynode_index][2] = 0; X DYNNODE[node_index][dynode_index][1] = 2; X ACTIVEPROCS--; X } X else /* Going backwards. */ X { X DYNNODE[node_index][dynode_index][1] = 1; X ACTIVEPROCS++; X } X draw_1_dynode(node_index, dynode_index); X percent = (int) 100 * (current_event->time - first_time) / X(last_time - first_time); X show_active(ACTIVEPROCS, percent); X} X DOWAITSTATIC() X{ X int i, node_id, node_index, percent; X X node_id = current_event->node_id; X node_index = search(node_id); X plot_processors(current_event->time); X if (forward) X { X current_event->previous_status = NODE[0][node_index][STATUS]; X PROCESSORS[NODE[0][node_index][PROC_ID]] = 0; X NODE[0][node_index][PROC_ID] = 0; X NODE[0][node_index][STATUS] = SUSPENDED; X ACTIVEPROCS-- ; X } X else /* Going backwards. */ X { X NODE[0][node_index][STATUS] = current_event->previous_status; X ACTIVEPROCS++ ; X } X draw_node(node_index); X percent = (int) 100 * (current_event->time - first_time) / X(last_time - first_time); X show_active(ACTIVEPROCS, percent); X} X plot_processors(time) X float time; X{ X int i, x1, x2, y; X float x_ratio, y_ratio; X static float previous_time; X X if (show_processor) X { X y_ratio = (YSVAL3 - 10.0) / number_of_processors; X x_ratio = (XSVAL3 - 10.0) / (last_time - first_time); X if (event_count != 1) X for (i = 1; i <= number_of_processors; i++) X if (PROCESSORS[i]) X { X x1 = 5 + x_ratio*(previous_time - first_time); X x2 = 5 + x_ratio*(time - first_time); X y = 5 + y_ratio*(i - 1); X line(pw_processor, x1, y, x2, y, 1); X } X } X previous_time = time; X} END_OF_FILE if test 8893 -ne `wc -c <'TRACE/src/events.c'`; then echo shar: \"'TRACE/src/events.c'\" unpacked with wrong size! fi # end of 'TRACE/src/events.c' fi if test -f 'TRACE/src/find_parents.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/find_parents.c'\" else echo shar: Extracting \"'TRACE/src/find_parents.c'\" \(483 characters\) sed "s/^X//" >'TRACE/src/find_parents.c' <<'END_OF_FILE' X#include "sched.trace.h" X find_parents() X{ X/* X For each node, find the node indices of all parent nodes. X PARENT[node_index][parent][0] contains the parent ID; X PARENT[node_index][parent][1] will contain the parent's index X into the node array. X*/ X int node_index, parent; X X for (node_index = 0; node_index < HINOD; node_index++) X for (parent = 0; parent < NODE[0][node_index][NPNT]; parent++) X PARENT[node_index][parent][1] = search(PARENT[node_index][parent][0]); X} X END_OF_FILE if test 483 -ne `wc -c <'TRACE/src/find_parents.c'`; then echo shar: \"'TRACE/src/find_parents.c'\" unpacked with wrong size! fi # end of 'TRACE/src/find_parents.c' fi if test -f 'TRACE/src/get_path_len.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/get_path_len.c'\" else echo shar: Extracting \"'TRACE/src/get_path_len.c'\" \(1015 characters\) sed "s/^X//" >'TRACE/src/get_path_len.c' <<'END_OF_FILE' X#include "sched.trace.h" X get_path_length(n, c, length) X int n, c, *length; X/* To establish a path from n (index in NODE array of node in question) to c (index in NODE array of current node) we need to trace ancestory of n. X*length keeps track of largest column + 1 with nonzero entry. X*/ X{ X int a[MAXLVLS][MAXNODES]; X int i, j, gen, k, sum; X X sum = 0; X for (i = 0; i < MAXLVLS; i++) X for (j = 0; j < MAXNODES; j++) X a[i][j] = -1; X a[0][n] = 1; X gen = HILVL; X if (c != -1) X gen = NODE[0][c][LVIX] - NODE[0][n][LVIX]; X if (gen > 0) X { X for (i = 0; i < gen; i++) X for (j = 0; j < MAXNODES; j++) X if (a[i][j] != -1) X { X k = 0; X while (PARENT[j][k][0]) X { X a[i+1][ PARENT[j][k][1] ] = j + 1; X k++; X } X *length = i + 1; X } X if (c != -1) X for (i = 0; i <= gen; i++) X if (a[i][c] != -1) X return(1); X } X return(-1); X} END_OF_FILE if test 1015 -ne `wc -c <'TRACE/src/get_path_len.c'`; then echo shar: \"'TRACE/src/get_path_len.c'\" unpacked with wrong size! fi # end of 'TRACE/src/get_path_len.c' fi if test -f 'TRACE/src/legend.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/legend.c'\" else echo shar: Extracting \"'TRACE/src/legend.c'\" \(2071 characters\) sed "s/^X//" >'TRACE/src/legend.c' <<'END_OF_FILE' X#include "sched.trace.h" X legend() X{ X int i, height, yoffset; X X height = (get_text_height())/2; X for (i = 0; i < 5; i++) X { X char string[100]; X int color, fill; X if (fb_depth > 1) X { X fill = COMPLETED; X if (i == NOTREADY) X color = my_color_map[WHITE]; X else if (i == READY) X color = my_color_map[YELLOW]; X else if (i == EXECUTING) X color = my_color_map[GREEN]; X else if (i == SUSPENDED) X color = my_color_map[RED]; X else if (i == COMPLETED) X color = my_color_map[BLACK]; X } X else X { X fill = i; X color = my_color_map[BLACK]; X } X drawcircle(pw_legend, C_RADIUS + 2, 2*C_RADIUS*(i + 1) + 2*i, X C_RADIUS, color, 0, fill, -1); X switch(i) X { X case 0: X strcpy(string, "Static node: Not ready for execution."); X break; X case 1: X strcpy(string, "Static node: Ready for execution."); X break; X case 2: X strcpy(string, "Static node: Currently executing."); X break; X case 3: X strcpy(string, "Static node: Suspended during execution."); X break; X case 4: X strcpy(string, "Static node: Execution completed."); X break; X } X text(pw_legend, 4*C_RADIUS, 2*C_RADIUS*(i + 1) + 2*i + height, X string); X } X yoffset = 11*(C_RADIUS + 1) + 5; X for (i = 0; i < 3; i++) X { X char string[100]; X box(pw_legend, 10, 15*i + yoffset, 14, 15*i + yoffset + 10, i); X switch(i) X { X case 0: X strcpy(string, "Spawned node: Ready for execution."); X break; X case 1: X strcpy(string, "Spawned node: Currently executing."); X break; X case 2: X strcpy(string, "Spawned node: Execution completed."); X break; X } X text(pw_legend, 4*C_RADIUS, 15*i + yoffset + 10, string); X } X} END_OF_FILE if test 2071 -ne `wc -c <'TRACE/src/legend.c'`; then echo shar: \"'TRACE/src/legend.c'\" unpacked with wrong size! fi # end of 'TRACE/src/legend.c' fi if test -f 'TRACE/src/load.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/load.c'\" else echo shar: Extracting \"'TRACE/src/load.c'\" \(2394 characters\) sed "s/^X//" >'TRACE/src/load.c' <<'END_OF_FILE' X#include "sched.trace.h" X#ifdef TITAN X#include X#include X#include X#endif X#ifndef TITAN X#include X#include X#include X#endif X extern int errno; X load_tables() X{ X load_directory_table(); X load_file_table("."); X} X load_directory_table() X{ X struct dirent *d; X DIR *dp; X int i; X struct stat stbuf; X X if ((dp = opendir(".")) == NULL) X { X printf("Cannot open directory .\n"); X exit(); X } X X i = 0; X while (directory_table[i] != NULL) X free(directory_table[i++]); X i = 0; X while ((d =(struct dirent *)readdir(dp)) != (struct dirent *)NULL && i < 127) X { X#ifdef TITAN printf("In load directory:\n"); printf("%ld %d %d\n", d->d_ino, d->d_off, d->d_reclen); printf("%s\n", d->d_name); X#endif X if (stat(d->d_name,&stbuf) == -1) X { X printf("Stat failed on %s.\n", d->d_name); X printf("errno = %d.\n", errno); X } X else if ((stbuf.st_mode & S_IFMT) == S_IFDIR) X { X directory_table[i] = (char *) malloc(d->d_namlen+1); X if (directory_table[i] == NULL) X { X printf("No memory for directory.\n"); X exit(); X } X strcpy(directory_table[i++],d->d_name); X } X } X closedir(dp); X if (i == 127) printf("Too many directory entries.\n"); X directory_table[i] = NULL; X set_directory_menu(); X} X load_file_table(s) X char *s; X{ X struct dirent *d; X DIR *dp; X int i; X X if ((dp = opendir(s)) == NULL) X { X printf("Cannot open directory.\n"); X exit(); X } X X i = 0; X while (file_table[i] != NULL) X free(file_table[i++]); X i = 0; X while ((d =(struct dirent *)readdir(dp)) != (struct dirent *)NULL && i < 127) X { X if (d->d_namlen > 5 && X d->d_name[0] == 't' && X d->d_name[1] == 'r' && X d->d_name[2] == 'a' && X d->d_name[3] == 'c' && X d->d_name[4] == 'e' && X d->d_name[5] == '.') X { X file_table[i] = (char *) malloc(d->d_namlen+1); X if (file_table[i] == NULL) X { X printf("No memory for directory.\n"); X exit(); X } X strcpy(file_table[i++], d->d_name); X } X } X closedir(dp); X if (i == 127) printf("Too many file entries.\n"); X max_file_index = i - 1; X file_table[i] = NULL; X set_file_menu(); X} END_OF_FILE if test 2394 -ne `wc -c <'TRACE/src/load.c'`; then echo shar: \"'TRACE/src/load.c'\" unpacked with wrong size! fi # end of 'TRACE/src/load.c' fi if test -f 'TRACE/src/new_tree.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/new_tree.c'\" else echo shar: Extracting \"'TRACE/src/new_tree.c'\" \(1680 characters\) sed "s/^X//" >'TRACE/src/new_tree.c' <<'END_OF_FILE' X#include "sched.trace.h" X new_tree() /* Initialize a new tree. */ X{ X int i, j, k; X char *str; X struct event *event_ptr; X X NOSKIP = TRUE; X ACTIVEPROCS = 0; X CURRENT_NODE = 0; X DEPTH = 0; X HINOD = 0; X HILVL = 0; X for (i = 0; i < MAXNODES; i++) X { X TIMES[i] = -1; X for (j = 0; j < MAXDEPTH; j++) X for (k = 0; k < 10; k++) X NODE[j][i][k] = 0; X for (j = 0; j < MAXPARENTS; j++) X for (k = 0; k < 2; k++) X PARENT[i][j][k] = 0; X for (j = 0; j < MAXDYNODES; j++) X { X DYNNODE[i][j][0] = 0; X DYNNODE[i][j][1] = -1; X DYNNODE[i][j][2] = 0; X } X DYNNODE[i][0][0] = 1; X } X for (i = 1; i <= number_of_processors; i++) X PROCESSORS[i] = 0; X XS = 500; X YS = 500; X event_count = 0; X size_factor = 1; X time_factor = 1; X time_flag = TRUE; X timing_flag = TRUE; X e_speed = 100; X t_speed = 100; X pending = 0; X nodraw = FALSE; X start_draw_mark = 0; /* normal start */ X forward = TRUE; X event_ptr = event_list->next_event; X while (event_ptr != trailer_event) X { X struct event *temp_ptr; X temp_ptr = event_ptr->next_event; X free((char *) event_ptr); X event_ptr = temp_ptr; X } X event_list->next_event = trailer_event; X trailer_event->previous_event = event_list; X current_event = event_list; X find_paths = TRUE; X reset_values(); /* Window dependent routines. */ X str = "Current node "; X display_node(str); X str = "Length of Critical Path "; X display_path(str); X clearscreen(pw, XSVAL, YSVAL); X if (HISTOGRAM) X plot_active2(); X histo_adj = 0; X if (show_processor) X clearscreen(pw_processor, XSVAL3, YSVAL3); X} X END_OF_FILE if test 1680 -ne `wc -c <'TRACE/src/new_tree.c'`; then echo shar: \"'TRACE/src/new_tree.c'\" unpacked with wrong size! fi # end of 'TRACE/src/new_tree.c' fi if test -f 'TRACE/src/open_tracefi.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/open_tracefi.c'\" else echo shar: Extracting \"'TRACE/src/open_tracefi.c'\" \(8081 characters\) sed "s/^X//" >'TRACE/src/open_tracefi.c' <<'END_OF_FILE' X#include "sched.trace.h" X char string[80]; XFILE *trace_file; X open_tracefile(file_name) X char *file_name; X{ X if ((trace_file = fopen(file_name, "r")) == NULL) X { X sprintf (string, "Couldn't open file %s.", file_name); X display_message(string); X } X else X { X sprintf (string, "Loading %s.", file_name); X display_message(string); X new_tree(); X fscanf(trace_file, "%d", &number_of_processors); X total_events = 0; X first_node_to_start = TRUE; X while (fscanf(trace_file, "%d", &ETYPE) != EOF) X { X if (ETYPE != STATICNODE && ETYPE != DYNAMICNODE) ++total_events; X switch (ETYPE) X { X case STATICNODE : READSTATIC(); break; X case STARTSTATIC : READSTARTSTATIC(); break; X case STOPSTATIC : READSTOPSTATIC(); break; X case DYNAMICNODE : READDYNNODE(); break; X case STARTDYN : READSTARTDYN(); break; X case STOPDYN : READSTOPDYN(); break; X case WAITSTATIC : READWAITSTATIC(); break; X default : X printf("I don't know this type, # %d, in event # %d.\n", X ETYPE, total_events); X exit(1); X break; X } X } X fclose(trace_file); X file_loaded = TRUE; X current_event = event_list; X REBUILD(); X display_message("Select GO to begin execution."); X } X} X READSTATIC() X{ X int i, node_id, number_of_children, number_of_parents, parent; X X if (HINOD == MAXNODES) X { X printf("*********OUT OF SPACE************\n"); X printf("Maximum number of nodes exceeded (%d).\n", MAXNODES); X exit(1); X }; X fscanf(trace_file, "%d %d %d", X &node_id, &number_of_children, &number_of_parents); X NODE[0][HINOD][ID] = node_id; X NODE[0][HINOD][NCH] = number_of_children; X NODE[0][HINOD][PNCH] = number_of_children; X NODE[0][HINOD][NPNT] = number_of_parents; X NODE[0][HINOD][LVIX] = 0; X if (number_of_children == 0) X NODE[0][HINOD][STATUS] = READY; X else X NODE[0][HINOD][STATUS] = NOTREADY; X i = 0; X while (i < number_of_parents) X { X fscanf(trace_file, "%d", &parent); X PARENT[HINOD][i][0] = parent; X PARENT[HINOD][i][1] = -1; X i++; X } X fscanf(trace_file, "%s", &NAMES[HINOD][0][0]); X HINOD++; X return(1); X} X READSTARTSTATIC() X{ X int node_id, node_index, processor; X float time; X X fscanf(trace_file, "%d", &node_id); X if ((node_index = search(node_id)) == -1) X { X printf("READSTARTSTATIC - Can not find node %d.\n", node_id); X printf("Event number = %d.\n", total_events); X exit(3); X }; X fscanf(trace_file, "%f", &time); X fscanf(trace_file, "%d", &processor); X/* X fscanf(trace_file, "%s", string); X*/ X new_node(ETYPE, node_id, 0, processor, time); X if (first_node_to_start) X { X first_node_to_start = FALSE; X first_time = time; X } X if (TIMES[node_index] < 0) X TIMES[node_index] = time; X} X X READSTOPSTATIC() X{ X int node_id, node_index; X float time; X X fscanf(trace_file, "%d", &node_id); X if ((node_index = search(node_id)) == -1) X { X printf("READSTOPSTATIC: Cannot find node %d.\n", node_id); X printf("Event number = %d.\n", total_events); X exit(1); X } X fscanf(trace_file, "%f", &time); X/* X fscanf(trace_file, "%s", string); X*/ X new_node(ETYPE, node_id, 0, 0, time); X last_time = time; X TIMES[node_index] = time - TIMES[node_index]; X} X READDYNNODE() X{ X int node_id, node_index, dynode_id, dynode_index; X char junk_string[10]; X X fscanf(trace_file, "%d %d", &node_id, &dynode_id); X if ((node_index = search(node_id)) == -1) X { X printf("READDYNODE: Cannot find node %d.\n", node_id); X printf("Event number = %d.\n", total_events); X exit(1); X }; X if ((dynode_index = DYNNODE[node_index][0][0]) == MAXDYNODES) X { X printf("READDYNNODE: No room for dynamic node %d in %d.\n", X dynode_id, node_id); X printf("Ignoring all remainimg dynamic nodes for %d.\n", node_id); X printf("Event number = %d.\n", total_events); X fscanf(trace_file, "%s", junk_string); X return(1); X }; X fscanf(trace_file, "%s", &NAMES[node_index][dynode_index][0]); X DYNNODE[node_index][dynode_index][0] = dynode_id; X DYNNODE[node_index][dynode_index][1] = -1; X DYNNODE[node_index][0][0] = dynode_index + 1; X new_node(ETYPE, node_id, dynode_id, 0, 0); X} X READSTARTDYN() X{ X int node_id, node_index, dynode_id, dynode_index, processor; X float time; X X fscanf(trace_file,"%d %d", &node_id, &dynode_id); X if ((node_index = search(node_id)) == -1) X { X printf("READSTARTDYN: Cannot find node %d.\n", node_id); X printf("Event number = %d.\n", total_events); X exit(1); X }; X if ((dynode_index = dynode_search(node_index, dynode_id)) == -1) X { X printf("READSTARTDYN:Cannot find dynamic node %d in %d.\n", X node_id, dynode_id); X printf("Event number = %d.\n", total_events); X fscanf(trace_file, "%f", &time); X fscanf(trace_file, "%d", &processor); X return(1); X }; X fscanf(trace_file, "%f", &time); X fscanf(trace_file, "%d", &processor); X/* X fscanf(trace_file, "%s", string); X*/ X new_node(ETYPE, node_id, dynode_id, processor, time); X} X READSTOPDYN() X{ X int node_id, node_index, dynode_id, dynode_index; X float time; X X fscanf(trace_file, "%d %d", &node_id, &dynode_id); X if ((node_index = search(node_id)) == -1) X { X printf("READSTOPDYN: Cannot find node %d.\n", node_id); X printf("Event number = %d.\n", total_events); X exit(1); X } X if ((dynode_index = dynode_search(node_index,dynode_id)) == -1) X { X printf("READSTOPDYN: Cannot find dyn node %d in %d.\n", X node_id, dynode_id); X printf("Event number = %d.\n", total_events); X fscanf(trace_file, "%f", &time); X return(1); X } X fscanf(trace_file, "%f", &time); X/* X fscanf(trace_file, "%s", string); X*/ X new_node(ETYPE, node_id, dynode_id, 0, time); X} X READWAITSTATIC() X{ X int node_id, node_index; X float time; X X fscanf(trace_file, "%d", &node_id); X if ((node_index = search(node_id)) == -1) X { X printf("READWAITSTATIC: Cannot find node %d.\n", node_id); X printf("Event number = %d.\n", total_events); X exit(1); X } X fscanf(trace_file, "%f", &time); X/* X fscanf(trace_file, "%s", string); X*/ X new_node(ETYPE, node_id, 0, 0, time); X last_time = time; X TIMES[node_index] = time - TIMES[node_index]; X} X new_node (type, node_id, dynode_id, processor, time) int type, node_id, dynode_id, processor; float time; X{ X struct event *event_ptr, *last_event; X X if ((event_ptr = (struct event *) malloc(sizeof(struct event))) == NULL) X { X printf("Out of memory!\n"); X exit(1); X } X event_ptr->previous_event = current_event; X current_event->next_event = event_ptr; X current_event = event_ptr; X current_event->type = type; X current_event->node_id = node_id; X current_event->dynode_id = dynode_id; X current_event->processor = processor; X current_event->time = time; X X current_event->next_event = trailer_event; X trailer_event->previous_event = current_event; X#ifdef ABC X if ((current_event = (struct event *) malloc(sizeof(struct event))) == NULL) X { X printf("Out of memory!\n"); X printf("In new_node; node id = %d.\n", node_id); X exit(1); X } X current_event->type = type; X current_event->node_id = node_id; X current_event->dynode_id = dynode_id; X current_event->processor = processor; X current_event->time = time; X X /* Perform insertion sort. */ X last_event = event_list; X event_ptr = event_list->next_event; X while (current_event->time >= event_ptr->time) X { /* Guarateed to terminate since trailer_event->time = 1.0e+100. */ X last_event = event_ptr; X event_ptr = event_ptr->next_event; X } X last_event->next_event = current_event; X current_event->previous_event = last_event; X current_event->next_event = event_ptr; X event_ptr->previous_event = current_event; X#endif X} END_OF_FILE if test 8081 -ne `wc -c <'TRACE/src/open_tracefi.c'`; then echo shar: \"'TRACE/src/open_tracefi.c'\" unpacked with wrong size! fi # end of 'TRACE/src/open_tracefi.c' fi if test -f 'TRACE/src/pathes.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/pathes.c'\" else echo shar: Extracting \"'TRACE/src/pathes.c'\" \(1188 characters\) sed "s/^X//" >'TRACE/src/pathes.c' <<'END_OF_FILE' X#include "sched.trace.h" X struct path_node *find_critical_path(index, time) X int index; X float *time; X{ X int i, j; X float max_time, new_time; X struct path_node *path, *new_path, *parent_path; X X path = (struct path_node *) malloc(sizeof(struct path_node)); X path->index = index; X X if (NODE[0][index][NPNT] == 0) X { X *time = TIMES[index]; X path->parent = NULL_PTR; X } X else X { X max_time = -1; X parent_path = NULL_PTR; X for (i = 0; i < NODE[0][index][NPNT]; i++) X { X new_time = 0; X new_path = find_critical_path(PARENT[index][i][1], &new_time); X if (new_time > max_time) X { X max_time = new_time; X free_path(parent_path); X parent_path = new_path; X } X else X { X free_path(new_path); X } X } X *time = max_time + TIMES[index]; X path->parent = parent_path; X } X return (path); X} X free_path(path) X struct path_node *path; X{ X struct path_node *ptr, *temp_ptr; X X ptr = path; X while (ptr != NULL_PTR) X { X temp_ptr = ptr->parent; X free((char *) ptr); X ptr = temp_ptr; X } X} END_OF_FILE if test 1188 -ne `wc -c <'TRACE/src/pathes.c'`; then echo shar: \"'TRACE/src/pathes.c'\" unpacked with wrong size! fi # end of 'TRACE/src/pathes.c' fi if test -f 'TRACE/src/rebuild.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/rebuild.c'\" else echo shar: Extracting \"'TRACE/src/rebuild.c'\" \(628 characters\) sed "s/^X//" >'TRACE/src/rebuild.c' <<'END_OF_FILE' X#include "sched.trace.h" X void redraw_all() X{ X if(file_loaded) X REBUILD(); X} X REBUILD() X{ X int i, level, flag; X X DEPTH = 0; X find_parents(); /* For each node, find node indices of parents. */ X build_levels(); /* Assign a level to each node. */ X assign_xy(HILVL); /* Assign x and y coordinates to each node. */ X for (i = 0; i < 2; i++) X { X flag = TRUE; X while (flag) X { X if (i) clearscreen(pw, XSVAL, YSVAL); X flag = FALSE; X for (level = 0; (level < HILVL) && (flag == FALSE); level++) X if (draw_level(level, i)) flag = TRUE; X } X } X} X END_OF_FILE if test 628 -ne `wc -c <'TRACE/src/rebuild.c'`; then echo shar: \"'TRACE/src/rebuild.c'\" unpacked with wrong size! fi # end of 'TRACE/src/rebuild.c' fi if test -f 'TRACE/src/sched.trace.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/sched.trace.h'\" else echo shar: Extracting \"'TRACE/src/sched.trace.h'\" \(6358 characters\) sed "s/^X//" >'TRACE/src/sched.trace.h' <<'END_OF_FILE' X/* Header file for the sched.trace program. */ X#include X X#ifdef SUNVIEW X#undef SUNVIEW X#include X#include X#include X#include X#include X#include X#include X#include typedef Pixwin *Surface; X#undef SUNVIEW X#define SUNVIEW X#endif X X#ifdef X X#define WHAT_FONT "-adobe-times-medium-r-*-*-20-*-*-*-*-*-*-*" X#define WHAT_FONT_BOLD "-adobe-times-bold-r-*-*-24-*-*-*-*-*-*-*" X#include X#include X#include X#include X#include X#include X#include X#include X#include X#include "Slider.h" typedef Window Surface; typedef Widget Frame; typedef Widget Panel; typedef Widget Canvas; typedef Widget Scrollbar; typedef Widget Panel_item; typedef Widget Menu; Display *display; GC gc; X#endif X X#define ROUND(x) (int)(x+0.5) X X/* Constants */ X X#define MAXNODES 200 X#define MAXDYNODES 77 X#define MAXPARENTS 20 X#define MAXDEPTH 10 X#define MAXLVLS 50 /* Maximum number of levels. */ X#define MAXLVL 20 /* Maximum number of nodes at each level. */ X#define MAXPROCESSORS 50 /* Maximum number of processors. */ X#define C_RADIUS 10 /* Size of the nodes. */ X#define SYS -1 /* Top nodes's parent. */ X X#define NUM_COLORS 16 X#define WHITE 0 X#define BLACK 1 X#define RED 2 X#define GREEN 3 X#define BLUE 4 X#define YELLOW 5 X#define TURQUOISE 6 X#define MAGENTA 7 X#define BACKGROUND 8 X X/* Indices for the node array. */ X X#define ID 0 X#define NCH 1 X#define NPNT 2 X#define PNCH 3 X#define XNODE 4 X#define YNODE 5 X#define LVIX 6 X#define STATUS 7 X#define PATHLENGTH 8 X#define PROC_ID 9 X X/* Statuses */ X X#define NOTREADY 0 X#define READY 1 X#define EXECUTING 2 X#define SUSPENDED 3 X#define COMPLETED 4 X X/* Event types. */ X X#define STATICNODE 0 X#define STARTSTATIC 1 X#define STOPSTATIC 2 X#define DYNAMICNODE 3 X#define STARTDYN 4 X#define STOPDYN 5 X#define WAITSTATIC 6 X X#ifdef SUNVIEW X#define XSVAL pw->pw_prretained->pr_size.x X#define YSVAL pw->pw_prretained->pr_size.y X#define XSVAL2 pw2->pw_prretained->pr_size.x X#define YSVAL2 pw2->pw_prretained->pr_size.y X#define XSVAL3 pw_processor->pw_prretained->pr_size.x X#define YSVAL3 pw_processor->pw_prretained->pr_size.y X#define XSVAL4 pw_legend->pw_prretained->pr_size.x X#define YSVAL4 pw_legend->pw_prretained->pr_size.y X#endif X X#ifdef X X#define XSVAL get_x_size(pw) X#define YSVAL get_y_size(pw) X#define XSVAL2 get_x_size(pw2) X#define YSVAL2 get_y_size(pw2) X#define XSVAL3 get_x_size(pw_processor) X#define YSVAL3 get_y_size(pw_processor) X#define XSVAL4 get_x_size(pw_legend) X#define YSVAL4 get_y_size(pw_legend) X#endif X X#define HOLLOW 0 X#define SOLID 1 X#define PLOP 0 X#define XOR 1 X#define NULL_PTR 0 X X/* Structure definitions */ X struct path_node X { X int index; X struct path_node *parent; X }; X struct critical_path X { X float time; X struct path_node *path; X struct critical_path *next_path; X }; X struct event X { X int type; X int node_id; X int dynode_id; X int processor; X int previous_status; X float time; X struct event *next_event; X struct event *previous_event; X }; X X X/* Global variables. */ X int XOFFSET; int YOFFSET; int XS,YS; int fd; int NODRAW; int HISTOGRAM; int HINOD; int HILVL; int XSIZE; int YSIZE; int NOSKIP; int ETYPE; int CURRENT_NODE; int DEPTH; int DYNZONE; int DYNDOWN; int ACTIVEPROCS; int MOSTPROCS; X X/* Arrays. */ X int NODE[MAXDEPTH][MAXNODES][10]; float CTIMES[MAXNODES]; int DYNNODE[MAXNODES][MAXDYNODES][3]; int LVLS[MAXDEPTH][MAXLVLS]; int PARENT[MAXNODES][MAXPARENTS][3]; X/*int A[MAXLVLS][MAXNODES][10];*/ float TIMES[MAXNODES]; char NAMES[MAXNODES][MAXDYNODES][50]; int PROCESSORS[MAXPROCESSORS]; unsigned long my_color_map[NUM_COLORS]; X struct x_y_point X { X int x; X int y; X struct x_y_point *next_point; X } *point_list, *last_point; /* Used to create histogram. */ X int histo_adj; /* shifts x-coordinates on histogram */ int event_count; /* count of events processed */ int total_events; /* total number of lines in file*/ int size_factor; /* allows one to expand or contract graph */ int time_factor; /* allows one to expand or contract graph */ int time_flag; /* determines whether timing is on or off */ int timing_flag; /* determines whether timing scale is set*/ int nodraw; /* do not draw, do everything else */ int start_draw_mark; /* start drawing when linecount gets here */ int done; int go; int sunny; int e_speed; int t_speed; int pending; int dt_index; /* directory_table index */ int ft_index; /* file_table index */ int max_file_index; char *directory_table[128]; char *file_table[128]; XFILE *fp; /* Pointer to the trace file */ int forward; int find_paths; struct critical_path *c_path; struct event *event_list, *trailer_event, *current_event; int number_of_processors; int screen_toggle; int show_processor; int show_legend; int file_loaded; int first_node_to_start; float first_time, last_time; int enter_new_directory; int fb_depth; int x_pos; int y_pos; X X#ifdef X Widget toplevel, vp, histogram_vp, processor_vp, legend_vp, title_label, X cw_slider_num_label, file_menu_shell; X#endif XFrame frame, histogram_frame, processor_frame, legend_frame; Panel panel; Canvas canvas, histogram_canvas, processor_canvas, legend_canvas; Scrollbar h_bar, v_bar; Panel_item title, X filetext, msgtext, directiontext, nodetext, pathtext, X load_button, go_button, stop_button, step_button, X quit_button, direction_button, subtree_button, full_button, X path, path_button, prepath_button, redraw_button, X histogram_button, timing_button, X c_time_button, name_button, processor_button, X contrast_button, legend_button, screendump_button, X file_choice, directory_choice, X e_speed_slider, t_speed_slider, cw_slider, count_slider, X delay_slider; Surface pw, pw2, pw_processor, pw_legend; Menu path_menu; X/* struct pixrect *color_button(); X*/ END_OF_FILE if test 6358 -ne `wc -c <'TRACE/src/sched.trace.h'`; then echo shar: \"'TRACE/src/sched.trace.h'\" unpacked with wrong size! fi # end of 'TRACE/src/sched.trace.h' fi if test -f 'TRACE/src/searches.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'TRACE/src/searches.c'\" else echo shar: Extracting \"'TRACE/src/searches.c'\" \(1045 characters\) sed "s/^X//" >'TRACE/src/searches.c' <<'END_OF_FILE' X#include "sched.trace.h" X search(id) X int id; X{ X/* X Find and return the index into the node array of a node, given its node id. X*/ X int index; X X for (index = 0; (index != HINOD) && (NODE[0][index][ID] != id); index++); X if (index != HINOD) X return(index); X else X return(-1) ; X} X dynode_search(node_index, did) X int node_index, did; X{ X/* X Find and return the index into the dynamic node array of a dynamic node, X given its node id and its parent's index into the node array. X*/ X int i, j; X X j = DYNNODE[node_index][0][0]; X for (i = 1; i < j; i++) X if (DYNNODE[node_index][i][0] == did) X return(i); X return (-1); X} X node_search(x, y) X int x, y; X{ X/* X Determine if the given (x,y) coordinates are within the radius of any node. X*/ X int r, nix; X X r = C_RADIUS*C_RADIUS; X nix = -1; X while (nix++ <= HINOD) X if (((NODE[DEPTH][nix][XNODE] - x)*(NODE[DEPTH][nix][XNODE] - x) < r) && X ((NODE[DEPTH][nix][YNODE] - y)*(NODE[DEPTH][nix][YNODE] - y) < r)) X return(nix); X if (nix > HINOD) return(-1) ; X} X END_OF_FILE if test 1045 -ne `wc -c <'TRACE/src/searches.c'`; then echo shar: \"'TRACE/src/searches.c'\" unpacked with wrong size! fi # end of 'TRACE/src/searches.c' fi echo shar: End of shell archive. exit 0