This commit is contained in:
Ludovic Jacomme 2002-04-03 13:55:22 +00:00
parent db8d051d6d
commit c458a893e0
13 changed files with 3628 additions and 0 deletions

View File

@ -0,0 +1 @@
SUBDIRS = src man1

View File

@ -0,0 +1,35 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/l2p.c)
L2P_MAJOR_VERSION=1
L2P_MINOR_VERSION=12
L2P_VERSION=$L2P_MAJOR_VERSION.$L2P_MINOR_VERSION
AC_SUBST(L2P_MAJOR_VERSION)
AC_SUBST(L2P_MINOR_VERSION)
AC_SUBST(L2P_VERSION)
# For automake.
VERSION=$L2P_VERSION
PACKAGE=lynx
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
dnl Checks for programs.
AC_PROG_CC
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_RANLIB
AC_PROG_MAKE_SET
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AM_ALLIANCE
AC_OUTPUT([
Makefile
man1/Makefile
src/Makefile
])

255
alliance/src/l2p/man1/l2p.1 Normal file
View File

@ -0,0 +1,255 @@
.\" $Id: l2p.1,v 1.1 2002/04/03 13:55:21 ludo Exp $
.\" @(#)l2p.l 1.03 94/Jan/30 UPMC; Author: Gilles-Eric DESCAMPS
.pl -.4
.TH L2P 1 "October 1, 1997" "ASIM/LIP6" "CAO\-VLSI Reference Manual"
.SH NAME
.TP
l2p
\- Creates a PostScript file from a symbolic layout file,or from
a physical layout file.
.so man1/alc_origin.1
.SH SYNOPSIS
.TP
\fBl2p\fP
[\fB-color\fP]
[\fB-drawingsize=<w>x<h>\fP]
[\fB-fA3\fP] [\fB-fLETTER\fP]
[\fB-fLEGAL\fP]
[\fB-givebwdict\fP] [\fB-givecolordict\fP]
[\fB-help\fP]
[\fB-noheader\fP]
[\fB-papersize=<x>x<y>x<w>x<h>\fP] [\fB-pages=<x>x<y>\fP] [\fB-tsize=<s>\fP]
[\fB-nrname\fP] [\fB-ncname\fP] [\fB-nrfname\fP] [\fB-niname\fP]
[\fB-nsname\fP] [\fB-mfeed\fP]
[\fB-real\fP] [\fB-resol=<x>\fP] [\fB-rflattencatal\fP] [\fB-rflattentrans\fP]
[\fB-rotate\fP] [\fB-scale=<f.f>\fP] [\fB-usedict=<f>\fP] \fIcellname\fP
.br
.SH DESCRIPTION
Two main kind of cells can be used as inputs for l2p :
.br
First, you can use l2p to print symbolic layout cells. File formats
can be .ap or .cp . This is given by an environment variable
.B MBK_IN_PH
that gives the appropriate symbolic layout file format.
.br
Second, you can use l2p to print real layout cells whose file formats
can be .cif or .gds .
This is given by an environment variable
.B RDS_IN
that gives the appropriate real layout file format.
.br
The path to the input file is set up by two environment variables:
\fBMBK_WORK_LIB\fP(3) and if not found
\fBMBK_CATA_LIB\fP(3).
The output of \fIl2p\fP is a \fBPostScript\fP file
in the current directory. The drawing size and the paper size
can be specified by the user. So, you can split your drawing
in as many pages as wanted. The resulting file can be then
used on any adequat \fBPostcript\fP printer.
.br
l2p will generate in the current directory, either a single file called
\fI<cellname>.ps\fP, either several files suffixed by \fI-<x>x<y>.ps\fP,
depending on wether you've asked for a monopage plot or for a drawing
that will be splitted on several pages.
If you do something like
\fIl2p -pages=2x1 cell\fP, it will generate two files called
\fIcell-1x1.ps\fP, and \fIcell-2x1.ps\fP.
.SH OPTIONS
With no options, l2p generate a 'standard file', with all options off.
This is ok for leaf cells, but not for large circuits.
.TP
\-color
generates a color PostScript file for use with color interpreters.
The default value gives a black and white \fBPostCript\fP file.
.TP
\-drawingsize=<width>x<height>
specifies the drawing area in centh of inch.
By default, wide = 725 and height = 1068 for french A4 paper. If
the drawing size is bigger than the paper area, then the
drawing will be splitted on several pages.
.TP
\-fA3
The drawing is done on A3 format paper.
.TP
\-fLETTER
The drawing is done on LETTER format paper.
.TP
\-fLEGAL
The drawing is done on LEGAL format paper.
.TP
\-givebwdict
give the Black & White internal PostScript dictionnary.
See below.
.TP
\-givecolordict
This option must be unique on the command line. When
used as in 'l2p -givebwdict', l2p then gives on the
standard output its Black & White internal Postscript
dictionnary. A PostScript dictionnary is a set of mac-
ros that will be used during interpretation of your
PostScript file. The macros in the internal PostScript
dictionnaries of l2p allows you to control which layer
to output, how to plot rectangles, and specify the
colors of the rectangles. You get the standard diction-
nary by a line of the form 'l2p -givecolordict >
dict.ps'. You can then edit it, in order to reuse it
with l2p, see the '-usedict' option below.
.TP
\-help
gives you this man page that explains how to use l2p.
.TP
\-noheader
prevents the border and various info, as the cellname and the position
of the page in the drawing, from being printed.
.TP
\-papersize=<x_low_left>x<y_low_left>x<width>x<height>
specifies the paper area in centh of inch. By default, 50x50x726x1069
for a4 paper.
.TP
\-pages=<number_of_x_pages>x<number_of_y_pages>
specifies the drawing area in pages. It can be useful, instead of having
to calculate the size in cenths of inch of the drawing, to give it in
numbers of pages. It takes care of the resizing of the paper and whether
there is a header.
.TP
\-tsize=<s>
.br
Available sizes:6,8,10,12,14.The default value is 8.
.TP
\-nrname
.br
No name at all will be displayed.
.TP
\-ncname
The external connector's names won't be displayed.
.TP
\-nrfname
The references's names won't be displayed.
.TP
\-niname
The instances's names won't be displayed.
.TP
\-nsname
The segments's names won't be displayed.
.TP
\-mfeed
Manualfeed:if set,informs the printer that it will be fed by the
user himself,for each printing .
.TP
\-real
uses real file (cif, gds). By default, uses
symbolic layout file (ap, cp).
.TP
\-resol=<x>
is the resolution of the file in dots per inch (dpi). This value has been
introducted to limitate the size of the generated PostScript files. Each
rectangle whose width and height are smaller than the resolution will not
be printed. The default value is 72dpi. It should only be changed in one
specifical case : when you want to produce a plot
of several meter large. Usually, you must provide
a PostScript file sized for A4 paper with
a much better resolution
than 72dpi. You can then increase that value to up to 1000dpi, but be
aware that the size of the file will probably be bigger than a 44Mb SyQuest
cartridge that is used in PAO for exchanging data files.
.TP
\-rflattencatal
flattens the cell to the catalog level. see catal(5) for more details
on the use of the catalog file. Be careful, this option requires a lot of memory...
.TP
\-rflattentrans
flattens the cell to the transistor level before printing. Be careful, this option
requires a lot more memory...
.TP
\-rotate
rotate the cell from 90 degree. This is useful if you have a wide cell, and you
want to have it printed in landscape mode.
.TP
\-scale=<f.f>
forces the cell to be printed with a certain scale (a floating-point number).
This is very useful, when you are printing a whole library of cells,
and you want all cells to be printed to the same scale.
.br
You can find at which scale a cell was printed by looking at the beginning of
the file : 'head n1_y-1x1.ps' will show you a PostScript comment beginning
by '%SCALE=3.78435' for example.
.TP
\-usedict=<filename>
The output Postcript file contains a Postcript dictionnary of macros.
.br
There are two standard dictionnaries used by l2p for black and white or color prints.
This allows you to use a PostScript dictionnary different from the two
internally encoded into l2p. By modifying one of the standard l2p
dictionnary, you can choose which layer to output, how to fill the
rectangles (empty, hashed, filled), which color to choose, ... and
lots of other possibilities. The rest of the generated postscript file
is mainly orders of drawing rectangles. PostScript is a reverse polish
notation langage, that is easy to read for simple programs.
.br
If you use this functionnality, and think that your dictionnaries are
worth it, please mail them to alliance\-support@asim.lip6.fr, in order to submit
them for inclusion in future version of l2p (Thanks).
.SH ENVIRONMENT VARIABLES:
.TP
for symbolic file(s) :
.nf
\fBsetenv MBK_IN_PH ap
setenv MBK_WORK_LIB .
setenv MBK_CATA_LIB /labo/cells/scr
setenv MBK_CATAL_NAME CATAL
setenv RDS_TECHNO_NAME cmos_1.rds\fP
.fi
.TP
for real file(s) :
.nf
\fBsetenv RDS_IN cif
setenv MBK_CATAL_NAME CATAL_ROUT
setenv RDS_TECHNO_NAME prol12_1.rds\fP
.fi
.SH EXAMPLES:
.TP
\fIl2p -color n1_y\fP
will create a colored \fBn1_y.ps\fP file in the current directory :
the 'standard' way.
.TP
\fIl2p -real cell\fP
will create a \fBcell.ps\fP file in the current directory from cell.cif
or cell.gds, depending on the RDS_IN environment variable.
.TP
\fIl2p -pages=3x2 na2_y\fP
size of the created drawing:3 horizontal pages,2 vertical ones;
.TP
.SH SEE ALSO
.BR mbk(1),
.BR rds(1),
.BR MBK_IN_PH(3),
.BR MBK_CATA_LIB(3),
.BR MBK_WORK_LIB(3),
.BR MBK_CATAL_NAME(3),
.BR RDS_TECHNO_NAME(3),
.BR pageview(1),
.BR gs(1),
.BR ghostview(1),
.BR lpr(1).
.SH DIAGNOSTICS
.br
You will not be able to generate more than approximativly 30 pages at the same
time (because of the FOPEN_MAX of your environment). In this case, see the
option that is not implemented yet.
.br
The generated \fBPostScript\fP is Level 1 for black& white plots.
When you use color, it generates Level 1 with color extensions.
It may not run with strict Level 1 interpreters, although it runs here with
our Apple Personnal LaserWriter, Sun Sparcprinters, and Canon CLC-300-PS.
It follows the Adobe Document Structuring Conventions 1, and as there
is a fake bitmap image inside each generated files, you can re-use them in your
word-processors, or publishing software, because the PostScript is EPSF-1.2
compliant.
.br
.so man1/alc_bug_report.1

View File

