0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at CDDL.LICENSE.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at CDDL.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A
0N/A#
0N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
0N/A# Use is subject to license terms.
0N/A#
0N/A
0N/A#
0N/A# Enlarge the bounding box of a PostScript file by amounts specified on the
0N/A# command line. They should be specified by assignments to the left, right,
0N/A# top, and bottom variables, in inches. For example,
0N/A#
0N/A# awk -f enlarge.awk file.ps top=2 bottom=2 > newfile.ps
0N/A#
0N/A
0N/ABEGIN {
0N/A left = 0;
0N/A bottom = 0;
0N/A right = 0;
0N/A top = 0;
0N/A}
0N/A
0N/A/^%%BoundingBox:/ {
0N/A printf "%s %d %d %d %d\n", $1, $2 - left * 72, $3 - bottom * 72, \
0N/A $4 + right * 72, $5 + top * 72;
0N/A next;
0N/A}
0N/A
0N/A{ print }