From Roberto Morro:
[obnox/wireshark/wip.git] / print.ps
index 49151e3dcc809997b07e8880ae6f43dfe54938c3..5ae242934c7eba7c394d451f7824b2da14436c82 100644 (file)
--- a/print.ps
+++ b/print.ps
@@ -3,17 +3,16 @@
 % Code between start/end remarks is put into ps.c
 % Anything else is thrown away, and is for testing only.
 %
-% ---- ethereal preamble start ---- %
-%!
+% ---- wireshark preamble start ---- %
 %!PS-Adobe-2.0
 %
-% Ethereal - Network traffic analyzer
-% By Gerald Combs <gerald@ethereal.com>
+% Wireshark - Network traffic analyzer
+% By Gerald Combs <gerald@wireshark.org>
 % Copyright 1998 Gerald Combs
 %
-%%Creator: Ethereal
-%%Title: ethereal.ps
-%%DocumentFonts: Helvetica Courier
+%%Creator: Wireshark
+%%Title: Wireshark output
+%%DocumentFonts: Helvetica Monaco
 %%EndComments
 %!
 
@@ -50,20 +49,13 @@ clippath pathbbox
 /hmax exch def
 pop pop                % junk
 
-% 1-inch margins
-%/lmargin 72 def
-%/tmargin vmax 72 sub def
-%/bmargin 72 def
-%/pagenumtab hmax 72 sub def
-
 % 1/2-inch margins
 /lmargin 36 def                                        % left margin
 /tmargin vmax 56 sub def               % top margin
 /bmargin 36 def                                        % bottom margin
-/pagenumtab hmax 36 sub def    % right margin
+/pagenumtab hmax 36 sub def            % right margin
 
 % Counters
-/vpos vmax 40 sub def
 /thispagenum 1 def
 
 % Strings
@@ -90,7 +82,7 @@ pop pop               % junk
 
        /vpos vpos 10 sub def
 
-       vpos bmargin le                         % is vpos <= bottom margin?
+       vpos 5 sub bmargin le           % is vpos <= bottom margin?
        {
                formfeed
        }
@@ -104,7 +96,7 @@ pop pop              % junk
        /indent exch def
        
        % wrapat = width / sizeof font (remember: monospaced font)
-       /pagewidth pagenumtab bmargin sub def
+       /pagewidth pagenumtab lmargin sub def
        /cwidth (A) stringwidth pop def
        /wrapat pagewidth cwidth div cvi def
                
@@ -131,10 +123,10 @@ pop pop           % junk
                lmargin                                         % X
                vmax 36 sub                                     % Y
                moveto
-               eth_pagetitle show
+               ws_pagetitle show
 
                % this page number
-               pagenumtab (Page ) stringwidth pop sub thispagenum pagenostr cvs stringwidth pop sub                                    % X
+               pagenumtab (Page ) stringwidth pop sub thispagenum pagenostr cvs stringwidth pop sub            % X
                vmax 36 sub                                     % Y
                moveto
                (Page ) show
@@ -158,7 +150,6 @@ pop pop             % junk
                bmargin                                         % Y
                moveto
                
-               % title
                pagenumtab                                      % X
                bmargin                                         % Y
                lineto
@@ -170,13 +161,13 @@ pop pop           % junk
 % Reset the vertical position
 /vpos tmargin def
 
-% ---- ethereal preamble end ---- %
-
 % Set the font to 8 point
-/Courier findfont 8 scalefont setfont
+/Monaco findfont 8 scalefont setfont
+
+% ---- wireshark preamble end ---- %
 
 % the page title
-/eth_pagetitle (Ethereal) def
+/ws_pagetitle (Wireshark) def
 
 % Display our output lines.
 
@@ -244,14 +235,11 @@ formfeed
 0 (00a0  00 00 00 03 20 36 41 20 52 69 6e 67 00 00 00 00   .... 6A Ring.... ) putline
 0 (00b0  00 00 00 00 00 00                                 ......           ) putline
 
-% ---- ethereal finale start ---- %
-
-% If this is not the first page, then print the page number
-thispagenum 1 gt                               % is thispagenum > 1 ?
-{
-       printpagedecorations
-}
-if
+% ---- wireshark finale start ---- %
 
+printpagedecorations
 showpage
-% ---- ethereal finale end ---- %
+
+%%EOF
+
+% ---- wireshark finale end ---- %