aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pman
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pman')
-rw-r--r--lib/pman/AUTHORS9
-rw-r--r--lib/pman/Makefile34
-rw-r--r--lib/pman/doc/html/.gitignore0
-rw-r--r--lib/pman/doc/man3/.gitignore0
-rw-r--r--lib/pman/doc/pdf/.gitignore0
-rw-r--r--lib/pman/doc/src/Makefile116
-rw-r--r--lib/pman/doc/src/book.xml43
-rw-r--r--lib/pman/doc/src/fascicules.xml18
-rw-r--r--lib/pman/doc/src/main_window.gifbin0 -> 14431 bytes
-rw-r--r--lib/pman/doc/src/main_window.ps1573
-rw-r--r--lib/pman/doc/src/make.dep26
-rw-r--r--lib/pman/doc/src/note.gifbin0 -> 1539 bytes
-rw-r--r--lib/pman/doc/src/notes.xml144
-rw-r--r--lib/pman/doc/src/options.gifbin0 -> 5218 bytes
-rw-r--r--lib/pman/doc/src/options.ps829
-rw-r--r--lib/pman/doc/src/part.xml37
-rw-r--r--lib/pman/doc/src/part_notes.xml39
-rw-r--r--lib/pman/doc/src/pman.xml82
-rw-r--r--lib/pman/doc/src/pman_chapter.xml371
-rw-r--r--lib/pman/doc/src/ref_man.xml37
-rw-r--r--lib/pman/doc/src/toolbar.gifbin0 -> 6848 bytes
-rw-r--r--lib/pman/doc/src/trace.gifbin0 -> 9829 bytes
-rw-r--r--lib/pman/doc/src/trace.ps1312
-rw-r--r--lib/pman/doc/src/warning.gifbin0 -> 1498 bytes
-rw-r--r--lib/pman/ebin/.gitignore0
-rw-r--r--lib/pman/info2
-rw-r--r--lib/pman/priv/Makefile58
-rw-r--r--lib/pman/priv/pman.gifbin0 -> 199 bytes
-rw-r--r--lib/pman/priv/pman.tool6
-rw-r--r--lib/pman/src/Makefile112
-rw-r--r--lib/pman/src/assert.hrl81
-rw-r--r--lib/pman/src/pman.app.src40
-rw-r--r--lib/pman/src/pman.appup.src19
-rw-r--r--lib/pman/src/pman.erl132
-rw-r--r--lib/pman/src/pman_buf.erl117
-rw-r--r--lib/pman/src/pman_buf.hrl29
-rw-r--r--lib/pman/src/pman_buf_buffer.erl102
-rw-r--r--lib/pman/src/pman_buf_converter.erl189
-rw-r--r--lib/pman/src/pman_buf_printer.erl89
-rw-r--r--lib/pman/src/pman_buf_utils.erl106
-rw-r--r--lib/pman/src/pman_main.erl787
-rw-r--r--lib/pman/src/pman_module_info.erl131
-rw-r--r--lib/pman/src/pman_options.erl395
-rw-r--r--lib/pman/src/pman_options.hrl34
-rw-r--r--lib/pman/src/pman_process.erl317
-rw-r--r--lib/pman/src/pman_relay.erl127
-rw-r--r--lib/pman/src/pman_relay_server.erl57
-rw-r--r--lib/pman/src/pman_shell.erl823
-rw-r--r--lib/pman/src/pman_tool.erl145
-rw-r--r--lib/pman/src/pman_win.erl667
-rw-r--r--lib/pman/src/pman_win.hrl39
-rw-r--r--lib/pman/vsn.mk1
52 files changed, 9275 insertions, 0 deletions
diff --git a/lib/pman/AUTHORS b/lib/pman/AUTHORS
new file mode 100644
index 0000000000..5a354526b4
--- /dev/null
+++ b/lib/pman/AUTHORS
@@ -0,0 +1,9 @@
+pman was first implemented for the old X windows interface "pxw" by
+Claes Wikstr�m and has since then been rewritten a couple of times by
+among others Peter Olin.
+
+Original Authors and Contributors:
+
+Claes Wikstr�m
+Peter Olin
+Gunilla Arendt \ No newline at end of file
diff --git a/lib/pman/Makefile b/lib/pman/Makefile
new file mode 100644
index 0000000000..3600504d07
--- /dev/null
+++ b/lib/pman/Makefile
@@ -0,0 +1,34 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1996-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Common Macros
+# ----------------------------------------------------
+
+SUB_DIRECTORIES = src priv doc/src
+
+SPECIAL_TARGETS =
+
+# ----------------------------------------------------
+# Default Subdir Targets
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_subdir.mk
+
diff --git a/lib/pman/doc/html/.gitignore b/lib/pman/doc/html/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/pman/doc/html/.gitignore
diff --git a/lib/pman/doc/man3/.gitignore b/lib/pman/doc/man3/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/pman/doc/man3/.gitignore
diff --git a/lib/pman/doc/pdf/.gitignore b/lib/pman/doc/pdf/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/pman/doc/pdf/.gitignore
diff --git a/lib/pman/doc/src/Makefile b/lib/pman/doc/src/Makefile
new file mode 100644
index 0000000000..4e116cb23e
--- /dev/null
+++ b/lib/pman/doc/src/Makefile
@@ -0,0 +1,116 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1997-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../../vsn.mk
+VSN=$(PMAN_VSN)
+APPLICATION=pman
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+XML_APPLICATION_FILES = ref_man.xml
+XML_REF3_FILES = pman.xml
+
+XML_PART_FILES = part.xml part_notes.xml
+XML_CHAPTER_FILES = pman_chapter.xml notes.xml
+
+BOOK_FILES = book.xml
+
+XML_FILES = \
+ $(BOOK_FILES) $(XML_CHAPTER_FILES) \
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
+
+GIF_FILES = \
+ main_window.gif \
+ trace.gif \
+ options.gif
+
+# ----------------------------------------------------
+
+HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
+
+INFO_FILE = ../../info
+
+MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+
+HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
+
+TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+XML_FLAGS +=
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+$(HTMLDIR)/%.gif: %.gif
+ $(INSTALL_DATA) $< $@
+
+docs: pdf html man
+
+$(TOP_PDF_FILE): $(XML_FILES)
+
+pdf: $(TOP_PDF_FILE)
+
+html: gifs $(HTML_REF_MAN_FILE)
+
+man: $(MAN3_FILES)
+
+gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+
+debug opt:
+
+clean clean_docs:
+ rm -rf $(HTMLDIR)/*
+ rm -f $(MAN3DIR)/*
+ rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
+ rm -f errs core *~
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_docs_spec: docs
+ $(INSTALL_DIR) $(RELSYSDIR)/doc/pdf
+ $(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf
+ $(INSTALL_DIR) $(RELSYSDIR)/doc/html
+ $(INSTALL_DATA) $(HTMLDIR)/* \
+ $(RELSYSDIR)/doc/html
+ $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR)
+ $(INSTALL_DIR) $(RELEASE_PATH)/man/man3
+ $(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3
+
+
+release_spec:
diff --git a/lib/pman/doc/src/book.xml b/lib/pman/doc/src/book.xml
new file mode 100644
index 0000000000..5d1d277fb7
--- /dev/null
+++ b/lib/pman/doc/src/book.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE book SYSTEM "book.dtd">
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header titlestyle="normal">
+ <copyright>
+ <year>1997</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Pman</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <pagetext>Pman</pagetext>
+ <preamble>
+ </preamble>
+ <parts lift="no">
+ <xi:include href="part.xml"/>
+ </parts>
+ <applications>
+ <xi:include href="ref_man.xml"/>
+ </applications>
+ <releasenotes>
+ <xi:include href="notes.xml"/>
+ </releasenotes>
+</book>
+
diff --git a/lib/pman/doc/src/fascicules.xml b/lib/pman/doc/src/fascicules.xml
new file mode 100644
index 0000000000..0678195e07
--- /dev/null
+++ b/lib/pman/doc/src/fascicules.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
+
+<fascicules>
+ <fascicule file="part" href="part_frame.html" entry="no">
+ User's Guide
+ </fascicule>
+ <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
+ Reference Manual
+ </fascicule>
+ <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
+ Release Notes
+ </fascicule>
+ <fascicule file="" href="../../../../doc/print.html" entry="no">
+ Off-Print
+ </fascicule>
+</fascicules>
+
diff --git a/lib/pman/doc/src/main_window.gif b/lib/pman/doc/src/main_window.gif
new file mode 100644
index 0000000000..e12754631c
--- /dev/null
+++ b/lib/pman/doc/src/main_window.gif
Binary files differ
diff --git a/lib/pman/doc/src/main_window.ps b/lib/pman/doc/src/main_window.ps
new file mode 100644
index 0000000000..c66620c677
--- /dev/null
+++ b/lib/pman/doc/src/main_window.ps
@@ -0,0 +1,1573 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (./main_window.tmp.eps)
+%%CreationDate: (Tue Jun 12 18:03:36 2001)
+%%BoundingBox: 0 22 377 234
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 0
+%%EndComments
+
+%%BeginDefaults
+%%PageOrientation: Portrait
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image. The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/buffer 512 string def
+/byte 1 string def
+/color_packet 3 string def
+/pixels 768 string def
+
+/DirectClassPacket
+{
+ %
+ % Get a DirectClass packet.
+ %
+ % Parameters:
+ % red.
+ % green.
+ % blue.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ compression 0 gt
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+ %
+ % Display a DirectClass image.
+ %
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { DirectClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayDirectClassPacket } image
+ } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+ %
+ % Get a DirectClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % red
+ % green
+ % blue
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 gt
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 gt
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ compression 0 gt
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+ %
+ % Display a PseudoClass image.
+ %
+ % Parameters:
+ % class: 0-PseudoClass or 1-Grayscale.
+ %
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ class 0 gt
+ {
+ currentfile buffer readline pop
+ token pop /depth exch def pop
+ /grays columns 8 add depth sub depth mul 8 idiv string def
+ columns rows depth
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { currentfile grays readhexstring pop } image
+ }
+ {
+ %
+ % Parameters:
+ % colors: number of colors in the colormap.
+ % colormap: red, green, blue color packets.
+ %
+ currentfile buffer readline pop
+ token pop /colors exch def pop
+ /colors colors 3 mul def
+ /colormap colors string def
+ currentfile colormap readhexstring pop pop
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { PseudoClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayPseudoClassPacket } image
+ } ifelse
+ } ifelse
+} bind def
+
+/DisplayImage
+{
+ %
+ % Display a DirectClass or PseudoClass image.
+ %
+ % Parameters:
+ % x & y translation.
+ % x & y scale.
+ % label pointsize.
+ % image label.
+ % image columns & rows.
+ % class: 0-DirectClass or 1-PseudoClass.
+ % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
+ % hex color packets.
+ %
+ gsave
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ x y translate
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ currentfile buffer readline pop
+ token pop /pointsize exch def pop
+ /Helvetica findfont pointsize scalefont setfont
+ x y scale
+ currentfile buffer readline pop
+ token pop /columns exch def
+ token pop /rows exch def pop
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ currentfile buffer readline pop
+ token pop /compression exch def pop
+ class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+ grestore
+} bind def
+%%EndProlog
+%%Page: 1 1
+%%PageBoundingBox: 0 22 377 234
+userdict begin
+%%BeginData:
+DisplayImage
+0 22
+377.000000 212.000000
+12
+757 426
+1
+0
+0
+16
+ffffff
+000000
+b24d7a
+dcadc2
+57253b
+0000ff
+d9d9d9
+c3c3c3
+bebebe
+828282
+000000
+000000
+000000
+000000
+000000
+000000
+03ff03ff03ff0311040003ff03ff03b70400031c04000301021a0400030002ff02ff02b6
+04000300021a04010301021a0400030002ff02ff02b604000300021a04010301021a0400
+030002ff02ff02b604000300021a0401030102020418030004ff04ff04b7030004170202
+040103010202040003ff03ff03e902020401030102020400030002150400030002ff02ff
+029e04000300021504000300021504000300020204010301020204000300021504000300
+02ff02ff029e040003000215040003000215040003000202040103010202040003000215
+0400030002ff02ff029e0400030002150400030002150400030002020401030102020400
+030002150400030002ff02ff029e040003000215040003000202030f0202040003000202
+0401030102020400030002150400030002ff0272000302ff022704000300021504000300
+02020300020d040002020400030002020401030102020400030002150400030002d10006
+0202000102060001020600010206000102050000020a00050225000102380001021b0004
+020d00010208000102ee0400030002150400030002020300020d04000202040003000202
+0401030102020400030002150400030002d1000102020002020100020204000202050002
+0206000202040000020900010203000102240001023800010219000102040000020c0001
+0208000102ee0400030002150400030002020300020d0400020204000300020204010301
+02020400030002150400030002d100010203000102010002020400020205000002000001
+02050002020400000208000102050001025e00010218000002070000020b000102f90400
+030002150400030002020300020d04000202040003000202040103010202040003000215
+0400030002d1000102030001020100000200000002030003020500000200000102050000
+020000010203000002030001020100010207000302040000020300030203000102000003
+020400000201000102040003020100010203000002030001020700040202000102000003
+020800040202000402040004020300000203000302010000020300040201000102000003
+020300010201000102040000020200040203000402d30400030002150400030002020300
+020d04000202040003000202040103010202040003000202030f02020400030002d10001
+020300010201000002000001020200000200000102040001020000010205000002000002
+020200000203000102010001020700010200000002040000020200010201000102020002
+020200000204000002010001020300010201000102000001020200020202000002070001
+020200010201000202020001020800010203000102020001020200010202000102020000
+020100010202000002010000020200010205000202020001020200010202000002040000
+02020000020200010201000102d7040003000208030302080400030002020300020d0400
+02020400030002020401030102020400030002020300020d040002020400030002d10001
+020200010202000002000001020200000200000102040000020200010204000002010001
+020200000207000102070001020000010202000002020001020300010201000102030001
+020200000202000102020001020300010200000002020000020000000202000002060001
+020400010200000102030001020800010202000102040001020000010204000102000000
+020200000202000102010000020100010206000102030001020200010202000102020000
+020700010201000102d704000300020803000201040002080400030002020300020d0400
+02020400030002020401030102020400030002020300020d040002020400030002d10005
+020300000201000102000000020100010203000102020001020400000202000102010000
+020700010207000102000001020200000202000102030001020100010203000102020000
+020200010202000102030001020000010201000002000000020100010206000102040001
+020000010203000102080001020200010204000102000001020400010200000002010000
+020200010202000002010001020600010203000102020001020200010202000002070001
+0201000302d504000300020803000201040002080400030002020300020d040002020400
+030002020401030102020400030002020300040e02020400030002d10001020700000201
+000102000000020100010203000102020002020300000202000202000000020700010207
+000102010000020100010202000702010001020400000201000102020001020200070200
+000102000001020000000201000002070001020400010200000102030001020800010202
+000102040001020000010204000102000000020100000201000202010001020100010206
+000102030001020200010203000002010001020400040203000302d30400030002080300
+040202080400030002020300020d04000202040003000202040103010202040003000215
+0400030002d1000102070000020100010200000002010001020300070203000002030001
+020000000207000102070001020100010200000002030001020700010204000102000000
+020300010202000102070000020000000201000102000000020700010204000102000001
+020300010208000102020001020400010200000102040001020000000201000002010000
+020000000201000002020001020600010203000102020001020300010200000002030002
+020100010205000202d20400030002150400030002020300020d04000202040003000202
+0401030102020400030002150400030002d1000102070000020200010202000102020001
+020400010203000002040002020800010205000102020001020000000203000102070001
+020400010200000002030001020200010207000002000000020200000200000002070001
+020400010200000102030001020800010202000102040001020000010204000102010000
+020000020201000202030001020600010203000102020001020300010200000002030001
+020200010206000102d20400030002150400030002020300020d04000202040003000202
+0401030102020400030002150400030002d1000102070000020200010202000102020000
+020600010202000002040002020300010203000102030001020400010205000102030000
+020100010205000102040001020300010203000002010002020200010209000102020001
+020100010203000102080001020300010202000102020001020200010202000102030000
+020700010202000002010001020300010202000102040001020400010202000102010000
+0203000102d20400030002150400030002020300020d0400020204000300020204010301
+02020400030002150400030002d100010207000002070001020100010206000102020000
+020500010203000102040005020500010207000402010001020500010204000102050004
+0201000102030001020a0004020200010203000102080001020400040204000402050003
+020900040201000102030001020200010204000102050003020000010200000502d30400
+030002150400030002020300020d04000202040003000202040103010202040003000215
+0400030002ff02ff029e0400030002150400030002020300020d04000202040003000202
+0401030102020400030002150400030002ff02ff029e0400030002150400030002020300
+040e02020400030002020401030102020400030002150400030002ff02ff029e04000300
+02150400030002150400030002020401030102020400030002150400030002ff02ff029e
+0400030002150400030002150400030002020401030102020400030002150400030002ff
+02ff029e04000300021504000300021504000300020204010300040403000416030004ff
+04ff049f030004160300041603000404030500ff00ff00e80304040003010202040000ff
+00ff00e70900030002020401030102020400000106ff06ff06e409010300020204010301
+02020400000106ff06ff06e40901030002020401030102020400000106ff06ff06e40901
+030002020401030102020400000106ff06ff06e409010300020204010301020204000001
+06ff06ff06e409010300020204010301020204000001060b01040604010006030102061f
+01000602010006040100062601040633010006020100060c010006ff06ff060201000602
+010006090102061309010300020204010301020204000001060b0100060f0100061f0100
+06020100062e01000635010106010100060c010006ff06ff0602010006020100060b0100
+061309010300020204010301020204000001060b01000606010206050100060301020618
+010006020100060201020603010206020100060201000619010006030100060001010603
+010206030102060301020618010106010100060201020603010106000100060201020603
+010206ff06f501000602010006020102060501000602010006000101060c090103000202
+04010301020204000001060b010006080100060501000602010006020100061801000600
+010006050100060201000602010006010100060201000619010006030101060101000601
+010006020100060101000602010006010100060201000617010006000100060001000601
+01000602010006010100060101010601010006020100060101000602010006ff06f40100
+060201000601010006020100060401000602010106010100060b09010300020204010301
+020204000001060b01030605010006050100060201000602010006180100060001000605
+010006020100060201000601010006000100060001000619010006030100060901000601
+010006050100060201000617010006000100060001000601010006020100060101000602
+010006010100060201000601010006ff06f8010406010100060201000604010006020100
+06020100060b09010300020204010301020204000001060b010006080100060501000602
+010406180100060001000605010006020104060101000600010006000100061901000603
+010006060103060101000605010406170100060101010601010006020100060101000602
+0100060101040602010206ff06f501000602010006010104060401000602010006020100
+060b09010300020204010301020204000001060b0100060801000605010006020100061d
+010006060100060201000605010006000100060001000619010006030100060501000602
+01000601010006050100061b010006010101060101000602010006010100060201000601
+01000609010006ff06f401000602010006010100060801000602010006020100060b0901
+0300020204010301020204000001060b0100060801000605010006020100060201000619
+010006060100060201000602010006010100060001000600010006190100060301000605
+010006020100060101000602010006010100060201000617010006020100060101000602
+010006010100060101010601010006020100060101000602010006ff06f4010006020100
+0601010006020100060401000602010106010100060b0901030002020401030102020400
+0001060b0100060801000605010006030102061a01000606010006030102060301000600
+0100061a0100060301000606010306020102060301020618010006020100060201020603
+010106000100060201020603010206ff06f5010006020100060201020605010006020100
+06000101060c0901030002020401030102020400000106ff06ff06d30100060f09010300
+020204010301020204000001060a0106062a0106062a010606ff06ff06470106060e0100
+060f09010300020204010301020204000001060a0106062a0106062a010606ff06ff0647
+0106060e0100060f0901030002020401030102020400000106ff06ff06e4090103000202
+0401030102020400000106ff06ff06e40901030002020401030102020400000106ff06ff
+06e40901030002020401030102020400000109ff09ff09e6030002020401030102020400
+000009ff09ff09e703000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e803000202040103010202040006ff06ff06e803000202040103010202
+040006ff06ff06e8030002020401030102020400060005ff05ff05d40912030002020401
+030102020400060005000849050108d50501089005010858050108670501085709110000
+030002020401030102020400060005000849050108d50501089005010858050108670501
+085709010706090007060001030002020401030102020400060005000849050108d50501
+089005010858050108670501085709010705000009000706000103000202040103010202
+040006000500080105030805050008060500083405010802050208270500080a05040818
+050008060500087405010801050008020500088905010800050008030500085105010801
+0503080d0500085205010802050208050500084a09010705000009010705000103000202
+0401030102020400060005000801050008020500080c0500083405010801050008020500
+08260500080a0500081c0500087c05010801050108010500088905010800050008030500
+085105010801050008020500080c05000852050108010500080205000850090107040001
+090107050001030002020401030102020400060005000801050008020500080205020803
+050108000500083405010801050008020500080105000802050008010500080005010802
+050008000501080305020802050008000501080205040808050008050500080205000801
+050008000501080305020802050408020502080305020802050008000501086605010801
+050108010500080205020802050108000500080305020875050108000501080105010802
+0502080305010800050008020502083d0501080105000802050008020502080305010800
+050008020502084c050108010500080605020802050408020502083c0901070400010600
+090107040001030002020401030102020400060005000801050008020500080405000802
+050008010501083405010801050008050500080205000801050108010500080105010801
+05000801050008020500080105010801050008030500080a050008050500080205000801
+050108010500080105000802050008030500080605000802050008020500080105010801
+050008650501080105000800050008000500080105000802050008010500080005000800
+050008010500080205000874050108000501080105010801050008020500080105000801
+05010801050008020500083c050108010500080205000801050008020500080105000801
+05010801050008020500084b05010802050008070500080605000801050008020500083b
+090107030001060109010704000103000202040103010202040006000500080105030805
+050008020500080205000834050108010500080505000802050008010500080505000805
+050008020500080105000802050008030500080a05030802050008020500080105000802
+050008010500080705000806050008020500080205000801050008020500086505010801
+050008000500080005000805050008010500080005000800050008010500080205000874
+050108000500080005010800050008010500080505000802050008010500084005010801
+05030802050008020500080105000802050008010500084f050108030501080505000805
+05000802050008020500083b090107030001060209010703000103000202040103010202
+040006000500080105000808050008020500080205000834050108010500080505000802
+0500080105000805050008050504080105000802050008030500080a0500080505000802
+050008010500080205000801050008070500080605000802050008020500080105000802
+050008650501080105000801050108020503080105000800050008000500080105040874
+050108000500080005010800050008020502080205000802050008020502083d05010801
+05000801050008020504080105000802050008020502084c050108050500080405000804
+050008030504083b09010702000106030901070300010300020204010301020204000600
+050008010500080805000802050008020500083405010801050008020500080105000802
+0500080105000805050008050500080505000802050008030500080a0500080505000802
+050008010500080205000801050008070500080605000802050008020500080105000802
+050008650501080105000801050108010500080205000801050008000500080005000801
+050008780501080005000803050008050500080105000802050008050500083c05010801
+05000802050008010500080505000802050008050500084b050108010500080205000804
+05000803050008040500083f090107020001060409010702000103000202040103010202
+040006000500080105000808050008020500080105010834050108010500080205000801
+05000801050108010500080505000805050008020500080105000802050008030500080a
+050008050500080105010801050008020500080105000802050008030500080605000802
+050008020500080105000802050008650501080105000802050008010500080205000801
+050008000500080005000801050008020500087405010800050008030500080105000802
+050008010500080105010801050008020500083c05010801050008020500080105000802
+050008010500080105010801050008020500084b05010801050008020500080405000802
+05000805050008020500083b090107010001060509010702000103000202040103010202
+040006000500080105000808050008030501080005000834050108020502080305010800
+050008010500080505000806050208020500080205000804050108080500080605010800
+050008010500080205000802050208050501080405000803050208020500080205000865
+050108010500080205000802050308010500080005000800050008020502087505010800
+05000803050008020502080305010800050008020502083d050108010500080205000802
+0502080305010800050008020502084c050108020502080505000802050408020502083c
+0901070100010606090107010001030002020401030102020400060005000849050108d5
+050108900501081305000843050108670501085709010700000106070901070100010300
+02020401030102020400060005000849050108d5050108900501080f0500080205000843
+050108670501085709010700000106080901070000010300020204010301020204000600
+05000849050108d5050108900501081005020844050108670501085709010001090b0700
+0001030002020401030102020400060005000849050108d5050108900501085805010867
+0501085709010000090d0001030002020401030102020400060005000849050108d50501
+08900501085805010867050108570901070e000103000202040103010202040006000500
+0849050108d5050108900501085805010867050108570901001003000202040103010202
+0400060005000849050108d5050108900501085805010867050108570901000d09000001
+030002020401030102020400060005ff05ff05d409010001060a09010001030002020401
+030102020400060001ff01ff01d409010001060a09010001030002020401030102020400
+060001000849010108d50101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001000849010108d50101089001010858010108670101
+085709010001060a09010001030002020401030102020400060001000805010008230100
+081d010108440100088f0101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001000804010008040101080b0101080b010108020100
+081c010108040100080c010008040100080b0102081b010008030100088a010108040100
+080c01000804010008760101080301010852010108020102080301020806010008520101
+080201020803010208020104084209010001060a09010001030002020401030102020400
+060001000803010008040100080101000809010008010100080901000801010008020100
+081b010108180100080d0100081a010008030101088a0101081801000876010108020100
+080101000851010108010100080201000801010008020100080401010852010108010100
+0802010008010100080201000801010008020100084209010001060a0901000103000202
+040103010202040006000100080201000805010008010100080901000801010008090100
+0801010008030100081a0101080201020802010008000101080301020802010408030101
+0805010008030102080301020802010008000101080501000802010008000100088a0101
+080201020802010008000101080301020802010408740101080201000801010008510101
+080101000802010008010100080701000800010008520101080101000805010008020100
+08050100084209010001060a090100010300020204010301020204000600010008010100
+080601000801010008090100080101000809010008010100080401000819010108040100
+080201010801010008040100080401000805010108050100080201000802010008010100
+0802010008010101080101000803010008050100088a0101080401000802010108010100
+080401000804010008760101080201000801010008510101080101000802010008010100
+08060100080101000852010108010100080501000802010008040100084309010001060a
+090100010300020204010301020204000600010008000100080701000801010008090100
+080101000809010008010100080501000818010108040100080201000802010008040100
+08040100080d010008020100080201000801010008020100080101000802010008030100
+08050100088a010108040100080201000802010008040100080401000876010108020100
+080101000851010108020103080101030802010008020100085201010801010308030103
+08040100084309010001060a090100010300020204010301020204000600010008010100
+080601000801010008090100080101000809010008010100080401000819010108040100
+08020100080201000804010008040100080d010008020100080201000801010008020100
+08010100080201000802010008060100088a010108040100080201000802010008040100
+080401000876010108020100080101000851010108050100080101000802010008010100
+080201000852010108010100080201000805010008040100084309010001060a09010001
+030002020401030102020400060001000802010008050100080101000809010008010100
+080901000801010008030100081a01010804010008020100080201000804010008040100
+080d01000802010008020100080101000802010008010100080201000802010008060100
+088a01010804010008020100080201000804010008040100087601010802010008010100
+085101010805010008010100080201000801010508510101080101000802010008050100
+08030100084409010001060a090100010300020204010301020204000600010008030100
+080401000801010008030101080301000801010008030101080301000801010008020100
+081b01010804010008020100080201000804010008040100080501010805010008020100
+08020100080101000802010008010101080101000801010008070100088a010108040100
+080201000802010008040100080401000876010108020100080101000851010108010100
+080201000801010008020100080501000852010108010100080201000801010008020100
+08030100084409010001060a090100010300020204010301020204000600010008040100
+080401010804010108040101080401010804010108020100081c01010804010008020100
+080201000804010008050101080301010805010008030102080301020802010008000101
+080201000805010408880101080401000802010008020100080401000805010108740101
+080301010852010108020102080301020806010008520101080201020803010208040100
+084409010001060a09010001030002020401030102020400060001000805010008230100
+081d010108390100089a0101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001000849010108390100089a01010890010108580101
+08670101085709010001060a090100010300020204010301020204000600010008490101
+08390100089a0101089001010858010108670101085709010001060a0901000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001000849010108d5010108900101
+0858010108670101085709010001060a0901000103000202040103010202040006000100
+0849010108d50101089001010858010108670101085709010001060a0901000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001ff01ff01d409010001060a0901
+0001030002020401030102020400060001ff01ff01d409010001060a0901000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001000849010108d5010108900101
+0858010108670101085709010001060a0901000103000202040103010202040006000100
+0805010008230100081d0101089101000842010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001000804010008040101080a0102
+080b010108020100081c010108100102081a0100081101020814010008170102081b0100
+08010104083b010108100102081a01000811010208140100083501010803010108520101
+08020102080301020803010208030102084c010108030100080401020803010208060100
+083b09010001060a09010001030002020401030102020400060001000803010008040100
+080101000808010008020100080901000801010008020100081b010108120100082f0100
+0814010008190100081a010008020100083f010108120100082f01000814010008350101
+080201000801010008510101080101000802010008010100080201000801010008020100
+0801010008020100084b0101080201010803010008020100080101000802010008040101
+083b09010001060a09010001030002020401030102020400060001000802010008050100
+08010100080c0100080901000801010008030100081a0101080201020802010008000101
+0805010008090100080001010802010008000101080301020802010108000100080c0100
+080301020803010208030101080001000802010208020100080001010804010108050100
+080301020803010208020100080001010805010008020100083f01010802010208020100
+080001010805010008090100080001010802010008000101080301020802010108000100
+080c01000803010208030102080301010800010008020102080201000800010108280101
+0802010008010100085101010801010008020100080101000809010008050100084b0101
+08010100080001000803010008050100080201000803010008000100083b09010001060a
+0901000103000202040103010202040006000100080101000806010008010100080c0100
+080901000801010008040100081901010801010008020100080101010801010008040100
+0809010108010100080101010801010008040100080201000800010008000100080b0100
+080201000802010008010100080201000801010008010101080101000802010008010101
+080101000803010108050100080201000802010008010100080201000801010108010100
+0803010008030103083c0101080101000802010008010101080101000804010008090101
+08010100080101010801010008040100080201000800010008000100080b010008020100
+080201000801010008020100080101000801010108010100080201000801010108010100
+082701010802010008010100085101010801010008020100080101000809010008050100
+084b0101080301000803010008050100080201000802010008010100083b09010001060a
+0901000103000202040103010202040006000100080001000807010008010100080b0100
+080a01000801010008050100081801010801010008020100080101000808010008090100
+080201000801010008080100080201000800010008000100080b01000802010008020100
+080501000801010008020100080101000802010008010100080f01000802010008020100
+080101000802010008010100080201000803010008070100083b01010801010008020100
+080101000808010008090100080201000801010008080100080201000800010008000100
+080b01000802010008020100080501000801010008020100080101000802010008010100
+082b010108020100080101000851010108020102080201030805010008050100084c0101
+0803010008030103080301020802010008020100083b09010001060a0901000103000202
+040103010202040006000100080101000806010008010100080a0100080b010008010100
+080401000819010108010104080101000808010008090100080201000801010008080100
+080201000800010008000100080b01000802010008020100080201030801010008020100
+0801010408010100080f0100080201000802010008010100080201000801010008020100
+0802010008080100083b0101080101040801010008080100080901000802010008010100
+08080100080201000800010008000100080b010008020100080201000802010308010100
+080201000801010408010100082b01010802010008010100085101010801010008020100
+08010100080201000803010008050100084d010108030100080301000802010008010100
+080201000801010008020100083b09010001060a09010001030002020401030102020400
+0600010008020100080501000801010008090100080c01000801010008030100081a0101
+080101000805010008080100080901000802010008010100080801000802010008000100
+08000100080b010008020100080201000801010008020100080101000802010008010100
+08050100080f010008020100080201000801010008020100080101000802010008020100
+0804010008020100083b0101080101000805010008080100080901000802010008010100
+08080100080201000800010008000100080b010008020100080201000801010008020100
+08010100080201000801010008050100082b010108020100080101000851010108010100
+0802010008010100080201000802010008050100084e0101080301000803010008020100
+080101000802010008010105083a09010001060a09010001030002020401030102020400
+060001000803010008040100080101000803010108020100080701010803010008010100
+08020100081b010108010100080201000801010008080100080901010801010008010100
+08080100080201000800010008000100080b010008020100080201000801010008020100
+080101000801010108010100080201000801010008070101080501000802010008020100
+08010100080201000801010108010100080101000805010008020100083b010108010100
+080201000801010008080100080901010801010008010100080801000802010008000100
+08000100080b010008020100080201000801010008020100080101000801010108010100
+0802010008010100082b0101080201000801010008510101080101000802010008010100
+080201000801010008050100084f01010803010008030100080201000801010008020100
+08050100083b09010001060a090100010300020204010301020204000600010008040100
+080401010804010108020104080301010804010108020100081c01010802010208020100
+0808010008090100080001010802010008080100080201000800010008000100080b0100
+080301020803010308020101080001000802010208020100080701010805010008030102
+0803010208020100080001010802010008060102083c0101080201020802010008080100
+08090100080001010802010008080100080201000800010008000100080b010008030102
+0803010308020101080001000802010208020100082b0101080301010852010108020102
+080301020802010408010104084b010108010104080201020803010208060100083b0901
+0001060a09010001030002020401030102020400060001000805010008230100081d0101
+08150105080101000819010508470100084d010108150105080101000819010508510101
+0858010108670101085709010001060a0901000103000202040103010202040006000100
+08490101081d010008670100084d0101081d010008710101085801010867010108570901
+0001060a090100010300020204010301020204000600010008490101081d010008670100
+084d0101081d0100087101010858010108670101085709010001060a0901000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001000849010108d5010108900101
+0858010108670101085709010001060a0901000103000202040103010202040006000100
+0849010108d50101089001010858010108670101085709010001060a0901000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001ff01ff01d409010001060a0901
+0001030002020401030102020400060001ff01ff01d409010001060a0901000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001000849010108d5010108900101
+0858010108670101085709010001060a0901000103000202040103010202040006000100
+0805010008230100081d010108670100086c010108900101085801010867010108570901
+0001060a09010001030002020401030102020400060001000804010008040101080d0100
+080a010108020100081c0101083b0100080b0102081b01000805010008650101082c0102
+086001010803010108520101080301000804010208030102085301010801010408030100
+08040102084309010001060a090100010300020204010301020204000600010008030100
+0804010008010100080b0101080901000801010008020100081b0101083b0100080d0100
+081a01000805010108650101082e01000860010108020100080101000851010108020101
+080301000802010008010100080201000852010108010100080601010803010008020100
+084209010001060a09010001030002020401030102020400060001000802010008050100
+08010100080a010008000100080901000801010008030100081a01010802010108000100
+080201020802010008000101080a01020802010008020100080201020802010008000101
+080201040803010108050100080301020803010208020100080001010805010008040100
+080001000865010108020102080201000800010108020100080001010803010208020100
+08000101080c010008030102080301010800010008020101080001000802010208020100
+08000101083d010108020100080101000851010108010100080001000803010008090100
+085201010801010008050100080001000803010008020100084209010001060a09010001
+030002020401030102020400060001000801010008060100080101000809010008010100
+080901000801010008040100081901010801010008010101080101000802010008010101
+080101000808010008020100080101000802010008010100080201000801010108010100
+080301000805010108050100080201000802010008010100080201000801010108010100
+080301000804010008010100086501010801010008020100080101010801010008010101
+0801010008010100080201000801010108010100080b0100080201000802010008010100
+08010101080101000801010108010100080201000801010108010100083c010108020100
+080101000851010108030100080301000809010008520101080101030804010008030100
+08020100084209010001060a090100010300020204010301020204000600010008000100
+080701000801010008080100080201000809010008010100080501000818010108010100
+080201000801010008020100080101000802010008080100080201000801010008020100
+0801010008020100080101000802010008030100080d0100080201000802010008010100
+080201000801010008020100080301000803010008020100086501010801010008020100
+0801010008050100080501000802010008010100080f0100080201000802010008010100
+080201000801010008020100080101000802010008010100084001010802010008010100
+085101010803010008030103080501000853010108050100080301000804010308420901
+0001060a0901000103000202040103010202040006000100080101000806010008010100
+080801000802010008090100080101000804010008190101080101000802010008010104
+080101000802010008080104080201000800010008020104080101000802010008030100
+080d01000802010008020100080101000802010008010100080201000802010008040100
+0802010008650101080101040801010008050100080501000802010008010100080f0100
+080201000802010008010100080201000801010008020100080101040801010008400101
+080201000801010008510101080301000803010008020100080301000854010108050100
+0803010008070100084209010001060a0901000103000202040103010202040006000100
+08020100080501000801010008080105080801000801010008030100081a010108010100
+080201000801010008050100080201000808010008060100080001000802010008050100
+0802010008030100080d0100080201000802010008010100080201000801010008020100
+080201000804010508640101080101000805010008050100080501000802010008010100
+080f01000802010008020100080101000802010008010100080201000801010008050100
+084001010802010008010100085101010803010008030100080201000802010008550101
+08010100080201000803010008070100084209010001060a090100010300020204010301
+020204000600010008030100080401000801010008030101080601000803010108030100
+0801010008020100081b0101080101000801010108010100080201000801010008020100
+080801000802010008030100080301000802010008010100080201000803010008050101
+080501000802010008020100080101000802010008010101080101000801010008090100
+0865010108010100080201000801010008050100080501000802010008010100080f0100
+080201000802010008010100080101010801010008010101080101000802010008010100
+084001010802010008010100085101010803010008030100080201000801010008560101
+0801010008020100080301000803010008020100084209010001060a0901000103000202
+040103010202040006000100080401000804010108040101080601000803010108040101
+08020100081c010108020101080001000802010208020100080201000809010208040100
+080401020802010008020100080401010803010108050100080301020803010208020100
+080001010802010008090100086501010802010208020100080501000806010208020100
+080f01000803010208030101080001000802010108000100080201020802010008400101
+080301010852010108010104080201020802010408520101080201020802010408020102
+084309010001060a09010001030002020401030102020400060001000805010008230100
+081d010108050100080e01050840010008770101082301050813010008050100084a0101
+0858010108670101085709010001060a0901000103000202040103010202040006000100
+084901010801010008020100085501000877010108390100080201000801010008020100
+084a01010858010108670101085709010001060a09010001030002020401030102020400
+0600010008490101080201020856010008770101083a010208030102084b010108580101
+08670101085709010001060a090100010300020204010301020204000600010008490101
+08d50101089001010858010108670101085709010001060a090100010300020204010301
+02020400060001000849010108d50101089001010858010108670101085709010001060a
+09010001030002020401030102020400060001000849010108d501010890010108580101
+08670101085709010001060a090100010300020204010301020204000600010008490101
+08d50101089001010858010108670101085709010001060a090100010300020204010301
+02020400060001ff01ff01d409010001060a090100010300020204010301020204000600
+00ff00ff00d409010001060a090100010300020204010301020204000600000008490001
+08d50001089000010858000108670001085709010001060a090100010300020204010301
+02020400060000000849000108d50001089000010858000108670001085709010001060a
+09010001030002020401030102020400060000000805000008230000081d0001086e0000
+08650001089000010858000108670001085709010001060a090100010300020204010301
+0202040006000000080400000804000108090004080a000108020000081c0001084f0002
+081b000008020002085f000108170002080500000812000008060000082e000008120002
+080300020805000108030001085200010805000008020002080400010853000108030000
+080400020803000208060000083b09010001060a09010001030002020401030102020400
+0600000008030000080400000801000008080000080d00000801000008020000081b0001
+08510000081a00000802000008020000085e000108190000081900000836000008140000
+080500000805000108020000080100000851000108040001080100000802000008020000
+0801000008520001080200010803000008020000080100000802000008040001083b0901
+0001060a0901000103000202040103010202040006000000080200000805000008010000
+08080000080d00000801000008030000081a000108020001080000000802000208020000
+08000001080a000208030002080200000800000108020000080200000802000208020000
+080000010804000108050000080300020803000208020000080000010805000008020000
+086200010802000208020000080000010802000008000001080500000803000208030002
+080300020802000408020002080300020802000008000001080a00020803000208020000
+080000010802000408010000080000010803000208050000080500000803000308020000
+080100000851000108030000080000000805000008020000080100000852000108010000
+080000000803000008050000080200000803000008000000083b09010001060a09010001
+0300020204010301020204000600000008010000080600000801000008080003080a0000
+080100000804000008190001080100000801000108010000080200000801000108010000
+080800000802000008010000080200000801000108010000080100000802000008010000
+080200000801000108010000080300010805000008020000080200000801000008020000
+080100010801000008030000080300000862000108010000080200000801000108010000
+080100010801000008040000080500000802000008020000080100000802000008030000
+080600000802000008020000080100010801000008080000080200000801000008020000
+080100010801000008030000080300010801000008010000080200000804000008050000
+080200000801000108020000080100000851000108020000080100000805000008020000
+0801000008520001080300000803000008050000080200000802000008010000083b0901
+0001060a0901000103000202040103010202040006000000080000000807000008010000
+080c00000809000008010000080500000818000108010000080200000801000008020000
+080100000802000008080000080500000802000008010000080500000802000008010000
+0802000008010000080f0000080200000802000008010000080200000801000008020000
+0803000008030003085f0001080500000801000008020000080100000802000008040000
+080500000802000008090000080300000806000008020000080200000801000008020000
+080800000805000008020000080100000802000008030000080300000805000008020000
+080400000805000008020000080100010802000008010000085100010801000008020000
+080300010803000008010000085200010803000008030003080300020802000008020000
+083b09010001060a09010001030002020401030102020400060000000801000008060000
+08010000080c000008090000080100000804000008190001080100000802000008010004
+080100000802000008090002080200040801000008060000080000000802000408010000
+080f00000802000008020000080100000802000008010000080200000802000008040000
+08020000085e000108020003080100000802000008010000080200000804000008050000
+080200000806000308030000080600000802000008020000080100000802000008080000
+080500000802000008010000080200000803000008030000080500000802000008040000
+080500000802000408020000080100000851000108010000080200000805000008020000
+080100000852000108030000080300000802000008010000080200000801000008020000
+083b09010001060a09010001030002020401030102020400060000000802000008050000
+080100000808000008020000080900000801000008030000081a00010801000008020000
+080100000805000008020000080c00000801000008050000080600000800000008020000
+08050000080f000008020000080200000801000008020000080100000802000008020000
+0804000008020000085e0001080100000802000008010000080200000801000008020000
+080400000805000008020000080500000802000008030000080600000802000008020000
+080100000802000008080000080500000802000008010000080200000803000008030000
+080500000802000008040000080500000802000008010001080200000801000008510001
+080100050804000008020000080100000852000108030000080300000802000008010000
+0802000008010005083a09010001060a0901000103000202040103010202040006000000
+080300000804000008010000080300010802000008020000080300010803000008010000
+08020000081b000108010000080100010801000008020000080100000802000008080000
+080200000801000008020000080100000807000008030000080200000801000008070001
+080500000802000008020000080100000802000008010001080100000801000008050000
+08020000085e000108010000080200000801000108010000080100010801000008040000
+080500000802000008020000080100000802000008030000080600000802000008020000
+080100000802000008080000080200000801000008020000080100000802000008030000
+080300000805000008020000080400000805000008020000080100010802000008010000
+085100010805000008010000080200000802000008010000085200010803000008030000
+08020000080100000802000008050000083b09010001060a090100010300020204010301
+020204000600000008040000080400010804000108030002080400010804000108020000
+081c00010802000108000000080200020802000008020000080900020803000208020000
+080700000804000208020000080700010805000008030002080300020802000008000001
+0802000008060002085f0001080200030801000008000001080200000800000108050000
+080500000803000208030003080400010804000008030002080200000802000008090002
+080300020802000008020000080400010801000008060002080500000805000008030003
+080300010852000108050000080200020804000108530001080100040802000208030002
+08060000083b09010001060a090100010300020204010301020204000600000008050000
+08230000081d000108050000080e000508470000087000010808000008050000083c0005
+083c00010858000108670001085709010001060a09010001030002020401030102020400
+06000000084900010801000008020000085c0000087000010808000008050000087f0001
+0858000108670001085709010001060a0901000103000202040103010202040006000000
+0849000108020002085d0000087000010808000008050000087f00010858000108670001
+085709010001060a09010001030002020401030102020400060000000849000108d50001
+089000010858000108670001085709010001060a09010001030002020401030102020400
+060000000849000108d50001089000010858000108670001085709010001060a09010001
+030002020401030102020400060000000849000108d50001089000010858000108670001
+085709010001060a09010001030002020401030102020400060000000849000108d50001
+089000010858000108670001085709010001060a09010001030002020401030102020400
+060000ff00ff00d409010001060a09010001030002020401030102020400060001ff01ff
+01d409010001060a09010001030002020401030102020400060001000849010108d50101
+089001010858010108670101085709010001060a09010001030002020401030102020400
+060001000849010108d50101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001000805010008230100081d010108c90100080a0101
+089001010858010108670101085709010001060a09010001030002020401030102020400
+060001000804010008040101080a0102080b010108020100081c01010817010208050100
+0812010008060100082e01000829010008110102081b0100080201020804010108900101
+08030101085201010803010008040102085a010108020102080301020804010108430901
+0001060a0901000103000202040103010202040006000100080301000804010008010100
+0808010008020100080901000801010008020100081b0101081901000819010008360100
+083e0100081a010008020100080201000803010108900101080201000801010008510101
+080201010803010008020100085901010801010008020100080101000802010008020100
+08010100084209010001060a090100010300020204010301020204000600010008020100
+080501000801010008080100080d01000801010008030100081a01010802010208020100
+080001010802010008000101080501000803010208030102080301020802010408020102
+080301020802010008000101080901010800010008030102080301020802010408020102
+080201000800010108040101080201010800010008030102080301020802010008000101
+080c01000803010208030102080201000800010108050100080601000803010108900101
+080201000801010008510101080101000800010008070100085901010805010008050100
+0802010008010100084209010001060a0901000103000202040103010202040006000100
+08010100080601000801010008080100080d010008010100080401000819010108010100
+080201000801010108010100080101010801010008040100080501000802010008020100
+080101000802010008030100080601000802010008020100080101010801010008080100
+080001000800010008010100080201000801010008020100080301000803010008020100
+080101010801010008030101080201000800010008000100080101000802010008040100
+0802010108010100080b0100080201000802010008010100080201000801010108010100
+080301000807010008030101089001010802010008010100085101010803010008070100
+0859010108050100080501000802010008010100084209010001060a0901000103000202
+04010301020204000600010008000100080701000801010008080103080a010008010100
+080501000818010108050100080101000802010008010100080201000804010008050100
+080201000809010008030100080601000802010008020100080101000802010008080100
+0800010008000100080501000801010008070100080301000802010008010100080c0100
+080001000800010008050100080401000802010008020100080b01000802010008020100
+080101000802010008010100080201000803010008060100080401010890010108020100
+08010100085101010803010008060100085a010108030101080501000803010008010100
+084209010001060a09010001030002020401030102020400060001000801010008060100
+080101000808010008020100080901000801010008040100081901010802010308010100
+080201000801010008020100080401000805010008020100080601030803010008060100
+080201000802010008010100080201000808010008000100080001000802010308020102
+080401000803010408010100080c01000800010008000100080201030804010008020100
+08020100080b010008020100080201000801010008020100080101000802010008020100
+0806010008050101089001010802010008010100085101010803010008050100085b0101
+08050100080301000804010008010100084209010001060a090100010300020204010301
+020204000600010008020100080501000801010008080100080201000809010008010100
+08030100081a010108010100080201000801010008020100080101000802010008040100
+080501000802010008050100080201000803010008060100080201000802010008010100
+080201000808010008000100080001000801010008020100080501000803010008030100
+08050100080c010008000100080001000801010008020100080401000802010008020100
+080b01000802010008020100080101000802010008010100080201000802010008050100
+08060101089001010802010008010100085101010803010008040100085c010108050100
+080201000805010008010100084209010001060a09010001030002020401030102020400
+060001000803010008040100080101000803010108020100080201000803010108030100
+0801010008020100081b0101080101000802010008010101080101000801010108010100
+080401000805010008020100080201000801010008020100080301000806010008020100
+080201000801010008020100080801000800010008000100080101000802010008010100
+080201000803010008030100080201000801010008070101080201000800010008000100
+0801010008020100080401000802010008020100080b0100080201000802010008010100
+080201000801010108010100080101000805010008070101089001010802010008010100
+085101010803010008030100085d01010801010008020100080101000806010008010100
+084209010001060a09010001030002020401030102020400060001000804010008040101
+0804010108030102080401010804010108020100081c0101080201030801010008000101
+080201000800010108050100080501000803010208030103080401010804010008030102
+080201000802010008080100080001000800010008020103080201020805010108020102
+080201000807010108020100080001000800010008020103080401000802010008020100
+080b01000803010208030102080201000800010108020100080501040803010108900101
+080301010852010108010104080101040859010108020102080201040803010108430901
+0001060a09010001030002020401030102020400060001000805010008230100081d0101
+0808010008050100083c0105084d01050816010008150101089001010858010108670101
+085709010001060a09010001030002020401030102020400060001000849010108080100
+0805010008ad010008150101089001010858010108670101085709010001060a09010001
+0300020204010301020204000600010008490101080801000805010008ad010008150101
+089001010858010108670101085709010001060a09010001030002020401030102020400
+060001000849010108d50101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001000849010108d50101089001010858010108670101
+085709010001060a09010001030002020401030102020400060001000849010108d50101
+089001010858010108670101085709010001060a09010001030002020401030102020400
+060001000849010108d50101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001ff01ff01d409010001060a09010001030002020401
+030102020400060001ff01ff01d409010001060a09010001030002020401030102020400
+060001000849010108d50101089001010858010108670101085709010001060a09010001
+030002020401030102020400060001000849010108d50101089001010858010108670101
+085709010001060a09010001030002020401030102020400060001000805010008230100
+081d010108bb010008180101089001010858010108670101085709010001060a09010001
+03000202040103010202040006000100080401000804010108090104080a010108020100
+081c010108170102080501000812010008060100082e0100081901020821010008040100
+0807010008050100081101010890010108030101085201010805010008020102085a0101
+080201020803010208030102084309010001060a09010001030002020401030102020400
+060001000803010008040100080101000808010008020100080901000801010008020100
+081b0101081901000819010008360100081b010008270100080601000805010108110101
+089001010802010008010100085101010804010108010100080201000859010108010100
+0802010008010100080201000801010008020100084209010001060a0901000103000202
+040103010202040006000100080201000805010008010100080c01000809010008010100
+08030100081a010108020102080201000800010108020100080001010805010008030102
+080301020803010208020104080201020803010208020100080001010809010108000100
+080301020803010208020104080201020802010008000101080401010805010008030102
+080301020802010008000101080a01020802010408040100080401000800010008110101
+089001010802010008010100085101010803010008000100080501000859010108050100
+080101000802010008010100084609010001060a09010001030002020401030102020400
+06000100080101000806010008010100080b0100080a0100080101000804010008190101
+080101000802010008010101080101000801010108010100080401000805010008020100
+080201000801010008020100080301000806010008020100080201000801010108010100
+080801000800010008000100080101000802010008010100080201000803010008030100
+080201000801010108010100080301010805010008020100080201000801010008020100
+0801010108010100080b0100080401000805010008040100080101000811010108900101
+080201000801010008510101080201000801010008050100085901010805010008010100
+0802010008010100084609010001090c0001030002020401030102020400060001000800
+01000807010008010100080b0100080a0100080101000805010008180101080501000801
+010008020100080101000802010008040100080501000802010008090100080301000806
+010008020100080201000801010008020100080801000800010008000100080501000801
+010008070100080301000802010008010100080f01000802010008020100080101000802
+01000801010008020100080b010008040100080501000803010008020100081101010890
+0101080201000801010008510101080101000802010008040100085a0101080401000803
+010208020103084309010000090d00010300020204010301020204000600010008010100
+0806010008010100080b0100080a01000801010008040100081901010802010308010100
+080201000801010008020100080401000805010008020100080601030803010008060100
+080201000802010008010100080201000808010008000100080001000802010308020102
+080401000803010408010100080f01000802010008020100080101000802010008010100
+08020100080b010008040100080401000804010008020100081101010890010108020100
+0801010008510101080101000802010008030100085b0101080301000803010008020100
+080101000802010008420901070e00010300020204010301020204000600010008020100
+0805010008010100080a0100080b01000801010008030100081a01010801010008020100
+080101000802010008010100080201000804010008050100080201000805010008020100
+080301000806010008020100080201000801010008020100080801000800010008000100
+080101000802010008050100080301000803010008050100080f01000802010008020100
+08010100080201000801010008020100080b010008040100080401000804010508100101
+089001010802010008010100085101010801010508010100085c01010802010008040100
+08020100080101000802010008420901070e000103000202040103010202040006000100
+080301000804010008010100080301010804010008050101080301000801010008020100
+081b01010801010008020100080101010801010008010101080101000804010008050100
+080201000802010008010100080201000803010008060100080201000802010008010100
+080201000808010008000100080001000801010008020100080101000802010008030100
+080301000802010008010100080701010805010008020100080201000801010008020100
+0801010108010100080b0100080401000803010008090100081101010890010108020100
+08010100085101010805010008010100085d010108010100080501000802010008010100
+0802010008420901070e0001030002020401030102020400060001000804010008040101
+0804010108040100080501010804010108020100081c0101080201030801010008000101
+080201000800010108050100080501000803010208030103080401010804010008030102
+080201000802010008080100080001000800010008020103080201020805010108020102
+08020100080701010805010008030102080301020802010008000101080c010008050101
+080101000809010008110101089001010803010108520101080501000801010408590101
+08010104080201020803010208430901070e000103000202040103010202040006000100
+0805010008230100081d01010808010008050100083c01050847010008040105082d0101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+084901010808010008050100088a01000838010108900101085801010867010108570901
+070e000103000202040103010202040006000100084901010808010008050100088a0100
+0838010108900101085801010867010108570901070e0001030002020401030102020400
+060001000849010108d5010108900101085801010867010108570901070e000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+070e0001030002020401030102020400060001000849010108d501010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e0001030002020401030102020400060001ff
+01ff01d40901070e0001030002020401030102020400060001ff01ff01d40901070e0001
+030002020401030102020400060001000849010108d50101089001010858010108670101
+08570901070e0001030002020401030102020400060001000849010108d5010108900101
+085801010867010108570901070e00010300020204010301020204000600010008050100
+08230100081d0101086e01000865010108900101085801010867010108570901070e0001
+030002020401030102020400060001000804010008040101080a0102080b010108020100
+081c0101084f0102081b010008020102085f010108010100082201020867010108030101
+085201010801010408030101080601000852010108030100080401020803010208060100
+083b0901070e000103000202040103010202040006000100080301000804010008010100
+0808010008020100080901000801010008020100081b010108510100081a010008020100
+08020100085e010108010100082401000867010108020100080101000851010108010100
+080601000801010008040101085201010802010108030100080201000801010008020100
+08040101083b0901070e0001030002020401030102020400060001000802010008050100
+080101000808010008020100080901000801010008030100081a01010802010108000100
+080201020802010008000101080a01020803010208020100080001010802010008020100
+080201020802010008000101080401010805010008030102080301020802010008000101
+080501000802010008620101080101000801010008030102080201000800010108020100
+080001010803010208050100080a010208020100080201000801010008000101084b0101
+080201000801010008510101080101000806010008010100080301000800010008520101
+08010100080001000803010008050100080201000803010008000100083b0901070e0001
+030002020401030102020400060001000801010008060100080101000808010008020100
+080901000801010008040100081901010801010008010101080101000802010008010101
+080101000808010008020100080101000802010008010101080101000801010008020100
+080101000802010008010101080101000803010108050100080201000802010008010100
+080201000801010108010100080301000803010008620101080101000800010008030100
+080201000801010108010100080101010801010008010100080201000804010008090100
+0802010008010100080201000801010108010100084a0101080201000801010008510101
+080101030803010008010100080201000801010008520101080301000803010008050100
+080201000802010008010100083b0901070e000103000202040103010202040006000100
+08000100080701000801010008090102080a010008010100080501000818010108010100
+080201000801010008020100080101000802010008080100080501000802010008010100
+0805010008020100080101000802010008010100080f0100080201000802010008010100
+0802010008010100080201000803010008030103085f0101080101010804010008020100
+080101000805010008020100080101000802010008040100080901000805010008020100
+0801010008020100084a0101080201000801010008510101080501000802010008010100
+0801010008020100085201010803010008030103080301020802010008020100083b0901
+070e00010300020204010301020204000600010008010100080601000801010008080100
+080201000809010008010100080401000819010108010100080201000801010408010100
+0802010008090102080201040801010008060100080001000802010408010100080f0100
+080201000802010008010100080201000801010008020100080201000804010008020100
+085e010108010101080401040801010008050100080201000801010408040100080a0102
+08020100080201000801010008020100084a010108020100080101000851010108050100
+080201000801010008010100080201000852010108030100080301000802010008010100
+080201000801010008020100083b0901070e000103000202040103010202040006000100
+0802010008050100080101000808010008020100080901000801010008030100081a0101
+0801010008020100080101000805010008020100080c0100080101000805010008060100
+080001000802010008050100080f01000802010008020100080101000802010008010100
+08020100080201000804010008020100085e010108010100080001000803010008050100
+08050100080201000801010008080100080d010008010100080201000801010008020100
+084a01010802010008010100085101010801010008020100080201000801010008010105
+08510101080301000803010008020100080101000802010008010105083a0901070e0001
+030002020401030102020400060001000803010008040100080101000803010108020100
+0802010008030101080301000801010008020100081b0101080101000801010108010100
+080201000801010008020100080801000802010008010100080201000801010008070100
+080301000802010008010100080701010805010008020100080201000801010008020100
+0801010108010100080101000805010008020100085e0101080101000801010008020100
+080201000801010008050100080201000801010008020100080401000809010008020100
+08010100080101010801010108010100084a010108020100080101000851010108010100
+080201000802010008010100080501000852010108030100080301000802010008010100
+0802010008050100083b0901070e00010300020204010301020204000600010008040100
+080401010804010108030102080401010804010108020100081c01010802010108000100
+080201020802010008020100080901020803010208020100080701000804010208020100
+0807010108050100080301020803010208020100080001010802010008060102085f0101
+0801010008020100080201020802010008050100080201000802010208050100080a0102
+08030101080001000801010008000101084b010108030101085201010802010208040101
+080601000852010108010104080201020803010208060100083b0901070e000103000202
+0401030102020400060001000805010008230100081d010108050100080e010508470100
+08700101082a0105080f0100084e0101085801010867010108570901070e000103000202
+040103010202040006000100084901010801010008020100085c01000870010108400100
+084e0101085801010867010108570901070e000103000202040103010202040006000100
+0849010108020102085d01000870010108400100084e0101085801010867010108570901
+070e0001030002020401030102020400060001000849010108d501010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108d5010108900101085801010867010108570901070e00010300020204010301
+02020400060001000849010108d5010108900101085801010867010108570901070e0001
+030002020401030102020400060001ff01ff01d40901070e000103000202040103010202
+0400060001ff01ff01d40901070e00010300020204010301020204000600010008490101
+08d5010108900101085801010867010108570901070e0001030002020401030102020400
+060001000849010108d5010108900101085801010867010108570901070e000103000202
+0401030102020400060001000805010008230100081d0101086e01000865010108900101
+085801010867010108570901070e00010300020204010301020204000600010008040100
+08040101080a0102080b010108020100081c0101084f0102081b010008020102085f0101
+0890010108030101085201010802010208030102085a0101080201020803010208030102
+08430901070e000103000202040103010202040006000100080301000804010008010100
+0808010008020100080901000801010008020100081b010108510100081a010008020100
+08020100085e010108900101080201000801010008510101080101000802010008010100
+080201000859010108010100080201000801010008020100080101000802010008420901
+070e00010300020204010301020204000600010008020100080501000801010008080100
+08020100080901000801010008030100081a010108020101080001000802010208020100
+08000101080a010208030102080201000800010108020100080201000802010208020100
+080001010804010108050100080301020803010208020100080001010805010008020100
+086201010801010008000101080301020802010008020100087b01010802010008010100
+085101010805010008050100085901010805010008010100080201000801010008460901
+070e00010300020204010301020204000600010008010100080601000801010008080100
+080201000809010008010100080401000819010108010100080101010801010008020100
+080101010801010008080100080201000801010008020100080101010801010008010100
+080201000801010008020100080101010801010008030101080501000802010008020100
+080101000802010008010101080101000803010008030100086201010801010108010100
+08010100080201000801010008020100087b010108020100080101000851010108050100
+08050100085901010805010008010100080201000801010008460901070e000103000202
+040103010202040006000100080001000807010008010100080901030809010008010100
+080501000818010108010100080201000801010008020100080101000802010008080100
+0805010008020100080101000805010008020100080101000802010008010100080f0100
+0802010008020100080101000802010008010100080201000803010008030103085f0101
+0801010008050100080201000802010008000100087c0101080201000801010008510101
+0804010008050100085a010108040100080301020802010308430901070e000103000202
+040103010202040006000100080101000806010008010100080c01000809010008010100
+080401000819010108010100080201000801010408010100080201000809010208020104
+0801010008060100080001000802010408010100080f0100080201000802010008010100
+080201000801010008020100080201000804010008020100085e01010801010008050104
+08030100087d01010802010008010100085101010803010008050100085b010108030100
+0803010008020100080101000802010008420901070e0001030002020401030102020400
+06000100080201000805010008010100080c0100080901000801010008030100081a0101
+0801010008020100080101000805010008020100080c0100080101000805010008060100
+080001000802010008050100080f01000802010008020100080101000802010008010100
+08020100080201000804010008020100085e010108010100080501000806010008000100
+087c01010802010008010100085101010802010008050100085c01010802010008040100
+08020100080101000802010008420901070e000103000202040103010202040006000100
+080301000804010008010100080301010802010008020100080301010803010008010100
+08020100081b010108010100080101010801010008020100080101000802010008080100
+080201000801010008020100080101000807010008030100080201000801010008070101
+080501000802010008020100080101000802010008010101080101000801010008050100
+08020100085e01010801010008050100080201000801010008020100087b010108020100
+08010100085101010801010008050100085d010108010100080501000802010008010100
+0802010008420901070e0001030002020401030102020400060001000804010008040101
+0804010108030102080401010804010108020100081c0101080201010800010008020102
+080201000802010008090102080301020802010008070100080401020802010008070101
+08050100080301020803010208020100080001010802010008060102085f010108010100
+080601020802010008020100087b01010803010108520101080101040801010408590101
+08010104080201020803010208430901070e000103000202040103010202040006000100
+0805010008230100081d010108050100080e010508470100087001010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108010100
+08020100085c01000870010108900101085801010867010108570901070e000103000202
+0401030102020400060001000849010108020102085d0100087001010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108d5010108900101085801010867010108570901070e00010300020204010301
+02020400060001000849010108d5010108900101085801010867010108570901070e0001
+030002020401030102020400060001000849010108d50101089001010858010108670101
+08570901070e0001030002020401030102020400060001ff01ff01d40901070e00010300
+02020401030102020400060001ff01ff01d40901070e0001030002020401030102020400
+060001000849010108d5010108900101085801010867010108570901070e000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+070e00010300020204010301020204000600010008050100082a010008160101086e0100
+0865010108900101085801010867010108570901070e0001030002020401030102020400
+060001000804010008040101080b010008050101080b01010802010008150101084f0102
+081b010008020102085f01010809010208090100080d0102086701010803010108520101
+0802010208030102085a010108020102080201040801010408420901070e000103000202
+040103010202040006000100080301000804010008010100080901010804010008010100
+0809010008010100080201000814010108510100081a01000802010008020100085e0101
+080b010008090100080f0100086701010802010008010100085101010801010008020100
+080101000802010008590101080101000802010008010100080201000801010008460901
+070e00010300020204010301020204000600010008020100080501000801010008080100
+080001000804010008010100080901000801010008030100081301010802010108000100
+080201020802010008000101080a01020803010208020100080001010802010008020100
+080201020802010008000101080401010805010008030102080301020802010008000101
+080501000802010008620101080201010800010008040100080301020802010008000101
+0803010208050100080901000800010108030102080201010800010008030102080a0102
+080301020802010008000101080201000802010008020102080201000800010108130101
+080201000801010008510101080101000802010008010100080201000859010108050100
+080501000801010008460901070e00010300020204010301020204000600010008010100
+0806010008010100080a0100080401000801010008090100080101000804010008120101
+080101000801010108010100080201000801010108010100080801000802010008010100
+080201000801010108010100080101000802010008010100080201000801010108010100
+080301010805010008020100080201000801010008020100080101010801010008030100
+080301000862010108010100080101010804010008020100080201000801010108010100
+080101000802010008040100080901010801010008010100080201000801010008000100
+080001000801010008020100080801000802010008010100080201000801010108010100
+080101000802010008010100080201000801010108010100081201010802010008010100
+085101010801010008020100080101000802010008590101080501000804010008020103
+08430901070e000103000202040103010202040006000100080001000807010008010100
+080a01000804010008010100080901000801010008050100081101010801010008020100
+080101000802010008010100080201000808010008050100080201000801010008050100
+08020100080101000802010008010100080f010008020100080201000801010008020100
+08010100080201000803010008030103085f010108010100080201000804010008020100
+080201000801010008020100080501000804010008090100080201000805010008010100
+080001000800010008010100080201000808010008050100080201000801010008050100
+080201000801010008020100080101000816010108020100080101000851010108020102
+08030102085a010108030101080501000806010008420901070e00010300020204010301
+0202040006000100080101000806010008010100080a0100080401000801010008090100
+080101000804010008120101080101000802010008010104080101000802010008090102
+080201040801010008060100080001000802010408010100080f01000802010008020100
+08010100080201000801010008020100080201000804010008020100085e010108010100
+080201000804010008020100080201000801010008020100080201030804010008090100
+080201000802010308010100080001000800010008010104080901020802010408010100
+080601000800010008020104080101000816010108020100080101000851010108010100
+0802010008010100080201000859010108050100080401000806010008420901070e0001
+03000202040103010202040006000100080201000805010008010100080a010008040100
+080101000809010008010100080301000813010108010100080201000801010008050100
+08020100080c0100080101000805010008060100080001000802010008050100080f0100
+080201000802010008010100080201000801010008020100080201000804010008020100
+085e01010801010008020100080401000802010008020100080101000802010008010100
+080201000804010008090100080201000801010008020100080101000800010008000100
+080101000810010008010100080501000806010008000100080201000805010008160101
+080201000801010008510101080101000802010008010100080201000859010108050100
+08030100080301000802010008420901070e000103000202040103010202040006000100
+080301000804010008010100080301010804010008040100080101000803010108030100
+080101000802010008140101080101000801010108010100080201000801010008020100
+080801000802010008010100080201000801010008070100080301000802010008010100
+080701010805010008020100080201000801010008020100080101010801010008010100
+0805010008020100085e0101080101000801010108040100080201000802010008010101
+080101000801010008020100080401000809010008020100080101000802010008010100
+080001000800010008010100080201000808010008020100080101000802010008010100
+080701000803010008020100080101000816010108020100080101000851010108010100
+080201000801010008020100085901010801010008020100080301000803010008020100
+08420901070e000103000202040103010202040006000100080401000804010108040101
+080201040803010108040101080401010802010008150101080201010800010008020102
+080201000802010008090102080301020802010008070100080401020802010008070101
+08050100080301020803010208020100080001010802010008060102085f010108020101
+080001000804010008030102080201000800010108030103080401000809010008020100
+0802010308010100080001000800010008020102080a0102080301020802010008070100
+08040102080201000816010108030101085201010802010208030102085a010108020102
+080401000804010208430901070e00010300020204010301020204000600010008050100
+082a01000816010108050100080e010508470100087001010805010008230105081c0105
+083c0101085801010867010108570901070e000103000202040103010202040006000100
+084901010801010008020100085c01000870010108010100080201000889010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108020102
+085d01000870010108020102088a0101085801010867010108570901070e000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+070e0001030002020401030102020400060001000849010108d501010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108d5010108900101085801010867010108570901070e00010300020204010301
+02020400060001ff01ff01d40901070e0001030002020401030102020400060001ff01ff
+01d40901070e0001030002020401030102020400060001000849010108d5010108900101
+085801010867010108570901070e00010300020204010301020204000600010008490101
+08d5010108900101085801010867010108570901070e0001030002020401030102020400
+0600010008050100082a010008160101086e010008650101089001010858010108670101
+08570901070e0001030002020401030102020400060001000804010008040101080b0100
+08050100080c01010802010008150101084f0102081b010008020102085f010108110100
+087d01010803010108520101080301000805010008040102085301010802010208030102
+0804010108430901070e0001030002020401030102020400060001000803010008040100
+080101000809010108040101080b010008010100080201000814010108510100081a0100
+0802010008020100085e010108110100087d010108020100080101000851010108020101
+080401010803010008020100085201010801010008020100080101000802010008020100
+0801010008420901070e0001030002020401030102020400060001000802010008050100
+0801010008080100080001000803010008000100080b0100080101000803010008130101
+0802010108000100080201020802010008000101080a0102080301020802010008000101
+080201000802010008020102080201000800010108040101080501000803010208030102
+080201000800010108050100080201000862010108010100080001010803010208020104
+080901020802010008020100080101000800010108600101080201000801010008510101
+080101000800010008030100080001000803010008560101080501000805010008020100
+0801010008420901070e0001030002020401030102020400060001000801010008060100
+08010100080a010008050100080b01000801010008040100081201010801010008010101
+080101000802010008010101080101000808010008020100080101000802010008010101
+080101000801010008020100080101000802010008010101080101000803010108050100
+080201000802010008010100080201000801010108010100080301000803010008620101
+0801010108010100080101000802010008030100080a0100080201000801010008020100
+0801010108010100085f0101080201000801010008510101080301000805010008030100
+085601010805010008050100080201000801010008420901070e00010300020204010301
+0202040006000100080001000807010008010100080a010008050100080b010008010100
+080501000811010108010100080201000801010008020100080101000802010008080100
+0805010008020100080101000805010008020100080101000802010008010100080f0100
+0802010008020100080101000802010008010100080201000803010008030103085f0101
+0801010008020100080101000802010008030100080a0100080501000802010008010100
+08020100085f010108020100080101000851010108030100080501000803010308530101
+0803010108050100080301000801010008420901070e0001030002020401030102020400
+06000100080101000806010008010100080a010008050100080b01000801010008040100
+081201010801010008020100080101040801010008020100080901020802010408010100
+08060100080001000802010408010100080f010008020100080201000801010008020100
+0801010008020100080201000804010008020100085e0101080101000802010008010104
+08030100080b010208020100080201000801010008020100085f01010802010008010100
+085101010803010008050100080301000802010008520101080501000803010008040100
+0801010008420901070e0001030002020401030102020400060001000802010008050100
+08010100080a010008050100080b01000801010008030100081301010801010008020100
+080101000805010008020100080c01000801010008050100080601000800010008020100
+08050100080f010008020100080201000801010008020100080101000802010008020100
+0804010008020100085e010108010100080201000801010008070100080e010008010100
+080201000801010008020100085f01010802010008010100085101010803010008050100
+0803010008020100085201010805010008020100080501000801010008420901070e0001
+030002020401030102020400060001000803010008040100080101000803010108040100
+080501000805010108030100080101000802010008140101080101000801010108010100
+080201000801010008020100080801000802010008010100080201000801010008070100
+080301000802010008010100080701010805010008020100080201000801010008020100
+0801010108010100080101000805010008020100085e0101080101000802010008010100
+0802010008030100080a01000802010008010100080101010801010108010100085f0101
+080201000801010008510101080301000805010008030100080201000852010108010100
+0802010008010100080601000801010008420901070e0001030002020401030102020400
+060001000804010008040101080401010802010408010104080301010804010108020100
+081501010802010108000100080201020802010008020100080901020803010208020100
+080701000804010208020100080701010805010008030102080301020802010008000101
+0802010008060102085f0101080101000802010008020102080501010809010208030101
+080001000801010008000101086001010803010108520101080101040801010408020102
+0853010108020102080201040803010108430901070e0001030002020401030102020400
+0600010008050100082a01000816010108050100080e0105084701000870010108150105
+080f010008630101085801010867010108570901070e0001030002020401030102020400
+06000100084901010801010008020100085c010008700101082b01000863010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108020102
+085d010008700101082b010008630101085801010867010108570901070e000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+070e0001030002020401030102020400060001000849010108d501010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108d5010108900101085801010867010108570901070e00010300020204010301
+02020400060001ff01ff01d40901070e0001030002020401030102020400060001ff01ff
+01d40901070e0001030002020401030102020400060001000849010108d5010108900101
+085801010867010108570901070e00010300020204010301020204000600010008490101
+08d5010108900101085801010867010108570901070e0001030002020401030102020400
+0600010008050100082a010008160101086e010008650101089001010858010108670101
+08570901070e0001030002020401030102020400060001000804010008040101080b0100
+08040102080b01010802010008150101084f0102081b010008020102085f010108110100
+080301000878010108030101085201010802010208030102085a01010802010208030102
+0804010008440901070e0001030002020401030102020400060001000803010008040100
+080101000809010108030100080201000809010008010100080201000814010108510100
+081a01000802010008020100085e01010811010008030100087801010802010008010100
+085101010801010008020100080101000802010008590101080101000802010008010100
+080201000802010108440901070e00010300020204010301020204000600010008020100
+080501000801010008080100080001000807010008090100080101000803010008130101
+0802010108000100080201020802010008000101080a0102080301020802010008000101
+080201000802010008020102080201000800010108040101080501000803010208030102
+080201000800010108050100080201000862010108020102080201000802010008010104
+080101000800010108750101080201000801010008510101080501000805010008590101
+0805010008050100080101000800010008440901070e0001030002020401030102020400
+06000100080101000806010008010100080a010008070100080901000801010008040100
+081201010801010008010101080101000802010008010101080101000808010008020100
+080101000802010008010101080101000801010008020100080101000802010008010101
+080101000803010108050100080201000802010008010100080201000801010108010100
+080301000803010008620101080101000802010008010100080201000803010008030101
+080101000874010108020100080101000851010108050100080501000859010108050100
+080501000803010008440901070e00010300020204010301020204000600010008000100
+0807010008010100080a010008060100080a010008010100080501000811010108010100
+080201000801010008020100080101000802010008080100080501000802010008010100
+0805010008020100080101000802010008010100080f0100080201000802010008010100
+0802010008010100080201000803010008030103085f0101080501000801010008020100
+080301000803010008020100087401010802010008010100085101010804010008050100
+085a010108040100080401010804010008440901070e0001030002020401030102020400
+06000100080101000806010008010100080a010008050100080b01000801010008040100
+081201010801010008020100080101040801010008020100080901020802010408010100
+08060100080001000802010408010100080f010008020100080201000801010008020100
+0801010008020100080201000804010008020100085e0101080201030801010008020100
+080301000803010008020100087401010802010008010100085101010803010008050100
+085b010108030100080701000803010008440901070e0001030002020401030102020400
+06000100080201000805010008010100080a010008040100080c01000801010008030100
+081301010801010008020100080101000805010008020100080c01000801010008050100
+08060100080001000802010008050100080f010008020100080201000801010008020100
+0801010008020100080201000804010008020100085e0101080101000802010008010100
+080201000803010008030100080201000874010108020100080101000851010108020100
+08050100085c010108020100080801000803010008440901070e00010300020204010301
+020204000600010008030100080401000801010008030101080401000803010008070101
+080301000801010008020100081401010801010008010101080101000802010008010100
+080201000808010008020100080101000802010008010100080701000803010008020100
+080101000807010108050100080201000802010008010100080201000801010108010100
+080101000805010008020100085e01010801010008020100080101000801010108030100
+0803010008020100087401010802010008010100085101010801010008050100085d0101
+0801010008050100080201000803010008440901070e0001030002020401030102020400
+060001000804010008040101080401010802010408010104080301010804010108020100
+081501010802010108000100080201020802010008020100080901020803010208020100
+080701000804010208020100080701010805010008030102080301020802010008000101
+0802010008060102085f0101080201030802010108000100080401010801010008020100
+087401010803010108520101080101040801010408590101080101040802010208020104
+08420901070e00010300020204010301020204000600010008050100082a010008160101
+08050100080e0105084701000870010108900101085801010867010108570901070e0001
+03000202040103010202040006000100084901010801010008020100085c010008700101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108020102085d01000870010108900101085801010867010108570901070e0001
+030002020401030102020400060001000849010108d50101089001010858010108670101
+08570901070e0001030002020401030102020400060001000849010108d5010108900101
+085801010867010108570901070e00010300020204010301020204000600010008490101
+08d5010108900101085801010867010108570901070e0001030002020401030102020400
+060001000849010108d5010108900101085801010867010108570901070e000103000202
+0401030102020400060001ff01ff01d40901070e00010300020204010301020204000600
+01ff01ff01d40901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108d5010108900101085801010867010108570901070e00010300020204010301
+020204000600010008050100082a010008160101086e0100086501010890010108580101
+0867010108570901070e0001030002020401030102020400060001000804010008040101
+080b010008040102080b01010802010008150101084f0102081b010008020102085f0101
+08110100080a010008220102084b01010803010108520101080101040805010008050100
+0852010108020102080201040801010408420901070e0001030002020401030102020400
+060001000803010008040100080101000809010108030100080201000809010008010100
+080201000814010108510100081a01000802010008020100085e010108110100080a0100
+08240100084b010108020100080101000851010108010100080801010804010108520101
+080101000802010008010100080201000801010008460901070e00010300020204010301
+020204000600010008020100080501000801010008080100080001000807010008090100
+0801010008030100081301010802010108000100080201020802010008000101080a0102
+080301020802010008000101080201000802010008020102080201000800010108040101
+080501000803010208030102080201000800010108050100080201000862010108010100
+080001010803010208020104080801000801010008030102080201000800010108020100
+080001010803010208050100084b01010802010008010100085101010801010008070100
+0800010008030100080001000852010108050100080501000801010008460901070e0001
+03000202040103010202040006000100080101000806010008010100080a010008070100
+080901000801010008040100081201010801010008010101080101000802010008010101
+080101000808010008020100080101000802010008010101080101000801010008020100
+080101000802010008010101080101000803010108050100080201000802010008010100
+080201000801010108010100080301000803010008620101080101010801010008010100
+0802010008030100080a0100080001000803010008020100080101010801010008010101
+08010100080101000802010008040100084b010108020100080101000851010108010103
+080301000801010008020100080101000852010108050100080401000802010308430901
+070e000103000202040103010202040006000100080001000807010008010100080a0100
+08050101080a010008010100080501000811010108010100080201000801010008020100
+080101000802010008080100080501000802010008010100080501000802010008010100
+0802010008010100080f0100080201000802010008010100080201000801010008020100
+0803010008030103085f01010801010008020100080101000802010008030100080a0101
+0804010008020100080101000805010008020100080101000802010008040100084b0101
+080201000801010008510101080501000801010008020100080101000802010008520101
+08030101080501000806010008420901070e000103000202040103010202040006000100
+080101000806010008010100080a01000807010008090100080101000804010008120101
+080101000802010008010104080101000802010008090102080201040801010008060100
+080001000802010408010100080f01000802010008020100080101000802010008010100
+08020100080201000804010008020100085e010108010100080201000801010408030100
+080a0101080401040801010008050100080201000801010408040100084b010108020100
+080101000851010108050100080101000802010008010100080201000852010108050100
+080401000806010008420901070e00010300020204010301020204000600010008020100
+0805010008010100080a0100080701000809010008010100080301000813010108010100
+08020100080101000805010008020100080c010008010100080501000806010008000100
+0802010008050100080f0100080201000802010008010100080201000801010008020100
+080201000804010008020100085e010108010100080201000801010008070100080a0100
+08000100080301000805010008050100080201000801010008080100084b010108020100
+080101000851010108010100080201000801010508000105085101010805010008030100
+080301000802010008420901070e00010300020204010301020204000600010008030100
+080401000801010008030101080401000803010008020100080301010803010008010100
+080201000814010108010100080101010801010008020100080101000802010008080100
+080201000801010008020100080101000807010008030100080201000801010008070101
+080501000802010008020100080101000802010008010101080101000801010008050100
+08020100085e01010801010008020100080101000802010008030100080a010008010100
+0802010008020100080101000805010008020100080101000802010008040100084b0101
+080201000801010008510101080101000802010008050100080501000852010108010100
+0802010008030100080301000802010008420901070e0001030002020401030102020400
+060001000804010008040101080401010802010408020102080401010804010108020100
+081501010802010108000100080201020802010008020100080901020803010208020100
+080701000804010208020100080701010805010008030102080301020802010008000101
+0802010008060102085f0101080101000802010008020102080501010808010008020100
+080201020802010008050100080201000802010208050100084b01010803010108520101
+0802010208060100080501000852010108020102080401000804010208430901070e0001
+0300020204010301020204000600010008050100082a01000816010108050100080e0105
+08470100087001010815010508740101085801010867010108570901070e000103000202
+040103010202040006000100084901010801010008020100085c01000870010108900101
+085801010867010108570901070e00010300020204010301020204000600010008490101
+08020102085d01000870010108900101085801010867010108570901070e000103000202
+0401030102020400060001000849010108d5010108900101085801010867010108570901
+070e0001030002020401030102020400060001000849010108d501010890010108580101
+0867010108570901070e0001030002020401030102020400060001000849010108d50101
+08900101085801010867010108570901070e000103000202040103010202040006000100
+0849010108d5010108900101085801010867010108570901070e00010300020204010301
+02020400060001ff01ff01d40901070e0001030002020401030102020400060001ff01ff
+01d40901070e0001030002020401030102020400060001000849010108d5010108900101
+0858010108670101085709010010030002020401030102020400060001000849010108d5
+0101089001010858010108670101085709010700000c0900000103000202040103010202
+04000600010008050100082a010008160101088301000850010108900101085801010867
+010108570901070000010608090107000001030002020401030102020400060001000804
+010008040101080b010008070100080a0101080201000815010108110100080a01000822
+0102080b01000806010008090100081501000807010008020102084a0101089001010803
+0101085201010805010008020102085a0101080201020802010408490901070100010607
+090107000001030002020401030102020400060001000803010008040100080101000809
+0101080601010809010008010100080201000814010108110100080a010008240100080b
+010008110100081401010806010008020100080201000849010108900101080201000801
+010008510101080401010801010008020100085901010801010008020100080101000802
+010008490901070100010606090107010001030002020401030102020400060001000802
+010008050100080101000808010008000100080501000800010008090100080101000803
+010008130101080101000800010108030102080201040808010008010100080301020802
+010008000101080201000800010108030102080501000804010108020104080201020803
+010208020100080101000803010208020100080001010802010008000100080601000806
+010008490101089001010802010008010100085101010803010008000100080101000802
+010008590101080101000802010008050100084909010702000106050901070100010300
+0202040103010202040006000100080101000806010008010100080a0100080401000801
+010008090100080101000804010008120101080101010801010008010100080201000803
+0100080a0100080001000803010008020100080101010801010008010101080101000801
+010008020100080401000804010108040100080601000802010008020100080101000800
+010008030100080201000801010108010100080301000805010008070100084901010890
+010108020100080101000851010108020100080101000801010008020100085901010801
+01000802010008040100084a090107020001060409010702000103000202040103010202
+040006000100080001000807010008010100080a01000803010008020100080901000801
+010008050100081101010801010008020100080101000802010008030100080a01010804
+010008020100080101000805010008020100080101000802010008040100080b01000806
+01000802010008050101080401000802010008010100080701000805010008060100084a
+010108900101080201000801010008510101080101000802010008020102085a01010802
+010208050100084a09010703000106030901070200010300020204010301020204000600
+0100080101000806010008010100080a0100080301000802010008090100080101000804
+01000812010108010100080201000801010408030100080a010108040104080101000805
+0100080201000801010408040100080b0100080601000802010008050101080401040801
+0100080701000804010008060100084b0101089001010802010008010100085101010801
+010008020100080101000802010008590101080101000802010008040100084a09010703
+000106020901070300010300020204010301020204000600010008020100080501000801
+0100080a0100080301050808010008010100080301000813010108010100080201000801
+010008070100080a01000800010008030100080501000805010008020100080101000808
+0100080b0100080601000802010008050100080001000803010008050100080701000804
+010008050100084c01010890010108020100080101000851010108010105080001000802
+010008590101080101000802010008030100084b09010704000106010901070300010300
+020204010301020204000600010008030100080401000801010008030101080401000807
+010008030101080301000801010008020100081401010801010008020100080101000802
+010008030100080a01000801010008020100080201000801010008050100080201000801
+010008020100080401000804010108040100080601000802010008020100080101000801
+0100080201000802010008010100080701000803010008050100084d0101089001010802
+010008010100085101010805010008010100080201000859010108010100080201000803
+0100084b0901070400010600090107040001030002020401030102020400060001000804
+010008040101080401010802010408050100080301010804010108020100081501010801
+010008020100080201020805010108080100080201000802010208020100080501000802
+010008020102080501000804010108050101080401000803010208020100080201000802
+010208020100080501040801010008050104084901010890010108030101085201010805
+010008020102085a01010802010208040100084b09010705000009020704000103000202
+04010301020204000600010008050100082a0100081601010815010508b9010108900101
+085801010867010108570901070500000901070500010300020204010301020204000600
+01000849010108d501010890010108580101086701010857090107060901070500010300
+02020401030102020400060001000849010108d501010890010108580101086701010857
+09010706090007060001030002020401030102020400060001000849010108d501010890
+010108580101086701010857090100100300020204010301020204000600010008490101
+08d5010108900101085801010867010108570900001103000202040103010202040009ff
+09ff09d9060e03000202040103010202040009ff09ff09d80000060e0300020204010301
+020204000901070d0000070000ff00ff00a507100001070c0001060e0300020204010301
+020204000901070b00010900070000ff00ff00a4090007100003070a0001060e03000202
+040103010202040009010709000209010700000106ff06ff06a109010710000507080001
+060e030002020401030102020400090107070003060009010700000106ff06ff06a10901
+071000010601000307060001060e03000202040103010202040009010705000306020901
+0700000106ff06ff06a10901071000010603000307040001060e03000202040103010202
+0400090107030003060409010700000106ff06ff06a10901071000010605000307020001
+060e030002020401030102020400090107010003060609010700000106ff06ff06a10901
+071000010607000307000001060e03000202040103010202040009050608090107000001
+06ff06ff06a1090107100001060809030001060e03000202040103010202040009010701
+0903060609010700000106ff06ff06a10901071000010607090307000001060e03000202
+0401030102020400090107030903060409010700000106ff06ff06a10901071000010605
+090307020001060e030002020401030102020400090107050903060209010700000106ff
+06ff06a10901071000010603090307040001060e03000202040103010202040009010707
+0903060009010700000106ff06ff06a10901071000010601090307060001060e03000202
+04010301020204000901070909040700000106ff06ff06a1090107100001090307080001
+060e0300020204010301020204000901070b09020700000109ff09ff09a3071000010901
+070a0001060e0300020204010301020204000901070d09000700000009ff09ff09a40710
+00000900070c0001060e030002020401030102020400090100ff00ff00d7060e03000202
+0401030102020400090000ff00ff00d8060e03000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff0615
+01000601010006ce030002020401030004040601000a0607010006020100060401000606
+010006100102061201000686000a06090100060c01000611010006020100060401000606
+0100060f01000602010006e0010006010100060801000602010006040100060601000605
+0100061f010106890300040403050601000909000607010006020100060c0100060f0100
+060201000611010006860009090006090100060c01000611010006020100060c0100060f
+01010601010006e00100060101000608010006020100060c010006050100061e01000601
+010006880304040003010202040006010001060609010607010006020100060201020603
+010106000100060201020609010006050100060201000602010206020104060201020602
+010106000100060901000600010106020100060001010603010206030102060301020603
+010206030102060301020603010206310001060609010608010006000100060201000602
+010006010104060201020609010006020100060201020603010106000100060201020609
+01010601010006020102060201000602010006d101050607010006020100060201020603
+010106000100060201010600010006020102060201000600010106040101060a01000601
+010006880300020204010301020204000601000106060901060701000602010006040100
+060201000601010106010100060201000609010006040100060201000601010006020100
+060301000603010006020100060101000600010006000100060801010601010006010101
+060101000601010006020100060101000602010006010100060201000601010006020100
+060101000602010006010100060201000601010006020100063000010606090106080100
+060001000602010006020100060301000603010006020100060801000602010006040100
+060201000601010106010100060201000608010006000100060001000601010006020100
+060101000602010006d20100060101000608010006020100060401000602010006010101
+06010100060101010601010006020100060101010601010006030101060a010006010100
+068803000202040103010202040006010001060609010607010406040100060201000602
+01000601010006020100060a010106030100060101000601010006070100060301000602
+010006010100060001000600010006080100060201000601010006050100060201000601
+010006050100060201000601010006050100060501000602010006010100063400010606
+090106080100060001000602010006020100060301000603010006020100060101040601
+010406040100060201000602010006010100060201000608010006000100060001000601
+01000602010006010100060001000600010006d101000601010006090104060401000602
+010006020100060101000602010006010100060201000601010006020100061001000601
+010006880300020204010301020204000601000106060901060701000602010006040100
+060201000602010006010104060c01000602010006010100060201020604010006030104
+060101000600010006000100060801000602010006010100060501000602010006010100
+060501040602010206030102060201040602010206310001060609010607010006020100
+060101000602010006030100060301000602010006080100060201000604010006020100
+060201000601010406080100060101010601010406010100060001000600010006d00105
+060801000602010006040100060201000602010006010100060201000601010406010100
+060201000610010006010100068803000202040103010202040006010001060609010607
+01000602010006040100060201000602010006010100060c010006020100060301000600
+010006050100060301000603010006050100060001000600010006080100060201000601
+010006050100060201000601010006050100060901000605010006010100060901000630
+000106060901060701040601010006020100060301000603010006020100060801000602
+010006040100060201000602010006010100060c01000601010106010100060501000600
+01000600010006d101000601010006090100060201000604010006020100060201000601
+010006020100060101000605010006020100061001000601010006880300020204010301
+020204000601000106060901060701000602010006040100060201000601010106010100
+060201000608010006020100060301010602010006020100060301000603010006020100
+060101000600010006000100060801010601010006010100060501000602010006010100
+060201000601010006020100060101000602010006010100060201000601010006020100
+060101000602010006300001060609010607010006020100060101000601010106030100
+060301000602010006080100060201000604010006020100060101010601010006020100
+0608010006020100060101000602010006010100060001000600010006d1010006010100
+060901000602010006040100060201000601010106010100060101010601010006020100
+060101000602010006030101060a01000601010006880300020204010301020204000601
+000106060901060701000602010006040100060301010600010006020102060a01020605
+010006030102060501010602010206020100060001000600010006080100060001010602
+010006060102060301020603010206030102060301020603010206030102063100010606
+090106070100060201000602010106000100060401010602010206090100060201000604
+0100060301010600010006020102060901000602010006020102060301000600010006d2
+010006010100060901000602010006040100060301010600010006020101060001000602
+0102060201000602010006030101060b0101068903000202040103010202040006010001
+09080634010006250100066c0001090806ff06ff06060300020204010301020204000601
+00000909063101000600010006260100066c0000090906ff06ff06060300020204010301
+02020400063f01000627010006ff06ff067e03000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040006ff06ff06e803000202040103010202040006ff06ff06e8
+03000202040103010202040003ff03ff03e9020204010301021a0400030002ff02ff02b6
+04000300021a04010301021a0400030002ff02ff02b604000300021a04010301021a0400
+030002ff02ff02b604000300021a04010301041b030004ff04ff04b70300041c030004ff
+04ff04f3
+%%EndData
+end
+%%PageTrailer
+%%Trailer
+%%BoundingBox: 0 22 377 234
+%%EOF
diff --git a/lib/pman/doc/src/make.dep b/lib/pman/doc/src/make.dep
new file mode 100644
index 0000000000..2f6a8a06cd
--- /dev/null
+++ b/lib/pman/doc/src/make.dep
@@ -0,0 +1,26 @@
+# ----------------------------------------------------
+# >>>> Do not edit this file <<<<
+# This file was automaticly generated by
+# /home/otp/bin/docdepend
+# ----------------------------------------------------
+
+
+# ----------------------------------------------------
+# TeX files that the DVI file depend on
+# ----------------------------------------------------
+
+book.dvi: book.tex part.tex pman.tex pman_chapter.tex \
+ ref_man.tex
+
+# ----------------------------------------------------
+# Source inlined when transforming from source to LaTeX
+# ----------------------------------------------------
+
+book.tex: ref_man.xml
+
+# ----------------------------------------------------
+# Pictures that the DVI file depend on
+# ----------------------------------------------------
+
+book.dvi: main_window.ps options.ps trace.ps
+
diff --git a/lib/pman/doc/src/note.gif b/lib/pman/doc/src/note.gif
new file mode 100644
index 0000000000..6fffe30419
--- /dev/null
+++ b/lib/pman/doc/src/note.gif
Binary files differ
diff --git a/lib/pman/doc/src/notes.xml b/lib/pman/doc/src/notes.xml
new file mode 100644
index 0000000000..27e3b5e5fe
--- /dev/null
+++ b/lib/pman/doc/src/notes.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2004</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Pman Release Notes</title>
+ <prepared>otp_appnotes</prepared>
+ <docno>nil</docno>
+ <date>nil</date>
+ <rev>nil</rev>
+ <file>notes.xml</file>
+ </header>
+ <p>This document describes the changes made to the Pman application.</p>
+
+<section><title>Pman 2.7.1</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The documentation is now built with open source tools
+ (xsltproc and fop) that exists on most platforms. One
+ visible change is that the frames are removed.</p>
+ <p>
+ Own Id: OTP-8201</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Pman 2.7</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>The copyright notices have been updated.</p>
+ <p>
+ Own Id: OTP-7851</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+ <section>
+ <title>Pman 2.6</title>
+
+ <section>
+ <title>Improvements and New Features</title>
+ <list type="bulleted">
+ <item>
+ <p>Some maintenance work to replace deprecated guard
+ expressions etc. somehow grew into a larger rewrite of
+ parts of the Pman code, fixing some of the more blatant
+ errors and removing unused code.</p>
+ <p>The default font has been changed, so now the entire text
+ on buttons etc. should be visible on most platforms.</p>
+ <p>Saving and restoring trace options to/from file now
+ works.</p>
+ <p>Selecting different sets of processes to hide/view should
+ now work in a more consistent and logical way.</p>
+ <p>It is now possible to select more than one module or
+ process to hide/show.</p>
+ <p>Own Id: OTP-6012 Aux Id: OTP-5987 </p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>Pman 2.5.3</title>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <list type="bulleted">
+ <item>
+ <p>Removed some dead code from <c>pman_process</c>.</p>
+ <p>Own Id: OTP-6550</p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>Pman 2.5.2</title>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <list type="bulleted">
+ <item>
+ <p>Some dead code reported by Dialyzer was eliminated.</p>
+ <p>A bug in <c>dbg</c> when tracing to wrap trace files
+ has been corrected. It failed to delete any already existing
+ wrap trace files with the same names when starting a new
+ wrap trace.</p>
+ <p>Own Id: OTP-5329</p>
+ </item>
+ <item>
+ <p>The graphic applications now search for HTML
+ documentation in the correct place.</p>
+ <p>Own Id: OTP-5381</p>
+ </item>
+ </list>
+ </section>
+ </section>
+
+ <section>
+ <title>Pman 2.5.1</title>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <list type="bulleted">
+ <item>
+ <p>The Pman 'trace shell' functionality was broken, it has
+ now been fixed. Furthermore, Pman could not correctly
+ find the pid of the active shell if more than one shell
+ process was running on the node. This has also been
+ corrected.</p>
+ <p>Own Id: OTP-5191</p>
+ </item>
+ </list>
+ </section>
+ </section>
+</chapter>
+
diff --git a/lib/pman/doc/src/options.gif b/lib/pman/doc/src/options.gif
new file mode 100644
index 0000000000..18377fbed1
--- /dev/null
+++ b/lib/pman/doc/src/options.gif
Binary files differ
diff --git a/lib/pman/doc/src/options.ps b/lib/pman/doc/src/options.ps
new file mode 100644
index 0000000000..b5e2c6a391
--- /dev/null
+++ b/lib/pman/doc/src/options.ps
@@ -0,0 +1,829 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (./options.tmp.eps)
+%%CreationDate: (Tue Jun 12 18:04:30 2001)
+%%BoundingBox: 0 53 250 318
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 0
+%%EndComments
+
+%%BeginDefaults
+%%PageOrientation: Portrait
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image. The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/buffer 512 string def
+/byte 1 string def
+/color_packet 3 string def
+/pixels 768 string def
+
+/DirectClassPacket
+{
+ %
+ % Get a DirectClass packet.
+ %
+ % Parameters:
+ % red.
+ % green.
+ % blue.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ compression 0 gt
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+ %
+ % Display a DirectClass image.
+ %
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { DirectClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayDirectClassPacket } image
+ } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+ %
+ % Get a DirectClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % red
+ % green
+ % blue
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 gt
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 gt
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ compression 0 gt
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+ %
+ % Display a PseudoClass image.
+ %
+ % Parameters:
+ % class: 0-PseudoClass or 1-Grayscale.
+ %
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ class 0 gt
+ {
+ currentfile buffer readline pop
+ token pop /depth exch def pop
+ /grays columns 8 add depth sub depth mul 8 idiv string def
+ columns rows depth
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { currentfile grays readhexstring pop } image
+ }
+ {
+ %
+ % Parameters:
+ % colors: number of colors in the colormap.
+ % colormap: red, green, blue color packets.
+ %
+ currentfile buffer readline pop
+ token pop /colors exch def pop
+ /colors colors 3 mul def
+ /colormap colors string def
+ currentfile colormap readhexstring pop pop
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { PseudoClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayPseudoClassPacket } image
+ } ifelse
+ } ifelse
+} bind def
+
+/DisplayImage
+{
+ %
+ % Display a DirectClass or PseudoClass image.
+ %
+ % Parameters:
+ % x & y translation.
+ % x & y scale.
+ % label pointsize.
+ % image label.
+ % image columns & rows.
+ % class: 0-DirectClass or 1-PseudoClass.
+ % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
+ % hex color packets.
+ %
+ gsave
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ x y translate
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ currentfile buffer readline pop
+ token pop /pointsize exch def pop
+ /Helvetica findfont pointsize scalefont setfont
+ x y scale
+ currentfile buffer readline pop
+ token pop /columns exch def
+ token pop /rows exch def pop
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ currentfile buffer readline pop
+ token pop /compression exch def pop
+ class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+ grestore
+} bind def
+%%EndProlog
+%%Page: 1 1
+%%PageBoundingBox: 0 53 250 318
+userdict begin
+%%BeginData:
+DisplayImage
+0 53
+250.000000 265.000000
+12
+350 371
+1
+0
+0
+8
+ffffff
+000000
+708090
+b03060
+d9d9d9
+808080
+a3a3a3
+000000
+03ff03ff03ff035f04000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400031b040c0392040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+04000300040003000400030004000307040c03050400030a040003080404030b0402030d
+0401030104010305040703200403030a040103010401031e040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000308040003020400030204000302
+040003050400030a0400030804010301040103090401030f040103010401030804010322
+040103010401030904010321040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003070400030204000302040003020400030504000303
+040203030400030804010302040103010403030104030301040303010401030104010300
+040103000403030704010302040103000401030004030302040303020403030604010303
+04010300040103000401030104030300040103010403030104010300040103020403030a
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000308
+040003020400030204000302040003050400030204040302040003080401030204010300
+040103010401030104010301040103010401030004010301040103000401030104010308
+040103020406030104010300040103010401030004010301040103050401030304010300
+040203000401030104010301040103000401030104010300040203000401030004010301
+040103080400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030704040302040003020400030504000301040603010400030804010302
+040103000401030104010301040103050401030004010301040103000401030104010308
+040103020402030504010300040103040401030104010305040103030401030004010301
+040103010401030104010300040103010401030004010301040103000402030c04000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030804000306
+040003020400030504000301040603010400030804010302040103000405030104010302
+040403000401030104010300040103010401030804010302040103030404030004010304
+040503050401030304010300040103010401030104010301040103000401030104010300
+040103010401030204020309040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003070400030604000302040003050400030104060301
+040003080401030204010300040103050401030104010301040103000401030104010300
+040103010401030804010302040103020401030104010300040103040401030904010303
+040103000401030104010301040103010401030004010301040103000401030104010303
+040203090400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003080400030604000302040003050400030204040302040003080401030104010301
+040103010401030104010301040103010401030004010300040203000401030104010300
+040003060401030204010302040103010401030004010301040103000401030104010306
+040103010401030104020300040103010401030004020300040103010401030004010301
+040103000401030104010308040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003070408030204000305040003030402030304000308
+040403030403030204010302040203000401030004010300040103000401030204010307
+040103020401030304020300040103000403030204030308040303020401030004010303
+04010300040103010403030104010301040103010403030a040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+0400030004000300040003000400030004000300040003080400030a040003050400030a
+040003660401032904000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+0400030004000300040003070400030a040003050400030a040003660401032a04000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+04000300040003000400030004000300040003000400030004000300040003080400030a
+04000305040c036604010329040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+04000300040003000400030004000307040c03a604000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+040003000400030004000300040003000400030004000300040003000400030004000300
+04000300040003000400030004000300040003ff03ff03d402ff02ff02bb00ff00ff00ba
+050000ff005b050100ff00ff000e050000ff005b050100b104a80502000204a8000504a8
+0502000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a8
+000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a80502
+000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a80005
+04a8050200020407010404080100041601000404010004360100040601000433000504a8
+0502000204090100040a0100041c010004360100043b0005040801040434010004130100
+041a010004060100042b0502000204090100040301000400010104020100040001010403
+010204020100040001010403010204020104040201020402010004000101040301020403
+0102040a0102040201000400010104020104040201020403010204020100040001010403
+01020404010104170005040a01000436010004130100041a010004330502000204090100
+040301010401010004010101040101000401010004020100040101010401010004040100
+040401000403010004020100040101010401010004010100040201000401010004020100
+040801000402010004010101040101000403010004060100040201000402010004010101
+0401010004010100040201000403010104170005040a0100040301000400010104030102
+0403010204030102040a0102040201000402010004010104040101000400010104020100
+040201000401010404090102040201000400010104020104040201020403010204020100
+040001010403010204040101040f05020002040901000403010004020100040101000402
+010004010100040201000401010004080100040401000407010004010100040201000401
+010004050100040201000408010004020100040101000402010004030100040601000402
+01000402010004010100040201000401010004210005040a010004030101040101000401
+010004020100040101000402010004010100040201000408010004020100040101000402
+0100040301000403010104010100040101000402010004030100040a0100040201000401
+010104010100040301000406010004020100040201000401010104010100040101000402
+010004030101040f05020002040901000403010004020100040101000402010004010104
+040101000408010004040100040401030401010004020100040101000405010404080100
+040201000401010004020100040301000406010004020100040201000401010004020100
+04020102041e0005040a0100040301000409010004010100040501000402010004080100
+040201000401010004020100040301000403010004020100040101000402010004030100
+040a01000402010004010100040201000403010004060100040201000402010004010100
+040201000401010004190502000204090100040301000402010004010100040201000401
+010004050100040801000404010004030100040201000401010004020100040101000405
+0100040c0100040201000401010004020100040301000406010004020100040201000401
+01000402010004050100041d0005040a0100040301000406010304010100040501040408
+010004020100040101000402010004030100040301000402010004010100040201000403
+0100040a0100040201000401010004020100040301000406010004020100040201000401
+010004020100040201020416050200020409010004030100040201000401010004020100
+040101000402010004010100040801000404010004030100040201000401010004020100
+040101000402010004010100040201000408010004020100040101010401010004030100
+040601000402010004020100040101000402010004010100040201000403010104170005
+040a01000403010004050100040201000401010004050100040c01000402010004010100
+04020100040301000403010004020100040101000402010004030100040a010004020100
+040101000402010004030100040601000402010004020100040101000402010004050100
+041505020002040701040401010004020100040101000402010004020102040201000408
+0100040501010402010304010100040201000402010204030102040a0102040201000400
+01010405010104040100040301020402010004020100040201020404010104170005040a
+010004030100040501000402010004010100040201000401010004020100040801000402
+01000401010004010101040301000403010104010100040101000401010104030100040a
+010004020100040101010401010004030100040601000402010004020100040101000402
+0100040101000402010004030101040f050200020462010004440005040a010004030100
+040601030402010204030102040a01020403010104000100040401010401010004000101
+040301010400010004040101040901020402010004000101040501010404010004030102
+04020100040201000402010204040101040f050200020462010004440005044701000421
+0100043c0502000204620100044400050447010004210100043c0502000204a800050447
+010004210100043c0502000204a8000504a80502000204a8000504a80502000204a80005
+04a80502000204a8000504a80502000204a8000504a80502000204a8000504a805020002
+04a8000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
+0502000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a8
+000504a8050200020408050a04070104040801000416010004040100045f000504a80502
+000204080509000004090100040a0100041c0100045f000504a805020002040805010306
+000104090100040301000400010104020100040001010403010204020100040001010403
+010204020104040901020402010004000101040a01020402010004000101040301020402
+0100040201000401010004000101041f000504a805020002040805010306000104090100
+040301010401010004010101040101000401010004020100040101010401010004040100
+04040100040a010004020100040101010401010004080100040201000401010104010100
+040101000402010004010100040201000401010104010100041e00050409050a04070104
+043d01000447050200020408050103060001040901000403010004020100040101000402
+01000401010004020100040101000408010004040100040a010004020100040101000402
+010004080100040501000402010004050100040101000400010004000100040101000402
+0100041e000504090509000004090100043f010004470502000204080501030600010409
+01000403010004020100040101000402010004010104040101000408010004040100040a
+010004020100040101000402010004090102040201000402010004020103040101000400
+0100040001000401010004020100041e0005040905010306000104090100040301000400
+0101040301020403010204030102040a0102040301020402010004000101040301010400
+010004470502000204080501030600010409010004030100040201000401010004020100
+04010100040501000408010004040100040a0100040201000401010004020100040c0100
+040101000402010004010100040201000401010004000100040001000401010004020100
+041e00050409050103060001040901000403010104010100040101000402010004010100
+040201000401010004020100040801000402010004010100040201000401010104010100
+040101000401010104470502000204080501030600010409010004030100040201000401
+0100040201000401010004020100040101000408010004040100040a0100040201000401
+010004020100040801000402010004010101040101000401010004020100040101000400
+0100040001000401010004020100041e0005040905010306000104090100040301000409
+010004010100040501000402010004080100040501000402010004010100040201000401
+010004020100044705020002040805010306000104070104040101000402010004010100
+040201000402010204020100040801000405010104090102040201000402010004090102
+04020100040001010403010304020100040001000402010004020100041e000504090501
+030600010409010004030100040601030401010004050104040901020402010404010100
+040201000401010004020100044705020002040805010008045b01000437000504090501
+030600010409010004030100040501000402010004010100040501000410010004010100
+04050100040201000401010004020100044705020002040805000009045b010004370005
+040905010306000104090100040301000405010004020100040101000402010004010100
+040201000408010004020100040101000402010004010100040201000401010004010101
+044705020002046f01000437000504090501030600010409010004030100040601030402
+010204030102040a01020403010204020100040201000402010104000100044705020002
+04a8000504090501000804930502000204a8000504090500000904930502000204a80005
+04a80502000204a8000504a805020002041b0501048a000504a805020002041a0503040e
+01000404010204030102046a000504a80502000204190505040d01000406010004050100
+046a000504a8050200020418050203010502040b0100040001000405010004050100040a
+010204020100040001010403010204020100040201000401010004000101040301020439
+000504a8050200020417050203030502040a010004000100040501000405010004090100
+040201000401010104010100040101000402010004010100040201000401010104010100
+04010100040201000438000504a805020002041605020305050204090100040001000405
+010004050100040901000405010004020100040501000401010004000100040001000401
+01000402010004010100043c000504a80502000204150002030700020407010004020100
+0404010004050100040a0102040201000402010004020103040101000400010004000100
+0401010004020100040201020439000504a8050200020416000203050002040801040404
+010004050100040d01000401010004020100040101000402010004010100040001000400
+0100040101000402010004050100043800050409050a0407010404430100044105020002
+041700020303000204090100040201000404010004050100040901000402010004010101
+040101000401010004020100040101000400010004000100040101000402010004010100
+0402010004380005040905090000040901000488050200020418000203010002040a0100
+040201000404010004050100040a01020402010004000101040301030402010004000100
+040201000402010004020102043900050409050103060001040901000403010004000101
+040301020403010204030102040901000400010104030102040301020403010204030102
+04020100040201000402010204330502000204190005042e010004580005040905010306
+000104090100040301010401010004010100040201000401010004020100040101000402
+010004080101040101000401010004020100040101000402010004010100040201000404
+010004020100040201000401010004020100043205020002041a0003042f010004580005
+040905010306000104090100040301000409010004010100040501000402010004080100
+040501000402010004010100040501000402010004040100040201000402010004010100
+04020100043205020002041b000104300100045800050409050103060001040901000403
+010004060103040101000405010404080100040501040401010004050104040401000403
+0100040001000402010404320502000204a8000504090501030600010409010004030100
+04050100040201000401010004050100040c010004050100040501000405010004080100
+04030100040001000402010004360502000204a800050409050103060001040901000403
+010004050100040201000401010004020100040101000402010004080100040501000402
+010004010100040201000401010004020100040401000404010004030100040201000432
+0502000204a8000504090501030600010409010004030100040601030402010204030102
+0409010004060102040301020403010204050100040401000404010204330502000204a8
+000504090501000804930502000204a80005040905000009049305020002041b0001048a
+000504a805020002041a0003040c01040404010004120100044301020416000504a80502
+000204190005040b0100041c0100044501000416000504a8050200020418000204010002
+040a01000406010204020100040001010403010204020104040901020402010004000101
+0403010204020100040201000401010004000101040a0102040201000400010104050100
+0402010004020100040e000504a805020002041700020403000204090100040801000402
+010104010100040101000402010004030100040a01000402010004010101040101000401
+010004020100040101000402010004010101040101000408010004020100040101010401
+0100040401000402010004020100040e000504a805020002041600020405000204080103
+04050100040201000405010004070100040a010004050100040201000405010004010100
+040001000400010004010100040201000408010004020100040101000402010004040100
+0403010004010100040e000504a805020002041505020407050204070100040801000402
+01000406010204040100040b010204020100040201000402010304010100040001000400
+010004010100040201000408010004020100040101000402010004040100040301000401
+0100040e000504a805020002041605020405050204080100040801000402010004090100
+04030100040e010004010100040201000401010004020100040101000400010004000100
+040101000402010004080100040201000401010004020100040401000404010004000100
+040e000504a8050200020417050204030502040901000408010004020100040501000402
+010004030100040a01000402010004010101040101000401010004020100040101000400
+010004000100040101000402010004080100040201000401010004020100040401000404
+0101040f00050409000a04070104042701010418010004060100043a0502000204180502
+04010502040a010004080100040201000406010204050101040901020402010004000101
+040301030402010004000100040201000402010004090102040201000402010004040100
+04050100040f00050409000905000409010004280100041a010004420502000204190505
+043c010004390100040f0005040900010406050104090100040301000400010104030102
+0403010204030102040b0100040301000402010004010100040001010403010204020104
+0402010204030102040201000400010104030102042505020002041a0503043d01000436
+010004000100041000050409000104060501040901000403010104010100040101000402
+010004010100040201000401010004020100040801040401010004020100040101010401
+010004010100040201000403010004060100040201000402010004010101040101000401
+010004020100042405020002041b0501043e010004370100041100050409000104060501
+040901000403010004090100040101000405010004020100040a01000403010004020100
+040101000402010004010100040701000406010004020100040201000401010004020100
+0401010004280502000204a8000504090001040605010409010004030100040601030401
+010004050104040a01000403010004020100040101000402010004010100040701000406
+0100040201000402010004010100040201000402010204250502000204a8000504090001
+04060501040901000403010004050100040201000401010004050100040e010004030100
+040201000401010004020100040101000407010004060100040201000402010004010100
+040201000405010004240502000204a80005040900010406050104090100040301000405
+01000402010004010100040201000401010004020100040a010004030100040101010401
+010004020100040101000402010004030100040601000402010004020100040101000402
+0100040101000402010004240502000204a8000504090001040605010409010004030100
+040601030402010204030102040b01000404010104000100040101000402010004020102
+04050101040401000403010204020100040201000402010204250502000204a800050409
+0001050804930502000204a8000504090000050904930502000204a8000504a805020002
+04a8000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
+0502000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a8
+000504a80502000204a800050409000a040701040442010004420502000204a800050409
+00090500040901000444010004420502000204a800050409000104060501040901000403
+010004000101040301020403010204030102040a01020402010004020100040201020402
+0100040001010402010404020102043a0502000204a80005040900010406050104090100
+040301010401010004010100040201000401010004020100040101000402010004080100
+040201000401010004020100040101000402010004010101040101000403010004030100
+0402010004390502000204a8000504090001040605010409010004030100040901000401
+010004050100040201000408010004020100040101000402010004010100040201000401
+0100040201000403010004030100043d0502000204a80005040900010406050104090100
+040301000406010304010100040501040408010404020100040001000402010404010100
+040201000403010004040102043a0502000204a800050409000104060501040901000403
+010004050100040201000401010004050100040c01000406010004000100040201000405
+010004020100040301000407010004390502000204a80005040900010406050104090100
+040301000405010004020100040101000402010004010100040201000408010004020100
+040301000403010004020100040101000402010004030100040301000402010004390502
+00020408050a040701040408010004160100040401000420010204050100040901000429
+000504090001040605010409010004030100040601030402010204030102040a01020404
+01000404010204020100040201000404010104020102043a050200020408050900000409
+0100040a0100041c01000422010004100100042900050409000105080493050200020408
+050103060001040901000403010004000101040201000400010104030102040201000400
+01010403010204020104040901020402010004000101040c010004030102040201000400
+010104020100040101000426000504090000050904930502000204080501030600010409
+010004030101040101000401010104010100040101000402010004010101040101000404
+010004040100040a0100040201000401010104010100040b010004050100040201010401
+010004010100040001000427000504a80502000204080501030600010409010004030100
+0402010004010100040201000401010004020100040101000408010004040100040a0100
+040201000401010004020100040b01000405010004020100040201000401010104280005
+04a805020002040805010306000104090100040301000402010004010100040201000401
+0104040101000408010004040100040a0100040201000401010004020100040b01000405
+01000402010004020100040101010428000504a805020002040805010306000104090100
+0403010004020100040101000402010004010100040501000408010004040100040a0100
+040201000401010004020100040b01000405010004020100040201000401010004000100
+0427000504a8050200020408050103060001040901000403010004020100040101000402
+01000401010004020100040101000408010004040100040a010004020100040101000402
+0100040b010004050100040201000402010004010100040101000426000504a805020002
+040805010306000104070104040101000402010004010100040201000402010204020100
+0408010004050101040901020402010004020100040b0100040501000402010004020100
+04010100040201000425000504a8050200020408050100080494000504a8050200020408
+050000090494000504a80502000204a8000504a80502000204a8000504a80502000204a8
+000504a80502000204a8000504a80502000204a8000504a805020002041b0501048a0005
+04a805020002041a0503040e01000404010204030102040a01020405010004090100044a
+000504a80502000204190505040d01000406010004050100040c010004100100044a0005
+04a8050200020418050203010502040b0100040001000405010004050100040c01000403
+010204020100040001010402010004010100040301020440000504a80502000204170502
+03030502040a0100040001000405010004050100040c0100040501000402010104010100
+04010100040001000403010004020100043f000504a80502000204160502030505020409
+0100040001000405010004050100040c0100040501000402010004020100040101010404
+01000443000504a805020002041500020307000204070100040201000404010004050100
+040c010004050100040201000402010004010101040501020440000504a8050200020416
+000203050002040801040404010004050100040c01000405010004020100040201000401
+01000400010004070100043f000504a80502000204170002030300020409010004020100
+0404010004050100040c0100040501000402010004020100040101000401010004020100
+04020100043f000504a8050200020418000203010002040a010004020100040401000405
+0100040c01000405010004020100040201000401010004020100040201020440000504a8
+05020002041900050488000504a805020002041a00030489000504a805020002041b0001
+048a000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
+0502000204a8000504a80502000204a8000504a805020002041b0001048a000504a80502
+0002041a0003040c01040404010004120100040b01020405010004090100041b0102041d
+000504a80502000204190005040b0100041c0100040d010004100100041d0100041d0005
+04a8050200020418000204010002040a0100040601020402010004000101040301020402
+0104040b01000403010204020100040001010402010004010100040a0102040201000400
+01010405010004020100040201000415000504a805020002041700020403000204090100
+040801000402010104010100040101000402010004030100040d01000405010004020101
+040101000401010004000100040a01000402010004010101040101000404010004020100
+040201000415000504a80502000204160002040500020408010304050100040201000405
+010004070100040d010004050100040201000402010004010101040b0100040201000401
+0100040201000404010004030100040101000415000504a8050200020415050204070502
+0407010004080100040201000406010204040100040d0100040501000402010004020100
+04010101040b010004020100040101000402010004040100040301000401010004150005
+04a80502000204160502040505020408010004080100040201000409010004030100040d
+01000405010004020100040201000401010004000100040a010004020100040101000402
+01000404010004040100040001000415000504a805020002041705020403050204090100
+0408010004020100040501000402010004030100040d0100040501000402010004020100
+040101000401010004090100040201000401010004020100040401000404010104160005
+04a8050200020418050204010502040a010004080100040201000406010204050101040b
+010004050100040201000402010004010100040201000409010204020100040201000404
+0100040501000416000504a80502000204190505047001000416000504a805020002041a
+0503046e0100040001000417000504a805020002041b0501047001000418000504a80502
+000204a8000504a80502000204a8000504a80502000204a8000504a80502000204a80005
+04a80502000204a8000504a80502000204a8000504a80502000204a8000504a805020002
+04a8000504a80502000204a8000504a80502000204a8000504a80502000204a8000504a8
+0502000204a8000504a80502000204a8000505ab000205a8000405ac000105a9000305ad
+000005aa00ff00ff00ff00ff001f04ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff04570005040f01040434010004130100041a01000406010004d3
+0005041101000436010004130100041a010004db00050411010004030100040001010403
+01020403010204030102040a010204020100040201000401010404010100040001010402
+010004020100040101040409010204020100040001010402010404020102040301020402
+010004000101040301020404010104b70005041101000403010104010100040101000402
+010004010100040201000401010004020100040801000402010004010100040201000403
+01000403010104010100040101000402010004030100040a010004020100040101010401
+010004030100040601000402010004020100040101010401010004010100040201000403
+010104b70005041101000403010004090100040101000405010004020100040801000402
+01000401010004020100040301000403010004020100040101000402010004030100040a
+010004020100040101000402010004030100040601000402010004020100040101000402
+01000401010004c100050411010004030100040601030401010004050104040801000402
+01000401010004020100040301000403010004020100040101000402010004030100040a
+010004020100040101000402010004030100040601000402010004020100040101000402
+01000402010204be0005041101000403010004050100040201000401010004050100040c
+010004020100040101000402010004030100040301000402010004010100040201000403
+0100040a0100040201000401010004020100040301000406010004020100040201000401
+0100040201000405010004bd000504110100040301000405010004020100040101000402
+010004010100040201000408010004020100040101000401010104030100040301010401
+0100040101000401010104030100040a0100040201000401010104010100040301000406
+01000402010004020100040101000402010004010100040201000403010104b700050411
+010004030100040601030402010204030102040a01020403010104000100040401010401
+010004000101040301010400010004040101040901020402010004000101040501010404
+0100040301020402010004020100040201020404010104b70005044e01000421010004e4
+0005044e01000421010004e40005044e01000421010004e4000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff045700050416050104ff043e000504150503040c010404190100
+040d010004ff0401000504140505040d0100042a010004ff040100050413050203010502
+040c01000403010004000101040901000402010004020102040201000400010104030101
+0400010004020102040201000402010004f300050412050203030502040b010004030101
+040101000408010004020100040401000402010104010100040101000401010104010100
+04020100040101000402010004f300050411050203050502040a01000403010004020100
+040801000400010004000100040401000402010004020100040101000402010004010100
+0402010004010100040001000400010004f3000504100002030700020409010004030100
+040201000408010004000100040001000404010004020100040201000401010004020100
+040101000402010004010100040001000400010004f300050411000203050002040a0100
+040301000402010004080100040001000400010004040100040201000402010004010100
+04020100040101000402010004010100040001000400010004f300050412000203030002
+040b01000403010004020100040801000400010004000100040401000402010004020100
+0401010004010101040101000402010004010100040001000400010004f3000504130002
+03010002040a010404010100040201000409010004000100040501000402010004020100
+040201010400010004020102040301000400010004f400050414000504ff043c00050415
+000304ff043d00050416000104ff043e000504ff0457000504ff0457000504ff04570005
+04ff0457000504ff0457000504ff040600470408000504ff040600460500040800050467
+058d0410000104430501040800050467058c000004100001044305010408000504670501
+048900010410000104430501040800050467050104890001041000010443050104080005
+04160001044e0501048900010410000104070602043805010408000504150003040c0104
+041201010404010004030102041905010489000104100001040706000401060004370501
+0408000504140005040d010004130100040d010004190501048900010410000104070600
+040106000402060004000601040306020402060004020600040206020403060204140501
+040800050413000204010002040c010004040102040b0100040401020405010004030102
+041205010489000104100001040706000401060004020601040106000401060004020600
+040106000402060004010600040206000401060004020600041305010408000504120002
+04030002040b010004030100040201000408010404040100040501000402010004020100
+041105010489000104100001040706030402060004050600040206000401060004000600
+0400060004010600040506000402060004130501040800050411000204050002040a0100
+0403010004020100040a0100040601000405010004020100040201000411050104890001
+041000010407060004020600040106000405060004020600040106000400060004000600
+040206020402060404130501040800050410050204070502040901000403010004020100
+040a01000406010004050100040201040411050104890001041000010407060004020600
+040106000405060004020600040106000400060004000600040506000401060004170501
+040800050411050204050502040a01000403010004020100040a01000406010004050100
+040201000415050104890001041000010407060004020600040106000405060004020600
+040106000400060004000600040106000402060004010600040206000403060104040601
+040406010501040800050412050204030502040b01000403010004020100040a01000406
+010004050100040201000402010004110501048900010410000104070603040206000406
+060204030600040006000403060204030602040406010404060104040601050104080005
+0413050204010502040c010004040102040b010004060100040501000403010204120501
+0489000104100001044305010408000504140505044c0501048900010410000104430501
+0408000504150503044d05010489000104100001044305010408000504160501044e0501
+048900010410000104430501040800050467050104890001041000010443050104080005
+04670501008b04100001044305010408000504670500008c041000010443050104080005
+04ff0406000105450408000504ff0406000005460408000504ff0457000504ff04570005
+04ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff04570005
+04ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff04570005
+04ff0457000504ff0457000504ff0457000505ff0557000405ff0558000305ff055900ff
+00ff00ff00ff001f04ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff04570005044c003b044b003b04460005044c003a
+0500044b003a050004460005044c000104370501044b00010437050104460005044c0001
+04370501044b00010437050104460005044c000104370501044b00010437050104460005
+044c000104370501044b00010437050104460005044c000104370501044b000104370501
+04460005044c000104370501044b00010437050104460005044c000104370501044b0001
+0437050104460005044c000104150102040201000402010004160501044b000104070102
+041f01020409050104460005044c00010414010004020100040101000401010004170501
+044b00010406010004020100042001000409050104460005044c00010414010004020100
+040101000400010004180501044b00010406010004020100040201020402010004000101
+0403010204030102040501000409050104460005044c0001041401000402010004010101
+04190501044b000104060100040501000402010004010101040101000401010004020100
+0401010004020100040401000409050104460005044c0001041401000402010004010100
+0400010004180501044b0001040601000409010004010100040201000401010004050100
+04020100040401000409050104460005044c000104140100040201000401010004010100
+04170501044b000104060100040601030401010004020100040101000405010404040100
+0409050104460005044c00010414010004020100040101000401010004170501044b0001
+040601000402010004010100040201000401010004020100040101000405010004080100
+0409050104460005044c00010414010004020100040101000402010004160501044b0001
+040601000402010004010100040201000401010004020100040101000402010004010100
+04020100040401000409050104460005044c000104150102040201000402010004160501
+044b00010407010204030103040101000402010004020102040301020405010004090501
+04460005044c000104370501044b00010437050104460005044c000104370501044b0001
+0437050104460005044c000104370501044b00010437050104460005044c000104370501
+044b00010437050104460005044c000104370501044b00010437050104460005044c0001
+04370501044b00010437050104460005044c000104370501044b00010437050104460005
+044c000104370501044b00010437050104460005044c000104370501044b000104370501
+04460005044c000104370501044b00010437050104460005044c00010539044b00010539
+04460005044c0000053a044b0000053a0446000504ff0457000504ff0457000504ff0457
+000504ff0457000504ff0457000504ff045700010500000204ff045700000501000204ff
+0457
+%%EndData
+end
+%%PageTrailer
+%%Trailer
+%%BoundingBox: 0 53 250 318
+%%EOF
diff --git a/lib/pman/doc/src/part.xml b/lib/pman/doc/src/part.xml
new file mode 100644
index 0000000000..29b88e0785
--- /dev/null
+++ b/lib/pman/doc/src/part.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>1996</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Pman User's Guide</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <description>
+ <p>The process manager <em>Pman</em> is a graphical tool used to
+ inspect the Erlang processes executing either locally or on remote
+ nodes. It is also possible to trace events in the individual processes.</p>
+ </description>
+ <xi:include href="pman_chapter.xml"/>
+</part>
+
diff --git a/lib/pman/doc/src/part_notes.xml b/lib/pman/doc/src/part_notes.xml
new file mode 100644
index 0000000000..1505d52421
--- /dev/null
+++ b/lib/pman/doc/src/part_notes.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2004</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Pman Release Notes</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date>2004-09-07</date>
+ <rev>1.0</rev>
+ <file>part_notes.sgml</file>
+ </header>
+ <description>
+ <p>The process manager <em>Pman</em> is a graphical tool used to
+ inspect the Erlang processes executing either locally or on remote
+ nodes. It is also possible to trace events in the individual
+ processes.</p>
+ </description>
+ <xi:include href="notes.xml"/>
+</part>
+
diff --git a/lib/pman/doc/src/pman.xml b/lib/pman/doc/src/pman.xml
new file mode 100644
index 0000000000..2469d141e5
--- /dev/null
+++ b/lib/pman/doc/src/pman.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>1996</year>
+ <year>2007</year>
+ <holder>Ericsson AB, All Rights Reserved</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ The Initial Developer of the Original Code is Ericsson AB.
+ </legalnotice>
+
+ <title>pman</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <module>pman</module>
+ <modulesummary>A graphical process manager.</modulesummary>
+ <description>
+ <p>A graphical tool used to inspect the Erlang processes executing either
+ locally or on remote nodes. It is also possible to trace events in
+ the individual processes.</p>
+ </description>
+ <funcs>
+ <func>
+ <name>start()</name>
+ <name>start(Excluded)</name>
+ <name>start_notimeout()</name>
+ <name>start_notimeout(Excluded)</name>
+ <fsummary>Start Pman.</fsummary>
+ <type>
+ <v>Excluded = [Module]</v>
+ <v>&nbsp;Module = atom()</v>
+ </type>
+ <desc>
+ <p>Starts Pman. It will use the previously saved trace settings
+ in <c>HOME/.erlang_tools/pman.opts</c>, where <c>HOME</c> is
+ the user's home directory, if such a file exists. Otherwise
+ standard trace settings will be used. The return value should
+ be ignored.</p>
+ <p><c>Excluded</c> is a list of module names. If the argument is
+ present, processes currently executing in any of these modules
+ will not be shown by Pman.</p>
+ <p><c>start/0,1</c> will fail unless the start-up succeeds
+ within 20 seconds, whereas <c>start_notimeout/0,1</c> will
+ wait indefinitely.</p>
+ </desc>
+ </func>
+ <func>
+ <name>proc(Process)</name>
+ <name>proc(A, B, C)</name>
+ <fsummary>Start a Pman trace window.</fsummary>
+ <type>
+ <v>Process = pid() | atom()</v>
+ <v>A = B = C = integer()</v>
+ </type>
+ <desc>
+ <p>Starts a Pman trace window for the specified process.
+ The return value should be ignored.</p>
+ <p>The process to trace is given either by its pid or by its
+ registered name. It is also possible to use <c>proc/3</c>
+ to trace the pid represented as <c><![CDATA[<A,B,C>]]></c>.</p>
+ </desc>
+ </func>
+ </funcs>
+</erlref>
+
diff --git a/lib/pman/doc/src/pman_chapter.xml b/lib/pman/doc/src/pman_chapter.xml
new file mode 100644
index 0000000000..141b488415
--- /dev/null
+++ b/lib/pman/doc/src/pman_chapter.xml
@@ -0,0 +1,371 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>1996</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Pman</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>pman_chapter.xml</file>
+ </header>
+ <marker id="here"></marker>
+
+ <section>
+ <title>Introduction</title>
+ <p>The process manager Pman is a tool for viewing processes executing
+ locally or on remote nodes. Its main purpose is to locate
+ erroneous code by inspecting the state of the processes and by tracing
+ events. Bottlenecks, unread messages, and bad memory handling are
+ some of the problems that can be solved with Pman.</p>
+ <p>Processes may be inspected individually in a process trace
+ window. There the user may dynamically follow the execution of a
+ process by getting trace output for sent and received messages
+ as well as for called functions and some other process
+ events. Information about source code modules executed by the
+ processes is also accessible. Note that Pman has some effect on
+ the real time behavior of a running system.</p>
+ </section>
+
+ <section>
+ <title>Getting Started with Pman</title>
+ <p>Start Pman by calling <c>pman:start()</c>. It will start
+ the <seealso marker="#main_win">Main Window</seealso>, showing an
+ overview of all processes running at the current node.</p>
+ <p>To trace a certain process, select it by clicking on its line and
+ then chose Trace-&gt;Selected Process, or simply double-click it. This
+ will open a <seealso marker="#trace_win">Trace Window</seealso>.
+ In the Trace Window, there is some information about the process
+ and traced events are added dynamically.</p>
+ <p>Which events to trace are selected in
+ the <seealso marker="#options_win">Options Window</seealso> which
+ is opened by choosing File-&gt;Options... in the Main Window or in a
+ Trace Window. Currently supported trace events are message sending,
+ message receiving, function calls and process events.</p>
+ <p>It is possible to by-pass the Main Window and open a Trace
+ Window directly for the process <c>Pid</c> by calling
+ <c>pman:proc(Pid)</c>.</p>
+ </section>
+
+ <section>
+ <marker id="main_win"></marker>
+ <title>The Main Window</title>
+ <p>The Main Window shows all processes running at the displayed node.
+ The window is automatically updated every 5 seconds.
+ Select which node to display in the window by choosing the node name
+ from the Nodes menu.</p>
+ <image file="main_window.gif">
+ <icaption>The Main Window.</icaption>
+ </image>
+ <p>A process can be selected by clicking on its line. The selected
+ process is highlighted. Use the arrow keys to move up and down in
+ the process overview.</p>
+ <p>The following information is displayed for each process:</p>
+ <list type="bulleted">
+ <item>Pid - process identifier.</item>
+ <item>Current Function - the function (<c>Module:Function/Arity</c>)
+ the process is currently executing.</item>
+ <item>Name - registered name of the process, if any.</item>
+ <item>Msgs - number of messages in the process' mailbox.</item>
+ <item>Reds - number of reductions performed. Gives a rough estimate
+ of the process' work load.</item>
+ <item>Size - estimated size of the process, in words, calculated by
+ adding the stack size and the heap size.</item>
+ </list>
+ <p>At the bottom of the window the following functions and
+ information can be found:</p>
+ <taglist>
+ <tag><em>Hide System Processes</em></tag>
+ <item>This check button controls the display of what Pman consider
+ <em>system processes</em>, that is, processes Pman knows are part
+ of Erlang/OTP rather than the user's application.
+ If the button is selected, these system processes will not be
+ shown.</item>
+ <tag><em>Auto-Hide New</em></tag>
+ <item>This check button controls the treatment of newly created
+ processes. If it is selected, new processes will not be shown.</item>
+ <tag><em># Hidden</em></tag>
+ <item>This label displays the number of processes currently
+ executing that are not shown in the process overview.</item>
+ </taglist>
+
+ <section>
+ <title>The File Menu</title>
+ <taglist>
+ <tag><em>Options...</em></tag>
+ <item>Open the <seealso marker="#options_win">Options Window</seealso>
+ which allows the user to set the trace options to use.</item>
+ <tag><em>Save Options</em></tag>
+ <item>Save the options set using the Options Window. The options are
+ stored to the file <c>HOME/.erlang_tools/pman.opts</c>, where
+ <c>HOME</c> is the user's home directory, and are automatically
+ loaded the next time Pman is started.</item>
+ <tag><em>Exit</em></tag>
+ <item>Stop Pman.</item>
+ </taglist>
+ </section>
+
+ <section>
+ <title>The View Menu</title>
+ <p>This menu mainly contains buttons for controlling what to
+ display in the Main Window. Note that the View Menu overrides
+ the settings of the check buttons (Hide System processes, Auto-Hide
+ new) in the Main Window.</p>
+ <taglist>
+ <tag><em>Hide All Processes</em></tag>
+ <item>Hide all processes.</item>
+ <tag><em>Hide Modules...</em></tag>
+ <item>Opens a dialog window with all loaded modules. If the user
+ selects a window and clicks OK, the process overview will not
+ show any processes running code from those modules.</item>
+ <tag><em>Hide Selected Processs</em></tag>
+ <item>Hide the selected process.</item>
+ <tag><em>Module Info...</em></tag>
+ <item>Given a selected process currently executing a function in
+ the module <c>Module</c>, this menu button opens a window
+ showing information about the module as returned from
+ <c>Module:module_info()</c>.</item>
+ <tag><em>Refresh</em></tag>
+ <item>Updates the process overview.</item>
+ <tag><em>Show All Processes</em></tag>
+ <item>Show all processes, except system processes and/or new
+ processes if <em>Hide System Processes</em> and/or
+ <em>Auto-Hide New</em> is selected.</item>
+ <tag><em>Show Processes...</em></tag>
+ <item>Opens a dialog window with all hidden processes. If
+ the user selects a process and clicks OK, the process
+ overview will show that process.</item>
+ </taglist>
+ </section>
+
+ <section>
+ <title>The Trace Menu</title>
+ <taglist>
+ <tag><em>Kill</em></tag>
+ <item>Terminates the selected process by calling
+ <c>exit(Pid,kill)</c>.</item>
+ <tag><em>Trace Selected Process</em></tag>
+ <item>Opens a Trace Window for the selected process. Tracing
+ will start immediately with the default trace flags set from
+ the Main Window.</item>
+ <tag><em>Shell Process</em></tag>
+ <item>Opens a Trace Window for the shell process of node Pman
+ was started at (not the displayed node). If the shell process
+ dies, the opened Trace Window will find the pid of
+ the automatically started new shell process, and continue to
+ trace that process.</item>
+ </taglist>
+ </section>
+
+ <section>
+ <title>The Nodes Menu</title>
+ <p>The Nodes menu contains one entry for each known node.
+ By selecting a node from the Nodes menu, the process overview
+ window will change its view, and display the processes running
+ on that node.</p>
+ </section>
+
+ <section>
+ <title>The Help Menu</title>
+ <taglist>
+ <tag><em>Help</em></tag>
+ <item>Selecting Help from the Help menu will cause the HTML
+ version of the Pman User's Guide (this document) to be
+ displayed. Currently this function requires Netscape to be up
+ and running.</item>
+ </taglist>
+ </section>
+ </section>
+
+ <section>
+ <marker id="trace_win"></marker>
+ <title>The Trace Window</title>
+ <p>A Trace Window outputs trace information for a traced process.
+ A Trace Window automatically uses the trace options set in
+ the Main Window, but it is also possible to change the options for
+ each Trace Window individually.</p>
+ <image file="trace.gif">
+ <icaption>The Trace Window.</icaption>
+ </image>
+ <p>There is no limit to how many Trace Windows can be open at the same
+ time. However, notice that if more processes are traced,
+ the performance degradation of the system will be more noticeable.</p>
+ <p>The following information is displayed, where applicable:</p>
+ <list type="bulleted">
+ <item>initial call - the function (<c>Module:Function/Arity</c>)
+ the process started executing in.</item>
+ <item>current function - the function (<c>Module:Function/Arity</c>)
+ the process is currently executing.</item>
+ <item>messages - the messages in the mailbox.</item>
+ <item>dictionary - the contents of the process dictionary.</item>
+ <item>heap size - heap size in words.</item>
+ <item>stack size - stack size in words.</item>
+ <item>reductions - number of reductions performed. Gives a rough
+ estimate of the process' work load.</item>
+ <item>links - list of pids the process is linked to.</item>
+ <item>trap_exit - <c>true</c> if the process trap exit signals,
+ <c>false</c> otherwise.</item>
+ </list>
+ <p>In the Trace Window, trace output is continuously added. First in
+ each trace message is the pid of the traced process.
+ Note that if the inheritance flags for tracing are set, the trace
+ output for the spawned/linked processes will be shown in the same
+ window as the spawning/linking process.</p>
+ <p>Each trace message also has a mnemonic tag:</p>
+ <taglist>
+ <tag><em>!</em></tag>
+ <item>This tag indicates that a message has been sent. Following
+ the <c>To:</c> tag will be a pid/name of the receiver. Next,
+ following the <c>Msg:</c> tag will be the sent message.</item>
+ <tag><em>rec</em></tag>
+ <item>This tag indicates that a message has been received.
+ Following this will be the received message.</item>
+ <tag><em>call</em></tag>
+ <item>This tag indicates a call to a function. Following this will be
+ the actual call, with all the arguments.</item>
+ <tag><em>link</em></tag>
+ <item>This tag indicates that a link between the traced process and
+ another process has been created. Following this will be the pid
+ of the other process.</item>
+ <tag><em>spawn</em></tag>
+ <item>This tag indicates that the traced process has spawned another
+ process. Following this will be the pid of the spawned process.</item>
+ <tag><em>exit</em></tag>
+ <item>This tag indicates that traced process has exited. Following
+ this will be the exit reason.</item>
+ </taglist>
+
+ <section>
+ <title>The File Menu</title>
+ <taglist>
+ <tag><em>Options...</em></tag>
+ <item>Opens the <seealso marker="#options_win">Options Window</seealso>
+ which allows the user to set the trace options to use for this
+ specific Trace Window.</item>
+ <tag><em>Save Buffer...</em></tag>
+ <item>Opens a dialog that prompts the user for a file name to
+ save the current Trace Window contents in.</item>
+ <tag><em>Close</em></tag>
+ <item>Stops tracing of the process, and closes the Trace Window.</item>
+ </taglist>
+ </section>
+
+ <section>
+ <title>The View Menu</title>
+ <taglist>
+ <tag><em>Clear Buffer</em></tag>
+ <item>Clears the contents of the Trace Window.</item>
+ <tag><em>Module Info</em></tag>
+ <item>Opens a window showing information about the module
+ the process is currently executing code from, as returned from
+ <c>Module:module_info()</c>.</item>
+ </taglist>
+ </section>
+
+ <section>
+ <title>The Trace Menu</title>
+ <taglist>
+ <tag><em>All Linked Processes</em></tag>
+ <item>Opens a Trace Window for each of the processes linked to the
+ process being traced in the current Trace Window.</item>
+ <tag><em>Linked Process -></em></tag>
+ <item>The Linked Process submenu has one entry for each process
+ linked to the process being traced in the current Trace Window.
+ Select one of the processes to open a new Trace Window for that
+ process.</item>
+ <tag><em>Kill</em></tag>
+ <item>Terminates the process being traced in the current Trace
+ Window by calling <c>exit(Pid,kill)</c>.</item>
+ </taglist>
+ </section>
+
+ <section>
+ <title>The Help Menu</title>
+ <taglist>
+ <tag><em>Help</em></tag>
+ <item>Selecting Help from the Help menu will cause the HTML version
+ of the Pman User's Guide (this document) to be displayed.
+ Currently this function requires Netscape to be up and running.</item>
+ </taglist>
+ </section>
+ </section>
+
+ <section>
+ <marker id="options_win"></marker>
+ <title>The Options Window</title>
+ <p>The Options Window allows the user to specify the amount of output,
+ and the destination of output for traced processes.</p>
+ <image file="options.gif">
+ <icaption>The Options Window.</icaption>
+ </image>
+ <p>In the upper left corner of the Options Window, there are check
+ buttons for determining what to output in the Trace Window:</p>
+ <taglist>
+ <tag><em>Trace send</em></tag>
+ <item>Select this check button to display information about sent
+ messages.</item>
+ <tag><em>Trace receive</em></tag>
+ <item>Select this check button to display information about received
+ messages.</item>
+ <tag><em>Trace functions</em></tag>
+ <item>Select this check button to display information about
+ function calls.</item>
+ <tag><em>Trace events</em></tag>
+ <item>Select this check button to display information about process
+ events, such as spawn, link and exit.</item>
+ </taglist>
+ <p>In the upper right corner of the dialog, there are options for
+ controlling the behaviour of spawned or linked processes:</p>
+ <taglist>
+ <tag><em>Inherit on spawn</em></tag>
+ <item>
+ <p>The user may select if spawned processes shall also be traced.
+ And if so, if all spawned processes should be traced, or just
+ the first spawned process.</p>
+ <p>If a spawned process is traced, it will get the same trace
+ options that are set for the spawning process. And the output
+ will be shown in the same Trace Window as that of the spawning
+ process.</p>
+ <p>.</p>
+ </item>
+ <tag><em>Inherit on link</em></tag>
+ <item>
+ <p>The user may select if a process that is being linked to
+ shall be traced. And if so, if all linked processes shall be
+ traced, or just the first one linked to.</p>
+ <p>If a linked process is traced, it will get the same trace
+ options that are set for the linking process. And the output
+ will be shown in the same Trace Window as that of the linked
+ process.</p>
+ </item>
+ </taglist>
+ <p>In the lower part of the Options Dialog, the user may select
+ whether the trace information shall be output to a file, or appear in
+ the trace window.</p>
+ <p>Sending trace information to a file is more efficient than displaying
+ it in the Trace Window. Furthermore, if the amount of trace data is
+ large, it will not be lost if tracing to a file. The trace information
+ in the Trace Window has an upper limit (approx. 10,000 lines), after
+ which the output buffer will be cleared.</p>
+ </section>
+</chapter>
+
diff --git a/lib/pman/doc/src/ref_man.xml b/lib/pman/doc/src/ref_man.xml
new file mode 100644
index 0000000000..4deb1d9b3d
--- /dev/null
+++ b/lib/pman/doc/src/ref_man.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="latin1" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>1996</year><year>2009</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ The contents of this file are subject to the Erlang Public License,
+ Version 1.1, (the "License"); you may not use this file except in
+ compliance with the License. You should have received a copy of the
+ Erlang Public License along with this software. If not, it can be
+ retrieved online at http://www.erlang.org/.
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+ the License for the specific language governing rights and limitations
+ under the License.
+
+ </legalnotice>
+
+ <title>Pman Reference Manual</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <description>
+ <p>The process manager <em>Pman</em> is a graphical tool used to
+ inspect the Erlang processes executing either locally or on remote
+ nodes. It is also possible to trace events in the individual processes.</p>
+ </description>
+ <xi:include href="pman.xml"/>
+</application>
+
diff --git a/lib/pman/doc/src/toolbar.gif b/lib/pman/doc/src/toolbar.gif
new file mode 100644
index 0000000000..116e32ace8
--- /dev/null
+++ b/lib/pman/doc/src/toolbar.gif
Binary files differ
diff --git a/lib/pman/doc/src/trace.gif b/lib/pman/doc/src/trace.gif
new file mode 100644
index 0000000000..8b34ec7ea0
--- /dev/null
+++ b/lib/pman/doc/src/trace.gif
Binary files differ
diff --git a/lib/pman/doc/src/trace.ps b/lib/pman/doc/src/trace.ps
new file mode 100644
index 0000000000..0828d4ade1
--- /dev/null
+++ b/lib/pman/doc/src/trace.ps
@@ -0,0 +1,1312 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (./trace.tmp.eps)
+%%CreationDate: (Tue Jun 12 18:05:00 2001)
+%%BoundingBox: 0 17 377 309
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 0
+%%EndComments
+
+%%BeginDefaults
+%%PageOrientation: Portrait
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image. The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/buffer 512 string def
+/byte 1 string def
+/color_packet 3 string def
+/pixels 768 string def
+
+/DirectClassPacket
+{
+ %
+ % Get a DirectClass packet.
+ %
+ % Parameters:
+ % red.
+ % green.
+ % blue.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ compression 0 gt
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+ %
+ % Display a DirectClass image.
+ %
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { DirectClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayDirectClassPacket } image
+ } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+ %
+ % Get a DirectClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % red
+ % green
+ % blue
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 gt
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 gt
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ compression 0 gt
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+ %
+ % Display a PseudoClass image.
+ %
+ % Parameters:
+ % class: 0-PseudoClass or 1-Grayscale.
+ %
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ class 0 gt
+ {
+ currentfile buffer readline pop
+ token pop /depth exch def pop
+ /grays columns 8 add depth sub depth mul 8 idiv string def
+ columns rows depth
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { currentfile grays readhexstring pop } image
+ }
+ {
+ %
+ % Parameters:
+ % colors: number of colors in the colormap.
+ % colormap: red, green, blue color packets.
+ %
+ currentfile buffer readline pop
+ token pop /colors exch def pop
+ /colors colors 3 mul def
+ /colormap colors string def
+ currentfile colormap readhexstring pop pop
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { PseudoClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayPseudoClassPacket } image
+ } ifelse
+ } ifelse
+} bind def
+
+/DisplayImage
+{
+ %
+ % Display a DirectClass or PseudoClass image.
+ %
+ % Parameters:
+ % x & y translation.
+ % x & y scale.
+ % label pointsize.
+ % image label.
+ % image columns & rows.
+ % class: 0-DirectClass or 1-PseudoClass.
+ % compression: 0-RunlengthEncodedCompression or 1-NoCompression.
+ % hex color packets.
+ %
+ gsave
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ x y translate
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ currentfile buffer readline pop
+ token pop /pointsize exch def pop
+ /Helvetica findfont pointsize scalefont setfont
+ x y scale
+ currentfile buffer readline pop
+ token pop /columns exch def
+ token pop /rows exch def pop
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ currentfile buffer readline pop
+ token pop /compression exch def pop
+ class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+ grestore
+} bind def
+%%EndProlog
+%%Page: 1 1
+%%PageBoundingBox: 0 17 377 309
+userdict begin
+%%BeginData:
+DisplayImage
+0 17
+377.000000 292.000000
+12
+562 436
+1
+0
+0
+8
+ffffff
+000000
+b24d7a
+dcadc2
+57253b
+d9d9d9
+c3c3c3
+828282
+03ff03ff034e040003ff03f40400031c04000301021a0400030002ff02f304000300021a
+04010301021a0400030002ff02f304000300021a04010301021a0400030002ff02f30400
+0300021a0401030102020418030004ff04f4030004170202040103010202040003ff03ff
+032602020401030102020400030002150400030002ff02db040003000215040003000215
+0400030002020401030102020400030002150400030002ff02db04000300021504000300
+02150400030002020401030102020400030002150400030002ff02db0400030002150400
+030002150400030002020401030102020400030002150400030002ff02db040003000215
+040003000202030f02020400030002020401030102020400030002150400030002ff0263
+000302730400030002150400030002020300020d04000202040003000202040103010202
+04000300021504000300021f000602020001020600010206000102060001020500000209
+0004020100010211000102020001025a0002020a000502040004020c0002022f00010205
+00000212000102110001021b0004020d000102080001023a040003000215040003000202
+0300020d0400020204000300020204010301020204000300021504000300021f00010202
+000202010002020400020205000202060002020400000207000202020000020100010211
+000102020001025800010202000102080000020200020203000002020001020900010202
+0001022d00020204000002120001021100010219000102040000020c000102080001023a
+0400030002150400030002020300020d0400020204000300020204010301020204000300
+021504000300021f00010203000102010002020400020205000002000001020500020204
+0000020700010206000102110001020200010258000102020001020d0001020800010208
+000102020001022d00020204000002120001021100010218000002070000020b00010245
+0400030002150400030002020300020d0400020204000300020204010301020204000300
+021504000300021f00010203000102010000020000000203000302050000020000010205
+000002000001020300000203000102010001020600010200000302050003020200010202
+000102080001020000020204000102000001020200040204000402030003020300040203
+0004020f00000201000102040001020c0001020800010207000102040001020000000211
+000402020001020000030209000002000001020300000204000402040002020000010204
+000302070004020200040204000402030000020300030201000002030004020100010200
+00030203000102010001020400000202000402030004021f040003000215040003000202
+0300020d04000202040003000202040103010202040003000202030f020204000300021f
+000102030001020100000200000102020000020000010204000102000001020500000200
+000202020000020300010201000302040002020200010203000102010001020100010202
+000102080002020100010203000202030001020200010202000102060001020100010201
+000102060001021100010202000102040001020b00010209000102070001020400010201
+0001020e0001020200010201000202020001020800000200000202020000020300010202
+000102020001020100020203000102010001020700010203000102020001020200010202
+000102020000020100010202000002010000020200010205000202020001020200010202
+000002040000020200000202000102010001022304000300020803030208040003000202
+0300020d040002020400030002020401030102020400030002020300020d040002020400
+0300021f0001020200010202000002000001020200000200000102040000020200010204
+000002010001020200000208000402020001020300010202000102030001020000010202
+000102080001020300010202000102030001020400010200000102060001020300010200
+000102060001020f0001020400010204000102080002020a000102080001020400010203
+0001020b0001020400010200000102030001020800000201000102020000020200010204
+000102000001020300010202000102030001020600010202000102040001020000010204
+000102000000020200000202000102010000020100010206000102030001020200010202
+000102020000020700010201000102230400030002080300020104000208040003000202
+0300020d040002020400030002020401030102020400030002020300020d040002020400
+0300021f0005020300000201000102000000020100010203000102020001020400000202
+000102010000020a00030201000102030001020200010203000102000001020200010208
+000102030001020200010203000102040001020000010206000102030001020000030204
+0003020a00020206000102040001020b0001020800000209000102040001020500020208
+000102040001020000010203000102080000020200010201000002020001020400010200
+000102030001020200010203000102060001020200010204000102000001020400010200
+000002010000020200010202000002010001020600010203000102020001020200010202
+00000207000102010003022104000300020803000201040002080400030002020300020d
+040002020400030002020401030102020400030002020300040e020204000300021f0001
+020700000201000102000000020100010203000102020002020300000202000202000000
+020c00020200000102030001020200070200000102020001020800010203000102020001
+020300010204000102000001020600070202000302040003020600020208000102040001
+020c000102060000020a0001020400010207000202060001020400010200000102030001
+020800000202000202000000020200010204000102000001020300010202000702060001
+020200010204000102000001020400010200000002010000020100020201000102010001
+02060001020300010202000102030000020100010204000402030003021f040003000208
+0300040202080400030002020300020d0400020204000300020204010301020204000300
+021504000300021f00010207000002010001020000000201000102030007020300000203
+000102000000020d00010200000102030001020200010206000102020001020800010203
+00010202000102030001020400010200000102060001020a000202050002020700020206
+000102040001020c000102050000020b0001020400010205000202080001020400010200
+000102030001020800000203000102000000020200010204000102000001020300010202
+0001020c0001020200010204000102000001020400010200000002010000020100000200
+000002010000020200010206000102030001020200010203000102000000020300020201
+000102050002021e0400030002150400030002020300020d040002020400030002020401
+0301020204000300021504000300021f0001020700000202000102020001020200010204
+00010203000002040002020d000102000001020300010202000102060001020200010208
+0001020300010202000102030001020400010200000102060001020b000102060001020a
+00010205000102020001020d000102040000020d00010202000102040001020b00010204
+000102000001020300010208000002040002020200010204000102000001020300010202
+0001020c0001020200010204000102000001020400010201000002000002020100020203
+00010206000102030001020200010203000102000000020300010202000102060001021e
+0400030002150400030002020300020d0400020204000300020204010301020204000300
+021504000300021f00010207000002020001020200010202000002060001020200000204
+000202030001020100000203000102010001020300010203000102030000020000010202
+000102080002020100010203000102040001020200010202000102020000020200010203
+000002000000020300010201000002030001020c00010203000102020001020300010202
+0000020200010204000102080001020200010202000102020001020e0001020200010201
+000102030001020800000204000202030001020200010202000102010002020300010203
+000002060001020300010202000102020001020200010202000102030000020700010202
+00000201000102030001020200010204000102040001020200010201000002030001021e
+0400030002150400030002020300020d0400020204000300020204010301020204000300
+021504000300021f00010207000002070001020100010206000102020000020500010203
+000102010005020200010203000102050004020000010202000102080001020000020204
+00010205000402040004020400040200000502020005020f000002040002020500010202
+000402050006020300010204000202030000021100040202000102030001020800000205
+000102040004020400020200000102050004020600010204000402040004020500030209
+000402010001020300010202000102040001020500030200000102000005021f04000300
+02150400030002020300020d040002020400030002020401030102020400030002150400
+03000282000102ff02560400030002150400030002020300020d04000202040003000202
+040103010202040003000215040003000282000102ff0256040003000215040003000202
+0300040e0202040003000202040103010202040003000215040003000282000102ff0256
+0400030002150400030002150400030002020401030102020400030002150400030002ff
+02db04000300021504000300021504000300020204010301020204000300021504000300
+02ff02db04000300021504000300021504000300020204010300040403000416030004ff
+04dc030004160300041603000404030500ff00ff00250304040003010202040000ff00ff
+00240700030002020401030102020400000105ff05ff0521070103000202040103010202
+0400000105ff05ff05210701030002020401030102020400000105ff05ff052107010300
+02020401030102020400000105ff05ff05210701030002020401030102020400000105ff
+05ff052107010300020204010301020204000001050b01040504010005030102051f0100
+05020100050401000526010405ff05860100050201000509010205130701030002020401
+0301020204000001050b0100050f0100051f010005020100052e010005ff058801000502
+0100050b0100051307010300020204010301020204000001050b01000506010205050100
+050301020518010005020100050201020503010205020100050201000519010005030100
+0500010105030102050301020503010205ff056b01000502010005020102050501000502
+010005000101050c07010300020204010301020204000001050b01000508010005050100
+050201000502010005180100050001000505010005020100050201000501010005020100
+051901000503010105010100050101000502010005010100050201000501010005020100
+05ff056a0100050201000501010005020100050401000502010105010100050b07010300
+020204010301020204000001050b01030505010005050100050201000502010005180100
+050001000505010005020100050201000501010005000100050001000519010005030100
+0509010005010100050501000502010005ff056a01040501010005020100050401000502
+010005020100050b07010300020204010301020204000001050b01000508010005050100
+050201040518010005000100050501000502010405010100050001000500010005190100
+0503010005060103050101000505010405ff056a01000502010005010104050401000502
+010005020100050b07010300020204010301020204000001050b01000508010005050100
+05020100051d010005060100050201000505010005000100050001000519010005030100
+0505010005020100050101000505010005ff056e01000502010005010100050801000502
+010005020100050b07010300020204010301020204000001050b01000508010005050100
+050201000502010005190100050601000502010005020100050101000500010005000100
+051901000503010005050100050201000501010005020100050101000502010005ff056a
+0100050201000501010005020100050401000502010105010100050b0701030002020401
+0301020204000001050b0100050801000505010005030102051a01000506010005030102
+0503010005000100051a01000503010005060103050201020503010205ff056b01000502
+010005020102050501000502010005000101050c07010300020204010301020204000001
+05ff05ff05100100050f07010300020204010301020204000001050a0106052a0106052a
+010605ff05840106050e0100050f07010300020204010301020204000001050a0106052a
+0106052a010605ff05840106050e0100050f0701030002020401030102020400000105ff
+05ff05210701030002020401030102020400000105ff05ff052107010300020204010301
+02020400000105ff05ff05210701030002020401030102020400000107ff07ff07230300
+02020401030102020400000007ff07ff072403000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0525
+03000202040103010202040005ff05ff052503000202040103010202040005ff05ff0515
+070f03000202040103010202040005ff05ff0515070f0300020204010301020204000504
+07ff07ff070e05010701060607000605030002020401030102020400050407ff07ff070d
+00000501070106050000070006050300020204010301020204000504070105ff05ff050a
+00010501070106050000070106040300020204010301020204000504070105cf010005ff
+053900010501070106040001070106040300020204010301020204000504070105030100
+050c01000504010005060100050a0102051801020503010205170100050d010205030102
+051f010205120100051501000502010205ff053300010501070106040001050007010603
+030002020401030102020400050407010517010005140100051a01000505010005170100
+050f010005050100052101000512010005140100050201000502010005ff053200010501
+070106030001050107010603030002020401030102020400050407010501010205020100
+050001010503010205020104050201020503010205050100050a01020503010205050100
+0505010005040101050a0102050201000500010105030102050501000505010005040101
+050301020502010005020100050201020505010005020100050201000502010205020104
+050201020502010005000101050501000506010005ff0532000105010701060300010502
+070106020300020204010301020204000504070105030100050201010501010005040100
+050401000506010005020100050201000504010005090100050201000501010005020100
+050401000505010005040101050901000502010005010101050101000501010005020100
+050401000505010005040101050201000502010005010100050201000501010005020100
+050401000502010005020100050101000502010005030100050301000502010005010101
+05010100050301000507010005ff05320001050107010602000105030701060203000202
+040103010202040005040701050301000502010005020100050401000504010005060100
+050601000504010005090100050901000504010005050100051001000505010005020100
+050101000502010005040100050501000509010005020100050101000502010005050100
+050401000502010005020100050501000503010005030100050201000501010005070100
+0505010105ff053300010501070106020001050407010601030002020401030102020400
+050407010503010005020100050201000504010005040100050601000503010305040100
+050901000506010305040100050501000511010205020100050201000501010405040100
+050501000509010405020100050001000503010305040100050201000502010005020103
+05030100050301000502010005010100050601000508010005ff05320001050107010601
+000105050701060103000202040103010202040005040701050301000502010005020100
+050401000504010005060100050201000502010005040100050901000505010005020100
+050401000505010005140100050101000502010005010100050801000505010005090100
+050601000500010005020100050201000504010005020100050201000501010005020100
+05030100050301000502010005010100050601000508010005ff05320001050107010601
+000105060701060003000202040103010202040005040701050301000502010005020100
+050401000504010005060100050201000502010005040100050901000502010005010100
+050201000504010005050100050401010509010005020100050101000502010005010100
+050201000504010005050100050401010502010005020100050301000503010005020100
+050401000502010005010101050101000502010005030100050301000502010005010100
+05050100050501000502010005ff05320001050107010600000105070701060003000202
+040103010202040005040701050301000502010005020100050401000505010105040100
+0503010305040100050a010205030103050401000505010005040101050a010205020100
+050201000502010205050100050501000504010105030102050401000504010305040100
+050301010500010005020103050401010502010205020100050501000506010205ff0533
+0001050107010600000105080701030002020401030102020400050407010530010505ff
+05d30001050107010001070b0300020204010301020204000504070105ff05ff050a0001
+050107010000070c0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701000d03000202
+04010301020204000504070105ff05ff050a000105010701000d03000202040103010202
+04000504070105ff05ff050a0001050107010001050a0700030002020401030102020400
+0504070105ff05ff050a0001050107010001050a07000300020204010301020204000504
+070105ff05ff050a0001050107010001050a070003000202040103010202040005040701
+05ff05ff050a0001050107010001050a07000300020204010301020204000504070105ff
+05ff050a0001050107010001050a07000300020204010301020204000504070105ff05ff
+050a0001050107010001050a07000300020204010301020204000504070105ff05ff050a
+0001050107010001050a07000300020204010301020204000504070105ff05ff050a0001
+050107010001050a07000300020204010301020204000504070105ff05ff050a00010501
+07010001050a07000300020204010301020204000504070105ff05ff050a000105010701
+0001050a07000300020204010301020204000504070105ff05ff050a0001050107010001
+070b0300020204010301020204000504070105ff05ff050a0001050107010000070c0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105eb010005ff051d000105010701060d030002020401030102020400
+05040701052c0100050d0101051801000506010005250100050d010205030102051f0102
+050a0102051b01000502010205ff0517000105010701060d030002020401030102020400
+05040701052c0100050c0100051a0100052d0100050f01000505010005210100050c0100
+051a0100050201000502010005ff0516000105010701060d030002020401030102020400
+050407010501010205020100050201000501010005000101050201000500010105030102
+050201000500010105020104050a01000503010005020100050101000500010105030102
+050201040502010205030102050201000500010105040101050a01020502010005000101
+050301020505010005050100050401010503010205020100050201000502010205050100
+050c010005030102050301020502010005000101050501000506010005ff051600010501
+0701060d0300020204010301020204000504070105000100050201000501010005020100
+050101010501010005010101050101000501010005020100050101010501010005030100
+050a01040501010005020100050101010501010005010100050201000503010005060100
+050201000502010005010101050101000503010105090100050201000501010105010100
+050101000502010005040100050501000504010105020100050201000501010005020100
+050101000502010005040100050c01000502010005020100050101000502010005010101
+05010100050301000507010005ff0516000105010701060d030002020401030102020400
+050407010500010005050100050201000501010005050100050501000502010005010100
+0502010005030100050c0100050301000502010005010100050201000501010005070100
+0506010005020100050201000501010005020100050f0100050501000502010005010100
+050201000504010005050100050901000502010005010100050201000505010005040100
+050c01000502010005020100050101000502010005010100050201000503010005060100
+05ff0517000105010701060d030002020401030102020400050407010500010005050100
+05020100050101000505010005050104050101000502010005030100050c010005030100
+050201000501010005020100050101000507010005060100050201000502010005010100
+050201000510010205020100050201000501010405040100050501000509010405020100
+050001000503010305040100050c01000502010005020100050101000502010005010100
+05020100050201000506010005ff0518000105010701060d030002020401030102020400
+050407010500010005050100050201000501010005050100050501000505010005020100
+05030100050c010005030100050201000501010005020100050101000507010005060100
+050201000502010005010100050201000513010005010100050201000501010005080100
+05050100050901000506010005000100050201000502010005040100050c010005020100
+0502010005010100050201000501010005020100050201000505010005ff051900010501
+0701060d0300020204010301020204000504070105000100050201000501010005010101
+05010100050501000505010005020100050101000502010005030100050c010005030100
+050101010501010005020100050101000502010005030100050601000502010005020100
+050101000502010005030101050901000502010005010100050201000501010005020100
+050401000505010005040101050201000502010005030100050301000502010005040100
+050c01000502010005020100050101000502010005010101050101000501010005050100
+05ff051a000105010701060d030002020401030102020400050407010501010205030101
+05000100050101000505010005060102050201000502010005040101050a010005040101
+050001000501010005020100050201020505010105040100050301020502010005020100
+05030101050a010205020100050201000502010205050100050501000504010105030102
+050401000504010305040100050c01000503010205030102050201000500010105020100
+0505010405ff0516000105010701060d0300020204010301020204000504070105300105
+058c01050516010005ff0528000105010701060d03000202040103010202040005040701
+05e0010005ff0528000105010701060d0300020204010301020204000504070105e00100
+05ff0528000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
+0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
+05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
+0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
+05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
+0504070105000100052b0100051f01020503010205ff05b1000105010701060d03000202
+04010301020204000504070105000100054b010005020100050101000502010005ff05b0
+000105010701060d03000202040103010202040005040701050001000500010105030102
+050301020502010005000101050a01020503010205020104050201020504010105090100
+05020100050101000502010005ff05b0000105010701060d030002020401030102020400
+050407010500010105010100050101000502010005010100050201000501010105010100
+050801000502010005040100050601000501010005020100050301010509010005020100
+050101000502010005ff05b0000105010701060d03000202040103010202040005040701
+050001000502010005010100050201000505010005010100050201000508010005080100
+050501000502010005020100051001020503010305ff05b0000105010701060d03000202
+040103010202040005040701050001000502010005010104050201030501010005020100
+05090102050501000504010005030104050f0100050201000505010005ff05b000010501
+0701060d0300020204010301020204000504070105000100050201000501010005050100
+050201000501010005020100050c01000504010005030100050401000513010005020100
+0505010005ff05b0000105010701060d0300020204010301020204000504070105000100
+050201000501010005020100050101000502010005010101050101000508010005020100
+050401000502010005050100050201000503010105090100050201000501010005020100
+05ff05b0000105010701060d030002020401030102020400050407010500010005020100
+05020102050301030501010005000101050a010205050100050201040502010205040101
+050a01020503010205ff05b1000105010701060d03000202040103010202040005040701
+051501000504010505ff05e8000105010701060d03000202040103010202040005040701
+0515010005ff05f3000105010701060d0300020204010301020204000504070105150100
+05ff05f3000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
+0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
+05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
+0504070105ff05ff050a000105010701060d0300020204010301020204000504070105ff
+05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105ff05ff050a000105010701060d030002020401030102020400
+05040701050901000511010005160100051e01040502010205ff05aa000105010701060d
+030002020401030102020400050407010509010005110100053601000505010005020100
+05ff05a9000105010701060d030002020401030102020400050407010501010205020104
+05020102050301020502010005010100050a010205030102050201040502010205040101
+050901000509010005ff05a9000105010701060d03000202040103010202040005040701
+050001000502010005030100050301000502010005010100050201000501010005000100
+050a01000502010005040100050601000501010005020100050301010509010305060100
+05ff05a9000105010701060d030002020401030102020400050407010500010005070100
+050701000501010005050101050b01000508010005050100050201000502010005130100
+0503010105ff05aa000105010701060d0300020204010301020204000504070105010102
+05040100050401030501010005050101050c010205050100050401000503010405130100
+0505010005ff05a9000105010701060d0300020204010301020204000504070105040100
+050301000503010005020100050101000505010005000100050e01000504010005030100
+0504010005130100050201000505010005ff05a9000105010701060d0300020204010301
+020204000504070105000100050201000503010005030100050201000501010005020100
+050101000501010005090100050201000504010005020100050501000502010005030101
+0509010005020100050101000502010005ff05a9000105010701060d0300020204010301
+020204000504070105010102050501010502010305020102050201000502010005090102
+05050100050201040502010205040101050a01020503010205ff05aa000105010701060d
+030002020401030102020400050407010522010505ff05e1000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
+05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
+05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
+05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
+040103010202040005040701051201000511010005060100052601020503010205ff05aa
+000105010701060d030002020401030102020400050407010512010005110100052d0100
+05020100050101000502010005ff05a9000105010701060d030002020401030102020400
+050407010500010005000101050301020503010105000100050101000502010005020102
+05020104050201020503010205020100050001010503010205040101050d010005010100
+05ff05ad000105010701060d030002020401030102020400050407010500010105010100
+050101000502010005010100050101010501010005020100050101000502010005030100
+0506010005020100050201000501010105010100050101000502010005030101050d0100
+0501010005ff05ad000105010701060d0300020204010301020204000504070105000100
+050501000502010005010100050201000501010005020100050101000507010005060100
+0502010005020100050101000502010005010100051601000502010305ff05aa00010501
+0701060d0300020204010301020204000504070105000100050501040501010005020100
+050101000502010005010100050701000506010005020100050201000501010005020100
+0502010205120100050301000502010005ff05a9000105010701060d0300020204010301
+020204000504070105000100050501000505010005020100050101000502010005010100
+050701000506010005020100050201000501010005020100050501000510010005040100
+0502010005ff05a9000105010701060d0300020204010301020204000504070105000100
+050501000502010005010100050101010501010005010101050101000502010005030100
+050601000502010005020100050101000502010005010100050201000503010105090100
+050501000502010005ff05a9000105010701060d03000202040103010202040005040701
+050001000506010205030101050001000502010105000100050201020505010105040100
+0503010205020100050201000502010205040101050901040502010205ff05aa00010501
+0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
+070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
+050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
+0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
+070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
+050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
+0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
+070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
+050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
+0701060d030002020401030102020400050407010532010305ff05d3000105010701060d
+03000202040103010202040005040701050101020505010005090100051b010005ff05d6
+000105010701060d030002020401030102020400050407010503010005100100051b0100
+05ff05d6000105010701060d030002020401030102020400050407010503010005030102
+050201000500010105020100050101000503010205040101050a010005ff05d600010501
+0701060d0300020204010301020204000504070105030100050501000502010105010100
+0501010005000100050301000502010005030101050a010005ff05d6000105010701060d
+030002020401030102020400050407010503010005050100050201000502010005010101
+050401000514010005ff05d6000105010701060d03000202040103010202040005040701
+0503010005050100050201000502010005010101050501020511010005ff05d600010501
+0701060d0300020204010301020204000504070105030100050501000502010005020100
+0501010005000100050701000510010005ff05d6000105010701060d0300020204010301
+020204000504070105030100050501000502010005020100050101000501010005020100
+0502010005030101050a010005ff05d6000105010701060d030002020401030102020400
+050407010503010005050100050201000502010005010100050201000502010205040101
+050a010005ff05d6000105010701060d0300020204010301020204000504070105320103
+05ff05d3000105010701060d0300020204010301020204000504070105ff05ff050a0001
+05010701060d0300020204010301020204000504070105ff05ff050a000105010701060d
+0300020204010301020204000504070105ff05ff050a000105010701060d030002020401
+0301020204000504070105120100052a01000506010305ff05bf000105010701060d0300
+02020401030102020400050407010511010005040101050a010205030102050b01010502
+01000508010005ff05bf000105010701060d030002020401030102020400050407010510
+010005040100050101000508010005020100050101000502010005090100050101000502
+01000507010005ff05bf000105010701060d03000202040103010202040005040701050f
+01000505010005010100050c0100050501000509010005010100050301000506010005ff
+05bf000105010701060d03000202040103010202040005040701050e0100050601000501
+0100050c0100050501000509010005010100050401000505010005ff05bf000105010701
+060d03000202040103010202040005040701050d01000507010005010100050b01000504
+0101050a010005010100050501000504010005ff05bf000105010701060d030002020401
+03010202040005040701050e01000506010005010100050a010005070100050901000501
+0100050401000505010005ff05bf000105010701060d0300020204010301020204000504
+0701050f0100050501000501010005090100050801000509010005010100050301000506
+010005ff05bf000105010701060d03000202040103010202040005040701051001000504
+010005010100050301010502010005050100050201000503010105030100050101000502
+01000507010005ff05bf000105010701060d030002020401030102020400050407010511
+0100050401010504010105020104050201020504010105040101050201000508010005ff
+05bf000105010701060d0300020204010301020204000504070105120100052a01000506
+010305ff05bf000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
+05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
+05ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05ff050a000105010701
+060d0300020204010301020204000504070105ff05ff050a000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701060d03000202040103010202040005040701
+05ff05ff050a000105010701060d03000202040103010202040005040701050201000530
+010005040100051401010509010205ff05aa000105010701060d03000202040103010202
+040005040701050201000536010005130100050d010005ff05aa000105010701060d0300
+020204010301020204000504070105000104050101000500010105030102050201000500
+0101050a01020502010005020100050201020502010405030101050b0100050401020505
+0100050301020503010205ff059c000105010701060d0300020204010301020204000504
+070105020100050301010501010005010100050201000501010105010100050801000502
+010005010100050201000504010005040100050501010509010405010100050201000504
+01000502010005020100050101000502010005ff059b000105010701060d030002020401
+030102020400050407010502010005030100050901000501010005020100050801000502
+010005020100050001000505010005040100051301000507010005040100050201000505
+01000502010005ff059b000105010701060d030002020401030102020400050407010502
+010005030100050601030501010005020100050801040503010005060100050401000513
+01000504010305040100050301020502010405ff059b000105010701060d030002020401
+030102020400050407010502010005030100050501000502010005010100050201000508
+010005060100050001000505010005040100051301000503010005020100050401000506
+01000501010005ff059f000105010701060d030002020401030102020400050407010502
+010005030100050501000502010005010101050101000508010005020100050101000502
+0100050401000504010005050101050b0100050301000502010005040100050201000502
+0100050101000502010005ff059b000105010701060d0300020204010301020204000504
+07010503010105010100050601030501010005000101050a010205020100050201000504
+01000505010105030101050b01000504010305040100050301020503010205ff059c0001
+05010701060d03000202040103010202040005040701051501000504010505ff05e80001
+05010701060d030002020401030102020400050407010515010005ff05f3000105010701
+060d030002020401030102020400050407010515010005ff05f3000105010701060d0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
+070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
+050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
+0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
+070105ff05ff050a000105010701060d0300020204010301020204000504070105ff05ff
+050a000105010701060d0300020204010301020204000504070105ff05ff050a00010501
+0701060d0300020204010301020204000504070105ff05ff050a000105010701060d0300
+020204010301020204000504070105ff05ff050a000105010701060d0300020204010301
+020204000504070105ff05ff050a000105010701060d0300020204010301020204000504
+0701057301010597010105350101053501010540010105190101050b0101050401010516
+000105010701060d0300020204010301020204000504070105040100052a010005400100
+05540100052a010005160100052e0103050301000536010005440100050b010305010103
+050401000503010305040100050501000515000105010701060d03000202040103010202
+0400050407010503010005040101050a010205030102050b010105020100053f0100050a
+0100050d010205030102051b01000512010005040101050a010205030102050b01010502
+0100051501000519010205110100050601000512010205030102050b0100050c0100050c
+0100051a0100050b0102050b0100050b0100050701000504010005060100050401000505
+01000515000105010701060d030002020401030102020400050407010502010005040100
+0501010005080100050201000501010005020100050901000501010005020100053e0100
+050a0100050f010005050100051b01000511010005040100050101000508010005020100
+050101000502010005090100050101000502010005140100051b01000511010005060100
+0514010005050100050a0101050c0100050c010005190101050d0100050b0100050b0100
+05070100050401000506010005040100050501000515000105010701060d030002020401
+03010202040005040701050101000505010005010100050c010005050100050901000501
+010005030100050501010509010005000101050301020503010205190100050401020502
+010005000101050301020505010005050100050a01020502010105000100050301010500
+0100051001000505010005010100050c0100050501000509010005010100050301000513
+010005040102050201000502010005020102050501000511010005060100050401020503
+010205050100050501000509010005000100050c01000504010205020104050201020502
+0101050001000509010005000100050d01000503010205040100050b0100050701000504
+01000506010005040100050501000515000105010701060d030002020401030102020400
+05040701050001000506010005010100050c010005050100050901000501010005040100
+050401010509010105010100050101000502010005010100050201000518010005030100
+050201000501010105010100050101000502010005040100050501000509010005020100
+0501010005000100050001000501010005010101050f01000506010005010100050c0100
+050501000509010005010100050401000512010005030100050201000501010005020100
+050101000502010005040100051101000506010005030100050201000501010005020100
+0504010005050100050b0100050c01000503010005020100050301000503010005020100
+050101000500010005000100050a0100050d0100050201000502010005030100050b0100
+05070100050401000506010005040100050501000515000105010701060d030002020401
+0301020204000504070101000507010005010100050a010105050100050a010005010100
+05050100050f0100050501000502010005010100051a0101050401000505010005020100
+050101000502010005040100050501000509010005050100050001000500010005010100
+05020100050e01000507010005010100050b010005040101050a01000501010005050100
+050f01010504010005020100050101000502010005050100050401000511010005040101
+05040100050901000504010005050100050b0100050a0101050801000503010005030100
+05020100050101000500010005000100050a0100050d0100050201000508010105090100
+05070100050501010504010005050101050401010513000105010701060d030002020401
+03010202040005040701050001000506010005010100050c010005030100050b01000501
+010005040100051001000505010405010100051c01000504010205020100050201000501
+01040504010005050100050901000505010005000100050001000501010005020100050f
+01000506010005010100050a010005070100050901000501010005040100051201000503
+010405020100050001000503010305040100051101000506010005030100050601030504
+010005050100050b0100050c010005040103050301000503010005020100050101000500
+010005000100050a0100050d01000503010205040100050b010005070100050401000506
+010005040100050501000515000105010701060d03000202040103010202040005040701
+050101000505010005010100050c010005020100050c0100050101000503010005110100
+0505010005050100051c0100050701000501010005020100050101000508010005050100
+050901000505010005000100050001000501010005020100051001000505010005010100
+050901000508010005090100050101000503010005130100050301000506010005000100
+050201000502010005040100051101000506010005030100050501000502010005040100
+05050100050b0100050c0100050301000502010005030100050301000502010005010100
+0500010005000100050a0100050d01000506010005030100050b01000507010005040100
+0506010005040100050501000515000105010701060d0300020204010301020204000504
+070105020100050401000501010005030101050201000502010005010100050701010503
+010005010100050201000506010105090100050501000502010005010100050201000518
+010005030100050201000501010005020100050101000502010005040100050501000509
+010005020100050101000500010005000100050101000501010105030101050b01000504
+010005010100050301010502010005050100050201000503010105030100050101000502
+010005060101050b01000503010005020100050301000503010005020100050401000504
+0101050a0100050601000503010005020100050101000502010005040100050501000504
+010105040100050501010504010005030100050201000503010005030100050201000501
+010005000100050001000503010105040100050501010505010005020100050201000503
+010005050101050301000507010005040100050601000504010005050100051500010501
+0701060d0300020204010301020204000504070105030100050401010504010105030102
+050201040503010105040101050201000507010105090100050601020503010205190100
+050401020502010005020100050201020505010005050100050a01020502010005000100
+05000100050201010500010005030101050c010005040101050401010502010405020102
+05040101050401010502010005070101050b010005040102050401000504010305040100
+05040101050a010005060100050401020503010305040100050501000504010105020104
+050301010504010005040103050401010502010205020100050001000500010005030101
+050201040503010105050100050301020504010005050101050301000507010005040100
+0506010005040100050501000515000105010701060d0300020204010301020204000504
+070105040100052a0100054001000525010505190100050d0100052a010005090100050b
+010005220100050a01030503010005220100050c01000504010005220100050c01000512
+010005060100050301030501010305040100050301030504010005050100051500010501
+0701060d03000202040103010202040005040701057301010541010105430101050d0101
+051e010105140101051e0101050b010105060101051e0101050b01010511010105050101
+05110101050b0101050401010516000105010701060d0300020204010301020204000504
+070105ff05ff050a000105010701060d0300020204010301020204000504070105ff0506
+0101055f010105630101051501010521000105010701060d030002020401030102020400
+0504070105040100052a0100051d010005b401000506010005040100053e010005120100
+05070100052a0100051501000501010005180100051301000523000105010701060d0300
+02020401030102020400050407010503010005040101050a010205030102050b01010502
+0100051c0100051f010405280100053f010005030100051f01000506010005030102052d
+01020503010205050100051201000506010005040101050a010205030102050b01010502
+0100051401000501010005010103050c010105030100051301000523000105010701060d
+030002020401030102020400050407010502010005040100050101000508010005020100
+0501010005020100050901000501010005020100051b010005210100052a0100053f0100
+05030100051f010005050100050301000500010005000100052e01000505010005040100
+051301000505010005040100050101000508010005020100050101000502010005090100
+050101000502010005130100050101000501010005020100050a01000505010005130100
+0523000105010701060d0300020204010301020204000504070105010100050501000501
+0100050c0100050501000509010005010100050301000505010105120100052101000504
+010205040101050a010205030102050301010500010005020102050a0102050301020502
+010005000101050201000502010005020102050201000500010105080101050101010502
+0102050301010500010005030101050b0100050401000504010005000100050401010500
+0100050201020502010005000101050a0102050301020505010005050100050301000514
+0100050401000505010005010100050c0100050501000509010005010100050301000511
+010505000100050201000502010205040100050501000513010005040102050201000500
+01010503010205020100050201000501010005000101000105010701060d030002020401
+03010202040005040701050001000506010005010100050c010005050100050901000501
+010005040100050401010512010005210100050301000502010005030101050901000502
+010005010100050201000501010005010101050101000502010005080100050201000501
+010005020100050101010501010005010100050201000501010005020100050101010501
+010005070101050101010501010005020100050101000501010105030101050b0100050a
+010005000100050301000501010105010100050201000501010105010100050801000502
+01000501010005020100050401000505010005190100050301000506010005010100050c
+010005050100050901000501010005040100051101000501010005010100050201000501
+010005020100050101040503010005130100050301000502010005010101050101000501
+0100050201000501010005020100050101010501000105010701060d0300020204010301
+020204000504070101000507010005010100050a010105050100050a0100050101000505
+010005180100052101000503010005020100050f01000505010005020100050101000502
+010005010100050201000508010005050100050201000501010005050100050201000501
+01000502010005010100050b01000500010105000100050101000505010005020100050f
+0101050c0102050201000502010005010100050201000501010005020100050801000509
+0100050401000505010005170101050301000507010005010100050a010105050100050a
+01000501010005050100050f010005010100050201030502010005020100050301000506
+0101050f0101050401000502010005010100050201000501010005050100050201000501
+01000502000105010701060d030002020401030102020400050407010500010005060100
+05010100050c010005030100050b01000501010005040100051901000521010005030100
+05020100050f010005050100050201000501010005020100050101040509010205020104
+0501010005060100050001000502010405010100050b0100050001010500010005020102
+050201000502010005110100050c01000500010005010100050201000501010405010100
+050201000508010005060103050401000505010005190100050301000506010005010100
+050c010005030100050b01000501010005040100050f0105050101000501010005020104
+050301000505010005130100050301040501010005020100050201020502010005020100
+050101000502000105010701060d03000202040103010202040005040701050101000505
+010005010100050c010005020100050c01000501010005030100053d0100050301000502
+0100050f0100050501000502010005010100050201000501010005100100050101000505
+010005060100050001000502010005050100050b01000503010005050100050101000502
+010005110100050c01000500010005010100050201000501010005050100050201000508
+01000505010005020100050401000505010005190100050401000505010005010100050c
+010005020100050c01000501010005030100051101000501010005020100050201000501
+010005070100050501000513010005030100050501000502010005050100050101000502
+0100050101000502000105010701060d0300020204010301020204000504070105020100
+050401000501010005030101050201000502010005010100050701010503010005010100
+050201000506010105350100050301000502010005030101050901000502010005010100
+050201000501010005010101050101000502010005080100050201000501010005020100
+0501010005070100050301000502010005010100050b0100050301000501010005020100
+050101000501010105030101050b0100050a010005000100050001000501010005010101
+050101000502010005010100050201000508010005020100050101000502010005040100
+05050100050b0101050b0100050501000504010005010100050301010502010005020100
+050101000507010105030100050101000502010005060101050901000501010005020100
+050201000501010005020100050301000505010005050101050b01000503010005020100
+050101000502010005010100050201000501010005010101050101000502000105010701
+060d03000202040103010202040005040701050301000504010105040101050301020502
+01040503010105040101050201000507010105120100052101000504010205040101050a
+010205030102050301010500010005020102050a01020503010205020100050701000504
+010205020100050b01000503010005020102050301010500010005030101050b0100050b
+010205030101050001000502010205020100050201000509010205030103050401000505
+0100050b0101050b01000506010005040101050401010503010205020104050301010504
+010105020100050701010509010005010100050201000502010005020102050401000505
+010005050101050b01000504010205020100050201000502010205030101050001000501
+01000502000105010701060d0300020204010301020204000504070105040100052a0100
+057501050544010005110100050c010005070100050e010505270100050b010005070100
+052a0100050901000527010005060100050b01000523000105010701060d030002020401
+0301020204000504070105ee01000502010005120101050f010005020100053a0101050d
+0101053a01010526010105050101050d01010521000105010701060d0300020204010301
+020204000504070105ef01020526010205ed000105010701060d03000202040103010202
+04000504070105730101052e0101058d01010504010105cc000105010701060d03000202
+04010301020204000504070105040100052a010005400100050401000501010005260100
+059101000505010005cb000105010701060d030002020401030102020400050407010503
+010005040101050a010205030102050b010105020100053f010005040100050101000501
+0103050c010105110100051501000509010205260102050c0100050b0100052001020504
+01000505010005cb000105010701060d0300020204010301020204000504070105020100
+050401000501010005080100050201000501010005020100050901000501010005020100
+053e010005040100050101000501010005020100050a01000513010005150100050b0100
+052801000519010005220100050401000505010005cb000105010701060d030002020401
+03010202040005040701050101000505010005010100050c010005050100050901000501
+010005030100050501010509010005000101050301020503010205190100050301050500
+010005020100050201020504010005130100050301010500010005030102050301010500
+01000501010005020100050401000503010205110102050201000500010105050100050a
+010205020100050001010502010405020102050201000500010105020100050001010503
+010205050100050401000505010005cb000105010701060d030002020401030102020400
+05040701050001000506010005010100050c010005050100050901000501010005040100
+050401010509010105010100050101000502010005010100050201000518010005040100
+050101000501010005020100050101000502010005010104051101000503010005000100
+050001000501010005020100050101000501010105010100050201000504010005020100
+05020100050f010005020100050101010501010005040100050c01000502010105010100
+050301000503010005020100050101010501010005010101050101000501010005020100
+05040100050401000505010005cb000105010701060d0300020204010301020204000504
+070101000507010005010100050a010105050100050a01000501010005050100050f0100
+050501000502010005010100051a01010504010005010100050201030502010005020100
+050301000511010105040100050001000500010005010100050201000501010005020100
+0501010005020100050401000502010005020100050f0100050201000501010005080100
+050c01000502010005020100050301000503010005020100050101000505010005020100
+0505010005040100050501010504010105c9000105010701060d03000202040103010202
+040005040701050001000506010005010100050c010005030100050b0100050101000504
+0100051001000505010405010100051c0100050201050501010005010100050201040503
+010005130100050301000500010005000100050101000502010005010100050201000501
+0100050201000504010005020104050f01040501010005080100050c0100050201000502
+010005030100050301040501010005050100050201000502010305040100050401000505
+010005cb000105010701060d030002020401030102020400050407010501010005050100
+05010100050c010005020100050c01000501010005030100051101000505010005050100
+051c01000503010005010100050201000502010005010100050701000513010005030100
+050001000500010005010100050201000501010005020100050101000502010005040100
+05020100051301000505010005080100050c010005020100050201000503010005030100
+050501000505010005020100050101000502010005040100050401000505010005cb0001
+05010701060d030002020401030102020400050407010502010005040100050101000503
+010105020100050201000501010005070101050301000501010005020100050601010509
+010005050100050201000501010005020100051801000503010005010100050201000502
+010005010100050201000503010005050101050b01000503010005000100050001000501
+010005020100050101000501010105010100050101010504010005020100050201000503
+010105090100050201000501010005080100050c01000502010005020100050301000503
+010005020100050101000505010005020100050101000502010005040100050401000505
+010005cb000105010701060d030002020401030102020400050407010503010005040101
+050401010503010205020104050301010504010105020100050701010509010005060102
+050301020519010005030100050101000502010005020100050201020504010005050101
+050b01000503010005000100050001000502010205030101050001000502010105000100
+050401000503010205040101050a01020502010005080100050c01000502010005020100
+050401010502010205020100050501000502010005020103050401000504010005050100
+05cb000105010701060d0300020204010301020204000504070105040100052a01000540
+010005220100050b010005300100051d0105053b01000505010005cb000105010701060d
+0300020204010301020204000504070105730101051e0101050d0101052c0101055e0101
+0504010105cc000105010701060d0300020204010301020204000504070105ff05ff050a
+000105010701060d0300020204010301020204000504070105ff05060101055f01010563
+0101051501010521000105010701060d0300020204010301020204000504070105040100
+052a0100051d010005b401000506010005040100053e01000512010005070100052a0100
+051501000501010005180100051301000523000105010701060d03000202040103010202
+0400050407010503010005040101050a010205030102050b010105020100051c0100051f
+010405280100053f010005030100051f01000506010005030102052d0102050301020505
+0100051201000506010005040101050a010205030102050b010105020100051401000501
+010005010103050c010105030100051301000523000105010701060d0300020204010301
+020204000504070105020100050401000501010005080100050201000501010005020100
+050901000501010005020100051b010005210100052a0100053f010005030100051f0100
+05050100050301000500010005000100052e010005050100050401000513010005050100
+050401000501010005080100050201000501010005020100050901000501010005020100
+05130100050101000501010005020100050a010005050100051301000523000105010701
+060d03000202040103010202040005040701050101000505010005010100050c01000505
+01000509010005010100050301000505010105120100052101000504010205040101050a
+010205030102050301010500010005020102050a01020503010205020100050001010502
+010005020100050201020502010005000101050801010501010105020102050301010500
+010005030101050b01000504010005040100050001000504010105000100050201020502
+010005000101050a01020503010205050100050501000503010005140100050401000505
+010005010100050c01000505010005090100050101000503010005110105050001000502
+010005020102050401000505010005130100050401020502010005000101050301020502
+0100050201000501010005000101000105010701060d0300020204010301020204000504
+0701050001000506010005010100050c0100050501000509010005010100050401000504
+010105120100052101000503010005020100050301010509010005020100050101000502
+010005010100050101010501010005020100050801000502010005010100050201000501
+010105010100050101000502010005010100050201000501010105010100050701010501
+01010501010005020100050101000501010105030101050b0100050a0100050001000503
+010005010101050101000502010005010101050101000508010005020100050101000502
+0100050401000505010005190100050301000506010005010100050c0100050501000509
+010005010100050401000511010005010100050101000502010005010100050201000501
+010405030100051301000503010005020100050101010501010005010100050201000501
+010005020100050101010501000105010701060d03000202040103010202040005040701
+01000507010005010100050a010105050100050a01000501010005050100051801000521
+01000503010005020100050f010005050100050201000501010005020100050101000502
+010005080100050501000502010005010100050501000502010005010100050201000501
+0100050b01000500010105000100050101000505010005020100050f0101050c01020502
+010005020100050101000502010005010100050201000508010005090100050401000505
+010005170101050301000507010005010100050a010105050100050a0100050101000505
+0100050f0100050101000502010305020100050201000503010005060101050f01010504
+010005020100050101000502010005010100050501000502010005010100050200010501
+0701060d03000202040103010202040005040701050001000506010005010100050c0100
+05030100050b0100050101000504010005190100052101000503010005020100050f0100
+050501000502010005010100050201000501010405090102050201040501010005060100
+050001000502010405010100050b01000500010105000100050201020502010005020100
+05110100050c010005000100050101000502010005010104050101000502010005080100
+05060103050401000505010005190100050301000506010005010100050c010005030100
+050b01000501010005040100050f01050501010005010100050201040503010005050100
+051301000503010405010100050201000502010205020100050201000501010005020001
+05010701060d03000202040103010202040005040701050101000505010005010100050c
+010005020100050c01000501010005030100053d01000503010005020100050f01000505
+010005020100050101000502010005010100051001000501010005050100050601000500
+01000502010005050100050b01000503010005050100050101000502010005110100050c
+010005000100050101000502010005010100050501000502010005080100050501000502
+0100050401000505010005190100050401000505010005010100050c010005020100050c
+010005010100050301000511010005010100050201000502010005010100050701000505
+010005130100050301000505010005020100050501000501010005020100050101000502
+000105010701060d03000202040103010202040005040701050201000504010005010100
+050301010502010005020100050101000507010105030100050101000502010005060101
+053501000503010005020100050301010509010005020100050101000502010005010100
+050101010501010005020100050801000502010005010100050201000501010005070100
+050301000502010005010100050b01000503010005010100050201000501010005010101
+05030101050b0100050a0100050001000500010005010100050101010501010005020100
+0501010005020100050801000502010005010100050201000504010005050100050b0101
+050b01000505010005040100050101000503010105020100050201000501010005070101
+050301000501010005020100050601010509010005010100050201000502010005010100
+05020100050301000505010005050101050b010005030100050201000501010005020100
+05010100050201000501010005010101050101000502000105010701060d030002020401
+030102020400050407010503010005040101050401010503010205020104050301010504
+0101050201000507010105120100052101000504010205040101050a0102050301020503
+01010500010005020102050a01020503010205020100050701000504010205020100050b
+01000503010005020102050301010500010005030101050b0100050b0102050301010500
+010005020102050201000502010005090102050301030504010005050100050b0101050b
+010005060100050401010504010105030102050201040503010105040101050201000507
+01010509010005010100050201000502010005020102050401000505010005050101050b
+010005040102050201000502010005020102050301010500010005010100050200010501
+0701060d0300020204010301020204000504070105040100052a01000575010505440100
+05110100050c010005070100050e010505270100050b010005070100052a010005090100
+0527010005060100050b01000523000105010701060d0300020204010301020204000504
+070105ee01000502010005120101050f010005020100053a0101050d0101053a01010526
+010105050101050d01010521000105010701060d03000202040103010202040005040701
+05ef01020526010205ed000105010701060d030002020401030102020400050407010573
+0101052e0101059401010504010105c5000105010701060d030002020401030102020400
+0504070105040100052a0100054001000504010005010100052601000598010005050100
+05c4000105010701060d030002020401030102020400050407010503010005040101050a
+010205030102050b010105020100053f0100050401000501010005010103050c01010511
+01000515010005090102051e0100050d010205030102050d0100050b0101051001020504
+0100050501000505010005c4000105010701060d03000202040103010202040005040701
+050201000504010005010100050801000502010005010100050201000509010005010100
+05020100053e010005040100050101000501010005020100050a01000513010005150100
+050b0100051e0100050f010005050100050d0100050a0100051401000504010005050100
+0505010005c4000105010701060d03000202040103010202040005040701050101000505
+010005010100050c01000505010005090100050101000503010005050101050901000500
+010105030102050301020519010005030105050001000502010005020102050401000513
+010005030101050001000503010205030101050001000501010005020100050401000503
+0102051101020502010005000101050301020505010005050100050a0101050001000502
+0102050401000504010205020100050201000504010005020104050301000505010005c4
+000105010701060d03000202040103010202040005040701050001000506010005010100
+050c01000505010005090100050101000504010005040101050901010501010005010100
+050201000501010005020100051801000504010005010100050101000502010005010100
+050201000501010405110100050301000500010005000100050101000502010005010100
+050101010501010005020100050401000502010005020100050f01000502010005010101
+050101000501010005020100050401000505010005090100050101010501010005020100
+050101040501010005020100050101000502010005040100050401000505010005050100
+05c4000105010701060d0300020204010301020204000504070101000507010005010100
+050a010105050100050a01000501010005050100050f0100050501000502010005010100
+051a01010504010005010100050201030502010005020100050301000511010105040100
+050001000500010005010100050201000501010005020100050101000502010005040100
+0502010005020100050f0100050501000502010005010100050201000504010005050100
+050901000502010005010100050201000503010005070100050101000502010005040100
+05040100050601010504010105c2000105010701060d0300020204010301020204000504
+0701050001000506010005010100050c010005030100050b010005010100050401000510
+01000505010405010100051c010005020105050101000501010005020104050301000513
+010005030100050001000500010005010100050201000501010005020100050101000502
+010005040100050201040510010205020100050201000501010405040100050501000509
+010005020100050101040503010005040103050101000502010005040100050401000505
+01000505010005c4000105010701060d0300020204010301020204000504070105010100
+0505010005010100050c010005020100050c010005010100050301000511010005050100
+05050100051c010005030100050101000502010005020100050101000507010005130100
+050301000500010005000100050101000502010005010100050201000501010005020100
+050401000502010005170100050101000502010005010100050801000505010005090100
+050201000501010005070100050301000502010005010100050201000504010005040100
+050501000505010005c4000105010701060d030002020401030102020400050407010502
+010005040100050101000503010105020100050201000501010005070101050301000501
+010005020100050601010509010005050100050201000501010005020100051801000503
+010005010100050201000502010005010100050201000503010005050101050b01000503
+010005000100050001000501010005020100050101000501010105010100050101010504
+010005020100050201000503010105090100050201000501010005020100050101000502
+010005040100050501000509010005010101050101000502010005030100050301000502
+010005010100050101010504010005040100050501000505010005c4000105010701060d
+030002020401030102020400050407010503010005040101050401010503010205020104
+050301010504010105020100050701010509010005060102050301020519010005030100
+050101000502010005020100050201020504010005050101050b01000503010005000100
+050001000502010205030101050001000502010105000100050401000503010205040101
+050a01020502010005020100050201020505010005050100050a01010500010005020102
+050401000504010305020101050001000504010005050101050301000505010005c40001
+05010701060d0300020204010301020204000504070105040100052a0100054001000522
+0100050b010005300100052b0105053401000505010005c4000105010701060d03000202
+04010301020204000504070105730101051e0101050d0101052c01010565010105040101
+05c5000105010701060d0300020204010301020204000504070105ff05ff050a00010501
+0701060d0300020204010301020204000504070105ff05060101055f0101056301010515
+01010521000105010701060d0300020204010301020204000504070105040100052a0100
+051d010005b401000506010005040100053e01000512010005070100052a010005150100
+0501010005180100051301000523000105010701060d0300020204010301020204000504
+07010503010005040101050a010205030102050b010105020100051c0100051f01040519
+010105040100050301020540010005030100051f01000506010005030102052d01020503
+010205050100051201000506010005040101050a010205030102050b0101050201000514
+01000501010005010103050c010105030100051301000504010205050100050b01000507
+000105010701060d03000202040103010202040005040701050201000504010005010100
+05080100050201000501010005020100050901000501010005020100051b010005210100
+051a0100050d01000540010005030100051f010005050100050301000500010005000100
+052e01000505010005040100051301000505010005040100050101000508010005020100
+050101000502010005090100050101000502010005130100050101000501010005020100
+050a0100050501000513010005060100051201000507000105010701060d030002020401
+03010202040005040701050101000505010005010100050c010005050100050901000501
+0100050301000505010105120100052101000504010205040101050b0100050401020505
+010005030102050a01020503010205020100050001010502010005020100050201020502
+010005000101050801010501010105020102050301010500010005030101050b01000504
+010005040100050001000504010105000100050201020502010005000101050a01020503
+010205050100050501000503010005140100050401000505010005010100050c01000505
+010005090100050101000503010005110105050001000502010005020102050401000505
+010005130100050601000503010205030102050201040505000105010701060d03000202
+040103010202040005040701050001000506010005010100050c01000505010005090100
+050101000504010005040101051201000521010005030100050201000503010105090104
+050401000505010005020100050201000508010005020100050101000502010005010101
+050101000501010005020100050101000502010005010101050101000507010105010101
+0501010005020100050101000501010105030101050b0100050a01000500010005030100
+050101010501010005020100050101010501010005080100050201000501010005020100
+050401000505010005190100050301000506010005010100050c01000505010005090100
+050101000504010005110100050101000501010005020100050101000502010005010104
+050301000513010005060100050501000502010005020100050301000507000105010701
+060d0300020204010301020204000504070101000507010005010100050a010105050100
+050a01000501010005050100051801000521010005030100050201000511010005060100
+050501000502010005020100050801000505010005020100050101000505010005020100
+050101000502010005010100050b01000500010105000100050101000505010005020100
+050f0101050c010205020100050201000501010005020100050101000502010005080100
+05090100050401000505010005170101050301000507010005010100050a010105050100
+050a01000501010005050100050f01000501010005020103050201000502010005030100
+05060101050f0101050701000505010005020100050701000507000105010701060d0300
+0202040103010202040005040701050001000506010005010100050c010005030100050b
+010005010100050401000519010005210100050301000502010005110100050601000505
+01000502010405090102050201040501010005060100050001000502010405010100050b
+0100050001010500010005020102050201000502010005110100050c0100050001000501
+010005020100050101040501010005020100050801000506010305040100050501000519
+0100050301000506010005010100050c010005030100050b01000501010005040100050f
+010505010100050101000502010405030100050501000513010005060100050501000503
+0102050401000507000105010701060d0300020204010301020204000504070105010100
+0505010005010100050c010005020100050c01000501010005030100053d010005030100
+050201000511010005060100050501000502010005100100050101000505010005060100
+050001000502010005050100050b01000503010005050100050101000502010005110100
+050c01000500010005010100050201000501010005050100050201000508010005050100
+05020100050401000505010005190100050401000505010005010100050c010005020100
+050c01000501010005030100051101000501010005020100050201000501010005070100
+0505010005130100050601000505010005060100050301000507000105010701060d0300
+020204010301020204000504070105020100050401000501010005030101050201000502
+010005010100050701010503010005010100050201000506010105350100050301000502
+010005030101050b01000506010005050100050201000502010005080100050201000501
+0100050201000501010005070100050301000502010005010100050b0100050301000501
+010005020100050101000501010105030101050b0100050a010005000100050001000501
+010005010101050101000502010005010100050201000508010005020100050101000502
+01000504010005050100050b0101050b0100050501000504010005010100050301010502
+010005020100050101000507010105030100050101000502010005060101050901000501
+010005020100050201000501010005020100050301000505010005050101050b01000506
+0100050501000502010005020100050301000507000105010701060d0300020204010301
+020204000504070105030100050401010504010105030102050201040503010105040101
+050201000507010105120100052101000504010205040101050b01000506010005050100
+05030102050a01020503010205020100050701000504010205020100050b010005030100
+05020102050301010500010005030101050b0100050b0102050301010500010005020102
+050201000502010005090102050301030504010005050100050b0101050b010005060100
+050401010504010105030102050201040503010105040101050201000507010105090100
+05010100050201000502010005020102050401000505010005050101050b010005060100
+0505010005030102050501010505000105010701060d0300020204010301020204000504
+070105040100052a0100057501050544010005110100050c010005070100050e01050527
+0100050b010005070100052a0100050901000527010005060100050b0100051e01040001
+05010701060d0300020204010301020204000504070105ee01000502010005120101050f
+010005020100053a0101050d0101053a01010526010105050101050d0101052100010501
+0701060d0300020204010301020204000504070105ef01020526010205ed000105010701
+060d0300020204010301020204000504070105730101052e010105ff0563000105010701
+060d0300020204010301020204000504070105040100052a010005400100050401000501
+010005260100052001030501010005010100058701000501010005ae000105010701060d
+030002020401030102020400050407010503010005040101050a010205030102050b0101
+05020100053f0100050401000501010005010103050c010105110100050a010005140100
+050401000501010005340102050401000503010405020102051001000508010005180100
+05010100050101000501010005ae000105010701060d0300020204010301020204000504
+070105020100050401000501010005080100050201000501010005020100050901000501
+010005020100053e010005040100050101000501010005020100050a010005130100050a
+010005140100050401000501010005330100050201000502010105030100050501000502
+0100050f0100052101000500010005000100050101000501010005ae000105010701060d
+03000202040103010202040005040701050101000505010005010100050c010005050100
+050901000501010005030100050501010509010005000101050301020503010205190100
+050301050500010005020100050201020504010005130100050401020502010005010100
+051101000504010005010100050a01020503010205020100050201000502010205030102
+050901000505010005000100050301000505010005020100050901020502010005000101
+050301020502010005020100050201020503010205020100050101000502010005010100
+05ae000105010701060d0300020204010301020204000504070105000100050601000501
+0100050c0100050501000509010005010100050401000504010105090101050101000501
+010005020100050101000502010005180100050401000501010005010100050201000501
+010005020100050101040511010005030100050201000501010005000100051201000512
+010005020100050101000502010005010100050201000501010005020100050101000502
+010005080100050701000503010305020100050201000508010005020100050101010501
+01000504010005020100050201000501010005020100050101000502010005bb00010501
+0701060d0300020204010301020204000504070101000507010005010100050a01010505
+0100050a01000501010005050100050f0100050501000502010005010100051a01010504
+010005010100050201030502010005020100050301000511010105040100050201000501
+010105130100051201000509010005010100050201000501010005020100050101000505
+010405010103050401000507010005020103050101040501010005050100050201000504
+01000502010005020100050501000501010005bf000105010701060d0300020204010301
+0202040005040701050001000506010005010100050c010005030100050b010005010100
+05040100051001000505010405010100051c010005020105050101000501010005020104
+050301000513010005030100050201000501010105130100051301020503010305020100
+050001000502010405020102050901000502010005030100050701000505010005080100
+0505010005020100050401000503010005000100050301030502010205bc000105010701
+060d03000202040103010202040005040701050101000505010005010100050c01000502
+0100050c01000501010005030100051101000505010005050100051c0100050301000501
+010005020100050201000501010005070100051301000503010005020100050101000500
+010005120100051601000501010005020100050201000500010005020100050901000508
+010005020100050301000503010005020100050501000508010005050100050201000504
+0100050301000500010005020100050201000505010005bb000105010701060d03000202
+040103010202040005040701050201000504010005010100050301010502010005020100
+050101000507010105030100050101000502010005060101050901000505010005020100
+050101000502010005180100050301000501010005020100050201000501010005020100
+0503010005050101050b01000503010005020100050101000501010005040101050a0100
+050d01010502010005020100050101000502010005030100050301000502010005010100
+050201000508010005020100050301000503010005020100050101000502010005080100
+050201000501010005020100050401000504010005030100050201000501010005020100
+0511010105a7000105010701060d03000202040103010202040005040701050301000504
+010105040101050301020502010405030101050401010502010005070101050901000506
+010205030102051901000503010005010100050201000502010005020102050401000505
+0101050b010005040102050201000502010005030101050a0100050d0101050301020503
+0103050301000504010205030102050a0102050201040502010205030102050a01020502
+010005020100050401000504010005040103050201020512010105a7000105010701060d
+0300020204010301020204000504070105040100052a01000540010005220100050b0100
+05140100050a01030597010005a7000105010701060d0300020204010301020204000504
+070105730101051e0101050d01010510010105a5010105a8000105010701060d03000202
+04010301020204000504070105ff05ff050a000105010701060d03000202040103010202
+04000504070105ff05ff050a000105010701000d03000202040103010202040005040701
+0507010005010100056401000501010005ff05950001050107010600000c030002020401
+03010202040005040701050701000501010005040100051201020521010105050100050b
+0100051001000501010005ff059500010501070106000001050807010300020204010301
+0202040005040701050701000501010005040100051401000520010005070100051d0100
+0501010005ff059500010501070106010001050707010300020204010301020204000504
+0701050701000501010005020104050201020503010205050100050a0101050001000502
+010205020100050001010504010005040101050001000509010205030102050201010500
+0100050201000501010005ff059500010501070106010001050607010600030002020401
+030102020400050407010510010005030100050201000501010005020100050401000509
+01000501010105010100050201000501010105010100050101040501010005010101050b
+0100050201000502010005010100050001000500010005ff059b00010501070106020001
+050507010600030002020401030102020400050407010510010005030100050201000501
+010005020100050401000509010005020100050101000502010005010100050201000503
+01000503010005020100050b01000506010005010100050001000500010005ff059b0001
+050107010602000105040701060103000202040103010202040005040701051001000503
+010005020100050101000502010005040100050901000502010005010104050101000502
+0100050301000503010005020100050b01000503010305010100050001000500010005ff
+059b00010501070106030001050307010601030002020401030102020400050407010510
+010005030100050201000501010005020100050401000509010005020100050101000505
+010005020100050301000503010005020100050b01000502010005020100050101000500
+01000500010005ff059b0001050107010603000105020701060203000202040103010202
+040005040701051001000503010005020100050101000502010005040100050901000501
+010105010100050201000501010005020100050301000503010005010101050301010505
+01000502010005020100050101000500010005000100050a010105ff058e000105010701
+060400010501070106020300020204010301020204000504070105110101050201020503
+010205050100050a01010500010005020102050201000502010005030100050401010500
+0100050301010505010005030103050101000500010005000100050a010105ff058e0001
+050107010604000105000701060303000202040103010202040005040701052901050505
+010005270100051a010005ff058e00010501070106050000070206030300020204010301
+0202040005040701053101000502010005240100050101000518010105ff058f00010501
+070106050000070106040300020204010301020204000504070100ff00ff000c05010701
+0606070106040300020204010301020204000504070000ff00ff000d0501070106060700
+060503000202040103010202040005ff05ff05150701000d030002020401030102020400
+05ff05ff05150700000e030002020401030102020400050207ff07ff0716050b03000202
+0401030102020400050207ff07ff07150000050b03000202040103010202040005020701
+060d0000060000ff0073067f0001060c0001050b03000202040103010202040005020701
+060b00010700060000ff00720700067f0003060a0001050b030002020401030102020400
+050207010609000207010600000105ff056f0701067f000506080001050b030002020401
+0301020204000502070106070003050007010600000105ff056f0701067f000105010003
+06060001050b030002020401030004040502070106050003050207010600000105ff056f
+0701067f00010503000306040001050b0300040403050502070106030003050407010600
+000105ff056f0701067f00010505000306020001050b0304040003010202040005020701
+06010003050607010600000105ff056f0701067f00010507000306000001050b03000202
+040103010202040005020705050807010600000105ff056f0701067f0001050807030001
+050b0300020204010301020204000502070106010703050607010600000105ff056f0701
+067f00010507070306000001050b03000202040103010202040005020701060307030504
+07010600000105ff056f0701067f00010505070306020001050b03000202040103010202
+04000502070106050703050207010600000105ff056f0701067f00010503070306040001
+050b0300020204010301020204000502070106070703050007010600000105ff056f0701
+067f00010501070306060001050b03000202040103010202040005020701060907040600
+000105ff056f0701067f0001070306080001050b03000202040103010202040005020701
+060b07020600000107ff0771067f00010701060a0001050b030002020401030102020400
+05020701060d07000600000007ff0772067f00000700060c0001050b0300020204010301
+020204000502070100ff00ff0014050b0300020204010301020204000502070000ff00ff
+0015050b03000202040103010202040005ff05ff052503000202040103010202040005ff
+05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
+05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
+05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
+05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
+05ff052503000202040103010202040005ff05ff052503000202040103010202040005ff
+05ff052503000202040103010202040003ff03ff0326020204010301021a0400030002ff
+02f304000300021a04010301021a0400030002ff02f304000300021a04010301021a0400
+030002ff02f304000300021a04010301041b030004ff04f40300041c030004ff04ff0430
+
+%%EndData
+end
+%%PageTrailer
+%%Trailer
+%%BoundingBox: 0 17 377 309
+%%EOF
diff --git a/lib/pman/doc/src/warning.gif b/lib/pman/doc/src/warning.gif
new file mode 100644
index 0000000000..96af52360e
--- /dev/null
+++ b/lib/pman/doc/src/warning.gif
Binary files differ
diff --git a/lib/pman/ebin/.gitignore b/lib/pman/ebin/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/pman/ebin/.gitignore
diff --git a/lib/pman/info b/lib/pman/info
new file mode 100644
index 0000000000..22003edcea
--- /dev/null
+++ b/lib/pman/info
@@ -0,0 +1,2 @@
+group: tools
+short: A graphical process manager used to inspect Erlang processes.
diff --git a/lib/pman/priv/Makefile b/lib/pman/priv/Makefile
new file mode 100644
index 0000000000..43f9d45d94
--- /dev/null
+++ b/lib/pman/priv/Makefile
@@ -0,0 +1,58 @@
+# ``The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved via the world wide web at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+# AB. All Rights Reserved.''
+#
+# $Id$
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+include ../vsn.mk
+VSN = $(PMAN_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/pman-$(VSN)
+
+#
+# Macros
+#
+TOOLBAR_FILES = \
+ pman.tool \
+ pman.gif
+
+#
+# Rules
+#
+
+debug opt:
+
+docs:
+
+clean:
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/priv
+ $(INSTALL_DATA) $(TOOLBAR_FILES) $(RELSYSDIR)/priv
+
+release_docs_spec:
+
+FORCE:
diff --git a/lib/pman/priv/pman.gif b/lib/pman/priv/pman.gif
new file mode 100644
index 0000000000..4575a397d8
--- /dev/null
+++ b/lib/pman/priv/pman.gif
Binary files differ
diff --git a/lib/pman/priv/pman.tool b/lib/pman/priv/pman.tool
new file mode 100644
index 0000000000..c04b7d00eb
--- /dev/null
+++ b/lib/pman/priv/pman.tool
@@ -0,0 +1,6 @@
+{version,"0.1"}.
+{{tool,"Pman"},
+ {start,{pman,start,[]}},
+ {icon,"pman.gif"},
+ {message,"Process Manager"},
+ {html,"../doc/html/index.html"}}.
diff --git a/lib/pman/src/Makefile b/lib/pman/src/Makefile
new file mode 100644
index 0000000000..e573e57220
--- /dev/null
+++ b/lib/pman/src/Makefile
@@ -0,0 +1,112 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1996-2009. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../vsn.mk
+VSN=$(PMAN_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/pman-$(VSN)
+
+# ----------------------------------------------------
+# Common Macros
+# ----------------------------------------------------
+
+MODULES= \
+ pman \
+ pman_main \
+ pman_shell \
+ pman_relay \
+ pman_relay_server \
+ pman_module_info \
+ pman_win \
+ pman_buf \
+ pman_buf_utils \
+ pman_buf_buffer \
+ pman_buf_converter \
+ pman_buf_printer \
+ pman_options \
+ pman_process \
+ pman_tool
+
+HRL_FILES= \
+ assert.hrl \
+ pman_buf.hrl \
+ pman_options.hrl \
+ pman_win.hrl
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
+
+APP_FILE = pman.app
+APP_SRC = $(APP_FILE).src
+APP_TARGET = $(EBIN)/$(APP_FILE)
+
+APPUP_FILE = pman.appup
+APPUP_SRC = $(APPUP_FILE).src
+APPUP_TARGET = $(EBIN)/$(APPUP_FILE)
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+ERL_COMPILE_FLAGS += +warn_obsolete_guard
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+debug opt: $(TARGET_FILES)
+
+clean:
+ rm -f $(TARGET_FILES)
+ rm -f errs core *~
+
+$(APP_TARGET): $(APP_SRC) ../vsn.mk
+ sed -e 's;%VSN%;$(VSN);' $< > $@
+
+$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+ sed -e 's;%VSN%;$(VSN);' $< > $@
+
+docs:
+
+# ----------------------------------------------------
+# Special Targets
+# ----------------------------------------------------
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/src
+ $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(TOOLBOX_FILES) $(RELSYSDIR)/src
+ $(INSTALL_DIR) $(RELSYSDIR)/ebin
+ $(INSTALL_DATA) $(TARGET_FILES) $(TARGET_TOOLBOX_FILES) $(RELSYSDIR)/ebin
+
+release_docs_spec:
+
diff --git a/lib/pman/src/assert.hrl b/lib/pman/src/assert.hrl
new file mode 100644
index 0000000000..ea3b68cd7c
--- /dev/null
+++ b/lib/pman/src/assert.hrl
@@ -0,0 +1,81 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%% Purpose : Assert macro
+
+
+%% ?ASSERT/2 - will simply return true if the first argument evaluates to true
+%% otherwise it will exit and output (via the error logger) the
+%% second string
+%%
+%% Arguments:
+%% Flag Expression that should evalueate to true or false
+%% String String to return as a part of the exit reason as well
+%% be to be sent to the error logger.
+%%
+%% Returns:
+%% true If the Flag expression evaluates to true
+%%
+%% Exits:
+%% {'EXIT', {assertion_failed, String}}
+%% If the Flag expression evaluates to something other than
+%% true.
+%%
+%% Usage notes:
+%% Please note that the Flag argument must be a valid expression that
+%% evaluates to true.
+%%
+%% Also, avoid any side effects in the Flag, as everything performed
+%% within the scope of the ?ASSERT macro will not be present when
+%% the code is not compiled with the debug_on flag.
+%%
+%% Side effects include the binding of a variable, sending of a
+%% message, etc.
+%%
+
+-ifdef(debug_on).
+-define(ASSERT(Flag, String),
+ case Flag of
+ true ->
+ true;
+ _ ->
+ S2 =
+ lists:flatten(
+ io_lib:format(
+ "=ASSERT====~nPid:~p, Module:~p, Line:~p~nTermination because assertion failed:~n~p",
+ [self(),?MODULE, ?LINE,String])),
+ error_logger:error_report(S2),
+ exit({assertion_failed, String})
+ end
+ ).
+
+-define(ALWAYS_ASSERT(String),
+ S2 = lists:flatten(
+ io_lib:format(
+ "=ASSERT====~nPid:~p, Module:~p, Line:~p~nTermination because of unconditional assert:~n~p",
+ [self(),?MODULE, ?LINE, String])),
+ error_logger:error_report(S2),
+ exit({always_assert, String})
+ ).
+-else.
+-define(ASSERT(_Flag,_String), true).
+-define(ALWAYS_ASSERT(_String), true).
+-endif.
+
+
+
diff --git a/lib/pman/src/pman.app.src b/lib/pman/src/pman.app.src
new file mode 100644
index 0000000000..cc32a17296
--- /dev/null
+++ b/lib/pman/src/pman.app.src
@@ -0,0 +1,40 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+{application, pman,
+ [{description, "pman The Process Manager"},
+ {vsn, "%VSN%"},
+ {modules, [
+ pman,
+ pman_buf,
+ pman_buf_buffer,
+ pman_buf_converter,
+ pman_buf_printer,
+ pman_buf_utils,
+ pman_main,
+ pman_module_info,
+ pman_options,
+ pman_process,
+ pman_relay,
+ pman_relay_server,
+ pman_shell,
+ pman_tool,
+ pman_win
+ ]},
+ {registered, []},
+ {applications, [kernel, stdlib]}]}.
diff --git a/lib/pman/src/pman.appup.src b/lib/pman/src/pman.appup.src
new file mode 100644
index 0000000000..7a435e9b22
--- /dev/null
+++ b/lib/pman/src/pman.appup.src
@@ -0,0 +1,19 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+{"%VSN%",[],[]}.
diff --git a/lib/pman/src/pman.erl b/lib/pman/src/pman.erl
new file mode 100644
index 0000000000..c8ea34b6b7
--- /dev/null
+++ b/lib/pman/src/pman.erl
@@ -0,0 +1,132 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+%%% Purpose : Exported API to the Pman graphical tool
+%%----------------------------------------------------------------------
+
+-module(pman).
+
+
+%% ---------------------------------------------------------------
+%% The user interface exports
+%% ---------------------------------------------------------------
+-export([start/0,
+ start_notimeout/0,
+ start/1,
+ start_notimeout/1,
+ proc/1,
+ proc/3]).
+
+%% ---------------------------------------------------------------
+
+%% Timeout for the startup function.
+%% If no {initialization_complete, Pid} message has been received
+%% from the spawned init-function within ?STARTUP_TIMEOUT ms
+%% the start-function will call exit(Reason).
+-define(STARTUP_TIMEOUT, 20000).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start/0
+
+start() ->
+ start([], ?STARTUP_TIMEOUT). %Start w/o excluded modules
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start_notimeout/0
+
+start_notimeout() ->
+ start([],infinity). %Start w/o excluded modules
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start/1
+
+start(LIModuleExcluded) ->
+ start(LIModuleExcluded, ?STARTUP_TIMEOUT).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start_notimeout/1
+
+start_notimeout(LIModuleExcluded) ->
+ start(LIModuleExcluded, infinity).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start/2 - Spawns the main Pman process, that will supervise
+%% all processes except those running code from the modules
+%% specified in LIModuleExcluded
+%%
+
+start(LIModuleExcluded, Timeout) ->
+
+ OSModuleExcluded = ordsets:from_list(LIModuleExcluded),
+
+ PidInit = spawn(pman_main, init, [self(), OSModuleExcluded]),
+
+ %% Wait for a initialization completion message from
+ %% the spawned process before returning its Pid.
+ %%
+
+ receive
+ {initialization_complete, PidInit} ->
+ PidInit
+
+ %% (Conditional) Failure to start within the time limit will
+ %% result in termination
+
+ after
+ Timeout ->
+ exit(PidInit, kill),
+ exit({startup_timeout, ?MODULE})
+ end.
+
+
+
+%% ---------------------------------------------------------------
+%% If we want to trace just one process, we can call proc, giving it
+%% either the Pid, or the registered name, (Global or local).
+%%
+%% (???)
+%% Note that this function must not be used internally to create a
+%% trace window, since it is assumed that it is started from any
+%% process (esp. the shell) it will not have any supervisor process
+%% that shall be notified about it's exit/death.
+%%
+%% Returns: Trace loop Pid|udefined
+
+%% ---------------------------------------------------------------
+
+
+proc(undefined) ->
+ exit(undefined);
+
+proc({shell,P}) when is_pid(P) ->
+ pman_shell:start({{shell,P},self()});
+
+proc(P) when is_atom(P) ->
+ proc(whereis(P));
+
+proc({global, N}) ->
+ proc(global:whereis_name(N));
+
+proc(P) when is_pid(P) ->
+ pman_shell:start({P,self()}).
+
+proc(X,Y,Z) ->
+ proc(c:pid(X,Y,Z)).
+
diff --git a/lib/pman/src/pman_buf.erl b/lib/pman/src/pman_buf.erl
new file mode 100644
index 0000000000..d56ce184fa
--- /dev/null
+++ b/lib/pman/src/pman_buf.erl
@@ -0,0 +1,117 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%%----------------------------------------------------------------------
+%%% Purpose : This module is the exported interface to the buffering mechanism
+%%% used in PMAN to prevent the trace output to congest
+%%% the system.
+%%%
+%%% This module depends on the modules (direct or indirectly):
+%%% pman_buf.hrl
+%%% pman_buf_utils.erl
+%%% pman_buf_buffer.erl
+%%% pman_buf_converter.erl
+%%% pman_buf_printer.erl
+%%%
+%%%----------------------------------------------------------------------
+
+-module(pman_buf).
+
+%%-compile(export_all).
+-export([start/2,clear/3]).
+
+
+-include("pman_buf.hrl").
+
+
+%% The buffering mechanism consists of three processes that
+%% work in a chain to prevent the process monitor from congesting
+%% output mechanism.
+%%
+%% Messages are buffered in the CONVERTER process before they are sent to
+%% to the BUFFER process where they are formatted before they are finally
+%% sent to either a file or the PRINTER process. The printer process
+%% outputs the messages in the graphical user interface.
+%%
+%%
+%%
+%% --> CONVERTER --> BUFFER --> PRINTER --> gui
+%% |
+%% |
+%% |
+%% V
+%%
+%% file
+%%
+
+
+
+
+
+%% ----------------------------------------------------------------
+%% The amount of data produced by a trace message may be large, and
+%% cause the run time system to run out of memory. To avoid this,
+%% the task of storing, cutting buffers, formating data and printing
+%% it is performed by three processes: The buffer, the converter and
+%% the printer.
+%%
+%% The converter accepts the raw data, a list
+%% of {trace,Msg} tuples. Having max priority, it assures that the
+%% amount of raw data stored never excedes ?BUFF_SIZE messages.
+%% (With the exception of the last batch received, which assures that
+%% the last trace message printed is never a buffer cut message.)
+%% Whenever there is space available in the buffer process, (The
+%% Buffer process stores max. ?BUFF_SIZE converted messages),
+%% the buffer asks for more unconverted messages, and ?PRINT_LEN messages
+%% are sent. They are converted by the buffer, and added to the list
+%% of messages to be sent.
+
+%% The printer process requests formatted messages from the buffer,
+%% and in chuncs of ?MAX_OUTPUT sends them to the buffer. If traces
+%% are to be dumped on file, due to the max priority, such is handled
+%% in the converter, and buffers are not cut.
+%%
+
+
+%% ---------------------------------------------------------------
+%% Initializes the buffering mechanism, which consist of three
+%% processes, each involved with a phase of the formattation and
+%% output of data to the process windows.
+
+start(Editor, FileName) ->
+ Buffer_Pid = spawn_link(pman_buf_buffer,init,[Editor]),
+ Converter_Pid =
+ spawn_link(pman_buf_converter,init,[Buffer_Pid, FileName]),
+ Buffer_Pid!{converter_pid, Converter_Pid},
+ #buffer{converter=Converter_Pid,buffer=Buffer_Pid}.
+
+
+
+%% ---------------------------------------------------------------
+%% Kills the converter and the clears the buffer with formated data
+%% starting a new converter.
+
+clear(Buff,String, FileName) ->
+ exit(Buff#buffer.converter,win_killed),
+ Converter_Pid=spawn_link(pman_buf_converter,init,[Buff#buffer.buffer,
+ FileName]),
+ Buff#buffer.buffer!{clear,String,Converter_Pid },
+ Buff#buffer{converter = Converter_Pid}.
+
+
+
diff --git a/lib/pman/src/pman_buf.hrl b/lib/pman/src/pman_buf.hrl
new file mode 100644
index 0000000000..3f25dcc5f0
--- /dev/null
+++ b/lib/pman/src/pman_buf.hrl
@@ -0,0 +1,29 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%-compile(export_all).
+%%-export([Function/Arity, ...]).
+
+-define(BUFF_SIZE,1000).
+-define(EDITOR_MAX,10000).
+-define(PRINT_LEN,50).
+-define(MAX_OUTPUT,5000).
+
+
+-record(buffer,{buffer,converter}).
diff --git a/lib/pman/src/pman_buf_buffer.erl b/lib/pman/src/pman_buf_buffer.erl
new file mode 100644
index 0000000000..ad92eb1f3e
--- /dev/null
+++ b/lib/pman/src/pman_buf_buffer.erl
@@ -0,0 +1,102 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%%----------------------------------------------------------------------
+%%% Purpose : The purpouse of the buffer process is to take
+%%% care of the data that is received by the converter
+%%% process and pass it on to the printer process in chunks
+%%% that can be handled.
+%%%
+%%% This module is a part of the buffering system, and
+%%% should not be used except through the API defined
+%%% in the pman_buf module.
+%%%
+%%%----------------------------------------------------------------------
+
+-module(pman_buf_buffer).
+
+%%-compile(export_all).
+-export([init/1]).
+
+-include("pman_buf.hrl").
+
+
+
+%%
+%% Initialization function for the buffer process.
+%% To be started with spawn from the calling process.
+%%
+
+init(Editor) ->
+ Printer_pid = spawn_link(pman_buf_printer,init,[Editor,self()]),
+ receive
+ {converter_pid,Pid} ->
+ Pid!{buffer,accept},
+ buffer_loop([],0,0,Printer_pid,Pid)
+ end.
+
+
+
+%%
+%% Receive loop for the buffer process.
+%%
+
+buffer_loop(Buffer,Size,Acc,Printer,Converter) ->
+ receive
+ {save_buffer,Name} ->
+ Printer!{save_buffer,Name},
+ buffer_loop(Buffer,Size,Acc,Printer,Converter);
+ {raw,Raw,Length} -> %%output to editor
+ New_Size = Size + Length,
+ if New_Size < ?BUFF_SIZE ->
+ Converter!{buffer,accept};
+ true -> ok
+ end,
+ Print = lists:map(fun(X) -> pman_buf_utils:textformat(X) end, Raw),
+ New_Buff = lists:append(Buffer,Print),
+ buffer_loop(New_Buff,New_Size,Acc,Printer,Converter);
+ {clear,Text,N_Converter} ->
+ Converter!{buffer,accept},
+ Printer!clear,
+ buffer_loop([Text],1,1,Printer,N_Converter);
+ {printer,send} when Buffer /= [] ->
+ if
+ Acc > ?EDITOR_MAX ->
+ Printer!clear,
+ Printer !{buffer,"Cleared Buffer due to Size\n\n"},
+ buffer_loop(Buffer,Size,1,Printer,Converter);
+ true ->
+ {Length,Rest,Print} = pman_buf_utils:split(Buffer,
+ ?PRINT_LEN,
+ 0,
+ []),
+ Printer ! {buffer,Print},
+ New_Size = Size - Length,
+ if New_Size < ?BUFF_SIZE ->
+ Converter!{buffer,accept};
+ true -> ok
+ end,
+ buffer_loop(Rest,New_Size,Acc+Length,Printer,Converter)
+ end;
+ {converter,file} ->
+ Converter!{buffer,Buffer},
+ self()!{raw,[to_file],1},
+ buffer_loop([],0,Acc,Printer,Converter)
+ end.
+
+
diff --git a/lib/pman/src/pman_buf_converter.erl b/lib/pman/src/pman_buf_converter.erl
new file mode 100644
index 0000000000..b6f560411c
--- /dev/null
+++ b/lib/pman/src/pman_buf_converter.erl
@@ -0,0 +1,189 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+%% Purpose : The purpouse of the converter process is to take
+%% care of the raw data that is received by the tracing
+%% process (a pman_shell process) and pass it on to
+%% the buffer process in chunks that can be handled.
+%%
+%% This module is a part of the buffering system, and
+%% should not be used except through the API defined
+%% in the pman_buf module.
+%%
+%%----------------------------------------------------------------------
+
+-module(pman_buf_converter).
+
+%%-compile(export_all).
+-export([init/2]).
+
+-include("pman_buf.hrl").
+
+
+%% ---------------------------------------------------------------
+%% Starts the process which received the raw data from the debugger,
+%% cuts and forwards it to the buffer in smaller chunks. High priority
+%% to avoid large message queues waiting to be processed.
+
+init(Buffer_Pid, FileName) ->
+ process_flag(priority, max),
+ converter_loop(Buffer_Pid,[],0,true,[], FileName).
+
+converter_loop(Buffer_Pid,Raw,Size,State,Last, FileName) ->
+ receive
+ {file,Shell} ->
+ case init_file(lists:append(Raw,Last),
+ FileName,
+ Shell,
+ Buffer_Pid) of
+ true -> converter_loop(Buffer_Pid,
+ [to_buffer],
+ 1,
+ State,
+ [],
+ FileName);
+ false -> converter_loop(Buffer_Pid,
+ Raw,
+ Size,
+ State,
+ Last,
+ FileName)
+ end;
+ {raw,Trace} ->
+ {New_Raw,New_Size,New_State,New_Last} =
+ converter_data(Trace, Buffer_Pid, Raw, Size, State, Last),
+ converter_loop(Buffer_Pid,
+ New_Raw,
+ New_Size,
+ New_State,
+ New_Last,
+ FileName);
+ {buffer,accept} when Raw /= [] ->
+ {Length,Rest,Print} = pman_buf_utils:split(Raw,?PRINT_LEN,0,[]),
+ Buffer_Pid!{raw,Print,Length},
+ converter_loop(Buffer_Pid,Rest,Size-Length,false,Last,FileName);
+ {buffer,accept} when Last /= [] ->
+ {New_Raw,New_Size,New_State,New_Last} =
+ converter_data(Last,Buffer_Pid,Raw,Size,true,[]),
+ converter_loop(Buffer_Pid,
+ New_Raw,
+ New_Size,
+ New_State,
+ New_Last,
+ FileName);
+ {buffer,accept} ->
+ converter_loop(Buffer_Pid,Raw,Size,true,Last, FileName);
+ {clear,Str} ->
+ Buffer_Pid!{clear,Str},
+ converter_loop(Buffer_Pid,[],0,State,Last,FileName)
+ end.
+
+converter_data(Trace,Buffer_Pid,Raw,Size,State,Last) ->
+ if
+ ?BUFF_SIZE - Size > 0 ->
+ {Len,Rest,New_Trace} = pman_buf_utils:split(Trace,
+ ?BUFF_SIZE-Size,
+ 0,[]),
+ {New_Raw,New_Last} =
+ case Rest of
+ [] ->
+ {lists:append(Raw,New_Trace),Last};
+ [_|_] ->
+ case Last of
+ [] ->
+ {lists:append(Raw,New_Trace),Rest};
+ _ ->{lists:concat([Raw,New_Trace,[cut_buffer]]),
+ Rest}
+ end
+ end,
+ case State of true ->
+ {Length,Cut_Raw,Print} = pman_buf_utils:split(New_Raw,
+ ?PRINT_LEN,
+ 0,[]),
+ Buffer_Pid!{raw,Print,Length},
+ {Cut_Raw,Size-Length,false,New_Last};
+ _ ->
+ {New_Raw,Size+Len,false,New_Last}
+ end;
+ true ->
+ {Raw,Size,State,Trace}
+ end.
+
+
+%% ---------------------------------------------------------------
+%% Initializes the environment for saving the trace to file. The
+%% actual saving is taken care of by the buffer process.
+
+init_file(Raw,FileName, Name,Buffer_Pid) ->
+ case open_file(FileName, Name) of
+ {false,T} ->
+ pman_win:msg_win(T),
+ false;
+ {File,T} ->
+ Buffer_Pid!{converter,file},
+ pman_win:dialog_window(gs:start(),T),
+ save_loop_init(File,Raw)
+ end.
+
+open_file(FileName, _Shell) ->
+%% L = "pman_trace." ++ Shell,
+ case file:open(FileName, [read,write]) of
+ {error, _} ->
+ Str = "ERROR: Could not create_file\n" ++ FileName,
+ {false,Str};
+ {ok,File} ->
+ file:position(File, {eof, 0}),
+ Str1 = " Appending trace log to file\n" ++ FileName,
+ {File,Str1}
+ end.
+
+
+save_loop_init(Fd,Raw) ->
+ {Date, Time} = calendar:local_time(),
+ {Year, Month, Day} = Date,
+ {Hour, Minute, Second} = Time,
+ io:format(Fd,"%%% ~n",[]),
+ io:format(Fd,"%%% Trace output~n",[]),
+ io:format(Fd,"%%% Started at ~4p-~2p-~2p ~2p:~2p:~2p~n",
+ [Year, Month, Day,
+ Hour, Minute, Second
+ ]),
+ io:format(Fd,"%%% ~n~n",[]),
+
+ Print = lists:map(fun(X) -> pman_buf_utils:textformat(X) end, Raw),
+ receive
+ {buffer,Text} when is_list(Text) ->
+ io:format(Fd,Text,[]),
+ io:format(Fd,Print,[]),
+ save_loop(Fd)
+ end.
+
+save_loop(Fd) ->
+ receive
+ {raw,Raw} ->
+ Print = lists:map(fun(X) -> pman_buf_utils:textformat(X) end, Raw),
+ io:format(Fd,Print,[]),
+ save_loop(Fd);
+ buffer -> true
+ end.
+
+
+
+
+
diff --git a/lib/pman/src/pman_buf_printer.erl b/lib/pman/src/pman_buf_printer.erl
new file mode 100644
index 0000000000..74e935171a
--- /dev/null
+++ b/lib/pman/src/pman_buf_printer.erl
@@ -0,0 +1,89 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(pman_buf_printer).
+
+%%-compile(export_all).
+-export([init/2]).
+
+
+-include("pman_buf.hrl").
+
+%% ---------------------------------------------------------------
+%% Starts the part of the buffer which regulates the flow of data to
+%% be printed in the pid editors
+
+
+init(Editor,Buffer_pid) ->
+ Buffer_pid!{printer,send},
+ printer_loop(Editor,Buffer_pid).
+
+printer_loop(Editor,Buffer_pid)->
+ receive
+ {save_buffer,Name} ->
+ gs:config(Editor,{save,Name}),
+ TT = "Buffer saved in file\n" ++ Name,
+ pman_win:dialog_window(gs:start(),TT),
+ printer_loop(Editor,Buffer_pid);
+ {buffer,Trace} ->
+ case lists:flatlength(Trace) of
+ Len when Len > ?MAX_OUTPUT ->
+ printer_long(lists:flatten(Trace),Editor),
+ Buffer_pid!{printer,send},
+ printer_loop(Editor,Buffer_pid);
+ _ ->
+ Buffer_pid!{printer,send},
+ print_trace(Editor,Trace),
+ printer_loop(Editor,Buffer_pid)
+ end;
+ clear ->
+ pman_win:configeditor(Editor, [{enable, true}]),
+ pman_win:configeditor(Editor,clear),
+ pman_win:configeditor(Editor, [{enable, false}]),
+ printer_loop(Editor,Buffer_pid);
+ _Other ->
+ printer_loop(Editor,Buffer_pid)
+ end.
+
+printer_long([],_) -> ok;
+printer_long(Trace,Editor) ->
+ receive
+ clear ->
+ pman_win:configeditor(Editor, [{enable, true}]),
+ pman_win:configeditor(Editor,clear),
+ pman_win:configeditor(Editor, [{enable, false}])
+ after 0 ->
+ {_Length,Rest,Print} = pman_buf_utils:split(Trace,
+ ?MAX_OUTPUT,
+ 0,
+ []),
+ print_trace(Editor,Print),
+ printer_long(Rest,Editor)
+ end.
+
+
+
+%% ---------------------------------------------------------------
+%% Function which print trace messages on the window
+%% ---------------------------------------------------------------
+
+print_trace(Editor,Elements) ->
+ pman_win:configeditor(Editor, [{enable, true}]),
+ pman_win:configeditor(Editor, [{insert, {'end',Elements}}]),
+ pman_win:configeditor(Editor, [{enable, false}]).
diff --git a/lib/pman/src/pman_buf_utils.erl b/lib/pman/src/pman_buf_utils.erl
new file mode 100644
index 0000000000..af3982665e
--- /dev/null
+++ b/lib/pman/src/pman_buf_utils.erl
@@ -0,0 +1,106 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(pman_buf_utils).
+
+%%-compile(export_all).
+-export([textformat/1, split/4]).
+
+
+%% ---------------------------------------------------------------
+%% Funtion which format the trace message
+%% ---------------------------------------------------------------
+
+textformat(died) ->
+ "\n\nProcess died\n";
+textformat({died, Pid}) ->
+ io_lib:format("~w Process died.~n",[Pid]);
+textformat({shell_died, Old, New}) ->
+ io_lib:format("~w Shell Process died. Restarted as ~w~n~n",[Old,New]);
+
+
+textformat(to_buffer) ->
+ "\nAppending trace log to Buffer\n\n";
+textformat(to_file) ->
+ "\nAppending trace log to File\n\n";
+textformat(cut_buffer) ->
+ "\nCUT BUFFER\n\n";
+textformat({trace, From, 'receive', Msg}) ->
+ io_lib:format("~w: rec ~s~n", [From,
+ tuple_space(Msg)]);
+textformat({trace, From, send, Msg, To}) ->
+ io_lib:format("~w: ! To: ~w Msg: ~s~n", [From,
+ To,
+ tuple_space(Msg)]);
+textformat({trace, From, call, Func}) ->
+ io_lib:format("~w: call ~s~n",[From, ffunc(Func)]);
+textformat({trace, From, spawn, Data}) ->
+ io_lib:format("~w: spawn ~p~n", [From, Data]);
+textformat({trace, From, link, Data}) ->
+ io_lib:format("~w: link ~p~n", [From, Data]);
+textformat({trace, From, unlink, Data}) ->
+ io_lib:format("~w: U-lnk ~p~n", [From, Data]);
+
+textformat({trace, From, Op, Data}) ->
+ io_lib:format("~w: ~w ~p~n", [From, Op, Data]);
+
+textformat({print, Format, Args}) ->
+ io_lib:format(Format, Args);
+textformat(Other) ->
+ io_lib:format("~p~n",[Other]).
+
+
+
+
+
+ffunc({M,F, Argl}) ->
+ io_lib:format("~w:~w(~s)", [M, F, fargs(Argl)]);
+ffunc(X) -> tuple_space(X).
+fargs([]) -> [];
+fargs([A]) -> tuple_space(A); %% last arg
+fargs([A|Args]) -> [tuple_space(A),", "|fargs(Args)].
+
+
+tuple_space(X) when is_tuple(X) -> print(size(X), X, "}");
+tuple_space(X) -> io_lib:format("~p",[X]).
+
+print(0 , _X, Buff) -> ["{"|Buff];
+print(1 , X, Buff) ->
+ Str = tuple_space(element(1, X)),
+ ["{",Str|Buff];
+print(Num, X, Buff) ->
+ Str = tuple_space(element(Num, X)),
+ print(Num-1, X, [", ",Str|Buff]).
+
+
+
+%% ----------------------------------------------------------------
+%% splits the list at element Size, returns Size, and the 2 lists
+%% If the list is not long enough, it returns {size(List),[],List}
+
+
+split([],_,Length,Buff) ->
+ {Length,[],lists:reverse(Buff)};
+split(Rest,0,Length,Buff) ->
+ {Length,Rest,lists:reverse(Buff)};
+split([L|List],Size,Length,Buff) ->
+ split(List,Size-1,Length+1,[L|Buff]).
+
+
+
diff --git a/lib/pman/src/pman_main.erl b/lib/pman/src/pman_main.erl
new file mode 100644
index 0000000000..b68da1d2c3
--- /dev/null
+++ b/lib/pman/src/pman_main.erl
@@ -0,0 +1,787 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(pman_main).
+
+%% Main process and window
+
+-export([init/2]).
+
+-record(state, {win, % GS top window
+ frame, % GS top frame
+ grid, % GS process info grid
+
+ size, % int() No. of displayed procs
+ w, % int() Window width
+ h, % int() Window height
+
+ hide_system=false, % bool() Auto-hide system procs
+ hide_new=false, % bool() Auto-hide new processes
+
+ hide_modules, % ordset() Excluded modules
+
+ hide_all=[], % [{node(), bool()}] Hide all
+ hide_pids=[], % [{node(), Ordset}] Processes
+ % explicitly to hide, per node
+ show_pids=[], % [{node(), Ordset}] Processes
+ % explicitly to show, per node
+
+ shown_pids=[], % [{node(), Ordset}] Processes
+ % actually shown, per node
+
+ node, % node() Current node
+ nodes=[], % [node()] All known nodes
+
+ focus=1, % int() Grid line with focus
+ focus_pid=undefined, % pid() | undefined Proc in focus
+
+ noshell, % bool() Noshell mode on
+
+ options}). % term() Trace options settings
+
+
+-include("pman_win.hrl").
+
+-define(REFRESH_TIME,5000).
+
+-define(REQUIRES_FOCUS, % List of menus that should
+ ['Trace Process', % be disabled if no process
+ 'Kill', % is in focus
+ 'Hide Selected Process',
+ 'Module']).
+
+%%--Process init and loop-----------------------------------------------
+
+init(PidCaller, OSModuleExcluded) ->
+ process_flag(trap_exit, true),
+
+ %% Monitor all nodes in a distributed system
+ case is_alive() of
+
+ %% We have a distributed system
+ true -> net_kernel:monitor_nodes(true);
+
+ %% No distribution
+ false -> ignore
+ end,
+ Nodes = [node()|nodes()],
+
+ %% Create the main window
+ %% For some extremely strange reason, the frame must be resized
+ %% or the grid won't be visible...
+ GridSize = length(processes()) + 61,
+ {Window, Grid, Frame, Visible, W, H} =
+ pman_win:pman_window(GridSize, OSModuleExcluded, Nodes),
+ gse:resize(Frame, ?WIN_WIDTH, ?WIN_HEIGHT-?MENU_HEIGHT),
+
+ Noshell = case pman_shell:find_shell() of
+ noshell -> true;
+ _ -> false
+ end,
+
+ State1 = #state{win=Window, frame=Frame, grid=Grid,
+ size=Visible,
+ w=W, h=H,
+ hide_modules=OSModuleExcluded,
+ node=node(),
+ noshell=Noshell},
+
+ State2 = lists:foldl(fun(Node, State) -> add_node(Node, State) end,
+ State1,
+ Nodes),
+
+ State3 = refresh(State2),
+
+ %% Notify caller that the process appears
+ %% to have been started.
+ PidCaller ! {initialization_complete, self()},
+
+ %% Initiate a 'catch all' trace pattern so call tracing works
+ erlang:trace_pattern({'_', '_', '_'}, true, [local]),
+
+ %% Read default options file
+ Options = restore_options(State3),
+
+ loop(State3#state{options=Options}).
+
+add_node(Node, State) ->
+ pman_win:add_menu(node, [Node], "Show"),
+ State#state{hide_all=nl_update(Node, false, State#state.hide_all),
+ hide_pids=nl_update(Node, [], State#state.hide_pids),
+ show_pids=nl_update(Node, [], State#state.show_pids),
+ shown_pids=nl_update(Node, [], State#state.shown_pids),
+ nodes=[Node|State#state.nodes]}.
+
+%% Restore saved options from default file
+restore_options(State)->
+ File = options_file(),
+ case pman_options:read_from_file(File) of
+ {ok, Options} ->
+ Options;
+ {error, ReasonStr, DefOptions} ->
+ Parent = State#state.win,
+ Msg = io_lib:format(
+ "Problems reading default option file~n~s:~n~s",
+ [File, ReasonStr]),
+ tool_utils:notify(Parent, Msg),
+ DefOptions
+ end.
+
+options_file() ->
+ {ok, [[Home]]} = init:get_argument(home),
+ filename:join([Home, ".erlang_tools", "pman.opts"]).
+
+loop(State) ->
+ receive
+ {nodeup, Node} ->
+ case nl_exists(Node, State#state.hide_all) of
+ true ->
+ pman_win:add_menu(node, [Node], "Show"),
+ loop(State#state{nodes=[Node|State#state.nodes]});
+ false ->
+ loop(add_node(Node, State))
+ end;
+
+ {nodedown, Node} ->
+ pman_win:remove_menu([Node]),
+
+ Msg = io_lib:format("Node~n~p~ndown.", [Node]),
+ spawn_link(tool_utils, notify, [State#state.win, Msg]),
+
+ %% We remove Node from the list of nodes but not from
+ %% the other lists of State, in case Node reappears later
+ Nodes = lists:delete(Node, State#state.nodes),
+ State2 = State#state{nodes=Nodes},
+
+ %% If it was the shown node that went down,
+ %% change overview to this node
+ if
+ Node==State#state.node ->
+ State3 = execute_cmd({node,node()}, State2, [], []),
+ loop(State3);
+ true ->
+ loop(State2)
+ end;
+
+ %% Ignore EXIT signals from help processes
+ {'EXIT', _Pid, _Reason} ->
+ loop(State);
+
+ %% GS events
+ {gs, _Obj, _Event, _Data, _Args} = Cmd ->
+ case gs_cmd(Cmd, State) of
+ stop ->
+ exit(topquit);
+ State2 ->
+ loop(State2)
+ end
+
+ after ?REFRESH_TIME ->
+ State2 = refresh(State),
+ loop(State2)
+ end.
+
+%% gs_cmd(Event, State) -> stop | State'
+gs_cmd(Event, State) ->
+ case Event of
+
+ %% --- Window manager commands ---
+
+ %% Window is moved or resized
+ {gs, _, configure, _Data, Args} ->
+ configure(Args, State);
+
+ %% Window closed, stop Pman
+ {gs, _, destroy, _, _} ->
+ stop;
+
+ %% --- Dynamic commands ---
+
+ %% Click in any object where the GS Data field is a 2-tuple
+ {gs, _, click, Data, Args} when is_tuple(Data), size(Data)==2 ->
+ execute_cmd(Data, State, [], Args);
+
+ %% Single click in the grid sets focus to selected process
+ {gs, _, click, {pidfunc,_,_}, [_,Row|_]} when is_integer(Row) ->
+ focus(Row, State);
+
+ %% Double click in the grid starts tracing of selected process
+ {gs, _, doubleclick, {pidfunc,_,_}, [_Col,Row| _]} when is_integer(Row) ->
+ execute_cmd('Trace Process', State, [], []);
+
+ %% Click in named GS objects
+ {gs, Cmd, click, Data, Args} when is_atom(Cmd);
+ is_atom(element(1, Cmd)) ->
+ execute_cmd(Cmd, State, Data, Args);
+
+ %% --- Keyboard accelerator commands ---
+
+ %% Move focus up and down
+ {gs, _, keypress, [], ['Up',_,0,0]} ->
+ execute_cmd(focus_previous, State, [], []);
+ {gs, _, keypress, [], ['Down',_,0,0]} ->
+ execute_cmd(focus_next, State, [], []);
+
+ %% Other keyboard shortcuts
+ {gs, _, keypress, [], ['Return',_,0,0]} ->
+ execute_cmd('Trace Process', State, [], []);
+ {gs, _, keypress, [], [Key,_,0,1]} ->
+ execute_cmd(shortcut(Key), State, [], []);
+
+ %% Ignore all other GS events
+ _Other ->
+ State
+ end.
+
+%% Keyboard shortcuts
+
+%% File menu
+shortcut(o) -> 'Default Options';
+shortcut(e) -> 'Exit';
+shortcut(z) -> 'Exit';
+
+%% View menu
+shortcut(i) -> 'Hide All';
+shortcut(u) -> 'Hide Modules';
+shortcut(d) -> 'Hide Selected Process';
+shortcut(m) -> 'Module';
+shortcut(r) -> 'Refresh';
+
+%% Trace menu
+shortcut(k) -> 'Kill';
+shortcut(t) -> 'Trace Process';
+shortcut(s) -> 'Trace Shell';
+
+%% Help menu
+shortcut(h) -> 'Help';
+
+%% Keyboard command only
+shortcut(l) -> 'All Links';
+
+%% Process grid traversal
+shortcut(p) -> focus_previous;
+shortcut(n) -> focus_next;
+shortcut(_) -> dummy.
+
+%% configure([W,H,X,Y|_], State) -> State'
+%% Window has been moved or resized
+configure([W,H|_], State) ->
+ if
+ W==State#state.w, H==State#state.h ->
+ ignore;
+
+ true ->
+ gse:resize(State#state.frame, W, H-?MENU_HEIGHT),
+
+ Grid = State#state.grid,
+ case abs(W - gs:read(Grid,width) - 6) of
+ 0 ->
+ ok; %% Avoid refreshing width if possible
+ _Anything ->
+ Cols = pman_win:calc_columnwidths(W-6),
+ gs:config(Grid, Cols)
+ end,
+ pman_win:configwin(Grid, W, H)
+ end,
+ State.
+
+%% focus(Row, State) -> State'
+%% Row = int() Grid row
+%% User has selected a row in the grid.
+%% Row==1 means header row.
+focus(Row, State) ->
+
+ Pid = case get_pid_in_focus(Row, State#state.grid) of
+ {true, {pidfunc,Pid0,_}} ->
+ pman_win:change_colour(State#state.grid,
+ State#state.focus, Row),
+ enable_pid_actions(),
+ Pid0;
+ false ->
+ disable_pid_actions(),
+ undefined
+ end,
+
+ State#state{focus=Row, focus_pid=Pid}.
+
+%% get_pid_in_focus(Row, Grid) -> {true, Data} | false
+%% Data = {pidfunc, Pid, Func}
+%% Func = {Mod,Name,Arity} | term()
+%% Return the data associated with the process in focus if there is one,
+get_pid_in_focus(1, _Grid) ->
+ false;
+get_pid_in_focus(Row, Grid) ->
+ case gs:read(Grid, {obj_at_row,Row}) of
+ undefined -> false;
+ GridLine ->
+ Data = gs:read(GridLine, data),
+ {true, Data}
+ end.
+
+%% execute_cmd(Cmd, State, Data, Args) -> stop | State'
+
+%% Checkbutton "Hide System Processes"
+execute_cmd('Hide System', State, _Data, Args) ->
+ [_Text, _Group, Bool|_Rest] = Args,
+ State2 = State#state{hide_system=Bool},
+ refresh(State2);
+
+%% Checkbutton "Auto-Hide New"
+execute_cmd('Auto Hide New', State, _Data, Args ) ->
+ [_Text, _Group, Bool|_Rest] = Args,
+ refresh(State#state{hide_new=Bool});
+
+%% File->Options...
+execute_cmd('Default Options', State, _Data, _Args) ->
+ OldOptions = State#state.options,
+ NewOptions = pman_options:dialog(State#state.win,
+ "Default Trace Options",
+ OldOptions),
+ case NewOptions of
+ {error, _Reason} ->
+ State;
+ Options ->
+ State#state{options=Options}
+ end;
+
+%% File->Save Options
+%% Save the set default options to the user's option file
+execute_cmd('Save Options', State, _Data, _Args)->
+ Options = State#state.options,
+ File = options_file(),
+ Parent = State#state.win,
+
+ case pman_options:save_to_file(Options, File) of
+ ok ->
+ tool_utils:notify(Parent, "Options saved to\n" ++ File);
+ {error, ReasonStr} ->
+ Msg = io_lib:format("Could not save options to~n~s:~n~s",
+ [File, ReasonStr]),
+ tool_utils:notify(Parent, Msg)
+ end,
+ State;
+
+%% File->Exit
+%% Exit the application
+execute_cmd('Exit', _State, _Data, _Args) ->
+ stop;
+
+%% View->Hide All Processes
+execute_cmd('Hide All', State, _Data, _Args) ->
+ Node = State#state.node,
+ HideAll = nl_update(Node, true, State#state.hide_all),
+ ShowPids = nl_del_all(State#state.node, State#state.show_pids),
+ State2 = State#state{hide_all=HideAll, show_pids=ShowPids},
+ refresh(State2, true);
+
+%% View->Hide modules...
+%% Opens a dialog where the user can select from a list of
+%% the loaded modules.
+%% The selected module is added to the list of hidden modules.
+execute_cmd('Hide Modules', State, _Data, _Args) ->
+
+ %% Get all loaded modules that are not already hidden
+ AllModules = lists:map(fun({Module, _File}) -> Module end,
+ code:all_loaded()),
+ ModulesSet = ordsets:subtract(ordsets:from_list(AllModules),
+ State#state.hide_modules),
+
+ %% Let the user select which of the loaded modules to exclude from
+ %% the process overview
+ Title = "Module selection",
+ case pman_tool:select(State#state.win, Title, ModulesSet) of
+ Modules when is_list(Modules) ->
+ HideModules = ordsets:union(State#state.hide_modules,
+ ordsets:from_list(Modules)),
+ refresh(State#state{hide_modules=HideModules});
+ cancelled -> State
+ end;
+
+%% View->Hide Selected Process
+%% The process in focus should explicitly be hidden
+execute_cmd('Hide Selected Process', State, _Data, _Args) ->
+ case State#state.focus_pid of
+ undefined -> State;
+ Pid ->
+ Node = State#state.node,
+ HidePids = nl_add(Node, Pid, State#state.hide_pids),
+ ShowPids = nl_del(Node, Pid, State#state.show_pids),
+ refresh(State#state{hide_pids=HidePids, show_pids=ShowPids})
+ end;
+
+%% View->Module Info...
+%% Open window with module information.
+execute_cmd('Module', State, _Data, _Args) ->
+ case get_pid_in_focus(State#state.focus, State#state.grid) of
+ {true, {pidfunc, _Pid, {Module,_Name,_Arity}}} ->
+ pman_module_info:start(Module);
+ _ -> % false | {true, {pidfunc, Pid, Other}}
+ ignore
+ end,
+ State;
+
+%% View->Refresh
+%% Refresh the main window.
+%% (Called automatically every ?REFRESH_TIME millisecond)
+execute_cmd('Refresh', State, _Data, _Args) ->
+ refresh(State);
+
+%% View->Show All Processes
+%% Makes all processes visible except system processes and new
+%% processes, if those buttons are checked.
+%% Note: Also un-hides all hidden modules!
+execute_cmd('Show All', State, _Data, _Args) ->
+ Node = State#state.node,
+ HideAll = nl_update(Node, false, State#state.hide_all),
+ HidePids = nl_del_all(State#state.node, State#state.hide_pids),
+ ShowPids = nl_del_all(State#state.node, State#state.show_pids),
+ State2 = State#state{hide_modules=ordsets:new(), hide_all=HideAll,
+ hide_pids=HidePids, show_pids=ShowPids},
+ refresh(State2, true);
+
+%% View->Show Processes...
+%% Open a list of all hidden processes, if the user selects one this
+%% process should explicitly be shown
+execute_cmd('Show Selected', State, _Data, _Args) ->
+ Node = State#state.node,
+
+ All = pman_process:r_processes(Node),
+ Hidden = case nl_lookup(Node, State#state.hide_all) of
+ true ->
+ All;
+ false ->
+ Shown = nl_lookup(Node, State#state.shown_pids),
+ ordsets:subtract(All, Shown)
+ end,
+
+ %% Selection window
+ Title = "Select Processes to Show",
+ Tuples =
+ lists:map(fun(Pid) ->
+ {M,F,A} = pman_process:function_info(Pid),
+ Str = case pman_process:get_name(Pid) of
+ " " ->
+ io_lib:format("~p:~p/~p",
+ [M, F, A]);
+ Name ->
+ io_lib:format("[~p] ~p:~p/~p",
+ [Name, M, F, A])
+ end,
+ {Pid, Str}
+ end,
+ Hidden),
+ case pman_tool:select(State#state.win, Title, Tuples) of
+ Pids when is_list(Pids) ->
+ HidePids = nl_del(Node, Pids, State#state.hide_pids),
+ ShowPids = nl_add(Node, Pids, State#state.show_pids),
+ refresh(State#state{hide_pids=HidePids,show_pids=ShowPids});
+ cancelled -> State
+ end;
+
+%% Trace->Kill
+execute_cmd('Kill', State, _Data, _Args) ->
+ case State#state.focus_pid of
+ Pid when is_pid(Pid) ->
+ exit(Pid, kill);
+ undefined ->
+ ignore
+ end,
+ State;
+
+%% Trace->Selected Process
+execute_cmd('Trace Process', State, _Data, _Args) ->
+ case State#state.focus_pid of
+ Pid when is_pid(Pid) ->
+ pman_shell:start({Pid,self()}, State#state.options);
+ undefined ->
+ ignore
+ end,
+ State;
+
+%% Trace->Shell Process
+execute_cmd('Trace Shell', State, _Data, _Args) ->
+ case pman_shell:find_shell() of
+ noshell ->
+ State;
+ Shell ->
+ pman_shell:start({{shell,Shell},self()},
+ State#state.options),
+ State#state{noshell=false}
+ end;
+
+%% Nodes->Show <Node>
+%% Change shown node
+execute_cmd({node,Node}, State, _Data, _Args) ->
+ gse:config(State#state.win,
+ [{title,lists:concat(["Pman: Overview on ", Node])}]),
+ gse:disable(Node),
+ catch gse:enable(State#state.node), % Menu may not exist any more
+ refresh(State#state{node=Node}, true);
+
+%% Help->Help
+execute_cmd('Help', State, _Data, _Args) ->
+ Win = State#state.win,
+ HelpFile =
+ filename:join([code:lib_dir(pman),"doc","html","index.html"]),
+ tool_utils:open_help(Win, HelpFile),
+ State;
+
+%% Keyboard shortcut Ctrl-l
+execute_cmd('All Links', State, _Data, _Args) ->
+ case State#state.focus_pid of
+ Pid when is_pid(Pid) ->
+ case process_info(Pid, links) of
+ {links, Pids} ->
+ pman_shell:start_list(Pids, self(),
+ State#state.options);
+ undefined ->
+ ignore
+ end;
+ undefined -> ignore
+ end,
+ State;
+
+%% Keyboard shortcuts for process grid traversal
+execute_cmd(focus_previous, State, _Data, _Args) ->
+ focus(previous_row(State), State);
+execute_cmd(focus_next, State, _Data, _Args) ->
+ focus(next_row(State), State);
+
+%% Keyboard combinations that are not shortcuts
+execute_cmd(dummy, State, _Data, _Args) ->
+ State.
+
+%% Convenience functions for disabling/enabling menu items that require
+%% that a process is selected.
+disable_pid_actions() ->
+ lists:foreach(fun(X) -> gse:disable(X) end, ?REQUIRES_FOCUS).
+
+enable_pid_actions() ->
+ lists:foreach(fun(X) -> gse:enable(X) end, ?REQUIRES_FOCUS).
+
+%% refresh(State) -> State'
+%% refresh(State, ForceP) -> State'
+%% Refreshes the main window.
+refresh(State) ->
+ refresh(State, false).
+refresh(#state{node=Node} = State, ForceP) ->
+
+ %% Update shown processes
+
+ %% First, get an ordset of all processes running at the current node
+ All = pman_process:r_processes(Node),
+
+ Shown = nl_lookup(Node, State#state.shown_pids),
+ ExpShown = nl_lookup(Node, State#state.show_pids),
+
+ {Show, State2} =
+ case nl_lookup(Node, State#state.hide_all) of
+
+ %% If the user has selected "Hide All Processes", only
+ %% explicitly selected processes which still exist should
+ %% be shown
+ true ->
+ {ordsets:intersection(ExpShown, All), State};
+
+ false ->
+ %% Compute which processes should be hidden according
+ %% to the flags/menu items selected
+ Hidden = hidden_pids(All, State),
+
+ NotHidden = ordsets:subtract(All, Hidden),
+
+ Show0 = case State#state.hide_new of
+ %% If the user has selected "Auto-Hide New",
+ %% then only those processes in NotHidden
+ %% which are already shown, should be shown,
+ %% together with explicitly selected
+ %% processes which still exist
+ true ->
+ ordsets:union(
+ ordsets:intersection(NotHidden,Shown),
+ ordsets:intersection(ExpShown, All));
+
+ %% Otherwise, show all processes in
+ %% NotHidden, together with explicitly
+ %% selected processes which still exist
+ false ->
+ ordsets:union(
+ NotHidden,
+ ordsets:intersection(ExpShown, All))
+ end,
+
+ ShownPids = nl_update(Node, Show0,
+ State#state.shown_pids),
+ {Show0, State#state{shown_pids=ShownPids}}
+ end,
+
+ NoOfHidden = length(All) - length(Show),
+
+ if
+ Show==Shown, not ForceP ->
+ pman_win:update(NoOfHidden),
+ State;
+
+ true ->
+ ShowInfo = display_info(Show),
+ pman_win:update(State#state.grid, ShowInfo, NoOfHidden),
+
+ %% Set the focus appropriately
+ State3 = case State2#state.focus_pid of
+ undefined ->
+ disable_pid_actions(),
+ State2;
+ Pid ->
+ Row = get_row(Pid, Show),
+ focus(Row, State2)
+ end,
+
+ trace_shell_possible(State3),
+
+ Size = length(Show),
+ case Size of
+ 1 -> gse:disable('Hide All');
+ _ -> gse:enable('Hide All')
+ end,
+
+ State3#state{size=Size}
+ end.
+
+%% hidden_pids(All, State) -> Hidden
+hidden_pids(All, State) ->
+
+ %% Processes hidden because they are system processes
+ HideSys = case State#state.hide_system of
+ true ->
+ lists:filter(
+ fun(Pid) ->
+ pman_process:is_system_process(Pid)
+ end,
+ All);
+ false ->
+ []
+ end,
+
+ %% Process hidden because they are executing code in a hidden module
+ Mods = State#state.hide_modules,
+ HideMod =
+ lists:filter(fun(Pid) ->
+ pman_process:is_hidden_by_module(Pid, Mods)
+ end,
+ All),
+
+ %% Explicitly hidden processes
+ HideExp = nl_lookup(State#state.node, State#state.hide_pids),
+
+ %% All hidden processes
+ ordsets:union([HideSys, HideMod, HideExp]).
+
+display_info(Pids) ->
+ lists:map(fun(Pid) ->
+ Func = pman_process:function_info(Pid),
+ Name = pman_process:get_name(Pid),
+ Msgs = pman_process:msg(Pid),
+ Reds = pman_process:reds(Pid),
+ Size = pman_process:psize(Pid),
+ {Pid, Func, Name, Msgs, Reds, Size}
+ end,
+ Pids).
+
+get_row(Pid, List) ->
+ get_row(Pid, List, length(List)+1).
+
+get_row(Pid, [Pid | _], Row) ->
+ Row;
+get_row(Pid, [_ | T], Row) ->
+ get_row(Pid, T, Row-1);
+get_row(_Pid, [], _Row) ->
+ 1.
+
+next_row(#state{size=Size, focus=Row}) ->
+ check_row(Row+1, Size).
+
+previous_row(#state{size=Size, focus=Row}) ->
+ check_row(Row-1, Size).
+
+check_row(1, Size) ->
+ Size+1;
+check_row(Row, Size) when Row==Size+2 ->
+ 2;
+check_row(Row, _Size) ->
+ Row.
+
+%% Check if node is running in noshell mode and if so disable the
+%% 'Trace Shell' menu option.
+trace_shell_possible(#state{noshell=true}) ->
+ gse:disable('Trace Shell');
+trace_shell_possible(_) ->
+ ok.
+
+%% -- Functions for manipulating {Node, Data} lists --
+
+%% nl_add(Node, Elem|Elems, NList) -> NList'
+nl_add(Node, Elems, [{Node, Ordset} | T]) when is_list(Elems) ->
+ [{Node, ordsets:union(Elems, Ordset)} | T];
+nl_add(Node, Elem, [{Node, Ordset} | T]) ->
+ [{Node, ordsets:add_element(Elem, Ordset)} | T];
+nl_add(Node, Elem, [H | T]) ->
+ [H | nl_add(Node, Elem, T)];
+nl_add(Node, Elems, []) when is_list(Elems) ->
+ [{Node, Elems}];
+nl_add(Node, Elem, []) ->
+ [{Node, ordsets:add_element(Elem, ordsets:new())}].
+
+%% nl_del(Node, Elem|Elems, NList) -> NList'
+nl_del(Node, Elems, [{Node, Ordset} | T]) when is_list(Elems) ->
+ [{Node, ordsets:subtract(Ordset, Elems)} | T];
+nl_del(Node, Elem, [{Node, Ordset} | T]) ->
+ [{Node, ordsets:del_element(Elem, Ordset)} | T];
+nl_del(Node, Elem, [H | T]) ->
+ [H | nl_del(Node, Elem, T)];
+nl_del(_Node, _Elem, []) ->
+ [].
+
+%% nl_del_all(Node, NList) -> NList'
+nl_del_all(Node, [{Node, _Ordset} | T]) ->
+ [{Node, ordsets:new()} | T];
+nl_del_all(Node, [H | T]) ->
+ [H | nl_del_all(Node, T)];
+nl_del_all(_Node, []) ->
+ [].
+
+%% nl_update(Node, Val, NList) -> NList'
+nl_update(Node, Val, [{Node, _OldVal} | T]) ->
+ [{Node, Val} | T];
+nl_update(Node, Val, [H | T]) ->
+ [H | nl_update(Node, Val, T)];
+nl_update(Node, Val, []) ->
+ [{Node, Val}].
+
+%% nl_lookup(Node, NList) -> Val
+nl_lookup(Node, NList) ->
+ {value, {_Node,Val}} = lists:keysearch(Node, 1, NList),
+ Val.
+
+%% nl_exists(Node, NList) -> bool()
+nl_exists(Node, NList) ->
+ case lists:keysearch(Node, 1, NList) of
+ {value, _Val} ->
+ true;
+ false ->
+ false
+ end.
diff --git a/lib/pman/src/pman_module_info.erl b/lib/pman/src/pman_module_info.erl
new file mode 100644
index 0000000000..cfd711a6e1
--- /dev/null
+++ b/lib/pman/src/pman_module_info.erl
@@ -0,0 +1,131 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(pman_module_info).
+
+%% Window with module information (View->Module Info...)
+
+%% External exports
+-export([start/1]).
+
+%% Record for keeping the loop state for the
+%% module info process.
+-record(state, {topwin, % GS identifier for top window
+ editor, % GS identifier for editor
+ module, % Name of the viewed module
+ parent}). % Pid of the parent
+
+start(Module) ->
+ Self = self(),
+ spawn_link(fun() -> init(Module, Self) end).
+
+init(Module, Parent) ->
+ process_flag(trap_exit, true),
+
+ GS = gs:start([{kernel,true}]),
+ Font = pman_win:font(GS),
+
+ WinTitle = lists:flatten(io_lib:format("Pman - Module Info: ~p",
+ [Module])),
+ WinOptions = [{title,WinTitle}, {width,550}, {height, 400},
+ {configure,true}, {keypress,true}, {destroy,true}],
+ TopWindow = gse:window(GS, WinOptions),
+
+ %% File menu
+ MenuBar = gse:menubar(TopWindow, []),
+ MBFile = gse:menubutton(MenuBar, [{label,{text," File "}},
+ {font,Font}, {underline, 1}]),
+ MenuFile = gse:menu(MBFile, []),
+
+ gse:named_menuitem('Save buffer', MenuFile,
+ [{label,{text,"Save buffer..."}},
+ {font,Font}, {underline,0}]),
+ gse:named_menuitem('Close', MenuFile,
+ [{label,{text,"Close"}},
+ {font,Font}, {underline,0}]),
+
+ %% Output part of window
+ Editor = gse:editor(TopWindow,
+ [{font,Font},
+ {x,3}, {y,40}, {width,546}, {height,348}]),
+ gse:config(Editor, [{keypress,true},
+ {insert,{'end',pman_win:module_data(Module)}}]),
+ gse:config(Editor, [{enable,false},
+ {vscroll,right}, {hscroll,bottom},
+ {wrap,none}]),
+ gse:map(TopWindow),
+
+ State = #state{topwin=TopWindow, editor=Editor, module=Module,
+ parent=Parent},
+ loop(State).
+
+loop(State) ->
+
+ receive
+ %% Die if the parent dies
+ {'EXIT', Pid, _Reason} when Pid==State#state.parent ->
+ gse:destroy(State#state.topwin);
+
+ %% Ignore other exit signals (from file dialog window)
+ {'EXIT', _Pid, _Reason} ->
+ loop(State);
+
+ %% Window closed
+ {gs, _TopWindow, destroy, [], []} ->
+ ok;
+
+ %% Window resized or moved
+ {gs, _TopWindow, configure ,_Data, [W,H,_X,_Y|_]} ->
+ gs:config(State#state.editor, [{width,W-3}, {height,H-40}]),
+ loop(State);
+
+ %% Close - destroy window and exit process
+ {gs, 'Close', click, _Data, _Args} ->
+ gse:destroy(State#state.topwin),
+ ok;
+
+ %% Save Buffer - make filename and save buffer to file
+ {gs, 'Save buffer', click, _Data, _Args} ->
+ save_buffer(State),
+ loop(State);
+
+ %% Keyboard accelerator commands
+ {gs, _, keypress, [], [c,_,0,1]} -> % 'Close'
+ gse:destroy(State#state.topwin),
+ ok;
+ {gs, _, keypress, [], [s,_,0,1]} -> % 'Save buffer'
+ save_buffer(State),
+ loop(State);
+ {gs, _, keypress, _Data, _Args} ->
+ loop(State)
+ end.
+
+save_buffer(State) ->
+ DefaultFile = atom_to_list(State#state.module) ++ ".module_info",
+ Result = tool_utils:file_dialog([{type,save}, {file,DefaultFile}]),
+ case Result of
+ %% User selected a file, now save the result
+ {ok, File, _Dir} ->
+ gs:config(State#state.editor, {save,File}),
+ Msg = "Module information saved in file\n" ++ File,
+ tool_utils:notify(State#state.topwin, Msg);
+
+ %% File dialog was cancelled in some way.
+ {error, _Reason} ->
+ ignore
+ end.
diff --git a/lib/pman/src/pman_options.erl b/lib/pman/src/pman_options.erl
new file mode 100644
index 0000000000..0765458fdc
--- /dev/null
+++ b/lib/pman/src/pman_options.erl
@@ -0,0 +1,395 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(pman_options).
+
+%% Window with trace options settings (File->Options...)
+
+-export([dialog/3,
+ read_from_file/1, save_to_file/2]).
+
+-include("pman_options.hrl").
+
+-define(WIN_WIDTH, 350).
+-define(WIN_HEIGHT, 350).
+
+-define(TOP_WINDOW, xx_pman_option_window_xx).
+-define(TOP_FRAME, xx_pman_top_frame_xx).
+
+-record(state, {resize_frame, % GS identifier for the main frame
+ parent}). % Pid of parent
+
+%%--dialog/3------------------------------------------------------------
+%% Create a window, or return a value indicating that is is already
+%% created.
+
+dialog(ParentWin, Title, Options) ->
+ Self = self(),
+ Pid = spawn(fun() -> dialog(Self, ParentWin, Title, Options) end),
+ receive
+ {Pid, Value} ->
+ Value % Options2 | {error,destroyed} | {error,cancelled}
+ end.
+
+dialog(Parent, ParentWin, Title, Options) ->
+
+ %% Check if the dialog has already been created, in that
+ %% case, we can reuse it. Otherwise a new dialog is created.
+ case gse:name_occupied(?TOP_WINDOW) of
+ false -> make_window(ParentWin, Title);
+ true -> ok
+ end,
+
+ %% Window has now been created or may be re-used
+ update_window_from_options(Options),
+
+ gse:resize(?TOP_FRAME, ?WIN_WIDTH, ?WIN_HEIGHT),
+ gse:map(?TOP_WINDOW),
+
+ loop(#state{resize_frame=?TOP_FRAME, parent=Parent}).
+
+loop(State) ->
+ receive
+ {gs, _Id, destroy, _Data, _Arg} ->
+ State#state.parent ! {self(), {error,destroyed}};
+
+ {gs, ?TOP_WINDOW, configure, _Data, [W, H |_]} ->
+ gse:config(State#state.resize_frame,
+ [{width,W},{height,H}]), % repack
+ loop(State);
+
+ {gs, ok_button, click, _Data, _Arg} ->
+ Options = get_options_from_window(),
+ gse:unmap(?TOP_WINDOW),
+ State#state.parent ! {self(), Options};
+
+ {gs, cancel_button, click, _Data, _Arg} ->
+ gse:unmap(?TOP_WINDOW),
+ State#state.parent ! {self(), {error,cancelled}};
+
+ {gs, trace_spawn, click, _Data, [_Text,_,Value]} ->
+ group_radio(Value, trace_spawn_all, [trace_spawn_all,
+ trace_spawn_first]),
+ loop(State);
+
+ {gs, trace_link, click, _Data, [_Text,_,Value]} ->
+ group_radio(Value, trace_link_all, [trace_link_all,
+ trace_link_first]),
+ loop(State);
+
+ {gs, trace_in_window, click, _Data, _Arg} ->
+ lists:foreach(fun(X) -> gse:disable(X) end,
+ [trace_file, trace_file_browse]),
+ loop(State);
+
+ {gs, trace_to_file, click, _Data, [_Text,_,_Value]} ->
+ lists:foreach(fun(X) -> gse:enable(X) end,
+ [trace_file, trace_file_browse]),
+ loop(State);
+
+ {gs, trace_file_browse, click, _Data, _Arg} ->
+ Result = tool_utils:file_dialog([{type,save},
+ {file, "Untitled.log"}]),
+ case Result of
+ {error, _Reason} ->
+ loop(State);
+ {ok, Name,_State} ->
+ gse:config(trace_file, [{text, Name}]),
+ loop(State)
+ end
+ end.
+
+-define(LBLOPTS, [{justify,left}, {align,w}]).
+-define(BTNOPTS, [{justify,left}, {align,w}]).
+
+make_window(ParentWin, Title) ->
+
+ Font = pman_win:font(),
+
+ gse:named_window(?TOP_WINDOW, ParentWin, [{title,Title},
+ {configure,true},
+ {width, ?WIN_WIDTH},
+ {height, ?WIN_HEIGHT}]),
+
+ gse:named_frame(?TOP_FRAME, ?TOP_WINDOW,
+ [{bw,3},
+ {packer_x,[{stretch,1,175}, {stretch,1,175}]},
+ {packer_y,[{stretch,3},{stretch,2},{stretch,1}]}]),
+
+ F11 = gse:frame(?TOP_FRAME, [{bw,3},
+ {pack_xy,{1,1}},
+ {packer_x,[{stretch,1},
+ {stretch,20},
+ {stretch,2}]},
+ {packer_y,[{stretch,2},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1}]}]),
+
+ gse:label(F11,[{pack_xy,{2,1}},
+ {label,{text,"Trace output options:"}},
+ {font,Font} | ?LBLOPTS]),
+
+ gse:named_checkbutton(trace_send, F11,
+ [{pack_xy,{2,2}},
+ {label,{text,"Trace send"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_checkbutton(trace_receive, F11,
+ [{pack_xy,{2,3}},
+ {label,{text, "Trace receive"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_checkbutton(trace_functions,F11,
+ [{pack_xy,{2,4}},
+ {label,{text, "Trace functions"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_checkbutton(trace_events,F11,
+ [{pack_xy,{2,5}},
+ {label,{text, "Trace events"}},
+ {font,Font} | ?BTNOPTS]),
+
+ F21 = gse:frame(?TOP_FRAME, [{bw,3},
+ {pack_xy,{2,1}},
+ {packer_x,[{stretch,1},
+ {stretch,2},
+ {stretch,2},
+ {stretch,20},
+ {stretch,1}]},
+ {packer_y,[{stretch,2},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1}]}]),
+
+ gse:label(F21, [{pack_xy,{{2,4},1}},
+ {label,{text,"Inheritance options:"}},
+ {font,Font} | ?LBLOPTS]),
+
+ gse:named_checkbutton(trace_spawn, F21,
+ [{pack_xy,{{2,4},2}},
+ {data,trace_send},
+ {label,{text,"Inherit on spawn"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_radiobutton(trace_spawn_all, F21,
+ [{pack_xy,{{3,4},3}},
+ {group,spawn},
+ {data,trace_receive},
+ {label,{text, "All spawns"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_radiobutton(trace_spawn_first, F21,
+ [{pack_xy,{{3,4},4}},
+ {group,spawn},
+ {data,trace_receive},
+ {label,{text,"First spawn only"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_checkbutton(trace_link, F21,
+ [{pack_xy,{{2,4},6}},
+ {data,trace_send},
+ {label,{text,"Inherit on link"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_radiobutton(trace_link_all, F21,
+ [{pack_xy,{{3,4},7}},
+ {group,link},
+ {data,trace_receive},
+ {label,{text,"All links"}},
+ {font,Font} | ?BTNOPTS]),
+
+ gse:named_radiobutton(trace_link_first, F21,
+ [{pack_xy,{{3,4},8}},
+ {group,link},
+ {data,trace_receive},
+ {label,{text,"First link only"}},
+ {font,Font} | ?BTNOPTS]),
+
+ F12 = gse:frame(?TOP_FRAME, [{bw,3},
+ {pack_xy,{{1,2},2}},
+ {packer_x,[{stretch,1},
+ {stretch,5}, % Label
+ {stretch,1},
+ {stretch,10}, % Field
+ {stretch,1},
+ {stretch,5}, % Button
+ {stretch,1}]},
+ {packer_y,[{stretch,2},
+ {stretch,1},
+ {stretch,1},
+ {stretch,1}]}]),
+
+ gse:label(F12, [{pack_xy,{{2,6},1}},
+ {label,{text,"Trace output options:"}},
+ {font,Font} | ?LBLOPTS]),
+ gse:named_radiobutton(trace_in_window, F12,
+ [{pack_xy,{{2,6},2}},
+ {group, trace_dest},
+ {label,{text,"In window"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_radiobutton(trace_to_file, F12,
+ [{pack_xy,{2,3}},
+ {group, trace_dest},
+ {label,{text,"To file"}},
+ {font,Font} | ?BTNOPTS]),
+ gse:named_entry(trace_file, F12, [{pack_xy,{4,3}}, {font,Font}]),
+ gse:named_button(trace_file_browse, F12,
+ [{pack_xy,{6,3}},
+ {label,{text," Browse..."}},
+ {font,Font} | ?BTNOPTS]),
+
+ F13 = gse:frame(?TOP_FRAME, [{bw,3},
+ {pack_xy,{{1,2},3}},
+ {packer_x,[{stretch, 1},
+ {fixed, 60},
+ {stretch, 1},
+ {fixed, 60},
+ {stretch, 1}]},
+ {packer_y,[{stretch,1},
+ {fixed, 30},
+ {stretch,1}]}]),
+
+ gse:named_button(ok_button, F13, [{pack_xy,{2,2}},
+ {label,{text,"OK"}},
+ {font,Font}]),
+ gse:named_button(cancel_button, F13, [{pack_xy,{4,2}},
+ {label,{text,"Cancel"}},
+ {font,Font}]).
+
+update_window_from_options(Options) ->
+
+ %% Trace output
+ gse:config(trace_send, [{select,Options#trace_options.send}]),
+ gse:config(trace_receive,
+ [{select,Options#trace_options.treceive}]),
+ gse:config(trace_functions,
+ [{select,Options#trace_options.functions}]),
+ gse:config(trace_events, [{select,Options#trace_options.events}]),
+
+ %% Trace inheritance
+ case (Options#trace_options.inherit_on_all_spawn or
+ Options#trace_options.inherit_on_1st_spawn) of
+ true ->
+ gse:select(trace_spawn),
+ gse:config(trace_spawn_all,
+ [{select,Options#trace_options.inherit_on_all_spawn}]),
+ gse:config(trace_spawn_first,
+ [{select,Options#trace_options.inherit_on_1st_spawn}]);
+ false ->
+ lists:foreach(fun(X) -> gse:disable(X) end,
+ [trace_spawn_all,trace_spawn_first])
+ end,
+
+ case (Options#trace_options.inherit_on_all_link or
+ Options#trace_options.inherit_on_1st_link) of
+ true -> gse:select(trace_link),
+ gse:config(trace_link_all,
+ [{select,Options#trace_options.inherit_on_all_link}]),
+ gse:config(trace_link_first,
+ [{select, Options#trace_options.inherit_on_1st_link}]);
+ false ->
+ lists:foreach(fun(X) -> gse:disable(X) end,
+ [trace_link_all,trace_link_first])
+ end,
+
+ %% Trace ouput destinations
+ gse:config(trace_in_window,
+ [{select,(not Options#trace_options.to_file)}]),
+
+ gse:config(trace_to_file, [{select,Options#trace_options.to_file}]),
+ gse:config(trace_file, [{text,Options#trace_options.file}]),
+ case Options#trace_options.to_file of
+ true ->
+ ok;
+ false ->
+ lists:foreach(fun(X) -> gse:disable(X) end,
+ [trace_file, trace_file_browse])
+ end.
+
+get_options_from_window() ->
+ #trace_options{send = gse:read(trace_send,select),
+ treceive = gse:read(trace_receive,select),
+ functions = gse:read(trace_functions,select),
+ events = gse:read(trace_events,select),
+ inherit_on_1st_spawn = gse:read(trace_spawn_first,select),
+ inherit_on_all_spawn = gse:read(trace_spawn_all,select),
+ inherit_on_1st_link = gse:read(trace_link_first,select),
+ inherit_on_all_link = gse:read(trace_link_all,select),
+ to_file = gse:read(trace_to_file,select),
+ file = gse:read(trace_file,text)}.
+
+group_radio(Value, Default, GroupList) ->
+ case Value of
+ true ->
+ gse:select(Default),
+ lists:foreach(fun(X) -> gse:enable(X) end, GroupList);
+ false ->
+ lists:foreach(fun(X) -> gse:deselect(X) end, GroupList),
+ lists:foreach(fun(X) -> gse:disable(X) end, GroupList)
+ end.
+
+%%--read_from_file/(File)-----------------------------------------------
+%% Returns the options saved in File.
+%% If no options can be found, then the default options are
+%% returned.
+
+read_from_file(File) ->
+ case file:consult(File) of
+ {ok, [Term]} ->
+ if
+ is_record(Term, trace_options) ->
+ {ok, Term};
+ true ->
+ {error, "unexpected contents", #trace_options{}}
+ end;
+ {ok, _Terms} ->
+ {error, "unexpected contents", #trace_options{}};
+ {error, Tuple} when is_tuple(Tuple) -> % {Line,Mod,Term}
+ {error, "erroneous contents", #trace_options{}};
+ {error, _Posix} ->
+ %% The most probable reason is that the file does not
+ %% exist, this is not an error so we simply return
+ %% the default trace options instead
+ {ok, #trace_options{}}
+ end.
+
+%%--save_to_file(Options, File)-----------------------------------------
+
+save_to_file(Options, File) ->
+ case file:open(File, [write]) of
+ {ok, Fd} ->
+ {{Year,Month,Day},{H,M,S}} = calendar:local_time(),
+ io:format(Fd, "%%%~n", []),
+ io:format(Fd, "%%% File: ~s~n", [File]),
+ io:format(Fd, "%%% Date: ~w-~2..0w-~2..0w, ~2..0w:~2..0w:~2..0w~n",
+ [Year,Month,Day,H,M,S]),
+ io:format(Fd, "%%%~n", []),
+ io:format(Fd, "%%% This file was created by Pman. ~n", []),
+ io:format(Fd, "%%%~n", []),
+ io:format(Fd, "%%% DO NOT EDIT! ~n", []),
+ io:format(Fd, "%%%~n", []),
+ io:format(Fd, "%%%~n", []),
+ io:format(Fd, "~p.~n", [Options]),
+ file:close(Fd),
+ ok;
+ {error, Posix} ->
+ {error, file:format_error(Posix)}
+ end.
diff --git a/lib/pman/src/pman_options.hrl b/lib/pman/src/pman_options.hrl
new file mode 100644
index 0000000000..047b9866c3
--- /dev/null
+++ b/lib/pman/src/pman_options.hrl
@@ -0,0 +1,34 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+%%
+%% An options-record contains the return data from the option dialog.
+%%
+
+-record(trace_options, {send=true,
+ treceive=true,
+ functions=true,
+ events=true,
+ to_file=false,
+ file="",
+ inherit_on_1st_spawn=false,
+ inherit_on_all_spawn=true,
+ inherit_on_1st_link=false,
+ inherit_on_all_link=true}).
+
diff --git a/lib/pman/src/pman_process.erl b/lib/pman/src/pman_process.erl
new file mode 100644
index 0000000000..276407a0f1
--- /dev/null
+++ b/lib/pman/src/pman_process.erl
@@ -0,0 +1,317 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+%% Purpose : A front-end to the erlang:process_info() functions, that
+%% can handle processes on different nodes in a transparent
+%% way.
+%% Also some convenience functions for process info, as well
+%% as some application specific functions for process
+%% classification.
+%%----------------------------------------------------------------------
+
+-module(pman_process).
+
+-export([pinfo/1, pinfo/2,
+ r_processes/1,
+ function_info/1,
+ get_name/1, msg/1, reds/1, psize/1,
+ is_running/1,
+ is_pid_or_shell/1,
+ get_pid/1,
+ is_system_process/1,
+ is_hidden_by_module/2
+ ]).
+
+%% List of registered name that will make a prodcess a "SYSTEM"-process
+-define(SYSTEM_REG_NAMES,
+ [
+ %% kernel
+ application_controller,
+ erl_reply,
+ auth,
+ boot_server,
+ code_server,
+ disk_log_server,
+ disk_log_sup,
+ erl_prim_loader,
+ error_logger,
+ file_server_2,
+ fixtable_server,
+ global_group,
+ global_name_server,
+ heart,
+ inet_gethost_native,
+ inet_gethost_native_sup,
+ init,
+ kernel_config,
+ kernel_safe_sup,
+ kernel_sup,
+ net_kernel,
+ net_sup,
+ rex,
+ user,
+ os_server,
+ ddll_server,
+ erl_epmd,
+ inet_db,
+ pg2,
+
+ %% stdlib
+ timer_server,
+ rsh_starter,
+ take_over_monitor,
+ pool_master,
+ dets,
+
+ %% sasl
+ sasl_safe_sup, sasl_sup, alarm_handler, overload,
+ release_handler,
+
+ %% gs
+ gs_frontend
+ ]).
+
+%% List of module:function/arity calls that will make the caller a
+%% "SYSTEM"-process.
+%%
+-define(SYSTEM_INIT_CALLS,
+ [{application_master,init,4},
+ {application_master,start_it,4},
+ {inet_tcp_dist,accept_loop,2},
+ {net_kernel,ticker,2},
+ {supervisor_bridge,user_sup,1},
+ {user_drv,server,2},
+ {group,server,3},
+ {kernel_config,init,1},
+ {inet_tcp_dist,do_accept,6},
+ {inet_tcp_dist,do_setup,6},
+ {pman_main,init,2},
+ {pman_buf_printer,init,2},
+ {pman_buf_converter,init,2},
+ {pman_buf_buffer,init,1},
+ {gstk,init,1},
+ {gstk_port_handler,init,2},
+ {gstk,worker_init,1}
+ ]).
+
+%% List of module:function/arity calls that will make the executing
+%% process a "SYSTEM"-process.
+-define(SYSTEM_RUNNING_CALLS,
+ [{file_io_server,server_loop,1},
+ {global,loop_the_locker,1},
+ {global,collect_deletions,2},
+ {global,loop_the_registrar,0},
+ {gs_frontend,request,2},
+ {shell,get_command1,5},
+ {shell,eval_loop,3},
+ {io,wait_io_mon_reply,2},
+ {pman_module_info,loop,1},
+ {pman_options,dialog,3},
+ {pman_options,loop,1},
+ {pman_relay_server,loop,1},
+ {pman_shell,monitor_loop,1},
+ {pman_shell,safe_loop,2}
+ ]).
+
+%% pinfo(Pid) -> [{Item, Info}] | undefined
+%% pinfo(Pid, Item) -> Info | undefined
+%% A version of process_info/1 that handles pid on remote nodes as well.
+pinfo({_, Pid}) -> % Handle internal process format
+ pinfo(Pid);
+pinfo(Pid) when node(Pid)==node() ->
+ process_info(Pid);
+pinfo(Pid) ->
+ case rpc:call(node(Pid), erlang, process_info, [Pid]) of
+ {badrpc, _} -> undefined;
+ Res -> Res
+ end.
+
+pinfo({_, Pid}, Item) -> % Handle internal process format
+ pinfo(Pid, Item);
+pinfo(Pid, Item) when node(Pid)==node() ->
+ case process_info(Pid, Item) of
+ {Item, Info} -> Info;
+ "" -> ""; % Item == registered_name
+ undefined -> undefined
+ end;
+pinfo(Pid, Item) ->
+ case rpc:call(node(Pid), erlang, process_info, [Pid, Item]) of
+ {badrpc, _} -> undefined;
+ {Item, Info} -> Info;
+ "" -> ""; % Item == registered_name
+ undefined -> undefined
+ end.
+
+%% function_info(Pid) -> {M, F, A}
+%% Returns the initial function for the specified process.
+function_info(Pid) ->
+ case pinfo(Pid, current_function) of
+ {Module, Function, Arity} ->
+ {Module, Function, Arity};
+ undefined ->
+ {unknown, unknown, 0}
+ end.
+
+%% r_processes(Node) -> Pids
+%% Return a list of all processes at Node.
+%%
+%% If there is a problem with getting information from a remote
+%% node, an empty list is returned.
+r_processes(Node) ->
+ ordsets:from_list(r_processes1(Node)).
+
+r_processes1(Node) ->
+ if
+ Node==node() ->
+ processes();
+ true ->
+ case rpc:block_call(Node, erlang, processes, []) of
+ {badrpc, _} ->
+ [];
+ Pids -> Pids
+ end
+ end.
+
+%% is_running(Object) -> {true, {shell,Pid}} | {true, Pid} | false
+%% Object = {shell, Pid} | {link, Pid, ?} | Pid
+is_running({shell,Pid}) ->
+ case is_running(Pid) of
+ {true,Pid} ->
+ {true,{shell,Pid}};
+ false ->
+ false
+ end;
+is_running({link,Pid,_}) ->
+ is_running(Pid);
+is_running(Pid) ->
+ case is_pid_or_shell(Pid) of
+ true ->
+ case pinfo(Pid) of
+ undefined -> false;
+ _PInfo -> {true, Pid}
+ end;
+ false ->
+ false
+ end.
+
+%% is_pid_or_shell(Object) -> bool()
+%% Checks if the argument is an pid or a tuple {shell, Pid}.
+is_pid_or_shell({shell,Pid}) when is_pid(Pid) ->
+ true;
+is_pid_or_shell(Pid) when is_pid(Pid) ->
+ true;
+is_pid_or_shell(_) ->
+ false.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% get_pid/1 - returns the Pid of the object provided that
+%% it is a proper process specifier.
+%%
+%% Arguments:
+%% Object A process specifier
+%%
+%% Returns:
+%% The Pid.
+
+get_pid({shell,Pid}) ->
+ Pid;
+get_pid(Pid) when is_pid(Pid) ->
+ Pid.
+
+%% is_system_process(Pid) -> bool()
+%% Returns true if Pid is a "system process".
+%% This is a prototype version, use file configuration later.
+is_system_process(Pid) ->
+ catch is_system_process2(Pid).
+
+is_system_process2(Pid) ->
+
+ %% Test if the registered name is a system registered name
+ case pinfo(Pid, registered_name) of
+ undefined -> ignore;
+ "" -> ignore;
+ Name ->
+ case lists:member(Name, ?SYSTEM_REG_NAMES) of
+ true -> throw(true);
+ false -> ignore
+ end
+ end,
+
+ %% Test if the start specification is a "system start function"
+ MFAi = case pinfo(Pid, initial_call) of
+ {proc_lib, init_p, 5} ->
+ proc_lib:translate_initial_call(Pid); % {M,F,A} | Fun
+ Res -> Res % {M,F,A} | undefined
+ end,
+ case lists:member(MFAi, ?SYSTEM_INIT_CALLS) of
+ true -> throw(true);
+ false -> ignore
+ end,
+
+ %% Test if the running specification is a "system running function"
+ case pinfo(Pid, current_function) of
+ undefined -> false;
+ MFAc ->
+ lists:member(MFAc, ?SYSTEM_RUNNING_CALLS)
+ end.
+
+%% is_hidden_by_module(Pid, Modules) -> bool()
+%% Checks if Pid is to be hidden because it executes code from one
+%% of Modules
+is_hidden_by_module(Pid, Modules) ->
+ case pinfo(Pid, current_function) of
+ {Module, _Function, _Arity} ->
+ lists:member(Module, Modules);
+ undefined -> false
+ end.
+
+%% get_name(Pid) -> Name | " "
+%% Returns the registered name of a process, if any, or " " otherwise.
+get_name(Pid) ->
+ case pinfo(Pid, registered_name) of
+ undefined -> " ";
+ "" -> " ";
+ Name -> Name
+ end.
+
+%% msg(Pid) -> int()
+msg(Pid) ->
+ case pinfo(Pid, messages) of
+ undefined -> 0;
+ Msgs -> length(Msgs)
+ end.
+
+%% reds(Pid) -> int()
+reds(Pid) ->
+ case pinfo(Pid, reductions) of
+ undefined -> 0;
+ Reds -> Reds
+ end.
+
+%% psize(Pid) -> int()
+%% Returns the total process size (stack + heap).
+psize(Pid) ->
+ Stack = pinfo(Pid, stack_size),
+ Heap = pinfo(Pid, heap_size),
+ case {Heap, Stack} of
+ {undefined, undefined} -> 0;
+ {undefined, Sz} -> Sz;
+ {Sz, undefined} -> Sz;
+ {Sz0, Sz1} -> Sz0 + Sz1
+ end.
diff --git a/lib/pman/src/pman_relay.erl b/lib/pman/src/pman_relay.erl
new file mode 100644
index 0000000000..289765492f
--- /dev/null
+++ b/lib/pman/src/pman_relay.erl
@@ -0,0 +1,127 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%----------------------------------------------------------------------
+%% Purpose : Interface function to relay calls (esp. trace calls)
+%% to processes on other nodes. Some of the calls
+%% are conditionally relayed.
+%%----------------------------------------------------------------------
+
+-module(pman_relay).
+
+%%-compile(export_all).
+-export([start/1,
+ ok_to_trace/1,
+ trac/3]).
+
+
+-include("assert.hrl").
+
+%% --------------------------------------------------------------
+%% DISTRIBUTION
+%% --------------------------------------------------------------
+%% (???) Process dictionary alert!!!
+%%
+%% Since we are not allowed to do erlang:trace/3 on remote
+%% processe we create a help process at the remote node to
+%% do the job for us
+%% ---------------------------------------------------------------
+
+start(P) when is_pid(P), node(P)/=node() ->
+
+ %% Remote supervision, relaying necessary
+
+ put(relay, spawn_link(node(P), pman_relay_server, init, [self()]));
+
+
+start(_) ->
+
+ %% Local supervision, no relaying
+
+ ignore.
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% ok_to_trace/1 - Tests wheter we can actually start tracing
+%% a process.
+%%
+%% Arguments:
+%% Pid Pid of the process to trace (on local or remote node)
+%%
+%% Returns
+%% true If it is OK to trace the process
+%% false If the process is already traced, or some other
+%% condition prevents it from being traced.
+
+ok_to_trace(Pid) when node(Pid) == node()->
+
+ %% Local trace, no relaying
+
+ case catch erlang:trace(Pid, false, [send]) of
+ 1 ->
+ true;
+ _Otherwise ->
+ false
+ end;
+ok_to_trace(Pid) ->
+
+ %% Remote trace, relaying necessary
+
+ PidRelay = get(relay),
+ PidRelay ! {ok_to_trace, self(), Pid},
+ receive
+ {ok_to_trace, PidRelay} ->
+ true;
+ {not_ok_to_trace, PidRelay} ->
+ false;
+ _Otherwise ->
+ ?ALWAYS_ASSERT("Unexpected message from relay process")
+ after
+ 5000 ->
+ false
+ end.
+
+
+
+
+
+
+%% ---------------------------------------------------------------
+%% Possibly send a request to do tracing to a remote node.
+%% ---------------------------------------------------------------
+
+trac(Pid, How, Flag) when node(Pid) == node() ->
+
+ %% Local trace, no relaying necessary
+
+
+ case catch erlang:trace(Pid, How, Flag) of
+ 1 -> ok;
+ _ -> pman_win:format("** Illegal trace request ** \n", [])
+ end;
+
+trac(Pid, How, Flag) ->
+
+
+
+ %% Remote trace, relaying necessary
+
+ get(relay) ! {self(), erlang, trace, [Pid, How, Flag]}.
+
diff --git a/lib/pman/src/pman_relay_server.erl b/lib/pman/src/pman_relay_server.erl
new file mode 100644
index 0000000000..2fcbb663bc
--- /dev/null
+++ b/lib/pman/src/pman_relay_server.erl
@@ -0,0 +1,57 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%%----------------------------------------------------------------------
+%%% Purpose : Relay server code.
+%%%----------------------------------------------------------------------
+
+-module(pman_relay_server).
+
+%%-compile(export_all).
+-export([init/1]).
+
+
+
+init(P) ->
+ process_flag(trap_exit, true),
+
+ loop(P).
+
+loop(P) ->
+ receive
+ {ok_to_trace, PidSender, PidToTrace} ->
+ case catch erlang:trace(PidToTrace, false, [send]) of
+ 1 ->
+ PidSender ! {ok_to_trace, self()},
+ loop(P);
+ _Otherwise ->
+ PidSender ! {not_ok_to_trace, self()}
+ end;
+
+ {P, M,F,A} ->
+ case catch apply(M, F, A) of
+ 1 -> ok;
+ _Other -> P ! {print, "** Illegal trace request **\n", []}
+ end,
+ loop(P);
+ {'EXIT', P, _Reason} ->
+ exit(normal);
+ Other -> %% Here is the normal case for trace i/o
+ P ! Other,
+ loop(P)
+ end.
diff --git a/lib/pman/src/pman_shell.erl b/lib/pman/src/pman_shell.erl
new file mode 100644
index 0000000000..0b13890460
--- /dev/null
+++ b/lib/pman/src/pman_shell.erl
@@ -0,0 +1,823 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+%% ---------------------------------------------------------------
+%% Purpose: Create a trace window with process
+%% information or a help window with information
+%% about pman.
+%%
+%% ---------------------------------------------------------------
+
+-module(pman_shell).
+
+%% ---------------------------------------------------------------
+%% The user interface exports
+%% ---------------------------------------------------------------
+
+-export([start_list/3,
+ start/2,
+ start/1,
+ find_shell/0]).
+
+%% ---------------------------------------------------------------
+%% Includes
+%% ---------------------------------------------------------------
+-include("assert.hrl").
+-include("pman_options.hrl").
+-include("pman_buf.hrl").
+
+
+%% ---------------------------------------------------------------
+%% Internal record declarations
+%% ---------------------------------------------------------------
+-record(pman_shell,{win,
+ editor,
+ pid,
+ buffer,
+ father,
+ shell_flag, % boolean, true for shell
+ trace_options, % Keeps trace options
+ db}). % DB for trace windows
+
+
+%%
+%% Constants
+%%
+
+-define (PMAN_DB, pman_db). % The pman db for trace windows
+
+
+
+%% ---------------------------------------------------------------
+%% start/1, start/2
+%%
+%% Starts a new trace shell process.
+%%
+%% start(Pid, DefaultOptions)
+%% Pid The Pid of the process to trace
+%% DefaultOptions The default trace options passed along from
+%% the calling process.
+%%
+%%
+%% start(Pid)
+%% Pid The Pid of the process to trace
+%%
+%% start(Pid) starts without using any default options except for those
+%% hardwired into the application. (See pman_options.hrl).
+%%
+%%
+%% Return: Both functions return a process id
+%% ---------------------------------------------------------------
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start_list/3 - Starts a trace window for each of the processes
+%% in the list
+
+start_list(LIPid, Father, Options) ->
+ StartFun = fun(Pid) ->
+ start({Pid,Father}, Options)
+ end,
+ lists:foreach(StartFun, LIPid).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% start/1 - Starts a trace window for the specified Pid.
+%%
+
+start(Pid) ->
+ start(Pid, #trace_options{}).
+
+%%
+%% start/2
+%%
+
+start(Pid,DefaultOptions) when is_pid(Pid) ->
+ start({Pid,self()}, DefaultOptions);
+
+start(Var,DefaultOptions) ->
+ Db = db_start(),
+ spawn_link(fun() -> internal(Var, DefaultOptions, Db) end).
+
+%% ---------------------------------------------------------------
+%% Initialize the enviroment for tracing/viewing Object
+%%
+%% Object can either be {shell,Shell} or a Pid.
+%% The main loop is then called, which handles trace and event
+%% requests. The window dies whenever Supervisor dies, while
+%% message windows die whenever their parent dies.
+%% ---------------------------------------------------------------
+
+internal({Object,Supervisor}, DefaultOptions, Db) ->
+
+ %% (???) This call will cause minor problems when the window has been
+ %% invoked with proc/1 from for instance the shell. The shell
+ %% does not handle the exit-signals, so it will exit
+ %% when the window is exited.
+
+
+ %% First check that no other process is tracing the process we want
+ %% to trace. There is no well defined way of doing this, so the
+ %% code below is used instead. (???)
+
+ pman_relay:start(Object), %(???) Uses proc. dict.
+
+ Pid = pman_process:get_pid(Object),
+
+ case pman_relay:ok_to_trace(Pid) of
+
+ %% Tracing cannot be performed on the specified process
+
+ false ->
+ T = lists:flatten(io_lib:format("ERROR: Process ~p is already being~ntraced by some other process.~nOr there may be a problem communicating with it.",[Pid])),
+ tool_utils:notify(gs:start(),T),
+ exit(quit);
+
+ %% Tracing can be performed, go ahead!
+
+ true ->
+
+ case db_insert_key (Db, Pid) of
+ true ->
+
+ link(Supervisor),
+ process_flag(trap_exit, true),
+
+ case catch pman_win:window(Object) of
+ {'EXIT', badrpc} ->
+ T = "ERROR: Could not access node",
+ pman_win:dialog_window(gs:start(),T);
+ {'EXIT', dead} ->
+ T = "ERROR: The process is dead",
+ pman_win:dialog_window(gs:start(),T);
+ {'EXIT',_W} ->
+ T = "ERROR: Untracable process \n(unexpected EXIT reason)",
+ pman_win:dialog_window(gs:start(),T);
+ {Win, Ed} ->
+ init_monitor_loop(Win,
+ Ed,
+ Object,
+ Supervisor,
+ DefaultOptions,
+ Db)
+ end;
+
+ false ->
+ T = lists:flatten(io_lib:format("ERROR: Process ~p is already being~ntraced by some other process.",[Pid])),
+ tool_utils:notify(gs:start(),T),
+ exit(quit);
+
+ Error ->
+ Error
+ end
+
+ end.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% init_monitor_loop/5
+
+init_monitor_loop(Win,Ed,Object,Supervisor, DefaultOptions, Db) ->
+
+ process_flag(priority, max),
+
+ %% Most default options come from the main window. Now we must set
+ %% the default file name to something that is shows what process
+ %% is being traced.
+
+ %% Find out an appropriate file name to write the trace output
+ %% to if the output should go to a file.
+
+ FileName = case pman_process:is_pid_or_shell(Object) of
+ true ->
+ default_file_name(pman_process:get_pid(Object));
+ false ->
+ "NoName"
+ end,
+
+ Buff = pman_buf:start(Ed, FileName),
+
+ case pman_process:is_running(Object) of
+
+ %% We are tracing a shell process.
+ {true,{shell,Pid}} ->
+ safe_link(Pid),
+ NewDefaultOptions =
+ DefaultOptions#trace_options{file=FileName},
+ perform_option_changes(Pid, NewDefaultOptions, Buff),
+ monitor_loop(#pman_shell{win=Win, editor=Ed, pid=Pid, buffer=Buff,
+ father = Supervisor,
+ shell_flag = true,
+ trace_options = NewDefaultOptions,
+ db = Db});
+
+ %% We are tracing an ordinary process.
+ {true,Pid} ->
+ safe_link(Pid),
+ NewDefaultOptions =
+ DefaultOptions#trace_options{file=FileName},
+ perform_option_changes(Pid, NewDefaultOptions, Buff),
+ monitor_loop(#pman_shell{win=Win, editor=Ed, pid=Pid, buffer=Buff,
+ father = Supervisor,
+ shell_flag = false,
+ trace_options = NewDefaultOptions,
+ db = Db});
+
+ %% The process being traced is dead.
+ false ->
+ monitor_loop(#pman_shell{win=Win, editor=Ed, pid=nopid,
+ buffer=Buff,
+ father = Supervisor,
+ shell_flag = false,
+ trace_options= DefaultOptions,
+ db = Db})
+ end.
+
+%% ----------------------------------------------------------------
+%% What is the Pid of the shell on our node?
+%% ----------------------------------------------------------------
+
+find_shell() ->
+ case shell:whereis_evaluator() of
+ undefined -> % noshell
+ noshell;
+ Pid ->
+ Pid
+ end.
+
+%% ---------------------------------------------------------------
+%% Functions called in case of an exit message
+%% ---------------------------------------------------------------
+
+clean_up(Win, Buff,Pid) ->
+
+ %% (???) Unlinks the traced process, but since we are using a safe link
+ %% it is probably unnecessary.
+
+ safe_unlink(Pid),
+
+ %% Kill helper processes
+
+ exit(Buff#buffer.converter, topquit),
+ exit(Buff#buffer.buffer, topquit),
+
+ gs:destroy(Win).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% exit_cmd/3 - Takes care of the necessary details when
+%% a linked process terminates.
+
+
+exit_cmd(Pid,_Reason, State) ->
+ case State#pman_shell.shell_flag of
+
+ %% This clause handles the case when a shell process dies.
+ %% Since it is restarted and the intention is to continue tracing
+ %% the restarted shell process, we need to handle it separately by
+ %% finding the new shell process.
+ true ->
+
+ NewShell = find_shell(),
+ safe_link(NewShell),
+ pman_relay:start(NewShell),
+
+ %% Update the window title with the new PID
+ Title = pman_win:title({shell, NewShell}),
+ Win = State#pman_shell.win,
+ gse:config(Win,[{title,Title}]),
+
+ pman_relay:trac(NewShell, true, flags()),
+
+ B = State#pman_shell.buffer,
+ B#buffer.converter!{raw,[{shell_died, Pid, NewShell}]},
+
+
+
+ State#pman_shell{pid=NewShell};
+
+ %% This clause handles the case when a traced process that is
+ %% not a shell process dies.
+ false ->
+
+ B = State#pman_shell.buffer,
+ B#buffer.converter!{raw,[{died, Pid}]},
+
+ lists:foreach(fun(X) -> gse:disable(X) end,
+ ['Options',
+ 'Kill',
+ 'LinksMenu']),
+ State#pman_shell{pid=undefined}
+ end.
+
+flags() ->
+ [send, 'receive', call, procs,
+ set_on_spawn, set_on_first_spawn, set_on_link, set_on_first_link].
+
+options_to_flaglists(Options) ->
+ AssocList =
+ [{Options#trace_options.send, send},
+ {Options#trace_options.treceive, 'receive'},
+ {Options#trace_options.inherit_on_1st_spawn, set_on_first_spawn},
+ {Options#trace_options.inherit_on_all_spawn, set_on_spawn},
+ {Options#trace_options.inherit_on_1st_link, set_on_first_link},
+ {Options#trace_options.inherit_on_all_link, set_on_link},
+ {Options#trace_options.events, procs},
+ {Options#trace_options.functions,call}],
+
+ TrueFun = fun ({Option,Flag}) ->
+ case Option of
+ true -> Flag;
+ _Otherwise -> false
+ end
+ end,
+ TrueFlags = mapfilter(TrueFun, AssocList),
+
+ FalseFun = fun ({Option,Flag}) ->
+ case Option of
+ false -> Flag;
+ _Otherwise -> false
+ end
+ end,
+ FalseFlags = mapfilter(FalseFun, AssocList),
+ {TrueFlags,FalseFlags}.
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% mapfilter/2 - Combines the functionality of lists:map and
+%% lists:filter. mapfilter applies the function argument to
+%% each element in the list. All returned values that are
+%% not false will occur in the resulting list.
+%%
+%% Arguments:
+%% Fun A fun that takes one argument
+%% List A list. Each element will become an argument to Fun.
+%%
+%% Returns:
+%% A list of all results from the map operation that are not false.
+%%
+
+mapfilter(Fun,[E|Es]) ->
+ case apply(Fun,[E]) of
+ false ->
+ mapfilter(Fun,Es);
+ Value -> [Value | mapfilter(Fun,Es)]
+ end;
+mapfilter(_Fun, []) -> [].
+
+
+
+perform_option_changes(Pid,Options,Buffer) ->
+
+ %% Notify the trace output functionality
+ %% if the destination is supposed to go to a file...
+
+ case Options#trace_options.to_file of
+ true ->
+ FName = Options#trace_options.file,
+ Buffer#buffer.converter!{file,FName};
+ false ->
+ done
+ end,
+
+ %%...then set the trace flags of the traced process
+
+ {OnFlags, OffFlags} = options_to_flaglists(Options),
+ case catch begin
+
+ %% (???) Note that the following calls cannot actually fail
+ %% This may be a problem. And the catch appears unnecessary
+ %% However, it may become necessary to let the
+ %% pman_relay:trac/3 function retrun appropriate values.
+ pman_relay:trac(Pid,true, OnFlags),
+ pman_relay:trac(Pid,false, OffFlags)
+ end of
+ true ->
+ ok;
+ _ -> pman_win:format("** Illegal trace request ** \n", [])
+ end.
+
+
+
+
+
+
+%% ---------------------------------------------------------------
+%% Take care of the command executed by the user.
+
+execute_cmd(Cmd,Shell_data) ->
+ Window = Shell_data#pman_shell.win,
+ Editor = Shell_data#pman_shell.editor,
+ Shell = Shell_data#pman_shell.pid,
+ Buffer = Shell_data#pman_shell.buffer,
+ TraceOptions = Shell_data#pman_shell.trace_options,
+
+ case Cmd of
+ 'Close' ->
+ db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
+ clean_up(Window, Buffer, Shell),
+ exit(quit);
+ 'Destroy' ->
+ db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
+ exit(Buffer#buffer.buffer,topquit),
+ safe_unlink(Shell),
+ exit(Buffer#buffer.converter,topquit),
+ exit(Buffer#buffer.buffer,topquit),
+ exit(quit);
+
+ 'Clear' when is_pid(Shell) ->
+ New_buffer = pman_buf:clear(Buffer,pman_win:display(Shell),
+ TraceOptions#trace_options.file),
+ Shell_data#pman_shell{buffer = New_buffer};
+ 'Save buffer' ->
+ DefaultFile = "Pman_buffer." ++ default_file_name(Shell),
+ Result = tool_utils:file_dialog([{type,save},
+ {file,DefaultFile}]),
+ case Result of
+ {ok, UserFile, _State} ->
+ Buffer#buffer.buffer!{save_buffer,UserFile};
+ {error,_Reason} ->
+ true
+ end,
+ Shell_data;
+ 'Help' ->
+ HelpFile = filename:join([code:lib_dir(pman), "doc", "html", "index.html"]),
+ tool_utils:open_help(gs:start([{kernel, true}]), HelpFile),
+ Shell_data;
+ 'Kill' when is_pid(Shell) ->
+ exit(Buffer#buffer.converter,killed),
+ exit(Buffer#buffer.buffer,killed),
+ lists:foreach(fun(X) -> gse:disable(X) end,
+ ['TraceMenu',
+ 'Clear']),
+ catch exit(Shell, kill),
+ Shell_data#pman_shell{pid = undefined};
+ 'All Links' when is_pid(Shell) ->
+ LIPid = pman_process:pinfo(Shell, links),
+ ?ALWAYS_ASSERT("Just a brutal test"),
+ start_list(LIPid,
+ Shell_data#pman_shell.father,
+ Shell_data#pman_shell.trace_options),
+ Shell_data;
+ 'Module' when is_pid(Shell) ->
+ {ModuleName,_,_} = pman_process:function_info(Shell),
+ pman_module_info:start(ModuleName),
+ Shell_data;
+ 'Options' when is_pid(Shell) ->
+ case pman_options:dialog(Window,
+ "Trace Options for Process",
+ TraceOptions) of
+ {error, _Reason} ->
+ Shell_data;
+ Options ->
+ perform_option_changes(Shell, Options, Buffer),
+ Shell_data#pman_shell{trace_options=Options}
+ end;
+
+ {trac,Choice,Bool} when is_pid(Shell) ->
+ pman_relay:trac(Shell, Bool, [Choice]),
+ Shell_data;
+
+
+ {configure,{X,Y}} ->
+ configure (Editor, X, Y),
+ Shell_data;
+
+ Pid when is_pid(Pid) ->
+ pman_shell:start({Pid, Shell_data#pman_shell.father},
+ Shell_data#pman_shell.trace_options),
+ Shell_data;
+ _Other ->
+ ?ALWAYS_ASSERT("Received unexpected event"),
+ Shell_data
+ end.
+
+
+default_file_name(Shell) when is_pid(Shell) ->
+ [A,B,C] = string:tokens(pid_to_list(Shell),[$.,$<,$>]),
+ "pman_trace." ++ A ++ "_" ++ B ++ "_" ++ C;
+default_file_name(_OTHER) ->
+ "shell".
+
+
+
+
+
+%% Key accellerators
+
+key(e) -> 'Clear';
+key(s) -> 'Save buffer';
+key(c) -> 'Close';
+key(a) -> 'All';
+key(r) -> 'Reset';
+key(m) -> 'Module';
+key(l) -> 'All Links';
+key(k) -> 'Kill';
+key(h) -> 'Help';
+key(z) -> 'Close';
+key(O) -> O.
+
+
+
+%% ---------------------------------------------------------------
+%% The main loop takes care of data coming in from the traces, as
+%% well as exit signals from proceses we are monitoring. Events
+%% caused by the user or window manager are also handled here.
+%% ---------------------------------------------------------------
+
+
+monitor_loop(Shell_data) ->
+ receive
+
+ %% WM destroy
+ {gs,_Window,destroy,[],[]} -> %%Avoid links menus
+ execute_cmd('Destroy', Shell_data);
+
+
+ %% Handle EXIT signal from parent process
+ {'EXIT', _Pid, topquit} ->
+ clean_up(Shell_data#pman_shell.win,
+ Shell_data#pman_shell.buffer,
+ Shell_data#pman_shell.pid),
+ exit(topquit);
+
+ %% (???) Ignore "stray" EXIT signal from converter
+ {'EXIT', _Pid, win_killed} ->
+ monitor_loop(Shell_data);
+
+
+ %% Handle EXIT signal from safely linked Pid
+ %% This is received when a traced process dies.
+ {'SAFE_EXIT', Pid, Reason} ->
+ New_Shell_data = exit_cmd(Pid, Reason,Shell_data ),
+ monitor_loop(New_Shell_data);
+
+
+ %% Handle EXIT signal from processes where we expect
+ %% some EXIT signals, such as the file_dialog opened, and possibly
+ %% others.
+
+ {'EXIT', _Pid, _Reason} ->
+ monitor_loop(Shell_data);
+
+ %% Handle incoming trace messages
+ Message when is_tuple(Message) , element(1,Message) == trace->
+ {L, Suspended} = collect_tracs([Message]),
+ Buffer = Shell_data#pman_shell.buffer,
+ Buffer#buffer.converter!{raw,L},
+ lists:foreach(fun(P) -> erlang:resume_process(P) end, Suspended),
+ monitor_loop(Shell_data);
+
+
+ %% All other messages on the form {...,...,...}
+ Message when is_tuple(Message) ->
+ do_link_stuff(Shell_data),
+
+ New_Shell_data = process_gs_event(Message,Shell_data),
+ monitor_loop(New_Shell_data);
+
+ %% Catch all for unexpected messages
+ _Anything ->
+ ?ALWAYS_ASSERT("Received unexpected event"),
+ monitor_loop(Shell_data)
+
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% process_event/1 - Error handling wrapper for gs_cmd
+
+process_gs_event(Message, Shell_data) ->
+ case catch gs_cmd(Message,Shell_data) of
+
+ %%
+ %% Error exits from gs_cmd
+
+ {'EXIT', badrpc} ->
+ Text = "\nERROR: Could not access node",
+ pman_win:msg_win(Text),
+ Shell_data;
+ {'EXIT', dead} ->
+ Text = "\nERROR: The process is dead",
+ pman_win:msg_win(Text),
+ Shell_data;
+
+ %% A controlled application initiated termination
+ {'EXIT', quit} ->
+ db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
+ exit(quit);
+
+
+ {'EXIT',Reason} ->
+ db_delete_key (Shell_data#pman_shell.db, Shell_data#pman_shell.pid),
+ io:format("Debug info, Reason: ~p~n",[Reason]),
+ ?ALWAYS_ASSERT("Unexpected EXIT reason"),
+ exit({unexpected_EXIT_reason,Reason});
+
+ %%
+ %% "Proper" exits from gs_cmd
+
+ New_Shell_data ->
+ New_Shell_data
+ end.
+
+
+
+gs_cmd(Cmd, Shell_data) ->
+ case Cmd of
+
+ %%User Command
+ {gs, Command, click, _Data, _Args} ->
+ execute_cmd(Command,Shell_data);
+
+ %%Key accellerator
+ {gs,_Window,keypress,_D,[Key,_,0,1]} ->
+ execute_cmd(key(Key),Shell_data);
+
+ %%Window Resize
+ {gs,_Window,configure,_,[X,Y|_]} ->
+ execute_cmd({configure,{X,Y}},Shell_data);
+
+
+ {gs, _Object, _Event, _Data, _Args} ->
+ ?ALWAYS_ASSERT("Unhandled gs event"),
+ Shell_data
+
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% (???) do_link_stuff/1 - I have no clue.
+%%
+
+do_link_stuff(Shell_data) ->
+
+ %% This appears to be code to execute for adding
+ %% dynamic links menus.
+
+ case Shell_data#pman_shell.pid of
+ undefined ->
+ ok;
+ Pid ->
+ case pman_process:pinfo(Pid, links) of
+ Links when is_list(Links) ->
+ pman_win:links_menus(Links);
+ undefined ->
+ ok
+ end
+ end.
+
+
+%% (???) Process dictionary used to safe Pid-Pid pairs.
+%%
+%% safe_link/1 - Spawns a process, that links to the Pid, and sends
+%% a message to the caller when the linked process dies.
+%%
+%% Since we (think we) need to link to the traced process, we want
+%% to do it in a way that has the smallest possible risk. The process
+%% that links to the Pid is small and simple, which is safer than if
+%% the calling process would link directly to the Pid.
+
+safe_link(Pid) when is_pid(Pid) ->
+ Self = self(),
+ PidSafe = spawn_link(fun() -> safe_init(Self, Pid) end),
+ put(Pid, PidSafe).
+
+
+%% safe_unlink/1 - Removes a safe link
+%%
+
+safe_unlink(Pid) when is_pid(Pid) ->
+ PidSafe = get(Pid),
+ PidSafe ! {unlink, self(), Pid},
+ erase(Pid);
+
+safe_unlink(_Anything)->
+ true.
+
+%% safe_init/2 - Initialize a simple receive loop that controls safe linking
+%% to application processes.
+%%
+safe_init(Caller, Pid) ->
+
+ process_flag(trap_exit, true),
+ link(Pid),
+
+ safe_loop(Caller, Pid).
+
+
+%% safe_loop/2 - Simply waits for an exit signal from the linked Pid,
+%% all other messages are disregarded.
+%%
+
+
+safe_loop(Caller, Pid) ->
+ receive
+ %% Linked process dies
+ {'EXIT' , Pid, Reason} ->
+ Caller ! {'SAFE_EXIT', Pid, Reason};
+
+ %% Caller dies
+ {'EXIT', Caller, _Reason} ->
+ unlink(Pid);
+
+
+ %% Unlink request
+ {unlink, Caller, Pid} ->
+ unlink(Pid);
+
+ %% Ignore everything else
+ _Anything ->
+ safe_loop(Caller, Pid)
+ end.
+
+
+
+configure (Editor, W, H) ->
+ gs:config (Editor, [{width, W - 3},
+ {height, H - 40}]).
+
+
+
+
+%%% The DB is used to avoid multiple trace windows
+%%% of the same process.
+
+%%% db_start /0
+%%%
+
+db_start() ->
+ case ets:info(?PMAN_DB) of
+ undefined -> ets:new(?PMAN_DB, [public, named_table]);
+ _ -> ?PMAN_DB
+ end.
+
+
+
+%%% db_insert_key /2
+%%%
+
+db_insert_key (Db, Pid) ->
+ case ets:lookup (Db, Pid) of
+ [] ->
+ case catch ets:insert (Db, {Pid}) of
+ true ->
+ true;
+
+ _Error ->
+ error_insert_db
+ end;
+
+ _already_exists ->
+ false
+ end.
+
+
+
+%%% db_delete_key /2
+%%%
+
+db_delete_key (Db, Pid) ->
+ ets:delete (Db, Pid).
+
+
+%% Function to collect all trace messages in the receive queue.
+%% Returns: {Messages,SuspendedProcesses}
+
+collect_tracs(Ack) -> collect_tracs(Ack, ordsets:new()).
+
+collect_tracs(Ack, Procs) ->
+ receive
+ Trac when is_tuple(Trac), element(1, Trac) == trace ->
+ P = suspend(Trac, Procs),
+ collect_tracs([Trac | Ack], P)
+ after 0 ->
+ {lists:reverse(Ack), ordsets:to_list(Procs)}
+ end.
+
+suspend({trace,From,call,_Func}, Suspended) when node(From) == node() ->
+ case ordsets:is_element(From, Suspended) of
+ true -> Suspended;
+ false ->
+ case (catch erlang:suspend_process(From)) of
+ true ->
+ ordsets:add_element(From, Suspended);
+ _ ->
+ Suspended
+ end
+ end;
+suspend(_Other, Suspended) -> Suspended.
diff --git a/lib/pman/src/pman_tool.erl b/lib/pman/src/pman_tool.erl
new file mode 100644
index 0000000000..1d33fb9764
--- /dev/null
+++ b/lib/pman/src/pman_tool.erl
@@ -0,0 +1,145 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(pman_tool).
+
+%% Listbox selection window
+
+-export([select/3]).
+
+-record(state, {topwin,
+ frame,
+ listbox}).
+
+%% Constants
+-define(WIN_WIDTH, 350).
+-define(WIN_HEIGHT, 350).
+
+select(Win, Title, Choices) ->
+ Self = self(),
+ Pid = spawn_link(fun() -> init(Self, Win, Title, Choices) end),
+ receive
+ {Pid, Result} ->
+ Result
+ end.
+
+init(Pid, Win, Title, Choices) ->
+
+ %% Create window
+ State = create_window(Win, Title, Choices),
+
+ gse:map(State#state.topwin),
+
+ %% enter event loop
+ loop(Pid, Choices, State).
+
+loop(Pid, Choices, State) ->
+ receive
+ {gs, _, destroy, _Data, _Args} ->
+ Pid ! {self(), cancelled};
+ {gs, _, configure, _Data, [W, H|_]} ->
+ gse:resize(State#state.frame, W, H),
+ loop(Pid, Choices, State);
+ {gs, _, click, ok, _Args} ->
+ case gs:read(State#state.listbox, selection) of
+ [] ->
+ Pid ! {self(), cancelled};
+ Indices ->
+ Selection = selection(Indices, Choices),
+ Pid ! {self(), Selection}
+ end;
+ {gs, _, click, cancel, _Args} ->
+ Pid ! {self(), cancelled};
+ {gs, Obj, doubleclick, _Data, _Args} ->
+ self() ! {gs, Obj, click, ok, []},
+ loop(Pid, Choices, State);
+ _GSEvent ->
+ loop(Pid, Choices, State)
+ end.
+
+selection(Indices, Choices) ->
+ selection(0, Indices, Choices).
+
+selection(I, [I|Is], [{Val,_Str}|Vals]) ->
+ [Val | selection(I+1, Is, Vals)];
+selection(I, [I|Is], [Val|Vals]) ->
+ [Val | selection(I+1, Is, Vals)];
+selection(_I, [], _Vals) ->
+ [];
+selection(I, Is, [_Val|Vals]) ->
+ selection(I+1, Is, Vals).
+
+create_window(Win, Title, Choices) ->
+ Font = pman_win:font(Win),
+
+ %% Top window and a frame that covers it entirely, to allow
+ %% usage of the packer for geometry management.
+ Topwin = gse:window(Win, [{width, ?WIN_WIDTH},
+ {height,?WIN_HEIGHT},
+ {configure, true},
+ {title, Title}]),
+ Frame = gse:frame(Topwin, [{packer_x,[{stretch,1},
+ {stretch,1}]},
+ {packer_y,[{stretch,1},
+ {stretch,5},
+ {stretch,1}]}]),
+
+ %% Caption above the list of items
+ CaptionTxt = "Select one or more of the following:",
+ gse:label(Frame, [{pack_x,{1,2}},
+ {pack_y,{1,1}},
+ {label,{text,CaptionTxt}}, {font,Font}]),
+
+ %% List of selectable items
+ Listbox = gse:listbox(Frame, [{pack_x,{1,2}},
+ {pack_y,{2,2}},
+ {selectmode,multiple},
+ {doubleclick, true},
+ {font,Font},
+ {items, str_choices(Choices)}]),
+
+ %% OK and Cancel buttons in a separate frame.
+ F13 = gse:frame(Frame, [{bw,1},
+ {pack_xy,{{1,2},3}},
+ {packer_x,[{stretch,1},
+ {fixed, 60},
+ {stretch,1},
+ {fixed, 60},
+ {stretch,1}]},
+ {packer_y,[{stretch,1},
+ {fixed, 30},
+ {stretch,1}]}]),
+
+ gse:button(F13, [{pack_xy,{2,2}},
+ {label,{text,"OK"}}, {font,Font},
+ {data,ok}]),
+ gse:button(F13, [{pack_xy,{4,2}},
+ {label,{text,"Cancel"}}, {font,Font},
+ {data,cancel}]),
+
+ gse:resize(Frame, ?WIN_WIDTH, ?WIN_HEIGHT),
+ #state{topwin=Topwin, frame=Frame, listbox=Listbox}.
+
+str_choices(Choices) ->
+ lists:map(
+ fun({Val, Str}) ->
+ lists:flatten(io_lib:format("~p: ~s", [Val, Str]));
+ (Term) ->
+ lists:flatten(io_lib:format("~p", [Term]))
+ end,
+ Choices).
diff --git a/lib/pman/src/pman_win.erl b/lib/pman/src/pman_win.erl
new file mode 100644
index 0000000000..52d5a237cf
--- /dev/null
+++ b/lib/pman/src/pman_win.erl
@@ -0,0 +1,667 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%% ------------------------------------------------------------
+%% Purpose: window management and the gs interface
+%% ------------------------------------------------------------
+
+-module(pman_win).
+
+%% ---------------------------------------------------------------
+%% The user interface exports
+%% ---------------------------------------------------------------
+
+-export([pman_window/3, window/1, module_data/1, display/1, format/2,
+ dialog_window/2, configeditor/2, configwin/3,
+ update/1, update/3,
+ msg_win/1, title/1,
+ remove_menu/1, add_menu/3,
+ change_colour/3, links_menus/1, calc_columnwidths/1]).
+-export([font/0, font/1]).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Constants
+%%
+-include("pman_win.hrl").
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% pman_window/3 - Create a GS window and components for the
+%% Pman overview window, the main window.
+%%
+%% Arguments:
+%% Size number of processes
+%% HiddenModules list of modules
+%% Nodes list of supervised nodes
+%%
+%% Return:
+%% {Win, Grid, Frame, Procnum, W, H} where
+%% Win The GS top window
+%% Grid The GS grid
+%% Procnum Number of displayed processes
+%%
+
+pman_window(Size, _HiddenModules, Nodes) ->
+ GS = gs:start([{kernel,true}]),
+ Font = font(GS),
+ Win_Options = [{title, lists:concat(["Pman: Overview on ",node()])},
+ {width, ?WIN_WIDTH}, {height, ?WIN_HEIGHT},
+ {destroy, true},
+ {keypress,true}],
+ Win = gs:create(window, GS, Win_Options),
+
+ %% Menu bar
+ MenuBar = gs:create(menubar, Win, []),
+ MBFile = gs:create(menubutton, MenuBar, [{label,{text," File "}},
+ {font,Font},
+ {underline,1}]),
+ MBView = gs:create(menubutton, MenuBar, [{label,{text, " View "}},
+ {font,Font},
+ {underline,1}]),
+ MBTrace = gs:create(menubutton, MenuBar, [{label,{text, " Trace "}},
+ {font,Font},
+ {underline,1}]),
+ MBHelp = gs:create(menubutton, MenuBar, [{label, {text, " Help "}},
+ {font,Font},
+ {side,right},
+ {underline,1}]),
+
+ %% Addition of a menu for distribution
+ add_node_menu(MenuBar, Nodes, Font),
+
+ %% All menu buttons
+ MenuFile = gs:create(menu, MBFile, []),
+ MenuView = gs:create(menu, MBView, []),
+ MenuTrace = gs:create(menu, MBTrace, []),
+ MenuHelp = gs:create(menu, MBHelp, []),
+
+ %% File menu
+ gse:named_menuitem('Default Options', MenuFile,
+ [{label,{text,"Options..."}}, {font,Font},
+ {underline,0}]),
+ gse:named_menuitem('Save Options',MenuFile,
+ [{label,{text,"Save Options"}}, {font,Font}]),
+ gse:named_menuitem('Exit', MenuFile,
+ [{label,{text,"Exit"}}, {font,Font},
+ {underline,0}]),
+
+ %% View menu
+ gse:named_menuitem('Hide All',MenuView,
+ [{label, {text, "Hide All Processes"}},
+ {font,Font},
+ {underline,1}]),
+
+ gse:named_menuitem('Hide Modules', MenuView,
+ [{label, {text, "Hide Modules..."}},
+ {font,Font},
+ {underline,8}]),
+
+ gse:named_menuitem('Hide Selected Process', MenuView,
+ [{label, {text, "Hide Selected Process"}},
+ {font,Font},
+ {underline,2}]),
+
+ gse:named_menuitem('Module',MenuView,
+ [{label, {text, "Module Info..."}}, {font,Font},
+ {underline,7}]),
+
+ gse:named_menuitem('Refresh', MenuView,
+ [{label, {text, "Refresh"}}, {font,Font},
+ {underline,0}]),
+
+ gse:named_menuitem('Show All',MenuView,
+ [{label, {text, "Show All Processes"}},
+ {font,Font}]),
+
+ gse:named_menuitem('Show Selected',MenuView,
+ [{label, {text, "Show Processes..."}},
+ {font,Font}]),
+
+ %% Trace menu
+ gs:create(menuitem, 'Kill', MenuTrace, [{label,{text, "Kill"}},
+ {font,Font},
+ {underline,0}]),
+
+ gs:create(menuitem, 'Trace Process', MenuTrace,
+ [{label, {text, "Trace Selected Process"}}, {font,Font},
+ {underline,0}]),
+
+ gs:create(menuitem,'Trace Shell', MenuTrace,
+ [{label, {text,"Shell Process"}}, {font,Font},
+ {underline,0}]),
+
+ %% Help menu
+ gs:create(menuitem,'Help', MenuHelp, [{label, {text, "Help" }},
+ {font,Font},
+ {underline,0}]),
+
+ %% Window contents
+
+ %% Geometry managing frame
+ Frame = gse:frame(Win, [{y,?MENU_HEIGHT},
+ {packer_x,[{stretch, 1}]},
+ {packer_y,[{stretch,10},
+ {fixed,?CHECKBAR_HEIGHT}]}]),
+
+
+
+ %% Grid
+ Grid_Options = [
+ {pack_x,1}, {pack_y,1},
+ {fg,black},
+ {vscroll,right},{hscroll,bottom},
+ calc_columnwidths(739),
+ {rows, {1,Size}}],
+ Grid = gse:grid(Frame,Grid_Options),
+
+
+ %% Checkbutton bar at the bottom of the window
+
+ CheckBar = gse:frame(Frame, [{pack_x,1},
+ {pack_y,2},
+ {packer_x,[{stretch, 2, 100,300},
+ {stretch, 2, 100,300},
+ {stretch,1},
+ {stretch, 2,100,300}]},
+ {packer_y,[{stretch,1}]}]),
+ gse:named_checkbutton('Hide System',CheckBar,
+ [{pack_xy,{1,1}},
+ {justify, left},
+ {align,w},
+ {width, 200},
+ {font, Font},
+ {label, {text, "Hide System Processes" }}]),
+
+ gse:named_checkbutton('Auto Hide New',CheckBar,
+ [{pack_xy,{2,1}},
+ {width, 200},
+ {justify, left},
+ {align,w},
+ {font, Font},
+ {label, {text, "Auto-Hide New" }}]),
+
+ gse:named_label('Number Hidden',CheckBar,
+ [{pack_xy,{4,1}},
+ {justify, left},
+ {align,w},
+ {width, 200},
+ {font, Font},
+ {label, {text, ?CPIDHIDDENTEXT }}]),
+
+ %% Finalize it!
+ gse:map(Win),
+ gse:config(Win,[raise]),
+ gse:config(Win,[{configure,true}]),
+
+
+ {Win, Grid, Frame, length(processes())+1, ?WIN_WIDTH, ?WIN_HEIGHT}.
+
+
+%% Calculate columnwidths in respect to the size of the window.
+
+calc_columnwidths(Width) ->
+ if
+ Width =< 739 ->
+ {columnwidths,[75,215,146,90,105,105]};
+ true ->
+ S = (Width - 75)/(215+146+90+105+105),
+ {columnwidths,[75,round(215*S),round(146*S),round(90*S),
+ round(105*S),round(105*S)]}
+ end.
+
+%% ---------------------------------------------------------------
+%% Create a trace window
+%%
+%% Process, a process id or an atom
+%%
+%% Return: A window and a editor
+%% ---------------------------------------------------------------
+
+
+window(Process) ->
+ GS = gs:start([{kernel,true}]),
+ Font = font(GS),
+ Win_Options = [{title,title(Process)}, {width,550}, {keypress,true},
+ {configure,true},
+ {destroy,true},{height, 400}],
+ Win = gs:create(window,GS,Win_Options),
+
+ MenuBar = gs:create(menubar, Win, []),
+
+ %% File menu
+ MBFile = gs:create(menubutton,MenuBar,[{label,{text," File "}},
+ {font,Font},
+ {underline, 1}]),
+ MenuFile = gs:create(menu, MBFile, []),
+ make_menus(pman_process:is_running(Process), MenuBar, MenuFile,
+ Font),
+
+ gse:named_menuitem('Save buffer',MenuFile,
+ [{label,{text, "Save buffer..."}},
+ {font,Font},
+ {underline,0}]),
+ gse:named_menuitem('Close',MenuFile,
+ [{label, {text, "Close"}},
+ {font,Font},
+ {underline,0}]),
+
+
+ Editor = gs:create(editor,Win,[{x,3}, {y,40},
+ {width,546}, {height,348},
+ {font,Font}]),
+ gs:config(Editor, [{keypress, true},{insert, {'end', display(Process)}}]),
+ gs:config(Editor, [{enable, false},{vscroll, right}, {hscroll, bottom},
+ {wrap,none}]),
+ gs:config(Win, [{map, true}]),
+ {Win, Editor}.
+
+%% ---------------------------------------------------------------------
+%% Menu Help Fuctions
+%% ---------------------------------------------------------------------
+
+
+links_menus(Links) ->
+ gs:destroy('Links'),
+ gs:create(menu,'Links','LinksMenu',[]),
+ Flag = case links_menus(Links,[]) of
+ [] -> false;
+ Pids ->
+ add_menu('Links', Pids, "Trace"),
+ true
+ end,
+ gse:config('LinksMenu',[{enable,Flag}]).
+
+links_menus([],Pids) -> Pids;
+links_menus([Pid|Links],Pids) when is_pid(Pid) ->
+ links_menus(Links,[Pid|Pids]);
+links_menus([_Port|Links],Pids) ->
+ links_menus(Links,Pids).
+
+
+%% Create the node menu.
+
+add_node_menu(MenuBar, Nodes, Font) ->
+ MBNode = gs:create(menubutton, MenuBar, [{label,{text, " Nodes "}},
+ {font,Font},
+ {underline, 1}]),
+ gs:create(menu, node, MBNode, []),
+ add_menu(node, Nodes, "Show", Font),
+ gse:disable(node()).
+
+
+%% ---------------------------------------------------------------------
+%% Add Menus in the list under Menu menuitem.
+
+add_menu(Menu, Names, Tag) ->
+ add_menu(Menu, Names, Tag, font()).
+
+add_menu(_Menu, [], _Tag, _Font) -> ok;
+add_menu(Menu, [Name|Names], Tag, Font) ->
+ Title = io_lib:format("~s ~p",[Tag, Name]),
+ gs:create(menuitem,Name,Menu,[{label,{text,Title}},
+ {font,Font},
+ {data,{Menu,Name}}]),
+ add_menu(Menu, Names, Tag, Font).
+
+%% ---------------------------------------------------------------------
+%% Remove a specific menu item, or a whole menu, or a list of both.
+%%
+
+remove_menu(List) when is_list(List)->
+ lists:foreach(fun(X) -> gs:destroy(X) end, List);
+
+remove_menu(Object) ->
+ gse:destroy(Object).
+
+
+%% ---------------------------------------------------------------------
+%% If the trace window opened is supposed to trace a real pid, let us
+%% add the trace menu, and other items specific to tracing. If not,
+%% the only menus available are the ones in the default defined in
+%% window(Pid).
+
+make_menus(false, _, _, _) -> ok;
+make_menus({true,Pid}, MenuBar, MenuFile, Font) ->
+ MBView = gs:create(menubutton,'ViewMenu',MenuBar,
+ [{underline,1},
+ {label,{text," View "}}, {font,Font},
+ {side,left}]),
+ MenuView = gs:create(menu, MBView, []),
+
+ MBTrace = gs:create(menubutton,'TraceMenu',MenuBar,
+ [{underline,1},
+ {label,{text," Trace "}}, {font,Font},
+ {side,left}]),
+ MenuTrace = gs:create(menu, MBTrace, []),
+
+
+ MBHelp = gs:create(menubutton,'HelpMenu',MenuBar,
+ [{underline,1},
+ {label,{text," Help "}}, {font,Font},
+ {side,right}]),
+ MenuHelp = gs:create(menu, MBHelp, []),
+
+ %% File menu
+ gse:named_menuitem('Options', MenuFile,
+ [{label, {text, "Options..."}}, {font,Font},
+ {underline,0}]),
+
+ %% Trace menu
+ gse:named_menuitem('All Links', MenuTrace,
+ [{label, {text, "All Linked Processes"}},
+ {font,Font},
+ {underline,0}]),
+ gse:named_menuitem('LinksMenu', MenuTrace,
+ [{underline,0},
+ {label, {text, "Linked Process..."}},
+ {font,Font},
+ {itemtype, cascade},
+ {enable,false}]),
+ gs:create(menu,'Links','LinksMenu',[]),
+ case pman_process:pinfo(Pid, links) of
+ Links when is_list(Links) ->
+ links_menus(Links);
+ undefined ->
+ lists:foreach(fun(X) -> gse:disable(X) end,['LinksMenu'])
+ end,
+ gse:named_menuitem('Kill', MenuTrace,
+ [{label, {text, "Kill"}}, {font,Font},
+ {underline,0}]),
+
+ %% View menu
+ gse:named_menuitem('Clear', MenuView,
+ [{label, {text, "Clear buffer"}}, {font,Font},
+ {underline,0}]),
+
+ gse:named_menuitem('Module', MenuView,
+ [{label, {text, "Module Info"}}, {font,Font},
+ {underline,0}]),
+
+ %% Help menu
+ gse:named_menuitem('Help', MenuHelp,
+ [{label, {text, "Help"}}, {font,Font},
+ {underline,0}]).
+
+%% ---------------------------------------------------------------------
+%% Configurate the actual editor
+%%
+%% Editor, actual editor
+%% Options, actual options for the editor
+%%
+%% Return: A configurated editor with the actual options
+%% ---------------------------------------------------------------------
+
+configeditor(Editor, Options) ->
+ gs:config(Editor, Options).
+
+%% ---------------------------------------------------------------------
+%% Configure the actual window after it has been resized.
+%% ---------------------------------------------------------------------
+
+configwin(Object, W, H) ->
+ Dx = abs(W - gs:read(Object,width) - 4),
+ Dy = abs(H - gs:read(Object,height) - 42),
+ if
+ Dx + Dy =/= 0 ->
+ gs:config(Object,[{width,W - 4}]);
+ true -> ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% update/1, 3
+update(NoOfHidden) ->
+ Str = lists:flatten(io_lib:format(?CPIDHIDDENTEXT++"~w",
+ [NoOfHidden])),
+ gse:config('Number Hidden', [{label, {text,Str}}]).
+
+update(Grid, ShowInfoR, NoOfHidden) ->
+
+ %% We reverse the list because we want the processes to appear with
+ %% the newest (=highest) pid first in the list.
+ ShowInfo = lists:reverse(ShowInfoR),
+
+ %% Set the length of the grid
+ CGridline = length(ShowInfo) + 1,
+ gs:config(Grid, [{rows, {1,CGridline}}]),
+
+ %% Add the header line
+ add_gridline(Grid,
+ 1,
+ {'Pid','Current Function','Name','Msgs','Reds','Size'},
+ []),
+
+ update(NoOfHidden),
+
+ %% Recurse through the ordset of pids
+ update_r(Grid, ShowInfo, 2).
+
+update_r(Grid, [], Row) ->
+ delete_gridlines(Grid, Row);
+update_r(Grid, [{Pid,Func,Name,Msgs,Reds,Psize}|ShowInfo], Row) ->
+ {M, F, A} = Func,
+ FuncText = lists:flatten(io_lib:format("~w:~w/~w", [M, F, A])),
+ add_gridline(Grid,
+ Row,
+ {Pid, FuncText, Name, Msgs, Reds, Psize},
+ [{data,{pidfunc,Pid,Func}}]),
+ update_r(Grid, ShowInfo, Row+1).
+
+add_gridline(Grid, Row, Tuple, LIOptSpec) ->
+ {Pid, FuncText, Name, Msgs, Reds, Psize} = Tuple,
+ LIOpt = [{click,true},
+ {doubleclick,true},
+ {fg, colour(Row)},
+ {text,{1,Pid}},
+ {text,{2,FuncText}},
+ {text,{3,Name}},
+ {text,{4,Msgs}},
+ {text,{5,Reds}},
+ {text,{6,Psize}} |LIOptSpec],
+ case gs:read(Grid, {obj_at_row, Row}) of
+ undefined ->
+ gse:gridline(Grid,[{row, Row}|LIOpt]);
+ GridLine ->
+ gs:config(GridLine,LIOpt)
+ end.
+
+delete_gridlines(Grid, Row) ->
+ case gs:read(Grid, {obj_at_row, Row}) of
+ undefined ->
+ ok;
+ GridLine ->
+ gs:destroy(GridLine),
+ delete_gridlines(Grid, Row+1)
+ end.
+
+colour(1) ->
+ ?HEADER_COLOUR;
+colour(_Row) ->
+ ?UNSELECTED_COLOUR.
+
+%% Interchange colours between two rows
+change_colour(Grid, Row, Row) ->
+ Gitem = gs:read(Grid, {obj_at_row,Row}),
+ gs:config(Gitem, {fg,?SELECTED_COLOUR});
+change_colour(Grid, From, To) ->
+ Gitem_to = gs:read(Grid, {obj_at_row,To}),
+ Gitem_fr = gs:read(Grid, {obj_at_row,From}),
+ gs:config(Gitem_to, {fg,?SELECTED_COLOUR}),
+ gs:config(Gitem_fr, {fg,colour(From)}).
+
+%% --------------------------------------------------------------
+%% Create a title for the window
+%% Return: the title
+%% --------------------------------------------------------------
+
+title({module, Mod}) ->
+ lists:flatten([io_lib:format("Pman: Module info ~p", [Mod])]);
+
+title({shell, Sh} ) ->
+ lists:flatten([io_lib:format("Pman: Shell process ~p on ~p",
+ [Sh,node(Sh)])]);
+
+title(Sh) ->
+ lists:flatten([io_lib:format("Pman: Process ~p on ~p",
+ [Sh, node(Sh)]),name(Sh)]).
+name(Pid) ->
+ case pman_process:pinfo(Pid, registered_name) of
+ undefined -> "";
+ Name ->
+ lists:flatten([io_lib:format("[~p]", [Name])])
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% module_data/1 - %% Returns the module information for a
+%% module, on a format suitable to insert into a GS editor.
+%%
+%% Arguments:
+%% ModuleName The module
+%%
+%% Returns:
+%% A string with module information.
+%%
+
+module_data(ModuleName) ->
+ vformat("", catch apply({ModuleName, module_info},[])).
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% display/1 -
+%%
+
+display({_,Pid,_}) -> display(Pid);
+display({_,Pid}) -> display(Pid);
+display(Pid) when is_pid(Pid) ->
+ case pman_process:pinfo(Pid) of
+ undefined ->
+ format('Process is dead~n',[]);
+ Other ->
+ proc_format(Other)
+ end.
+
+%% --------------------------------------------------------------
+%% Format functions for the shell and help window.
+%% --------------------------------------------------------------
+
+vformat(Pad, {M,F,A}) when is_atom(F) ->
+ Pad2 = lists:append(Pad,mkpad(io_lib:format("~w:~w",[M,F]))),
+ lists:flatten([format("~p:~p", [M,F]),argformat(Pad2, A)]);
+
+vformat(Pad, [H|T]) ->
+ kvformat(Pad, [H|T],"[");
+
+vformat(_Pad, X) -> format("~p~n", [X]).
+
+format(Format) -> format(Format, []).
+
+format(Format, Args) ->
+ io_lib:format(Format, Args).
+
+
+kvformat(S, [Item],Buff) ->
+ lists:reverse([format("\n~s~p]\n",[S,Item])|Buff]);
+
+kvformat(S,[H|T],Buff) ->
+ kvformat(S,T,[format("\n~s~p, ",[S,H])|Buff]);
+
+kvformat(_,[],Buff) ->
+ lists:reverse(["]\n"|Buff]).
+
+argformat(_Pad,A) when is_integer(A) ->
+ format("/~p\n", [A]);
+argformat(_,A) ->
+ lists:flatten([format("/~p\n", [length(A)]),
+ format("args: \n"),
+ argformat2(" ", A)]).
+
+argformat2(Pad, Arglist) ->
+ Chars = lists:flatten(io_lib:format("~p",[Arglist])),
+ if
+ length(Chars) < (70 - length(Pad)) ->
+ format("~s~s\n", [Pad, Chars]);
+ true ->
+ argformat3(Pad, Arglist)
+ end.
+
+argformat3(_,[]) -> format("\n");
+argformat3(Pad, [H|T]) ->
+ Chars = truncate(65,io_lib:format("~s~p",[Pad, H])),
+ format("~s,\n", [Chars]),
+ argformat3(Pad, T).
+
+pformat(false) -> [];
+pformat({value,{_, 0}}) -> [];
+pformat({value,{_, []}}) -> [];
+pformat({value, {Key, Vals}}) ->
+ Pad = mkpad(io_lib:format("~p ",[Key])),
+ format(lists:flatten(["~p: " ,vformat(Pad, Vals), "~n"]), [Key]).
+
+truncate(0, _Chars) -> ".....";
+truncate(I, [H|T]) -> [H|truncate(I-1, T)];
+truncate(_I, []) -> [].
+
+mkpad([_|T]) -> [32|mkpad(T)];
+mkpad([]) -> [].
+
+proc_format(Pi) -> %% process_info struct
+ X1 = pformat(lists:keysearch(initial_call, 1, Pi)),
+ X2 = pformat(lists:keysearch(current_function, 1,Pi)),
+ X3 = pformat(lists:keysearch(messages, 1,Pi)),
+ X4 = pformat(lists:keysearch(dictionary,1, Pi)),
+ X5 = pformat(lists:keysearch(heap_size, 1,Pi)),
+ X6 = pformat(lists:keysearch(stack_size, 1,Pi)),
+ X7 = pformat(lists:keysearch(reductions, 1,Pi)),
+ X8 = pformat(lists:keysearch(links, 1,Pi)),
+ X9 = pformat(lists:keysearch(trap_exit, 1,Pi)),
+ lists:flatten([X1, X2, X3, X4, X5,X6,X7,X8,X9]).
+
+
+%% Using the tool_utils function for presenting messages.
+dialog_window(GSParent, Text) ->
+ spawn_link(tool_utils, notify, [GSParent, Text]).
+
+%% Create a window with a dismiss button.
+msg_win(Text) ->
+ spawn_link(fun() -> display_msg_win(Text) end).
+
+display_msg_win(Text) ->
+ GS = gs:start([{kernel,true}]),
+ Font = font(GS),
+ Win = gs:window(GS, [{width,200}, {height,75}, {destroy,true},
+ {title,"Pman Message"}]),
+ Can = gs:canvas(Win, [{width,200}, {height, 75},{x,0},{y,0}]),
+ gs:text(Can, [{text,Text}, {coords,[{10,0}]}, {justify,center}]),
+ Btn = gs:button(Win, [{label,{text,"Dismiss"}}, {font,Font},
+ {width,100}, {x,50}, {y,40}]),
+ gs:config(Win, {map,true}),
+ receive
+ {gs, Btn, click, _, _} ->
+ ok
+ end.
+
+%% Choose default font
+font() ->
+ font(gs:start([{kernel,true}])).
+
+font(GS) ->
+ case gs:read(GS, {choose_font, {screen,[],12}}) of
+ Font when element(1, Font)==screen ->
+ Font;
+ _ ->
+ gs:read(GS, {choose_font, {courier,[],12}})
+ end.
diff --git a/lib/pman/src/pman_win.hrl b/lib/pman/src/pman_win.hrl
new file mode 100644
index 0000000000..8a2778d5b7
--- /dev/null
+++ b/lib/pman/src/pman_win.hrl
@@ -0,0 +1,39 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-define(WIN_HEIGHT, 390).
+-define(WIN_WIDTH, 745).
+
+-define(MENU_HEIGHT, 40).
+-define(CHECKBAR_HEIGHT, 40).
+
+-define(CPIDHIDDENTEXT, "# Hidden: ").
+
+-define(HEADER_COLOUR, blue).
+-define(UNSELECTED_COLOUR, black).
+-define(SELECTED_COLOUR, white).
+
+
+
+
+
+
+
+
+
diff --git a/lib/pman/vsn.mk b/lib/pman/vsn.mk
new file mode 100644
index 0000000000..d190164053
--- /dev/null
+++ b/lib/pman/vsn.mk
@@ -0,0 +1 @@
+PMAN_VSN = 2.7.1