@ -0,0 +1,156 @@
#
# This file is part of the Alliance CAD System
# Copyright (C) Laboratoire LIP6 - Département ASIM
# Universite Pierre et Marie Curie
#
# Home page : http://www-asim.lip6.fr/alliance/
# E-mail support : mailto:alliance-support@asim.lip6.fr
#
# This progam is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# Alliance VLSI CAD System is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with the GNU C Library; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#/***************************************************************************/
#/* */
#/* Chaine de CAO & VLSI Alliance */
#/* */
#/* Produit : (R)ectangle (D)ata (S)tructure (2)to (P)ost(S)cript driver */
#/* Fichier : Makefile */
#/* */
#/* (c) copyright 1991 Laboratoire MASI equipe CAO & VLSI */
#/* Tous droits reserves */
#/* Support : e-mail cao-vlsi@masi.ibp.fr */
#/* */
#/* Auteur(s) : Gilles-Eric DESCAMPS le : 23/03/1993 */
#/* */
#/* Modifie par : GED toujours le : 05/10/1993 */
#/* Modifie par : EL le : 02/03/1995 */
#/* */
#/***************************************************************************/
include $(ALLIANCE_TOP)/etc/$(ALLIANCE_OS).mk
include $(ALLIANCE_TOP)/etc/libraries.mk
RPS_VERSION = '"1.12"'
RPS_TAIL = 103
NROFF = /usr/bin/nroff -man
INC = -DALLIANCE_VERSION=$(ALLIANCE_VERSION) -DRPS_VERSION=$(RPS_VERSION) \
-DRPS_H='"$(RPS_INC_DEST)/$(RPS_INC)"' -I$(ALLIANCE_INCLUDE) \
-DRFM_H='<$(RFM_H)>' \
-DRUT_H='<$(RUT_H)>' \
-DRDS_H='<$(RDS_H)>' \
-DRPR_H='<$(RPR_H)>' \
-DRTL_H='<$(RTL_H)>' \
-DMPH_H='<$(MPH_H)>' \
-DRWI_H='<$(RWI_H)>' \
-DMPU_H='<$(MPU_H)>' \
-DMUT_H='<$(MUT_H)>'
LIB = -L$(RPS_LIB_DEST) -lRps$(RPS_TAIL) -L$(ALLIANCE_LIB) \
$(RTL_L) \
$(RGS_L) \
$(RCF_L) \
$(RUT_L) \
$(RFM_L) \
$(RPR_L) \
$(RDS_L) \
$(MPU_L) \
$(MCP_L) \
$(MAP_L) \
$(MGL_L) \
$(MPH_L) \
$(MMG_L) \
$(MUT_L) \
-lm
RPS_BIN = l2p
RPS_LIB = libRps$(RPS_TAIL).a
RPS_INC = rps$(RPS_TAIL).h
RPS_BIN_DEST = $(TARGET_BIN)
RPS_LIB_DEST = $(TARGET_LIB)
RPS_INC_DEST = $(TARGET_INCLUDE)
all : $(RPS_INC_DEST)/$(RPS_INC) \
$(RPS_LIB_DEST)/$(RPS_LIB) \
$(RPS_BIN_DEST)/$(RPS_BIN)
distrib : all
-$(RM) $(RPS_BIN_DEST)/INSTALLED
-$(RM) $(RPS_LIB_DEST)/INSTALLED
-$(RM) $(RPS_INC_DEST)/INSTALLED
$(RPS_INC_DEST)/$(RPS_INC) : rps_inc.h
$(CP) rps_inc.h $(RPS_INC_DEST)/$(RPS_INC)
$(RPS_LIB_DEST)/$(RPS_LIB) : drive_ps.o tmp_dict.o
$(AR) $(ARFLAGS) $(RPS_LIB_DEST)/$(RPS_LIB) drive_ps.o tmp_dict.o
$(RANLIB) $(RPS_LIB_DEST)/$(RPS_LIB)
$(RPS_BIN_DEST)/$(RPS_BIN) : $(RPS_LIB_DEST)/$(RPS_LIB) \
$(RPS_INC_DEST)/$(RPS_INC) rds2ps.o tmp_man.o
$(CC) $(CFLAGS) -o $(RPS_BIN_DEST)/$(RPS_BIN) rds2ps.o tmp_man.o $(LIB)
$(STRIP) $(RPS_BIN_DEST)/$(RPS_BIN)
drive_ps.o : drive_ps.c $(RPS_INC_DEST)/$(RPS_INC)
$(CC) $(CFLAGS) -c $(INC) drive_ps.c
tmp_dict.c : dict_bw.ps dict_color.ps
$(AWK) 'BEGIN{printf ("extern rps_put();\n"); \
printf ("void rps_print_dict_bw (pg)\n");\
printf ("void *pg;\n{\n")}\
{printf ("\trps_put (pg,\"%s\\n\");\n", $$0)}\
END{printf("}\n")}' dict_bw.ps > tmp_dict.c
$(AWK) 'BEGIN{printf ("\nvoid rps_print_dict_color (pg)\n");\
printf ("void *pg;\n{\n")}\
{printf ("\trps_put (pg,\"%s\\n\");\n", $$0)}\
END{printf("}\n")}' dict_color.ps >> tmp_dict.c
tmp_dict.o : tmp_dict.c
$(CC) $(CFLAGS) -c $(INC) tmp_dict.c
rds2ps.o : rds2ps.c $(RPS_INC_DEST)/$(RPS_INC)
$(CC) $(CFLAGS) -c $(INC) rds2ps.c
tmp_man.c : $(RPS_BIN).1
$(NROFF) $(RPS_BIN).1 | \
$(AWK) 'BEGIN{printf ("void puts ();\n"); \
printf ("void rps_print_man () {\n")}\
{printf ("\tputs (\"%s\");\n", $$0)}\
END{printf("}\n")}' | \
cat > tmp_man.c
tmp_man.o : tmp_man.c
$(CC) $(CFLAGS) -c $(INC) tmp_man.c
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
clean :
$(RM) -f *.o
realclean : clean
$(RM) -f $(RPS_BIN_DEST)/$(RPS_BIN)
$(RM) -f $(RPS_LIB_DEST)/$(RPS_LIB)
$(RM) -f $(RPS_INC_DEST)/$(RPS_INC)
pure : $(RPS_INC_DEST)/$(RPS_INC) \
$(RPS_LIB_DEST)/$(RPS_LIB) \
purel2p
purel2p : $(RPS_LIB_DEST)/$(RPS_LIB) \
$(RPS_INC_DEST)/$(RPS_INC) rds2ps.o tmp_man.o
purify $(CC) -o purel2p rds2ps.o tmp_man.o $(LIB)
#- - - END OF MAKEFILE - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -0,0 +1,15 @@
## Process this file with automake to produce Makefile.in
bin_PROGRAMS = l2p
CFLAGS = @CFLAGS@ -DL2P_VERSION=\"@L2P_VERSION@\"
l2p_LDADD = @LIBS@ \
-lMlu -lMpu -lMap -lMmg -lMcp -lMcl -lMel \
-lMhl -lMvl -lMlo -lMph -lMut -lMal -lRcn \
-lMsl -lMgl \
-lRtl -lRgs -lRcf -lRfm -lRpr -lRwi -lRut -lRds
lynx_SOURCES = \
drive_ps.c rps_inc.h tmp_man.c \
dict_color.ps l2p.c tmp_dict.c

View File

@ -0,0 +1,156 @@
#
# This file is part of the Alliance CAD System
# Copyright (C) Laboratoire LIP6 - Département ASIM
# Universite Pierre et Marie Curie
#
# Home page : http://www-asim.lip6.fr/alliance/
# E-mail support : mailto:alliance-support@asim.lip6.fr
#
# This progam is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# Alliance VLSI CAD System is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with the GNU C Library; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#/***************************************************************************/
#/* */
#/* Chaine de CAO & VLSI Alliance */
#/* */
#/* Produit : (R)ectangle (D)ata (S)tructure (2)to (P)ost(S)cript driver */
#/* Fichier : Makefile */
#/* */
#/* (c) copyright 1991 Laboratoire MASI equipe CAO & VLSI */
#/* Tous droits reserves */
#/* Support : e-mail cao-vlsi@masi.ibp.fr */
#/* */
#/* Auteur(s) : Gilles-Eric DESCAMPS le : 23/03/1993 */
#/* */
#/* Modifie par : GED toujours le : 05/10/1993 */
#/* Modifie par : EL le : 02/03/1995 */
#/* */
#/***************************************************************************/
include $(ALLIANCE_TOP)/etc/$(ALLIANCE_OS).mk
include $(ALLIANCE_TOP)/etc/libraries.mk
RPS_VERSION = '"1.12"'
RPS_TAIL = 103
NROFF = /usr/bin/nroff -man
INC = -DALLIANCE_VERSION=$(ALLIANCE_VERSION) -DRPS_VERSION=$(RPS_VERSION) \
-DRPS_H='"$(RPS_INC_DEST)/$(RPS_INC)"' -I$(ALLIANCE_INCLUDE) \
-DRFM_H='<$(RFM_H)>' \
-DRUT_H='<$(RUT_H)>' \
-DRDS_H='<$(RDS_H)>' \
-DRPR_H='<$(RPR_H)>' \
-DRTL_H='<$(RTL_H)>' \
-DMPH_H='<$(MPH_H)>' \
-DRWI_H='<$(RWI_H)>' \
-DMPU_H='<$(MPU_H)>' \
-DMUT_H='<$(MUT_H)>'
LIB = -L$(RPS_LIB_DEST) -lRps$(RPS_TAIL) -L$(ALLIANCE_LIB) \
$(RTL_L) \
$(RGS_L) \
$(RCF_L) \
$(RUT_L) \
$(RFM_L) \
$(RPR_L) \
$(RDS_L) \
$(MPU_L) \
$(MCP_L) \
$(MAP_L) \
$(MGL_L) \
$(MPH_L) \
$(MMG_L) \
$(MUT_L) \
-lm
RPS_BIN = l2p
RPS_LIB = libRps$(RPS_TAIL).a
RPS_INC = rps$(RPS_TAIL).h
RPS_BIN_DEST = $(TARGET_BIN)
RPS_LIB_DEST = $(TARGET_LIB)
RPS_INC_DEST = $(TARGET_INCLUDE)
all : $(RPS_INC_DEST)/$(RPS_INC) \
$(RPS_LIB_DEST)/$(RPS_LIB) \
$(RPS_BIN_DEST)/$(RPS_BIN)
distrib : all
-$(RM) $(RPS_BIN_DEST)/INSTALLED
-$(RM) $(RPS_LIB_DEST)/INSTALLED
-$(RM) $(RPS_INC_DEST)/INSTALLED
$(RPS_INC_DEST)/$(RPS_INC) : rps_inc.h
$(CP) rps_inc.h $(RPS_INC_DEST)/$(RPS_INC)
$(RPS_LIB_DEST)/$(RPS_LIB) : drive_ps.o tmp_dict.o
$(AR) $(ARFLAGS) $(RPS_LIB_DEST)/$(RPS_LIB) drive_ps.o tmp_dict.o
$(RANLIB) $(RPS_LIB_DEST)/$(RPS_LIB)
$(RPS_BIN_DEST)/$(RPS_BIN) : $(RPS_LIB_DEST)/$(RPS_LIB) \
$(RPS_INC_DEST)/$(RPS_INC) rds2ps.o tmp_man.o
$(CC) $(CFLAGS) -o $(RPS_BIN_DEST)/$(RPS_BIN) rds2ps.o tmp_man.o $(LIB)
$(STRIP) $(RPS_BIN_DEST)/$(RPS_BIN)
drive_ps.o : drive_ps.c $(RPS_INC_DEST)/$(RPS_INC)
$(CC) $(CFLAGS) -c $(INC) drive_ps.c
tmp_dict.c : dict_bw.ps dict_color.ps
$(AWK) 'BEGIN{printf ("extern rps_put();\n"); \
printf ("void rps_print_dict_bw (pg)\n");\
printf ("void *pg;\n{\n")}\
{printf ("\trps_put (pg,\"%s\\n\");\n", $$0)}\
END{printf("}\n")}' dict_bw.ps > tmp_dict.c
$(AWK) 'BEGIN{printf ("\nvoid rps_print_dict_color (pg)\n");\
printf ("void *pg;\n{\n")}\
{printf ("\trps_put (pg,\"%s\\n\");\n", $$0)}\
END{printf("}\n")}' dict_color.ps >> tmp_dict.c
tmp_dict.o : tmp_dict.c
$(CC) $(CFLAGS) -c $(INC) tmp_dict.c
rds2ps.o : rds2ps.c $(RPS_INC_DEST)/$(RPS_INC)
$(CC) $(CFLAGS) -c $(INC) rds2ps.c
tmp_man.c : $(RPS_BIN).1
$(NROFF) $(RPS_BIN).1 | \
$(AWK) 'BEGIN{printf ("void puts ();\n"); \
printf ("void rps_print_man () {\n")}\
{printf ("\tputs (\"%s\");\n", $$0)}\
END{printf("}\n")}' | \
cat > tmp_man.c
tmp_man.o : tmp_man.c
$(CC) $(CFLAGS) -c $(INC) tmp_man.c
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
clean :
$(RM) -f *.o
realclean : clean
$(RM) -f $(RPS_BIN_DEST)/$(RPS_BIN)
$(RM) -f $(RPS_LIB_DEST)/$(RPS_LIB)
$(RM) -f $(RPS_INC_DEST)/$(RPS_INC)
pure : $(RPS_INC_DEST)/$(RPS_INC) \
$(RPS_LIB_DEST)/$(RPS_LIB) \
purel2p
purel2p : $(RPS_LIB_DEST)/$(RPS_LIB) \
$(RPS_INC_DEST)/$(RPS_INC) rds2ps.o tmp_man.o
purify $(CC) -o purel2p rds2ps.o tmp_man.o $(LIB)
#- - - END OF MAKEFILE - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -0,0 +1,335 @@
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% This is the beginning of the l2p BLACK & WHITE PostScript dictionnary.
% (If you want to change patterns, this is THE place to do it.)
% (Remember that you can substitute another PostScript dictionnary.)
%%Pages: 1 1
%%EndComments
%%BeginPreview: 256 64 1 64
%0000000000000000000000000000000000000000000000000000000000000000
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000000000000000000000000000000000F000000000000000FFFF0
%0FFFF00000000FFFF0FFF000FFF000000000000000FFF00000000000000FFFF0
%0FFFF00000000F0000F00F0F00000000000000000FF0FF00F0F0FFF0000FFFF0
%0FFFF00000000F0000F00F0F0000000000000000FFF0FFF0F0F0F0F0000FFFF0
%0FFFF00000000FFF00FFF000FF0000000000000000F0F000F0F0FFF0000FFFF0
%0FFFF00000000F0000F0000000F000000000000000F0F000F0F0F000000FFFF0
%0FFFF00000000F0000F0000000F000000000000000F0F000FFF0F000000FFFF0
%0FFFF00000000FFFF0F0000FFF0000000000000000FFF00000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000FFF00FFF00FFFF0F000F0FFF0FFFF0F00000F000000000FFFF0
%0FFFF00000000F00F0F00F0F0000F000F00F00F0000F00000F000000000FFFF0
%0FFFF00000000F00F0F00F0F00000F0F000F00F0000F00F00F000000000FFFF0
%0FFFF00000000FFF00FFF00FFF000F0F000F00FFF00F00F00F000000000FFFF0
%0FFFF00000000F0000F0F00F00000F0F000F00F00000F0F0F0000000000FFFF0
%0FFFF00000000F0000F00F0F000000F0000F00F00000FF0FF0000000000FFFF0
%0FFFF00000000F0000F00F0FFFF000F000FFF0FFFF00F000F0000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000F00000FF00F00F00FF00F00F0FFFF00000000000000000FFFF0
%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000FFFF00FF00F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000FFFF0F00F00F0000FF00FFFF00F0000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000FF0000000000000000000000000000000000000000000FFFF0
%0FFFF00000000F00F000000000000000000000000000000000000000000FFFF0
%0FFFF00000000000F000000000000000000000000000000000000000000FFFF0
%0FFFF0000000000F0000000000000000000000000000000000000000000FFFF0
%0FFFF000000000F00000000000000000000000000000000000000000000FFFF0
%0FFFF00000000F000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000FFFF000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000FFF000FF00FFF00FFFF0FFF00000000000000000000000FFFF0
%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0
%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0
%0FFFF00000000FFF00FFFF0FFF00FFF00FFF00000000000000000000000FFFF0
%0FFFF00000000F0000F00F0F0000F0000F0F00000000000000000000000FFFF0
%0FFFF00000000F0000F00F0F0000F0000F00F0000000000000000000000FFFF0
%0FFFF00000000F0000F00F0F0000FFFF0F00F0000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0000000000000000000000000000000000000000000000000000000000000000
%%EndPreview
%%EndProlog
%%BeginSetup
/MF
{statusdict /manualfeed true put} bind def
/INFO % Change jobname in order to give info about status
{/statusdict where exch pop {
statusdict exch /jobname exch put
} if } bind def
/NOP % Draw nothing with x,y,w,h
{pop pop pop pop} bind def
/ER % Draw an [E]mpty [R]ectangle with x,y,w,h
{/h exch def /w exch def newpath moveto
0 h rlineto w 0 rlineto 0 h neg rlineto
closepath stroke} bind def
/E2R % Draw an [E]mpty dashed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def newpath moveto
1.0 setlinewidth [8.0 8.0] 0 setdash
0 h rlineto w 0 rlineto 0 h neg rlineto
closepath stroke context restore} bind def
/D1FR % Draw a [D]iagonal [1] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
0.1 setlinewidth
/pas 8 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
% abscisse de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for context restore} bind def
/D2FR % Draw a [D]iagonal [2] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
0.8 setlinewidth
/pas 16 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
% abscisse de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for context restore} bind def
/D6FR % Draw a [D]iagonal [6] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
0.5 setlinewidth [0.5 8] 0 setdash
0 8 x w add y add h add {
newpath 0 moveto y h add neg y h add rlineto stroke
} for context restore} bind def
/D7FR % Draw a [D]iagonal [7] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
1.0 setlinewidth [1 8] 0 setdash
0 8 x w add y add h add {
newpath 0 moveto y h add neg y h add rlineto stroke
} for context restore} bind def
/D8FR % Draw a [D]iagonal [8] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 12 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.8 setlinewidth
% abscisse de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/D9FR % Draw a [D]iagonal [9] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 8 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.1 setlinewidth
% abscisse de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/X1FR % Draw a [X]cross [1] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 6 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.1 setlinewidth
% abscisse1 de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for
% abscisse2 de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/X2FR % Draw a [X]cross [2] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 3 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.2 setlinewidth
% abscisse1 de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for
% abscisse2 de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/showstring {
gsave
rotate
% dup stringwidth pop 2 div neg 0 rmoveto
false charpath
gsave
1 setgray
2 setlinewidth
1 setlinejoin
1 setlinecap
stroke
grestore
fill
grestore
} bind def
%- - - BEGIN OF LAYER TRADUCTION - - -
/RDS_NWELL_init {
/R { D6FR } bind def
} def
/RDS_PWELL_init {
/R { D6FR } bind def
} def
/RDS_NIMP_init {
/R { D6FR } bind def
} def
/RDS_PIMP_init {
/R { D6FR } bind def
} def
/RDS_ACTIV_init {
/R { D6FR } bind def
} def
/RDS_NDIF_init {
/R { D9FR } bind def
} def
/RDS_PDIF_init {
/R { D1FR } bind def
} def
/RDS_NTIE_init {
/R { D9FR } bind def
} def
/RDS_PTIE_init {
/R { D1FR } bind def
} def
/RDS_POLY_init {
/R { X1FR } bind def
} def
/RDS_GATE_init {
/R { X1FR } bind def
} def
/RDS_TPOLY_init {
/R { X1FR } bind def
} def
/RDS_CONT_init {
/R { X2FR } bind def
} def
/RDS_ALU1_init {
/R { D7FR } bind def
} def
/RDS_VALU1_init {
/R { D7FR } bind def
} def
/RDS_TALU1_init {
/R { D7FR } bind def
} def
/RDS_VIA1_init {
/R { X2FR } bind def
} def
/RDS_TVIA1_init {
/R { X2FR } bind def
} def
/RDS_ALU2_init {
/R { D2FR } bind def
} def
/RDS_TALU2_init {
/R { D2FR } bind def
} def
/RDS_VIA2_init {
/R { X2FR } bind def
} def
/RDS_ALU3_init {
/R { D8FR } bind def
} def
/RDS_TALU3_init {
/R { D8FR } bind def
} def
/RDS_VIA3_init {
/R { X2FR } bind def
} def
/RDS_ALU4_init {
/R { D8FR } bind def
} def
/RDS_CPAS_init {
/R { NOP } bind def
} def
/RDS_REF_init {
/R { NOP } bind def
} def
/RDS_USER0_init {
/R { NOP } bind def
} def
/RDS_USER1_init {
/R { NOP } bind def
} def
/RDS_USER2_init {
/R { NOP } bind def
} def
/RDS_ABOX_init {
/R { E2R } bind def
} def
/UNKNOW_init {
/R { NOP } bind def
} def
%- - - END OF LAYER TRADUCTION - - -
%%EndSetup
% This is the end of the l2p BLACK & WHITE PostScript dictionnary.
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

