summaryrefslogtreecommitdiff
path: root/ipl/mprogs/roll.icn
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
commitf627f77f23d1497c9e1f4269b5c8812d12b42f18 (patch)
tree708772d83a8355e25155cf233d5a9e38f8ad4d96 /ipl/mprogs/roll.icn
parent6ab0c0f5bf14ed9c15370407b9ee7e0b4b089ae1 (diff)
downloadicon-upstream.tar.gz
Imported Upstream version 9.5.0upstream/9.5.0upstream
Diffstat (limited to 'ipl/mprogs/roll.icn')
-rw-r--r--ipl/mprogs/roll.icn103
1 files changed, 0 insertions, 103 deletions
diff --git a/ipl/mprogs/roll.icn b/ipl/mprogs/roll.icn
deleted file mode 100644
index 0f1ea32..0000000
--- a/ipl/mprogs/roll.icn
+++ /dev/null
@@ -1,103 +0,0 @@
-############################################################################
-#
-# File: roll.icn
-#
-# Subject: Program to display the program counter on a stripchart
-#
-# Author: Gregg M. Townsend and Ralph E. Griswold
-#
-# Date: June 25, 1996
-#
-############################################################################
-#
-# This file is in the public domain.
-#
-############################################################################
-#
-# roll displays a chart recording a time-history of program execution
-# by line number.
-#
-############################################################################
-#
-# Requires: Version 9 graphics
-#
-############################################################################
-#
-# Links: em_setup, filedim, strpchrt
-#
-############################################################################
-#
-# Includes: evdefs.icn
-#
-############################################################################
-
-$include "evdefs.icn"
-
-link em_setup
-link filedim
-link strpchrt
-
-$define Width 500
-$define MaxHeight 500
-
-global ifile, Limit
-global maxln
-
-procedure main(args)
- local fname, sc, h, t, y, mask, ymul, maxln
- local size, i, linemask
-
- linemask := 2 ^ 16 - 1
-
- em_setup(args)
-
- size := filedim(prog_name())
- maxln := size.rows
-
- if maxln > MaxHeight then {
- ymul := real(MaxHeight) / maxln
- maxln := MaxHeight
- }
- else ymul := 1
-
- Limit := 10
-
- vis_setup("size=" || Width || "," || maxln, "label=roll")
-
- sc := stripchart(Visualization, 0, 0, Width, maxln)
-
- t := 0
- i := 0
-
- mask := E_Loc ++ E_Tick
-
- repeat {
-
- i := (i + 1) % Limit
-
- if i = 0 then {
- while *Pending(Visualization) > 0 do
- case Event(Visualization) of {
- &lpress | &mpress | &rpress: {
- event(E_ALoc, integer(&y / ymul) + 1, &eventsource)
- }
- }
- }
-
-
- EvGet(mask) | break
- if &eventcode === E_Loc then {
- y := ymul * iand(&eventvalue, linemask)
- DrawPoint(sc.win, sc.x, y)
- }
- else if &eventcode === E_Tick then sadvance(sc, &eventvalue)
- }
-
- sadvance(sc)
-
- Fg(sc.win, "red")
- DrawLine(sc.win, sc.x, 0, sc.x, maxln)
-
- em_end()
-
-end