|
Packit Service |
392537 |
%!
|
|
Packit Service |
392537 |
%%BoundingBox: 25 25 290 900
|
|
Packit Service |
392537 |
%%Title: AMANDA ExaLabel
|
|
Packit Service |
392537 |
%%Creator: AMANDA genlabel program
|
|
Packit Service |
392537 |
%%Pages: 1
|
|
Packit Service |
392537 |
%%EndComments
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
%%%%
|
|
Packit Service |
392537 |
%%%% This is a template file used by AMANDA to create PostScript tape
|
|
Packit Service |
392537 |
%%%% labels for each dump. This file is set up for Exabyte 8mm tapes,
|
|
Packit Service |
392537 |
%%%% but you can edit it to work with anything.
|
|
Packit Service |
392537 |
%%%%
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
% The label is made up of 6 parts: statistics, tape name, date,
|
|
Packit Service |
392537 |
% header, filesystem list, and the logo. Geometrically, the label
|
|
Packit Service |
392537 |
% looks like this:
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
% +------------------------+
|
|
Packit Service |
392537 |
% |statistics | <- section 'A'
|
|
Packit Service |
392537 |
% +----+-------------------+
|
|
Packit Service |
392537 |
% |logo| TAPE_NAME | <- section 'B' (logo) <- section 'F'
|
|
Packit Service |
392537 |
% | | version date | <- section 'C'
|
|
Packit Service |
392537 |
% +----+--+--------+-------+
|
|
Packit Service |
392537 |
% | h fs l| h fs l | h fs l| <- section 'D'
|
|
Packit Service |
392537 |
% +-------+--------+-------+
|
|
Packit Service |
392537 |
% | | | | <- section 'E'
|
|
Packit Service |
392537 |
% | | | |
|
|
Packit Service |
392537 |
% v v v v
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
% Sections D and E, which hold the bulk of the information are
|
|
Packit Service |
392537 |
% cut into columns.
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% section 'A' font, start position, and line separation
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/StatFont { /Courier findfont 9 scalefont setfont } def
|
|
Packit Service |
392537 |
/StatPos { 40 740 } def
|
|
Packit Service |
392537 |
/StatSep { 8 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% section 'B' font and position (text centered around this point)
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/TitleFont { /Helvetica-Bold findfont 24 scalefont setfont } def
|
|
Packit Service |
392537 |
/TitlePos { 180 685 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% section 'C' font, position of the date (left justified) and the version
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/DateFont { /Palatino-Bold findfont 10 scalefont setfont } def
|
|
Packit Service |
392537 |
/DatePos { 280 670 } def
|
|
Packit Service |
392537 |
/VersFont { /Palatino-Bold findfont 10 scalefont setfont } def
|
|
Packit Service |
392537 |
/VersPos { 80 670 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% section 'D' font, and field positions (x coord is relative to each column)
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
/HeadingFont { /Palatino-Bold findfont 8 scalefont setfont } def
|
|
Packit Service |
392537 |
/HeadingLvlPos { 126 650 } def % Heading is right justified
|
|
Packit Service |
392537 |
/HeadingHostPos { 5 650 } def
|
|
Packit Service |
392537 |
/HeadingFsPos { 45 650 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% section 'E' font, and line separation
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/HostFont { /Courier findfont 6 scalefont setfont } def
|
|
Packit Service |
392537 |
/HostSep { 6 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% the following rectangles separate the regions
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/StatBox { 290 750 25 710 } def
|
|
Packit Service |
392537 |
/TitleBox { 290 710 25 665 } def
|
|
Packit Service |
392537 |
/LogoBox { 70 710 25 665 } def
|
|
Packit Service |
392537 |
/HeadingBox { 290 665 25 645 } def
|
|
Packit Service |
392537 |
/HostBox { 290 645 25 0 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% number of columns for section 'E,' column width, position of first
|
|
Packit Service |
392537 |
% entry in first column, y coordinate of top and bottom of dividing lines
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/NumColumns { 2 } def
|
|
Packit Service |
392537 |
/ColumnWidth { 132 } def
|
|
Packit Service |
392537 |
/ColumnBasePos { 25 633 } def
|
|
Packit Service |
392537 |
/TopColDivLine { 665 } def
|
|
Packit Service |
392537 |
/BotColDivLine { 0 } def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
%%%%
|
|
Packit Service |
392537 |
%%%% END OF USER-CONFIGURABLE OPTIONS
|
|
Packit Service |
392537 |
%%%%
|
|
Packit Service |
392537 |
%%%% the rest of this file contains the internal functions that are used
|
|
Packit Service |
392537 |
%%%% by genlabel to draw the label
|
|
Packit Service |
392537 |
%%%%
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
% Initial Setup... draws everything that is the same for all labels
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% function to draw a box
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/box {
|
|
Packit Service |
392537 |
/ury exch def
|
|
Packit Service |
392537 |
/urx exch def
|
|
Packit Service |
392537 |
/lly exch def
|
|
Packit Service |
392537 |
/llx exch def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
llx lly moveto
|
|
Packit Service |
392537 |
llx ury lineto
|
|
Packit Service |
392537 |
urx ury lineto
|
|
Packit Service |
392537 |
urx lly lineto
|
|
Packit Service |
392537 |
closepath
|
|
Packit Service |
392537 |
} def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% move the origin up a bit
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
0 20 translate
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% draw all of the boxes
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
0 setgray
|
|
Packit Service |
392537 |
2 setlinewidth % thick lines
|
|
Packit Service |
392537 |
StatBox box stroke
|
|
Packit Service |
392537 |
TitleBox box stroke
|
|
Packit Service |
392537 |
LogoBox box stroke
|
|
Packit Service |
392537 |
HeadingBox box stroke
|
|
Packit Service |
392537 |
HostBox box stroke
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% draw the column dividers
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
0.5 setlinewidth % thin lines
|
|
Packit Service |
392537 |
/i 1 def
|
|
Packit Service |
392537 |
{
|
|
Packit Service |
392537 |
NumColumns i sub 0 le { exit } if % no lines if this last col.
|
|
Packit Service |
392537 |
/xoff ColumnBasePos pop % get x base position
|
|
Packit Service |
392537 |
i ColumnWidth mul add def % offset for this column
|
|
Packit Service |
392537 |
xoff TopColDivLine moveto
|
|
Packit Service |
392537 |
xoff BotColDivLine lineto stroke
|
|
Packit Service |
392537 |
/i i 1 add def
|
|
Packit Service |
392537 |
} loop
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% draw the heading names
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/i 0 def
|
|
Packit Service |
392537 |
HeadingFont
|
|
Packit Service |
392537 |
{
|
|
Packit Service |
392537 |
NumColumns i sub 0 le { exit } if
|
|
Packit Service |
392537 |
/xoff ColumnBasePos pop
|
|
Packit Service |
392537 |
i ColumnWidth mul add def
|
|
Packit Service |
392537 |
HeadingLvlPos exch xoff add exch moveto
|
|
Packit Service |
392537 |
(Lv) stringwidth pop neg 0 rmoveto (Lv) show
|
|
Packit Service |
392537 |
HeadingHostPos exch xoff add exch moveto
|
|
Packit Service |
392537 |
(Host) show
|
|
Packit Service |
392537 |
HeadingFsPos exch xoff add exch moveto
|
|
Packit Service |
392537 |
(Fs) show
|
|
Packit Service |
392537 |
/i i 1 add def
|
|
Packit Service |
392537 |
} loop
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
% the following functions draw strings for each kind of information
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
/CurrStatY StatPos exch pop def
|
|
Packit Service |
392537 |
ColumnBasePos /CurrColumnY exch def
|
|
Packit Service |
392537 |
/CurrColumnX exch def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% DrawStat draws the string on the top of the stack in the next position
|
|
Packit Service |
392537 |
% in section 'A'
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/DrawStat {
|
|
Packit Service |
392537 |
StatFont
|
|
Packit Service |
392537 |
StatPos pop CurrStatY moveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
/CurrStatY CurrStatY StatSep sub def
|
|
Packit Service |
392537 |
} def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% DrawTitle draws the string on the top of the stack in section 'B'
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/DrawTitle {
|
|
Packit Service |
392537 |
TitleFont
|
|
Packit Service |
392537 |
TitlePos moveto
|
|
Packit Service |
392537 |
dup stringwidth pop 2 div neg 0 rmoveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
} def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% DrawDate draws the string on the top of the stack in section 'C'
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/DrawDate {
|
|
Packit Service |
392537 |
DateFont
|
|
Packit Service |
392537 |
DatePos moveto
|
|
Packit Service |
392537 |
dup stringwidth pop neg 0 rmoveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
} def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% DrawVers draws the string on the top of the stack in section 'C'
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/DrawVers {
|
|
Packit Service |
392537 |
VersFont
|
|
Packit Service |
392537 |
VersPos moveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
} def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
% DrawHost expects five strings to be on the stack. The strings are
|
|
Packit Service |
392537 |
% Host Name, Partition Name, Dump Level, Tape File Number, and Output Size.
|
|
Packit Service |
392537 |
% Right now, the Output Size is discarded.
|
|
Packit Service |
392537 |
%
|
|
Packit Service |
392537 |
/DrawHost {
|
|
Packit Service |
392537 |
HostFont
|
|
Packit Service |
392537 |
pop pop pop % discard sizes and fileno
|
|
Packit Service |
392537 |
CurrColumnX HeadingLvlPos pop add CurrColumnY moveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
CurrColumnX HeadingFsPos pop add CurrColumnY moveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
CurrColumnX HeadingHostPos pop add CurrColumnY moveto
|
|
Packit Service |
392537 |
show
|
|
Packit Service |
392537 |
/CurrColumnY CurrColumnY HostSep sub def
|
|
Packit Service |
392537 |
CurrColumnY BotColDivLine lt {
|
|
Packit Service |
392537 |
/CurrColumnY ColumnBasePos exch pop def
|
|
Packit Service |
392537 |
/CurrColumnX CurrColumnX ColumnWidth add def
|
|
Packit Service |
392537 |
} if
|
|
Packit Service |
392537 |
} def
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
|
|
Packit Service |
392537 |
%%%%
|
|
Packit Service |
392537 |
%%%% END OF TEMPLATE FILE
|
|
Packit Service |
392537 |
%%%%
|