View File

@ -0,0 +1,367 @@
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
% This is the beginning of the l2p COLOR PostScript dictionnary.
% (If you want to change colors or patterns, this is THE place to do it.)
% (Remember that you can substitute another PostScript dictionnary.)
%%Pages: 1 1
%%EndComments
%%BeginPreview: 256 64 1 64
%0000000000000000000000000000000000000000000000000000000000000000
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000000000000000000000000000000000F000000000000000FFFF0
%0FFFF00000000FFFF0FFF000FFF000000000000000FFF00000000000000FFFF0
%0FFFF00000000F0000F00F0F00000000000000000FF0FF00F0F0FFF0000FFFF0
%0FFFF00000000F0000F00F0F0000000000000000FFF0FFF0F0F0F0F0000FFFF0
%0FFFF00000000FFF00FFF000FF0000000000000000F0F000F0F0FFF0000FFFF0
%0FFFF00000000F0000F0000000F000000000000000F0F000F0F0F000000FFFF0
%0FFFF00000000F0000F0000000F000000000000000F0F000FFF0F000000FFFF0
%0FFFF00000000FFFF0F0000FFF0000000000000000FFF00000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000FFF00FFF00FFFF0F000F0FFF0FFFF0F00000F000000000FFFF0
%0FFFF00000000F00F0F00F0F0000F000F00F00F0000F00000F000000000FFFF0
%0FFFF00000000F00F0F00F0F00000F0F000F00F0000F00F00F000000000FFFF0
%0FFFF00000000FFF00FFF00FFF000F0F000F00FFF00F00F00F000000000FFFF0
%0FFFF00000000F0000F0F00F00000F0F000F00F00000F0F0F0000000000FFFF0
%0FFFF00000000F0000F00F0F000000F0000F00F00000FF0FF0000000000FFFF0
%0FFFF00000000F0000F00F0FFFF000F000FFF0FFFF00F000F0000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000F00000FF00F00F00FF00F00F0FFFF00000000000000000FFFF0
%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000FFFF00FF00F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0
%0FFFF00000000FFFF0F00F00F0000FF00FFFF00F0000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000FF0000000000000000000000000000000000000000000FFFF0
%0FFFF00000000F00F000000000000000000000000000000000000000000FFFF0
%0FFFF00000000000F000000000000000000000000000000000000000000FFFF0
%0FFFF0000000000F0000000000000000000000000000000000000000000FFFF0
%0FFFF000000000F00000000000000000000000000000000000000000000FFFF0
%0FFFF00000000F000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000FFFF000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF00000000FFF000FF00FFF00FFFF0FFF00000000000000000000000FFFF0
%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0
%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0
%0FFFF00000000FFF00FFFF0FFF00FFF00FFF00000000000000000000000FFFF0
%0FFFF00000000F0000F00F0F0000F0000F0F00000000000000000000000FFFF0
%0FFFF00000000F0000F00F0F0000F0000F00F0000000000000000000000FFFF0
%0FFFF00000000F0000F00F0F0000FFFF0F00F0000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFF000000000000000000000000000000000000000000000000000000FFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
%0000000000000000000000000000000000000000000000000000000000000000
%%EndPreview
%%EndProlog
%%BeginSetup
/MF
{statusdict /manualfeed true put} bind def
/INFO % Change jobname in order to give info about status
{/statusdict where exch pop {
statusdict exch /jobname exch put
} if } bind def
/NOP % Draw nothing with x,y,w,h
{pop pop pop pop} bind def
/ER % Draw an [E]mpty [R]ectangle with x,y,w,h
{/h exch def /w exch def newpath moveto
0 h rlineto w 0 rlineto 0 h neg rlineto
closepath stroke} bind def
/E2R % Draw an [E]mpty dashed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def newpath moveto
1.0 setlinewidth [8.0 8.0] 0 setdash
0 h rlineto w 0 rlineto 0 h neg rlineto
closepath stroke context restore} bind def
/D1FR % Draw a [D]iagonal [1] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
0.1 setlinewidth
/pas 4 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
% abscisse de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for context restore} bind def
/D2FR % Draw a [D]iagonal [2] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
0.8 setlinewidth
/pas 8 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
% abscisse de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for context restore} bind def
/D6FR % Draw a [D]iagonal [6] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
0.5 setlinewidth [1 4] 0 setdash
0 4 x w add y add h add {
newpath 0 moveto y h add neg y h add rlineto stroke
} for context restore} bind def
/D7FR % Draw a [D]iagonal [7] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
1.0 setlinewidth [1 8] 0 setdash
0 4 x w add y add h add {
newpath 0 moveto y h add neg y h add rlineto stroke
} for context restore} bind def
/D8FR % Draw a [D]iagonal [8] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 6 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.8 setlinewidth
% abscisse de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/D9FR % Draw a [D]iagonal [9] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 4 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.1 setlinewidth
% abscisse de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/X1FR % Draw a [X]cross [1] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 4 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.1 setlinewidth
% abscisse1 de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for
% abscisse2 de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/X2FR % Draw a [X]cross [2] [F]illed [R]ectangle with x,y,w,h
{/context save def /h exch def /w exch def /y exch def /x exch def newpath
0.5 setlinewidth
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke
x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip
/pas 2 def
% ordonnee de depart:
y pas div cvi pas mul /yy exch def
0.2 setlinewidth
% abscisse1 de depart:
x h neg add pas div cvi pas mul
pas x w add {
newpath yy moveto h pas add h pas add rlineto stroke
} for
% abscisse2 de depart:
x pas div cvi pas mul
pas x w add h add {
newpath yy moveto h neg pas neg add h pas add rlineto stroke
} for context restore} bind def
/showstring {
gsave
rotate
% dup stringwidth pop 2 div neg 0 rmoveto
false charpath
gsave
1 setgray
2 setlinewidth
1 setlinejoin
1 setlinecap
stroke
grestore
fill
grestore
} bind def
%- - - BEGIN OF LAYER TRADUCTION - - -
/RDS_NWELL_init {
/R { D6FR } bind def
/setcmykcolor where {begin 0.0 0.5 1.0 0.0 setcmykcolor end} if
} def
/RDS_PWELL_init {
/R { D6FR } bind def
/setcmykcolor where {begin 0.0 0.0 1.0 0.0 setcmykcolor end} if
} def
/RDS_NIMP_init {
/R { D9FR } bind def
/setcmykcolor where {begin 1.0 0.0 1.0 0.2 setcmykcolor end} if
} def
/RDS_PIMP_init {
/R { D9FR } bind def
/setcmykcolor where {begin 1.0 0.0 1.0 0.2 setcmykcolor end} if
} def
/RDS_ACTIV_init {
/R { D6FR } bind def
/setcmykcolor where {begin 0.0 0.0 1.0 0.0 setcmykcolor end} if
} def
/RDS_NDIF_init {
/R { D9FR } bind def
/setcmykcolor where {begin 1.0 0.0 1.0 0.2 setcmykcolor end} if
} def
/RDS_PDIF_init {
/R { D1FR } bind def
/setcmykcolor where {begin 0.0 0.2 1.0 0.2 setcmykcolor end} if
} def
/RDS_NTIE_init {
/R { D1FR } bind def
/setcmykcolor where {begin 1.0 0.0 1.0 0.0 setcmykcolor end} if
} def
/RDS_PTIE_init {
/R { D9FR } bind def
/setcmykcolor where {begin 0.0 0.2 1.0 0.2 setcmykcolor end} if
} def
/RDS_POLY_init {
/R { X1FR } bind def
/setcmykcolor where {begin 0.0 1.0 1.0 0.2 setcmykcolor end} if
} def
/RDS_GATE_init {
/R { X1FR } bind def
/setcmykcolor where {begin 0.0 1.0 1.0 0.0 setcmykcolor end} if
} def
/RDS_TPOLY_init {
/R { X1FR } bind def
/setcmykcolor where {begin 0.2 0.7 0.7 0.0 setcmykcolor end} if
} def
/RDS_CONT_init {
/R { X2FR } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_ALU1_init {
/R { D7FR } bind def
/setcmykcolor where {begin 1.0 1.0 0.0 0.2 setcmykcolor end} if
} def
/RDS_VALU1_init {
/R { D7FR } bind def
/setcmykcolor where {begin 0.8 0.0 0.2 0.0 setcmykcolor end} if
} def
/RDS_TALU1_init {
/R { D7FR } bind def
/setcmykcolor where {begin 1.0 1.0 0.0 0.0 setcmykcolor end} if
} def
/RDS_VIA1_init {
/R { X2FR } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_TVIA1_init {
/R { X2FR } bind def
/setcmykcolor where {begin 0.5 0.2 0.0 0.1 setcmykcolor end} if
} def
/RDS_ALU2_init {
/R { D2FR } bind def
/setcmykcolor where {begin 1.0 0.0 0.0 0.0 setcmykcolor end} if
} def
/RDS_TALU2_init {
/R { D2FR } bind def
/setcmykcolor where {begin 1.0 0.0 0.2 0.0 setcmykcolor end} if
} def
/RDS_VIA2_init {
/R { X2FR } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_ALU3_init {
/R { D8FR } bind def
/setcmykcolor where {begin 0.0 1.0 0.0 0.2 setcmykcolor end} if
} def
/RDS_TALU3_init {
/R { D8FR } bind def
/setcmykcolor where {begin 0.0 1.0 0.0 0.0 setcmykcolor end} if
} def
/RDS_VIA3_init {
/R { X2FR } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_ALU4_init {
/R { D8FR } bind def
/setcmykcolor where {begin 0.0 1.0 0.0 0.2 setcmykcolor end} if
} def
/RDS_CPAS_init {
/R { NOP } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 0.0 setcmykcolor end} if
} def
/RDS_REF_init {
/R { NOP } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_USER0_init {
/R { NOP } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_USER1_init {
/R { NOP } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_USER2_init {
/R { NOP } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/RDS_ABOX_init {
/R { E2R } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
/UNKNOW_init {
/R { NOP } bind def
/setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if
} def
%- - - END OF LAYER TRADUCTION - - -
%%EndSetup
% This is the end of the l2p COLOR PostScript dictionnary.
% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

View File

@ -0,0 +1,782 @@
/*
* This file is part of the Alliance CAD System
* Copyright (C) Laboratoire LIP6 - Département ASIM
* Universite Pierre et Marie Curie
*
* Home page : http://www-asim.lip6.fr/alliance/
* E-mail support : mailto:alliance-support@asim.lip6.fr
*
* This progam is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* Alliance VLSI CAD System is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with the GNU C Library; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/****************************************************************************/
/* */
/* Chaine de CAO & VLSI Alliance */
/* */
/* Produit : (R)ectangle (D)ata (S)tructure (2)to (P)ost(S)cript driver */
/* Fichier : drive_ps.c */
/* */
/* (c) copyright 1991-94 Laboratoire MASI equipe CAO & VLSI */
/* Tous droits reserves */
/* Support : e-mail cao-vlsi@masi.ibp.fr */
/* */
/* Auteur(s) : Gilles-Eric DESCAMPS le : 23/03/1993 */
/* */
/* Modifie par : Gilles-Eric DESCAMPS le : 30/01/1994 */
/* 1.03 introduces -landscape, automating centering of cell in drawing, */
/* suppression of '-1x1' extension for monopages drawings, use of an */
/* external PostScript dictionnary, ability to give its own dictionnary, */
/* */
/* Modifie par : Etienne LACOUME le : 02/03/1995 */
/* 1.10 introduces a better quality in drawing,the capability to display */
/* the names of rectangles,connectors,references,instances,segments,the */
/* ability to use several sizes for the font,the manualfeed mode for the */
/* printer. */
/****************************************************************************/
#ident "$Id: drive_ps.c,v 1.1 2002/04/03 13:55:21 ludo Exp $"
#define DRIVE2PS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mut.h"
#include "mph.h"
#include "rds.h"
#include "rwi.h"
#include "rut.h"
#include RPS_H
#include "rtl.h"
#include "rpr.h"
#include "rfm.h"
struct rps_param p;
enum {E_NOPARAM, E_NOFIG, E_OPEN, E_CLOSE, E_WRITE, E_READ, E_OUTBOX};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_error (type, msg)
int type;
char *msg;
{
fflush (stdout);
fprintf (stderr, "RPS_ERROR: ");
switch (type) {
case E_NOPARAM :
fprintf (stderr, "No parameters given to RPS !");
break;
case E_NOFIG :
fprintf (stderr, "No figure given to RPS !");
break;
case E_OPEN :
fprintf (stderr, "Problem while opening file ");
fprintf (stderr, msg);
break;
case E_CLOSE :
fprintf (stderr, "Problem while closing file ");
fprintf (stderr, msg);
break;
case E_WRITE :
fprintf (stderr, "Problem while writing file ");
fprintf (stderr, msg);
break;
case E_READ :
fprintf (stderr, "Problem while reading file ");
fprintf (stderr, msg);
break;
case E_OUTBOX :
fprintf (stderr, msg);
break;
default :
fprintf (stderr, "Unknow internal error");
};
fprintf (stderr,"\n");
fflush (stderr);
exit (1);
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
long rps_getboundingbox( FigureRds, X, Y, dX, dY )
rdsfig_list *FigureRds;
long *X, *Y, *dX, *dY;
{
rdsrec_list *Rectangle;
rdsins_list *Instance;
int Layer;
long X1, Y1, X2, Y2;
long XMinRds, YMinRds, XMaxRds, YMaxRds;
long MaskCounter;
short ComputeBound;
MaskCounter = 0;
ComputeBound = RDS_YES;
for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) {
for ( Rectangle = FigureRds->LAYERTAB[Layer];
Rectangle != (rdsrec_list *)NULL;
Rectangle = Rectangle->NEXT ) {
MaskCounter++;
X1 = Rectangle->X;
X2 = X1 + Rectangle->DX;
Y1 = Rectangle->Y;
Y2 = Y1 + Rectangle->DY;
if ( ComputeBound ) {
ComputeBound = RDS_NO;
XMaxRds = X2;
YMaxRds = Y2;
XMinRds = X1;
YMinRds = Y1;
} else {
if ( XMaxRds < X2 ) XMaxRds = X2;
if ( YMaxRds < Y2 ) YMaxRds = Y2;
if ( XMinRds > X1 ) XMinRds = X1;
if ( YMinRds > Y1 ) YMinRds = Y1;
};
};
};
for ( Instance = FigureRds->INSTANCE;
Instance != (rdsins_list *)NULL;
Instance = Instance->NEXT ) {
for ( Layer = 0;
Layer < RDS_MAX_LAYER;
Layer++ ) {
for ( Rectangle = Instance->LAYERTAB[Layer];
Rectangle != (rdsrec_list *)NULL;
Rectangle = Rectangle->NEXT ) {
MaskCounter++;
X1 = Rectangle->X;
X2 = X1 + Rectangle->DX;
Y1 = Rectangle->Y;
Y2 = Y1 + Rectangle->DY;
if ( ComputeBound ) {
ComputeBound = RDS_NO;
XMaxRds = X2;
YMaxRds = Y2;
XMinRds = X1;
YMinRds = Y1;
} else {
if ( XMaxRds < X2 ) XMaxRds = X2;
if ( YMaxRds < Y2 ) YMaxRds = Y2;
if ( XMinRds > X1 ) XMinRds = X1;
if ( YMinRds > Y1 ) YMinRds = Y1;
};
};
};
};
*X = XMinRds;
*dX = XMaxRds-XMinRds;
*Y = YMinRds;
*dY = YMaxRds-YMinRds;
return( MaskCounter );
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_put (pg, s)
rps_pge *pg;
char *s;
{
static char buf[80];
static int res, lg;
lg = strlen(s);
res = fprintf(pg->f, "%s", s);
if (res != lg) {
rps_error(E_WRITE, pg->fname);
}
pg->nb_bytes_written += lg;
if ((pg->nb_bytes_written / 16384) > pg->nb_last_written) {
pg->nb_last_written = (pg->nb_bytes_written / 16384) ;
sprintf (buf, "(%ldKo of %s)INFO\n",
pg->nb_last_written*16, pg->param->figname);
rps_put (pg, buf);
};
}
extern rps_print_dict_color ();
extern rps_print_dict_bw ();
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_put_psdict (pg)
rps_pge *pg;
{
FILE *dict;
char buffer[BUFSIZ+16];
size_t lu, ecr;
if (strlen (p.dictfilename)) {
dict = fopen (p.dictfilename, "r");
if (!dict) {
rps_error (E_OPEN, p.dictfilename);
};
while (!feof (dict)) {
lu = fread (buffer, 1, BUFSIZ, dict);
if (lu == -1) {
rps_error (E_READ, p.dictfilename);
};
ecr = fwrite (buffer, 1, lu, pg->f);
if (ecr == -1) {
rps_error (E_WRITE, pg->fname);
};
};
if (fclose (dict) == EOF) {
rps_error (E_CLOSE, p.dictfilename);
};
} else {
if (p.couleur) {
rps_print_dict_color (pg);
} else {
rps_print_dict_bw (pg);
};
};
if (p.a3tray) {
rps_put (pg, "statusdict /a3tray known\n");
rps_put (pg, " {statusdict begin a3tray end}\n");
rps_put (pg, "if\n\n");
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_put_header (pg)
rps_pge *pg;
{
char buf[512];
char fname[80];
sprintf (buf, "\n%ld %ld %ld %ld ER\n", pg->ps_x,
pg->ps_y, pg->ps_w, pg->ps_h);
rps_put (pg, buf);
sprintf (buf, "%ld %ld moveto\n", pg->ps_x, pg->ps_y - 16);
rps_put (pg, buf);
rps_put (pg, "/Courier-Bold findfont 14 scalefont setfont\n");
strcpy (fname, pg->fname);
fname[strlen(fname)-3]='\0';
sprintf (buf, "(%s)show\n", fname);
rps_put (pg, buf);
if ((p.nbx_pages!=1) || (p.nby_pages!=1)) {
rps_put (pg, "/Helvetica findfont 10 scalefont setfont\n");
sprintf (buf, "( %dx%d pages total)", p.nbx_pages,
p.nby_pages);
sprintf (buf, "%sshow\n", buf);
rps_put (pg, buf);
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_open_output (p)
rps_par *p;
{
int nbxf, nbyf, x, y;
double topsw, topsh;
char fname[256];
char buf[512];
rps_pge *pg;
/* On calcule l'echelle */
topsw = ((double) p->draw_w) / (double) (p->rds_w);
topsh = ((double) p->draw_h) / (double) (p->rds_h);
if (topsw < topsh) {
p->width_first = RDS_YES;
if (p->verbose) {
printf ("\twidth first, ");
};
} else {
p->width_first = RDS_NO;
if (p->verbose) {
printf ("\theight first, ");
};
};
if (p->tops == 0.0) {
if (p->width_first) {
p->tops = topsw;
} else {
p->tops = topsh;
};
};
if (p->verbose) {
printf ("SCALE=%f, resol=%lddpi ", p->tops, p->resol);
};
/* recentrage de la fenetre RDS */
p->rds_dx = ((long) ((double) p->draw_w / p->tops) - p->rds_w) / 2 ;
printf (" Centering:(%ld", p->rds_dx);
p->rds_dy = ((long) ((double) p->draw_h / p->tops) - p->rds_h) / 2 ;
printf (",%ld)\n", p->rds_dy);
/* On calcule le nombre de feuilles */
if (p->draw_w % p->paper_w) {
nbxf = (p->draw_w / p->paper_w) + 1;
} else {
nbxf = (p->draw_w / p->paper_w);
};
if (p->draw_h % p->paper_h) {
nbyf = (p->draw_h / p->paper_h) + 1;
} else {
nbyf = (p->draw_h / p->paper_h);
};
p->nbx_pages = nbxf;
p->nby_pages = nbyf;
/* On genere les infos sur cette feuille unique */
if ((p->nbx_pages == 1) && (p->nby_pages == 1)) {
if (p->verbose) {
printf ("\tOne page ");
};
pg = (rps_pge *) mbkalloc (sizeof (rps_pge));
pg->param = p;
pg->next = NULL;
pg->prpnom = (list_rnm *) NULL;
sprintf (fname,"%s.ps", p->figname);
pg->fname = namealloc (fname);
pg->f = fopen (pg->fname, "w");
if (!pg->f) {
rps_error (E_OPEN, pg->fname);
};
pg->nb_bytes_written = 0;
pg->nb_last_written = 0;
/* On calcule la BoundingBox PostScript par page */
pg->ps_x = p->paper_x;
pg->ps_y = p->paper_y;
if (p->draw_w % p->paper_w) {
pg->ps_w = p->draw_w % p->paper_w;
} else {
pg->ps_w = p->paper_w;
};
if (p->draw_h % p->paper_h) {
pg->ps_h = p->draw_h % p->paper_h;
} else {
pg->ps_h = p->paper_h;
};
if (p->verbose) {
printf (" PS(%ld,%ld,%ld,%ld) ", pg->ps_x,
pg->ps_y, pg->ps_w, pg->ps_h);
};
/* On calcule la BoundingBox RDS par page */
pg->rds_x = p->rds_x;
pg->rds_y = p->rds_y;
pg->rds_h = p->draw_h / p->tops;
pg->rds_w = p->draw_w / p->tops;
if (p->verbose) {
printf (" RDS(%ld,%ld,%ld,%ld)\n", pg->rds_x,
pg->rds_y, pg->rds_w, pg->rds_h);
};
p->headpages = pg;
rps_put (pg, "%!PS-Adobe-2.0 EPSF-1.2\n");
sprintf (buf, "%%%%Title: %s\n", pg->fname);
rps_put (pg, buf);
sprintf (buf, "%%%%BoundingBox: %ld %ld %ld %ld\n",
pg->ps_x, pg->ps_y, pg->ps_x+pg->ps_w,
pg->ps_y+pg->ps_h);
rps_put (pg, buf);
sprintf (buf, "%%%%Creator: Rps v%s", RPS_VERSION);
sprintf (buf, "%s with%s\n", buf, p->cmdline);
rps_put (pg, buf);
sprintf (buf, "%%SCALE=%f\n", p->tops);
rps_put (pg, buf);
rps_put_psdict (pg);
rps_put (pg, "%%Page: 1 1\n");
if (p->header) {
rps_put_header (pg);
};
sprintf (buf, "%f setlinewidth\n", p->tops / 2.0);
rps_put (pg, buf);
return;
};
/* On genere les infos sur ces feuilles */
p->headpages = NULL;
for (x=0 ; x<nbxf ; x++) {
for (y=0 ; y<nbyf ; y++) {
if (p->verbose) {
printf ("\tpage (%d,%d) ", x+1, y+1);
};
pg = (rps_pge *) mbkalloc (sizeof (rps_pge));
pg->param = p;
pg->next = p->headpages;
pg->prpnom = (list_rnm *) NULL;
sprintf (fname,"%s-%dx%d.ps", p->figname, x+1, y+1);
pg->fname = namealloc (fname);
pg->f = fopen (pg->fname, "w");
pg->nb_bytes_written = 0;
pg->nb_last_written = 0;
/* On calcule la BoundingBox PostScript par page */
pg->ps_x = p->paper_x;
pg->ps_y = p->paper_y;
if (!pg->f) {
rps_error (E_OPEN, pg->fname);
};
if ((x == nbxf-1) && (p->draw_w % p->paper_w)) {
pg->ps_w = p->draw_w % p->paper_w;
} else {
pg->ps_w = p->paper_w;
};
if ((y == nbyf-1) && (p->draw_h % p->paper_h)) {
pg->ps_h = p->draw_h % p->paper_h;
} else {
pg->ps_h = p->paper_h;
};
if (p->verbose) {
printf (" PS(%ld,%ld,%ld,%ld) ", pg->ps_x,
pg->ps_y, pg->ps_w, pg->ps_h);
};
/* On calcule la BoundingBox RDS par page */
if (p->width_first) {
pg->rds_w = (p->rds_w/nbxf);
pg->rds_h = (pg->rds_w*pg->ps_h)/pg->ps_w;
pg->rds_x = p->rds_x + (x*pg->rds_w);
pg->rds_y = p->rds_y + (y*pg->rds_h);
} else {
pg->rds_h = (p->rds_h/nbyf);
pg->rds_w = (pg->rds_h*pg->ps_w)/pg->ps_h;
pg->rds_y = p->rds_y + (y*pg->rds_h);
pg->rds_x = p->rds_x + (x*pg->rds_w);
};
if (p->verbose) {
printf (" RDS(%ld,%ld,%ld,%ld)\n", pg->rds_x,
pg->rds_y, pg->rds_w, pg->rds_h);
};
p->headpages = pg;
rps_put (pg, "%!PS-Adobe-2.0 EPSF-1.2\n");
sprintf (buf, "%%%%Title: %s\n", pg->fname);
rps_put (pg, buf);
sprintf (buf, "%%%%BoundingBox: %ld %ld %ld %ld\n",
pg->ps_x, pg->ps_y, pg->ps_x+pg->ps_w,
pg->ps_y+pg->ps_h);
rps_put (pg, buf);
sprintf (buf, "%%%%Creator: Rps v%s", RPS_VERSION);
sprintf (buf, "%s with%s\n", buf, p->cmdline);
rps_put (pg, buf);
sprintf (buf, "%%SCALE=%f\n", p->tops);
rps_put (pg, buf);
rps_put_psdict (pg);
rps_put (pg, "%%Page: 1 1\n");
if (p->header) {
rps_put_header (pg);
};
sprintf (buf, "%f setlinewidth\n", p->tops / 2.0);
rps_put (pg, buf);
};
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_start_layer (l)
int l;
{
static rps_pge *pg;
static char buffer[ 128 ];
if (p.verbose) {
printf ("\t%02d layers to do...\r", RDS_MAX_LAYER-l);
fflush (stdout);
};
for (pg=p.headpages ; pg ; pg=pg->next) {
rps_put (pg, "\n%- - - - - - - - - - - - [NEW LAYER]\n");
rps_put (pg, "/layer save def\n");
/*
** Modified by L.Jacomme 21/09/95
*/
if ( (l >= RDS_MAX_LAYER ) ||
(l < 0 ) )
{
rps_put (pg, "UNKNOW_init\n");
}
else
{
sprintf( buffer, "%s_init\n", RDS_LAYER_NAME[ l ] );
rps_put (pg, buffer );
}
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_finish_layer (l)
int l;
{
static rps_pge *pg;
if (p.verbose) {
printf ("\t \r");
};
for (pg=p.headpages ; pg ; pg=pg->next) {
rps_put (pg, "layer restore\n");
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_filter_rec (r)
rdsrec_list *r;
{
static long ax, ay, aw, ah, tx, ty, tw, th;
static rps_pge *pg;
static char buf[512];
static double px, py, pw, ph;
if (p.landscape) {
ax = p.rds_x + (p.rds_x+p.rds_w) - (r->Y+r->DY);
ay = r->X;
aw = abs(r->DY);
ah = abs(r->DX);
} else {
ax=r->X; ay=r->Y; aw=r->DX; ah=r->DY;
};
ax += p.rds_dx;
ay += p.rds_dy;
if ((ax < p.rds_x) || (ay < p.rds_y) || (aw > p.rds_w)
|| (ah > p.rds_h)) {
sprintf (p.err, "(%d, %d, %d, %d) is", ax, ay, aw, ah);
sprintf (p.err, "%s out of boundingbox:(%d, %d, %d, %d)",
p.err, p.rds_x, p.rds_y, p.rds_w, p.rds_h);
rps_error (E_OUTBOX, p.err);
}
for (pg=p.headpages ; pg ; pg=pg->next) {
/* Est-on en-dehors de la page RDS ? */
if ((ax - pg->rds_x) > pg->rds_w) continue;
if ((ay - pg->rds_y) > pg->rds_h) continue;
if (((ax - pg->rds_x) + aw) < 0) continue;
if (((ay - pg->rds_y) + ah) < 0) continue;
/* On tronque aux bords de la page RDS */
tx = (ax < pg->rds_x ?
pg->rds_x :
ax);
ty = (ay < pg->rds_y ?
pg->rds_y :
ay);
tw = ((ax + aw) > (pg->rds_x + pg->rds_w) ?
((pg->rds_x + pg->rds_w) - tx) :
(ax + aw) - tx);
th = ((ay + ah) > (pg->rds_y + pg->rds_h) ?
((pg->rds_y + pg->rds_h) - ty) :
(ay + ah) - ty);
/* On recentre sur la page */
tx -= pg->rds_x;
ty -= pg->rds_y;
/* On traduit en Unites PostScript */
px = (tx * p.tops) + pg->ps_x;
py = (ty * p.tops) + pg->ps_y;
pw = (tw * p.tops);
ph = (th * p.tops);
if (((long) (pw*p.resol)/72) || ((long) (ph*p.resol)/72)) {
sprintf (buf, "%f\t%f\t%f\t%f\tR\n", px, py, pw, ph);
rps_put (pg, buf);
stonrec(px,py,pw,ph,r,pg);
};
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void stonrec (ax,ay,aw,ah,ar,ap)
double ax,ay,aw,ah;
rdsrec_list *ar;
rps_pge *ap;
{
list_rnm *recpno;
if (!p.norectname && ar->NAME!=NULL && !IsRdsConInter(ar)) {
if ((IsRdsConExter(ar) && p.noconame) ||
(IsRdsReference(ar) && p.norefname) ||
(IsRdsInstance(ar) && p.noinstname) ||
(IsRdsSegment(ar) && p.nosegname) ) {
}
else {
recpno=(list_rnm *) mbkalloc (sizeof(list_rnm));
recpno->x=(int)(ax+(aw/2.0));
recpno->y=(int)(ay+(ah/2.0));
recpno->rot=RDS_NO;
if ((ah > aw) && IsRdsInstance(ar)) recpno->rot=RDS_YES;
recpno->lirec=ar;
recpno->next=ap->prpnom;
ap->prpnom=recpno;
};
};
return;
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void addname()
{
char buf[80];
rps_pge *pg;
list_rnm *pgl;
float longlet,basewr;
int scale,xc,yc,xrot;
char * name;
longlet=0.57;
scale=p.textsize;
basewr=longlet*(float)scale;
for (pg=p.headpages; pg!=(rps_pge *)NULL; pg=pg->next) {
sprintf(buf,"/Courier-Bold findfont %d scalefont setfont\n",scale);
rps_put(pg,buf);
for (pgl=pg->prpnom; pgl!=(list_rnm*) NULL; pgl=pgl->next){
name=pgl->lirec->NAME;
if (pgl->rot) {
xc=pgl->x + (int)(basewr/2.0);
yc=pgl->y - (int)(basewr*(float)(strlen(name))/2.0);
xrot=90;
} else {
xc=pgl->x - (int)(basewr*(float)(strlen(name))/2.0);
yc=pgl->y - (int)(basewr/2.0);
xrot = 0;
};
sprintf(buf,"%d %d moveto (%s) %d showstring\n",
xc,yc,name,xrot);
rps_put(pg,buf);
};
};
return;
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void catinst(ap)
rps_par * ap;
{
rdsins_list * Instance;
rdsrec_list * pcatr,*prabox;
rdsfig_list * FigureRds;
FigureRds=ap->fig;
for (Instance = FigureRds->INSTANCE;
Instance != (rdsins_list *) NULL;
Instance = Instance->NEXT) {
prabox = Instance->LAYERTAB[RDS_ABOX];
if (prabox == NULL) continue;
pcatr = (rdsrec_list *) mbkalloc(sizeof(rdsrec_list));
pcatr->X = prabox->X;
pcatr->Y = prabox->Y;
pcatr->DX = prabox->DX;
pcatr->DY = prabox->DY;
pcatr->FLAGS = prabox->FLAGS;
pcatr->NAME = Instance->INSNAME;
pcatr->NEXT = FigureRds->LAYERTAB[RDS_ABOX];
FigureRds->LAYERTAB[RDS_ABOX] = pcatr;
};
return;
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_close_output (p)
rps_par *p;
{
rps_pge *pg;
for (pg=p->headpages ; pg ; pg=pg->next) {
if (p->manualfeed) rps_put(pg,"MF\n");
rps_put (pg, "showpage\n");
rps_put (pg, "%%EOF\n");
if (fclose (pg->f) == EOF) {
rps_error (E_CLOSE, pg->fname);
};
};
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void rps_walk_fig (fig, layer, param)
rdsfig_list *fig;
int layer;
rps_par *param;
{
rdsrec_list *r;
/*
rdsins_list *i;
rdsfig_list *m;
*/
for ( r = fig->LAYERTAB[layer] ;
r != (rdsrec_list *) NULL ;
r = r->NEXT) {
rps_filter_rec (r);
}
/*
for (i=fig->INSTANCE ; i!=(rdsins_list *)NULL ; i=i->NEXT) {
m = rps_get_fig (i->FIGNAME);
if (incatalog(i->FIGNAME)) {
}
*/
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void saveps (p)
rps_par *p;
{
long nbmask, swap;
int l;
if (!p) {
rps_error (E_NOPARAM,"");
};
/* On calcule la Bounding Box RDS */
if (!(p->fig)) {
rps_error (E_NOFIG,"");
};
nbmask = rps_getboundingbox (p->fig, &p->rds_x, &p->rds_y,
&p->rds_w, &p->rds_h);
if (p->verbose) {
printf ("\t%ld masks, ", nbmask);
printf ("BBox=(x=%ld,y=%ld,w=%ld,h=%ld)\n", p->rds_x,
p->rds_y, p->rds_w, p->rds_h);
};
if (p->landscape) {
swap = p->rds_y;
p->rds_y = p->rds_x;
p->rds_x = swap;
swap = p->rds_h;
p->rds_h = p->rds_w;
p->rds_w = swap;
};
/* On revient en unites PostScript */
if (p->verbose) {
printf ("\tPaper=(%.3f,%.3f) %.3f inch(es) wide, %.3f ",
p->paper_x/100.0, p->paper_y/100.0, p->paper_w/100.0,
p->paper_h/100.0);
printf ("inch(es) tall\n");
};
p->paper_x = (p->paper_x*72)/100;
p->paper_y = (p->paper_y*72)/100;
p->paper_w = (p->paper_w*72)/100;
p->paper_h = (p->paper_h*72)/100;
p->draw_w = (p->draw_w*72)/100;
p->draw_h = (p->draw_h*72)/100;
/* On reduit de la taille necessaire a la cartouche */
if (p->header) {
p->paper_y += 18 ;
p->paper_h -= 18 ;
};
/* On calcule la taille du dessin si elle nous est donnee en pages */
if ((p->nbx_pages!=0) && (p->nbx_pages!=1)) {
p->draw_w = p->paper_w * p->nbx_pages;
};
if ((p->nby_pages!=0) && (p->nby_pages!=1)) {
p->draw_h = p->paper_h * p->nby_pages;
};
if (p->verbose) {
printf ("\tDrawing= %.3f inch(es) wide, %.3f inch(es) tall\n",
p->draw_w/72.0, p->draw_h/72.0);
};
catinst(p);
/* On ouvre le(s) fichier(s) de sortie */
rps_open_output (p);
fflush (stdout);
for (l=0 ; l<RDS_MAX_LAYER ; l++) {
rps_start_layer (l);
rps_walk_fig (p->fig, l, p);
rps_finish_layer (l);
};
addname();
/* On ferme le(s) fichier(s) de sortie */
rps_close_output (p);
};
/****************************************************************************/

359
alliance/src/l2p/src/l2p.c Normal file
View File

@ -0,0 +1,359 @@
/*
* This file is part of the Alliance CAD System
* Copyright (C) Laboratoire LIP6 - Département ASIM
* Universite Pierre et Marie Curie
*
* Home page : http://www-asim.lip6.fr/alliance/
* E-mail support : mailto:alliance-support@asim.lip6.fr
*
* This progam is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* Alliance VLSI CAD System is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with the GNU C Library; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/****************************************************************************/
/* */
/* Chaine de CAO & VLSI Alliance */
/* */
/* Produit : (R)ectangle (D)ata (S)tructure (2)to (P)ost(S)cript driver */
/* Fichier : rds2ps.c */
/* */
/* (c) copyright 1991-94 Laboratoire MASI equipe CAO & VLSI */
/* Tous droits reserves */
/* Support : e-mail cao-vlsi@masi.ibp.fr */
/* */
/* Auteur(s) : Gilles-Eric DESCAMPS le : 23/03/1993 */
/* */
/* Modifie par : Gilles-Eric DESCAMPS le : 30/01/1994 */
/* Modifie par : Etienne LACOUME le : 02/03/1995 */
/* */
/****************************************************************************/
#ident "$Id: l2p.c,v 1.1 2002/04/03 13:55:21 ludo Exp $"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mut.h"
#include "mph.h"
#include "mpu.h"
#include "rds.h"
#include "rwi.h"
#include "rut.h"
#include RPS_H
#include "rtl.h"
#include "rpr.h"
#include "rfm.h"
extern void rps_print_man ();
extern struct rps_param p;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void print_usage (progname)
char *progname;
{
printf ("usage: %s [options] cellname\n", progname);
printf (" where cellname is the name of the figure ");
printf ("without extensions,\n");
printf ("or: %s -help\n", progname);
printf (" in order to get the full list of ");
printf ("options.\n\n");
};
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void ParseArgs (argc, argv, param)
int argc;
char **argv;
struct rps_param *param;
{
int a,stext;
rps_pge fakepage;
strcpy (param->cmdline, "");
for (a=0 ; a<argc ; a++){
strcat (param->cmdline, " ");
strcat (param->cmdline, argv[a]);
};
if (argc == 2) {
if (!strcmp(argv[1], "-givebwdict")) {
fakepage.nb_bytes_written = 0;
fakepage.nb_last_written = 0;
fakepage.f = stdout;
fakepage.param = param;
rps_print_dict_bw (&fakepage);
exit (0);
};
if (!strcmp(argv[1], "-givecolordict")) {
fakepage.nb_bytes_written = 0;
fakepage.nb_last_written = 0;
fakepage.f = stdout;
fakepage.param = param;
rps_print_dict_color (&fakepage);
exit (0);
};
if (!strcmp(argv[1], "-help")) {
rps_print_man ();
exit (0);
};
};
alliancebanner ("L2P",RPS_VERSION,
"(L)ayout to(2) (P)aper: A tool for PostScript plots",
"1994",ALLIANCE_VERSION);
if (argc == 1) {
print_usage (argv[0]);
exit (1);
};
param->figname=namealloc (argv[argc-1]);
param->draw_w = 740;
param->draw_h = 1094;
param->paper_x = 50;
param->paper_y = 25;
param->paper_w = 740;
param->paper_h = 1119;
param->verbose = RDS_YES;
param->a3tray = RDS_NO;
param->couleur = RDS_NO;
param->norectname = RDS_NO;
param->noconame = RDS_NO;
param->norefname = RDS_NO;
param->noinstname = RDS_NO;
param->nosegname = RDS_NO;
param->textsize = 8;
param->manualfeed = RDS_NO;
param->flatten = RDS_NO;
param->header = RDS_YES;
param->landscape = RDS_NO;
param->real = RDS_NO;
param->resol = 100;
param->nbx_pages = 0;
param->nby_pages = 0;
param->tops = 0.0;
strcpy (param->papername,"a4");
param->headpages = NULL;
strcpy (param->dictfilename, "");
for (a=1 ; a<(argc-1) ; a++) {
if (argv[a][0] != '-') {
print_usage (argv[0]);
exit (1);
};
if (!strcmp(argv[a], "-fA3")) {
param->a3tray = RDS_YES;
param->draw_w = 1100;
param->draw_h = 1565;
param->paper_x = 50;
param->paper_y = 25;
param->paper_w = 1100;
param->paper_h = 1590;
continue;
};
if (!strcmp(argv[a], "-fLETTER")) {
param->draw_w = 770;
param->draw_h = 1025;
param->paper_x = 50;
param->paper_y = 25;
param->paper_w = 770;
param->paper_h = 1050;
continue;
};
if (!strcmp(argv[a], "-fLEGAL")) {
param->draw_w = 770;
param->draw_h = 1325;
param->paper_x = 50;
param->paper_y = 25;
param->paper_w = 770;
param->paper_h = 1350;
continue;
};
if (!strcmp(argv[a], "-color")) {
param->couleur = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-nrname",7)) {
param->norectname = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-ncname",7)) {
param->noconame = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-nrfname",8)) {
param->norefname = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-niname",7)) {
param->noinstname = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-nsname",7)) {
param->nosegname = RDS_YES;
continue;
};
if (!strncmp(argv[a],"-tsize=",7)) {
if (sscanf(&(argv[a] [7]),"%d",&stext) !=1) {
print_usage(argv[a]);
exit(1);
};
switch(stext) {
case 6:
param->textsize=6;
break;
case 10:
param->textsize=10;
break;
case 12:
param->textsize=12;
break;
case 14:
param->textsize=14;
break;
default:
param->textsize=8;
break;
};
continue;
};
if (!strncmp(argv[a],"-mfeed",6)) {
param->manualfeed = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-drawingsize=", 13)) {
if (sscanf (&(argv[a][13]),"%ldx%ld",
&param->draw_w,
&param->draw_h) != 2) {
print_usage (argv[0]);
exit (1);
};
continue;
};
if (!strcmp(argv[a], "-landscape")) {
param->landscape = RDS_YES;
continue;
};
if (!strcmp(argv[a], "-noheader")) {
param->header = RDS_NO;
continue;
};
if (!strncmp(argv[a], "-papersize=", 11)) {
if (sscanf (&(argv[a][11]),"%ldx%ldx%ldx%ld",
&param->paper_x, &param->paper_y,
&param->paper_w, &param->paper_h) != 4) {
print_usage (argv[0]);
exit (1);
};
continue;
};
if (!strncmp(argv[a], "-pages=", 7)) {
if (sscanf (&(argv[a][7]),"%ldx%ld",
&param->nbx_pages,
&param->nby_pages) != 2) {
print_usage (argv[0]);
exit (1);
};
continue;
};
if (!strcmp(argv[a], "-real")) {
param->real = RDS_YES;
continue;
};
if (!strcmp(argv[a], "-rflattentrans")) {
param->flatten = RDS_YES;
param->tilcatal = NO;
continue;
};
if (!strcmp(argv[a], "-rflattencatal")) {
param->flatten = RDS_YES;
param->tilcatal = YES;
continue;
};
if (!strncmp(argv[a], "-resol=", 7)) {
if (sscanf (&(argv[a][7]),"%ld",
&param->resol) != 1) {
print_usage (argv[0]);
exit (1);
};
continue;
};
if (!(strcmp(argv[a], "-rotate")
&& strcmp(argv[a], "-landscape"))) {
param->landscape = RDS_YES;
continue;
};
if (!strncmp(argv[a], "-scale=", 7)) {
if (sscanf (&(argv[a][7]),"%lf",
&param->tops) != 1) {
print_usage (argv[0]);
exit (1);
};
continue;
};
if (!strncmp(argv[a], "-usedict=", 9)) {
if (sscanf (&(argv[a][9]),"%s",
param->dictfilename) != 1) {
print_usage (argv[0]);
exit (1);
};
continue;
};
print_usage (argv[0]);
exit (1);
};
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
int main (argc, argv)
int argc;
char **argv;
{
phfig_list *mbk_fig;
/* Initialisations */
mbkenv ();
rdsenv ();
ParseArgs (argc, argv, &p);
printf("\n- Loading technology file : %s\n", RDS_TECHNO_NAME);
loadrdsparam();
/* Chargement de la figure */
if (p.real) {
printf ("- Loading rds figure: %s.%s\n", p.figname, RDS_IN);
fflush (stdout);
p.fig = getrdsfig (p.figname, 'A', 0);
if (p.flatten) {
printf ("- Flattening rds figure: %s\n", p.figname);
fflush (stdout);
rflattenrdsfig (p.fig, YES, p.tilcatal);
};
} else {
printf ("- Loading mbk figure: %s.%s\n", p.figname, IN_PH);
fflush (stdout);
mbk_fig = getphfig (p.figname, 'A');
if (p.flatten) {
printf ("- Flattening mbk figure: %s\n", p.figname);
fflush (stdout);
rflattenphfig (mbk_fig, YES, p.tilcatal);
};
figmbkrds (mbk_fig, 0, 0);
p.fig = HEAD_RDSFIG;
};
/* Sauvegarde en PostScript */
printf ("- Saving PostScript figure: %s\n", p.figname);
fflush (stdout);
saveps (&p);
/* Tout est bien qui finit bien */
printf ("- All done.\n");
return (0);
}
/****************************************************************************/

View File

@ -0,0 +1,122 @@
/*
* This file is part of the Alliance CAD System
* Copyright (C) Laboratoire LIP6 - Département ASIM
* Universite Pierre et Marie Curie
*
* Home page : http://www-asim.lip6.fr/alliance/
* E-mail support : mailto:alliance-support@asim.lip6.fr
*
* This progam is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* Alliance VLSI CAD System is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with the GNU C Library; see the file COPYING. If not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/****************************************************************************/
/* */
/* Chaine de CAO & VLSI Alliance */
/* */
/* Produit : (R)ectangle (D)ata (S)tructure (2)to (P)ost(S)cript driver */
/* Fichier : drive_ps.h */
/* */
/* (c) copyright 1991-94 Laboratoire MASI equipe CAO & VLSI */
/* Tous droits reserves */
/* Support : e-mail cao-vlsi@masi.ibp.fr */
/* */
/* Auteur(s) : Gilles-Eric DESCAMPS le : 23/03/1993 */
/* */
/* Modifie par : Gilles-Eric DESCAMPS le : 30/01/1994 */
/* Modifie par : Etienne LACOUME le : 02/03/1995 */
/* */
/****************************************************************************/
typedef struct list_rnom
{
struct list_rnom * next;
rdsrec_list * lirec;
int x;
int y;
char rot;
}list_rnm;
typedef struct rps_pages
{
struct rps_param *param;
struct rps_pages *next;
struct list_rnom *prpnom;
FILE *f;
char *fname;
long nb_bytes_written;
long nb_last_written;
long ps_x;
long ps_y;
long ps_w;
long ps_h;
long rds_x;
long rds_y;
long rds_w;
long rds_h;
} rps_pge;
typedef struct rps_param
{
char *figname;
rdsfig_list *fig;
long draw_w;
long draw_h;
long paper_x;
long paper_y;
long paper_w;
long paper_h;
char papername[16];
char verbose;
char a3tray;
char couleur;
char norectname;
char noconame;
char norefname;
char noinstname;
char nosegname;
int textsize;
char manualfeed;
char flatten;
char tilcatal;
char header;
char landscape;
char real;
long resol;
int nbx_pages;
int nby_pages;
double tops;
char dictfilename[256];
/* The rest of the structure doesn't have to be completed */
char width_first;
long rds_x;
long rds_y;
long rds_w;
long rds_h;
long rds_dx;
long rds_dy;
rps_pge *headpages;
char err[128];
char cmdline[1024];
} rps_par;
#ifndef DRIVE2PS
#ifdef __STDC__ /* We're ANSI */
extern void saveps (struct rps_param *param);
extern void rps_GetBoundingBox (rdsfig_list *fig);
#else
extern saveps ();
extern rps_GetBoundingBox ();
#endif
#endif

View File

@ -0,0 +1,712 @@
extern rps_put();
void rps_print_dict_bw (pg)
void *pg;
{
rps_put (pg,"% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n");
rps_put (pg,"% This is the beginning of the l2p BLACK & WHITE PostScript dictionnary.\n");
rps_put (pg,"% (If you want to change patterns, this is THE place to do it.)\n");
rps_put (pg,"% (Remember that you can substitute another PostScript dictionnary.)\n");
rps_put (pg,"%%Pages: 1 1\n");
rps_put (pg,"%%EndComments\n");
rps_put (pg,"%%BeginPreview: 256 64 1 64\n");
rps_put (pg,"%0000000000000000000000000000000000000000000000000000000000000000\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000000000000000000000000000000000F000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF0FFF000FFF000000000000000FFF00000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F00000000000000000FF0FF00F0F0FFF0000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000000000000000FFF0FFF0F0F0F0F0000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFF000FF0000000000000000F0F000F0F0FFF0000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F0000000F000000000000000F0F000F0F0F000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F0000000F000000000000000F0F000FFF0F000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF0F0000FFF0000000000000000FFF00000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFF00FFFF0F000F0FFF0FFFF0F00000F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F0000F000F00F00F0000F00000F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F00000F0F000F00F0000F00F00F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFF00FFF000F0F000F00FFF00F00F00F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F0F00F00000F0F000F00F00000F0F0F0000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F000000F0000F00F00000FF0FF0000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0FFFF000F000FFF0FFFF00F000F0000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00000FF00F00F00FF00F00F0FFFF00000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000FFFF00FF00F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF0F00F00F0000FF00FFFF00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000FF0000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000000F000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF0000000000F0000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000F00000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF000FF00FFF00FFFF0FFF00000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFFF0FFF00FFF00FFF00000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000F0000F0F00000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000F0000F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000FFFF0F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0000000000000000000000000000000000000000000000000000000000000000\n");
rps_put (pg,"%%EndPreview\n");
rps_put (pg,"%%EndProlog\n");
rps_put (pg,"\n");
rps_put (pg,"%%BeginSetup\n");
rps_put (pg,"\n");
rps_put (pg,"/MF\n");
rps_put (pg,"{statusdict /manualfeed true put} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/INFO % Change jobname in order to give info about status\n");
rps_put (pg,"{/statusdict where exch pop {\n");
rps_put (pg," statusdict exch /jobname exch put\n");
rps_put (pg,"} if } bind def \n");
rps_put (pg,"\n");
rps_put (pg,"/NOP % Draw nothing with x,y,w,h\n");
rps_put (pg,"{pop pop pop pop} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/ER % Draw an [E]mpty [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/h exch def /w exch def newpath moveto\n");
rps_put (pg,"0 h rlineto w 0 rlineto 0 h neg rlineto\n");
rps_put (pg,"closepath stroke} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/E2R % Draw an [E]mpty dashed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def newpath moveto\n");
rps_put (pg,"1.0 setlinewidth [8.0 8.0] 0 setdash\n");
rps_put (pg,"0 h rlineto w 0 rlineto 0 h neg rlineto\n");
rps_put (pg,"closepath stroke context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D1FR % Draw a [D]iagonal [1] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"0.1 setlinewidth\n");
rps_put (pg,"/pas 8 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D2FR % Draw a [D]iagonal [2] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"0.8 setlinewidth\n");
rps_put (pg,"/pas 16 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D6FR % Draw a [D]iagonal [6] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"0.5 setlinewidth [0.5 8] 0 setdash\n");
rps_put (pg,"0 8 x w add y add h add {\n");
rps_put (pg," newpath 0 moveto y h add neg y h add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D7FR % Draw a [D]iagonal [7] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"1.0 setlinewidth [1 8] 0 setdash\n");
rps_put (pg,"0 8 x w add y add h add {\n");
rps_put (pg," newpath 0 moveto y h add neg y h add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D8FR % Draw a [D]iagonal [8] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 12 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.8 setlinewidth\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D9FR % Draw a [D]iagonal [9] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 8 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.1 setlinewidth\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/X1FR % Draw a [X]cross [1] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 6 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.1 setlinewidth\n");
rps_put (pg,"% abscisse1 de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for\n");
rps_put (pg,"% abscisse2 de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/X2FR % Draw a [X]cross [2] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 3 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.2 setlinewidth\n");
rps_put (pg,"% abscisse1 de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for\n");
rps_put (pg,"% abscisse2 de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/showstring {\n");
rps_put (pg," gsave\n");
rps_put (pg," rotate\n");
rps_put (pg," % dup stringwidth pop 2 div neg 0 rmoveto\n");
rps_put (pg," false charpath\n");
rps_put (pg," gsave\n");
rps_put (pg," 1 setgray\n");
rps_put (pg," 2 setlinewidth\n");
rps_put (pg," 1 setlinejoin\n");
rps_put (pg," 1 setlinecap\n");
rps_put (pg," stroke\n");
rps_put (pg," grestore\n");
rps_put (pg," fill\n");
rps_put (pg," grestore\n");
rps_put (pg,"} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"%- - - BEGIN OF LAYER TRADUCTION - - -\n");
rps_put (pg,"/RDS_NWELL_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PWELL_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_NIMP_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PIMP_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ACTIV_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_NDIF_init {\n");
rps_put (pg," /R { D9FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PDIF_init {\n");
rps_put (pg," /R { D1FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_NTIE_init {\n");
rps_put (pg," /R { D9FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PTIE_init {\n");
rps_put (pg," /R { D1FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_POLY_init {\n");
rps_put (pg," /R { X1FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_GATE_init {\n");
rps_put (pg," /R { X1FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TPOLY_init {\n");
rps_put (pg," /R { X1FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_CONT_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU1_init {\n");
rps_put (pg," /R { D7FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VALU1_init {\n");
rps_put (pg," /R { D7FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TALU1_init {\n");
rps_put (pg," /R { D7FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VIA1_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TVIA1_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU2_init {\n");
rps_put (pg," /R { D2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TALU2_init {\n");
rps_put (pg," /R { D2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VIA2_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU3_init {\n");
rps_put (pg," /R { D8FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TALU3_init {\n");
rps_put (pg," /R { D8FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VIA3_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU4_init {\n");
rps_put (pg," /R { D8FR } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_CPAS_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_REF_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_USER0_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_USER1_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_USER2_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ABOX_init {\n");
rps_put (pg," /R { E2R } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"/UNKNOW_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg,"} def\n");
rps_put (pg,"%- - - END OF LAYER TRADUCTION - - -\n");
rps_put (pg,"%%EndSetup\n");
rps_put (pg,"\n");
rps_put (pg,"% This is the end of the l2p BLACK & WHITE PostScript dictionnary.\n");
rps_put (pg,"% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n");
}
void rps_print_dict_color (pg)
void *pg;
{
rps_put (pg,"% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n");
rps_put (pg,"% This is the beginning of the l2p COLOR PostScript dictionnary.\n");
rps_put (pg,"% (If you want to change colors or patterns, this is THE place to do it.)\n");
rps_put (pg,"% (Remember that you can substitute another PostScript dictionnary.)\n");
rps_put (pg,"%%Pages: 1 1\n");
rps_put (pg,"%%EndComments\n");
rps_put (pg,"%%BeginPreview: 256 64 1 64\n");
rps_put (pg,"%0000000000000000000000000000000000000000000000000000000000000000\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000000000000000000000000000000000F000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF0FFF000FFF000000000000000FFF00000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F00000000000000000FF0FF00F0F0FFF0000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000000000000000FFF0FFF0F0F0F0F0000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFF000FF0000000000000000F0F000F0F0FFF0000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F0000000F000000000000000F0F000F0F0F000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F0000000F000000000000000F0F000FFF0F000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF0F0000FFF0000000000000000FFF00000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFF00FFFF0F000F0FFF0FFFF0F00000F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F0000F000F00F00F0000F00000F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F00000F0F000F00F0000F00F00F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFF00FFF000F0F000F00FFF00F00F00F000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F0F00F00000F0F000F00F00000F0F0F0000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F000000F0000F00F00000FF0FF0000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0FFFF000F000FFF0FFFF00F000F0000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00000FF00F00F00FF00F00F0FFFF00000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F00F0F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000FFFF00FF00F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F00F000F00F0F00F00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF0F00F00F0000FF00FFFF00F0000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000FF0000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000000F000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF0000000000F0000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000F00000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFFF000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF000FF00FFF00FFFF0FFF00000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F00F0F00F0F00F0F0000F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000FFF00FFFF0FFF00FFF00FFF00000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000F0000F0F00000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000F0000F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF00000000F0000F00F0F0000FFFF0F00F0000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFF000000000000000000000000000000000000000000000000000000FFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0\n");
rps_put (pg,"%0000000000000000000000000000000000000000000000000000000000000000\n");
rps_put (pg,"%%EndPreview\n");
rps_put (pg,"%%EndProlog\n");
rps_put (pg,"\n");
rps_put (pg,"%%BeginSetup\n");
rps_put (pg,"\n");
rps_put (pg,"/MF\n");
rps_put (pg,"{statusdict /manualfeed true put} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/INFO % Change jobname in order to give info about status\n");
rps_put (pg,"{/statusdict where exch pop {\n");
rps_put (pg," statusdict exch /jobname exch put\n");
rps_put (pg,"} if } bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/NOP % Draw nothing with x,y,w,h\n");
rps_put (pg,"{pop pop pop pop} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/ER % Draw an [E]mpty [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/h exch def /w exch def newpath moveto\n");
rps_put (pg,"0 h rlineto w 0 rlineto 0 h neg rlineto\n");
rps_put (pg,"closepath stroke} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/E2R % Draw an [E]mpty dashed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def newpath moveto\n");
rps_put (pg,"1.0 setlinewidth [8.0 8.0] 0 setdash\n");
rps_put (pg,"0 h rlineto w 0 rlineto 0 h neg rlineto\n");
rps_put (pg,"closepath stroke context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D1FR % Draw a [D]iagonal [1] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"0.1 setlinewidth\n");
rps_put (pg,"/pas 4 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D2FR % Draw a [D]iagonal [2] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"0.8 setlinewidth\n");
rps_put (pg,"/pas 8 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D6FR % Draw a [D]iagonal [6] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"0.5 setlinewidth [1 4] 0 setdash\n");
rps_put (pg,"0 4 x w add y add h add {\n");
rps_put (pg," newpath 0 moveto y h add neg y h add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D7FR % Draw a [D]iagonal [7] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"1.0 setlinewidth [1 8] 0 setdash\n");
rps_put (pg,"0 4 x w add y add h add {\n");
rps_put (pg," newpath 0 moveto y h add neg y h add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D8FR % Draw a [D]iagonal [8] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 6 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.8 setlinewidth\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/D9FR % Draw a [D]iagonal [9] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 4 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.1 setlinewidth\n");
rps_put (pg,"% abscisse de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/X1FR % Draw a [X]cross [1] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 4 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.1 setlinewidth\n");
rps_put (pg,"% abscisse1 de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for\n");
rps_put (pg,"% abscisse2 de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/X2FR % Draw a [X]cross [2] [F]illed [R]ectangle with x,y,w,h\n");
rps_put (pg,"{/context save def /h exch def /w exch def /y exch def /x exch def newpath\n");
rps_put (pg,"0.5 setlinewidth\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath stroke\n");
rps_put (pg,"x y moveto 0 h rlineto w 0 rlineto 0 h neg rlineto closepath clip\n");
rps_put (pg,"/pas 2 def\n");
rps_put (pg,"% ordonnee de depart:\n");
rps_put (pg,"y pas div cvi pas mul /yy exch def\n");
rps_put (pg,"0.2 setlinewidth\n");
rps_put (pg,"% abscisse1 de depart:\n");
rps_put (pg,"x h neg add pas div cvi pas mul\n");
rps_put (pg,"pas x w add {\n");
rps_put (pg," newpath yy moveto h pas add h pas add rlineto stroke\n");
rps_put (pg,"} for\n");
rps_put (pg,"% abscisse2 de depart:\n");
rps_put (pg,"x pas div cvi pas mul\n");
rps_put (pg,"pas x w add h add {\n");
rps_put (pg," newpath yy moveto h neg pas neg add h pas add rlineto stroke\n");
rps_put (pg,"} for context restore} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"/showstring {\n");
rps_put (pg," gsave\n");
rps_put (pg," rotate\n");
rps_put (pg," % dup stringwidth pop 2 div neg 0 rmoveto\n");
rps_put (pg," false charpath\n");
rps_put (pg," gsave\n");
rps_put (pg," 1 setgray\n");
rps_put (pg," 2 setlinewidth\n");
rps_put (pg," 1 setlinejoin\n");
rps_put (pg," 1 setlinecap\n");
rps_put (pg," stroke\n");
rps_put (pg," grestore\n");
rps_put (pg," fill\n");
rps_put (pg," grestore\n");
rps_put (pg,"} bind def\n");
rps_put (pg,"\n");
rps_put (pg,"%- - - BEGIN OF LAYER TRADUCTION - - -\n");
rps_put (pg,"/RDS_NWELL_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.5 1.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PWELL_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 1.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_NIMP_init {\n");
rps_put (pg," /R { D9FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 0.0 1.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PIMP_init {\n");
rps_put (pg," /R { D9FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 0.0 1.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ACTIV_init {\n");
rps_put (pg," /R { D6FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 1.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_NDIF_init {\n");
rps_put (pg," /R { D9FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 0.0 1.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PDIF_init {\n");
rps_put (pg," /R { D1FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.2 1.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_NTIE_init {\n");
rps_put (pg," /R { D1FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 0.0 1.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_PTIE_init {\n");
rps_put (pg," /R { D9FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.2 1.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_POLY_init {\n");
rps_put (pg," /R { X1FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 1.0 1.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_GATE_init {\n");
rps_put (pg," /R { X1FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 1.0 1.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TPOLY_init {\n");
rps_put (pg," /R { X1FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.2 0.7 0.7 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_CONT_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU1_init {\n");
rps_put (pg," /R { D7FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 1.0 0.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VALU1_init {\n");
rps_put (pg," /R { D7FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.8 0.0 0.2 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TALU1_init {\n");
rps_put (pg," /R { D7FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 1.0 0.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VIA1_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TVIA1_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.5 0.2 0.0 0.1 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU2_init {\n");
rps_put (pg," /R { D2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 0.0 0.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TALU2_init {\n");
rps_put (pg," /R { D2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 1.0 0.0 0.2 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VIA2_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU3_init {\n");
rps_put (pg," /R { D8FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 1.0 0.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_TALU3_init {\n");
rps_put (pg," /R { D8FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 1.0 0.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_VIA3_init {\n");
rps_put (pg," /R { X2FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ALU4_init {\n");
rps_put (pg," /R { D8FR } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 1.0 0.0 0.2 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_CPAS_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 0.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_REF_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_USER0_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_USER1_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_USER2_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/RDS_ABOX_init {\n");
rps_put (pg," /R { E2R } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"/UNKNOW_init {\n");
rps_put (pg," /R { NOP } bind def\n");
rps_put (pg," /setcmykcolor where {begin 0.0 0.0 0.0 1.0 setcmykcolor end} if\n");
rps_put (pg,"} def\n");
rps_put (pg,"%- - - END OF LAYER TRADUCTION - - -\n");
rps_put (pg,"%%EndSetup\n");
rps_put (pg,"\n");
rps_put (pg,"% This is the end of the l2p COLOR PostScript dictionnary.\n");
rps_put (pg,"% = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n");
}

View File

@ -0,0 +1,333 @@
void puts ();
void rps_print_man () {
puts ("");
puts ("");
puts ("");
puts ("L2P(1) CAO-VLSI Reference Manual L2P(1)");
puts ("");
puts ("");
puts ("NNAAMMEE");
puts (" l2p - Creates a PostScript file from a symbolic layout");
puts (" file,or from a physical layout file.");
puts ("");
puts ("SSYYNNOOPPSSIISS");
puts (" ll22pp [--ccoolloorr] [--ddrraawwiinnggssiizzee==<<ww>>xx<<hh>>] [--ffAA33] [--ffLLEETTTTEERR]");
puts (" [--ffLLEEGGAALL] [--ggiivveebbwwddiicctt] [--ggiivveeccoolloorrddiicctt] [--hheellpp]");
puts (" [--nnoohheeaaddeerr] [--ppaappeerrssiizzee==<<xx>>xx<<yy>>xx<<ww>>xx<<hh>>]");
puts (" [--ppaaggeess==<<xx>>xx<<yy>>] [--ttssiizzee==<<ss>>] [--nnrrnnaammee] [--nnccnnaammee]");
puts (" [--nnrrffnnaammee] [--nniinnaammee] [--nnssnnaammee] [--mmffeeeedd] [--rreeaall]");
puts (" [--rreessooll==<<xx>>] [--rrffllaatttteennccaattaall] [--rrffllaatttteennttrraannss]");
puts (" [--rroottaattee] [--ssccaallee==<<ff..ff>>] [--uusseeddiicctt==<<ff>>] _c_e_l_l_n_a_m_e");
puts ("");
puts ("DDEESSCCRRIIPPTTIIOONN");
puts (" Two main kind of cells can be used as inputs for l2p :");
puts (" First, you can use l2p to print symbolic layout cells.");
puts (" File formats can be .ap or .cp . This is given by an envi-");
puts (" ronment variable MMBBKK__IINN__PPHH that gives the appropriate sym-");
puts (" bolic layout file format.");
puts (" Second, you can use l2p to print real layout cells whose");
puts (" file formats can be .cif or .gds . This is given by an");
puts (" environment variable RRDDSS__IINN that gives the appropriate");
puts (" real layout file format.");
puts (" The path to the input file is set up by two environment");
puts (" variables: MMBBKK__WWOORRKK__LLIIBB(3) and if not found");
puts (" MMBBKK__CCAATTAA__LLIIBB(3). The output of _l_2_p is a PPoossttSSccrriipptt file");
puts (" in the current directory. The drawing size and the paper");
puts (" size can be specified by the user. So, you can split your");
puts (" drawing in as many pages as wanted. The resulting file can");
puts (" be then used on any adequat PPoossttccrriipptt printer.");
puts (" l2p will generate in the current directory, either a sin-");
puts (" gle file called _<_c_e_l_l_n_a_m_e_>_._p_s, either several files suf-");
puts (" fixed by _-_<_x_>_x_<_y_>_._p_s, depending on wether you've asked for");
puts (" a monopage plot or for a drawing that will be splitted on");
puts (" several pages. If you do something like _l_2_p _-_p_a_g_e_s_=_2_x_1");
puts (" _c_e_l_l, it will generate two files called _c_e_l_l_-_1_x_1_._p_s, and");
puts (" _c_e_l_l_-_2_x_1_._p_s.");
puts ("");
puts ("OOPPTTIIOONNSS");
puts (" With no options, l2p generate a 'standard file', with all");
puts (" options off. This is ok for leaf cells, but not for large");
puts (" circuits.");
puts ("");
puts (" -color generates a color PostScript file for use with");
puts (" color interpreters. The default value gives a");
puts (" black and white PPoossttCCrriipptt file.");
puts ("");
puts (" -drawingsize=<width>x<height>");
puts (" specifies the drawing area in centh of inch. By");
puts (" default, wide = 725 and height = 1068 for french A4");
puts (" paper. If the drawing size is bigger than the paper");
puts (" area, then the drawing will be splitted on several");
puts (" pages.");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("ASIM/LIP6 October 1, 1997 1");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("L2P(1) CAO-VLSI Reference Manual L2P(1)");
puts ("");
puts ("");
puts (" -fA3 The drawing is done on A3 format paper.");
puts ("");
puts (" -fLETTER");
puts (" The drawing is done on LETTER format paper.");
puts ("");
puts (" -fLEGAL");
puts (" The drawing is done on LEGAL format paper.");
puts ("");
puts (" -givebwdict");
puts (" give the Black & White internal PostScript diction-");
puts (" nary. See below.");
puts ("");
puts (" -givecolordict");
puts (" This option must be unique on the command line.");
puts (" When used as in 'l2p -givebwdict', l2p then");
puts (" gives on the standard output its Black & White");
puts (" internal Postscript dictionnary. A PostScript");
puts (" dictionnary is a set of mac- ros that will be used");
puts (" during interpretation of your PostScript file.");
puts (" The macros in the internal PostScript dictionnaries");
puts (" of l2p allows you to control which layer to out-");
puts (" put, how to plot rectangles, and specify the");
puts (" colors of the rectangles. You get the standard dic-");
puts (" tion- nary by a line of the form 'l2p -give-");
puts (" colordict > dict.ps'. You can then edit it, in");
puts (" order to reuse it with l2p, see the '-usedict'");
puts (" option below.");
puts ("");
puts (" -help gives you this man page that explains how to use");
puts (" l2p.");
puts ("");
puts (" -noheader");
puts (" prevents the border and various info, as the cell-");
puts (" name and the position of the page in the drawing,");
puts (" from being printed.");
puts ("");
puts (" -papersize=<x_low_left>x<y_low_left>x<width>x<height>");
puts (" specifies the paper area in centh of inch. By");
puts (" default, 50x50x726x1069 for a4 paper.");
puts ("");
puts (" -pages=<number_of_x_pages>x<number_of_y_pages>");
puts (" specifies the drawing area in pages. It can be use-");
puts (" ful, instead of having to calculate the size in");
puts (" cenths of inch of the drawing, to give it in num-");
puts (" bers of pages. It takes care of the resizing of the");
puts (" paper and whether there is a header.");
puts ("");
puts (" -tsize=<s>");
puts (" Available sizes:6,8,10,12,14.The default value is");
puts (" 8.");
puts ("");
puts (" -nrname");
puts (" No name at all will be displayed.");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("ASIM/LIP6 October 1, 1997 2");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("L2P(1) CAO-VLSI Reference Manual L2P(1)");
puts ("");
puts ("");
puts (" -ncname");
puts (" The external connector's names won't be displayed.");
puts ("");
puts (" -nrfname");
puts (" The references's names won't be displayed.");
puts ("");
puts (" -niname");
puts (" The instances's names won't be displayed.");
puts ("");
puts (" -nsname");
puts (" The segments's names won't be displayed.");
puts ("");
puts (" -mfeed Manualfeed:if set,informs the printer that it will");
puts (" be fed by the user himself,for each printing .");
puts ("");
puts (" -real uses real file (cif, gds). By default, uses sym-");
puts (" bolic layout file (ap, cp).");
puts ("");
puts (" -resol=<x>");
puts (" is the resolution of the file in dots per inch");
puts (" (dpi). This value has been introducted to limitate");
puts (" the size of the generated PostScript files. Each");
puts (" rectangle whose width and height are smaller than");
puts (" the resolution will not be printed. The default");
puts (" value is 72dpi. It should only be changed in one");
puts (" specifical case : when you want to produce a plot");
puts (" of several meter large. Usually, you must provide a");
puts (" PostScript file sized for A4 paper with a much bet-");
puts (" ter resolution than 72dpi. You can then increase");
puts (" that value to up to 1000dpi, but be aware that the");
puts (" size of the file will probably be bigger than a");
puts (" 44Mb SyQuest cartridge that is used in PAO for");
puts (" exchanging data files.");
puts ("");
puts (" -rflattencatal");
puts (" flattens the cell to the catalog level. see");
puts (" catal(5) for more details on the use of the catalog");
puts (" file. Be careful, this option requires a lot of");
puts (" memory...");
puts ("");
puts (" -rflattentrans");
puts (" flattens the cell to the transistor level before");
puts (" printing. Be careful, this option requires a lot");
puts (" more memory...");
puts ("");
puts (" -rotate");
puts (" rotate the cell from 90 degree. This is useful if");
puts (" you have a wide cell, and you want to have it");
puts (" printed in landscape mode.");
puts ("");
puts (" -scale=<f.f>");
puts (" forces the cell to be printed with a certain scale");
puts (" (a floating-point number). This is very useful,");
puts (" when you are printing a whole library of cells, and");
puts ("");
puts ("");
puts ("");
puts ("ASIM/LIP6 October 1, 1997 3");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("L2P(1) CAO-VLSI Reference Manual L2P(1)");
puts ("");
puts ("");
puts (" you want all cells to be printed to the same scale.");
puts (" You can find at which scale a cell was printed by");
puts (" looking at the beginning of the file : 'head");
puts (" n1_y-1x1.ps' will show you a PostScript comment");
puts (" beginning by '%SCALE=3.78435' for example.");
puts ("");
puts (" -usedict=<filename>");
puts (" The output Postcript file contains a Postcript dic-");
puts (" tionnary of macros.");
puts (" There are two standard dictionnaries used by l2p");
puts (" for black and white or color prints. This allows");
puts (" you to use a PostScript dictionnary different from");
puts (" the two internally encoded into l2p. By modifying");
puts (" one of the standard l2p dictionnary, you can choose");
puts (" which layer to output, how to fill the rectangles");
puts (" (empty, hashed, filled), which color to choose, ...");
puts (" and lots of other possibilities. The rest of the");
puts (" generated postscript file is mainly orders of draw-");
puts (" ing rectangles. PostScript is a reverse polish");
puts (" notation langage, that is easy to read for simple");
puts (" programs.");
puts (" If you use this functionnality, and think that your");
puts (" dictionnaries are worth it, please mail them to");
puts (" alliance-support@asim.lip6.fr, in order to submit");
puts (" them for inclusion in future version of l2p");
puts (" (Thanks).");
puts ("");
puts ("");
puts ("EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS::");
puts (" for symbolic file(s) :");
puts (" sseetteennvv MMBBKK__IINN__PPHH aapp");
puts (" sseetteennvv MMBBKK__WWOORRKK__LLIIBB ..");
puts (" sseetteennvv MMBBKK__CCAATTAA__LLIIBB //llaabboo//cceellllss//ssccrr");
puts (" sseetteennvv MMBBKK__CCAATTAALL__NNAAMMEE CCAATTAALL");
puts (" sseetteennvv RRDDSS__TTEECCHHNNOO__NNAAMMEE ccmmooss__11..rrddss");
puts ("");
puts (" for real file(s) :");
puts (" sseetteennvv RRDDSS__IINN cciiff");
puts (" sseetteennvv MMBBKK__CCAATTAALL__NNAAMMEE CCAATTAALL__RROOUUTT");
puts (" sseetteennvv RRDDSS__TTEECCHHNNOO__NNAAMMEE pprrooll1122__11..rrddss");
puts ("");
puts ("");
puts ("EEXXAAMMPPLLEESS::");
puts (" _l_2_p _-_c_o_l_o_r _n_1___y");
puts (" will create a colored nn11__yy..ppss file in the current");
puts (" directory : the 'standard' way.");
puts ("");
puts (" _l_2_p _-_r_e_a_l _c_e_l_l");
puts (" will create a cceellll..ppss file in the current directory");
puts (" from cell.cif or cell.gds, depending on the RDS_IN");
puts (" environment variable.");
puts ("");
puts (" _l_2_p _-_p_a_g_e_s_=_3_x_2 _n_a_2___y");
puts (" size of the created drawing:3 horizontal pages,2");
puts ("");
puts ("");
puts ("");
puts ("ASIM/LIP6 October 1, 1997 4");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("L2P(1) CAO-VLSI Reference Manual L2P(1)");
puts ("");
puts ("");
puts (" vertical ones;");
puts ("");
puts ("");
puts ("");
puts (" SSEEEE AALLSSOO");
puts (" mmbbkk((11)),, rrddss((11)),, MMBBKK__IINN__PPHH((33)),, MMBBKK__CCAATTAA__LLIIBB((33)),,");
puts (" MMBBKK__WWOORRKK__LLIIBB((33)),, MMBBKK__CCAATTAALL__NNAAMMEE((33)),,");
puts (" RRDDSS__TTEECCHHNNOO__NNAAMMEE((33)),, ppaaggeevviieeww((11)),, ggss((11)),,");
puts (" gghhoossttvviieeww((11)),, llpprr((11))..");
puts ("");
puts ("");
puts ("DDIIAAGGNNOOSSTTIICCSS");
puts (" You will not be able to generate more than approximativly");
puts (" 30 pages at the same time (because of the FOPEN_MAX of");
puts (" your environment). In this case, see the option that is");
puts (" not implemented yet.");
puts (" The generated PPoossttSSccrriipptt is Level 1 for black& white");
puts (" plots. When you use color, it generates Level 1 with");
puts (" color extensions. It may not run with strict Level 1");
puts (" interpreters, although it runs here with our Apple Person-");
puts (" nal LaserWriter, Sun Sparcprinters, and Canon CLC-300-PS.");
puts (" It follows the Adobe Document Structuring Conventions 1,");
puts (" and as there is a fake bitmap image inside each generated");
puts (" files, you can re-use them in your word-processors, or");
puts (" publishing software, because the PostScript is EPSF-1.2");
puts (" compliant.");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("");
puts ("ASIM/LIP6 October 1, 1997 5");
puts ("");
puts ("");
}