Importing RDSGDS sources into the new CVS tree

This commit is contained in:
Frederic Petrot 2002-03-13 13:37:58 +00:00
parent 96e7b257dc
commit 3663f0049a
16 changed files with 5072 additions and 0 deletions

View File

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

View File

@ -0,0 +1,318 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
INCLUDES = @INCLUDES@
LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
SUBDIRS = src
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_COMMON = Makefile.am Makefile.in configure configure.in
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && rev=". $$rev"; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
install-exec-am:
install-exec: install-exec-recursive
install-data-am:
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile
all-redirect: all-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-tags clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-tags distclean-generic clean-am
distclean: distclean-recursive
-rm -f config.status
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
install-exec install-data-am install-data install-am install \
uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

1634
alliance/src/rdsgds/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
dnl
dnl This file is part of the Alliance CAD System
dnl Copyright (C) Laboratoire LIP6 - Département ASIM
dnl Universite Pierre et Marie Curie
dnl
dnl Home page : http://www-asim.lip6.fr/alliance/
dnl E-mail support : mailto:alliance-support@asim.lip6.fr
dnl
dnl This library is free software; you can redistribute it and/or modify it
dnl under the terms of the GNU Library General Public License as published
dnl by the Free Software Foundation; either version 2 of the License, or (at
dnl your option) any later version.
dnl
dnl Alliance VLSI CAD System is distributed in the hope that it will be
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
dnl Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License along
dnl with the GNU C Library; see the file COPYING. If not, write to the Free
dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl Purpose : Auto stuffing Alliance
dnl Almost ten years since I wrote this stuff, I just can't
dnl believe it
dnl Date : 01/02/2002
dnl Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
dnl $Id: configure.in,v 1.1 2002/03/13 13:37:57 fred Exp $
dnl
dnl
AC_INIT(src/gds_swap.c)
AM_INIT_AUTOMAKE(rdsgds, 2.1)
AC_PROG_INSTALL
AC_PROG_CC
AC_HEADER_STDC
AC_C_CONST
AC_PROG_RANLIB
changequote(,)dnl
INCLUDES=-I${ALLIANCE_TOP}/include
LDFLAGS=-L${ALLIANCE_TOP}/lib
changequote([,])dnl
AC_SUBST(INCLUDES)
AC_SUBST(LDFLAGS)
AC_OUTPUT([
Makefile
src/Makefile
])

View File

@ -0,0 +1,2 @@
lib_LIBRARIES = libRgs.a
libRgs_a_SOURCES = gds_drive.h gds_parse.c gds_swap.h gds.h gds_error.c gds_parse.h rgs.h gds_drive.c gds_error.h gds_swap.c

View File

@ -0,0 +1,318 @@
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
INCLUDES = @INCLUDES@
LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
lib_LIBRARIES = libRgs.a
libRgs_a_SOURCES = gds_drive.h gds_parse.c gds_swap.h gds.h gds_error.c gds_parse.h rgs.h gds_drive.c gds_error.h gds_swap.c
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_CLEAN_FILES =
LIBRARIES = $(lib_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LIBS = @LIBS@
libRgs_a_LIBADD =
libRgs_a_OBJECTS = gds_parse.o gds_error.o gds_drive.o gds_swap.o
AR = ar
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
DEP_FILES = .deps/gds_drive.P .deps/gds_error.P .deps/gds_parse.P \
.deps/gds_swap.P
SOURCES = $(libRgs_a_SOURCES)
OBJECTS = $(libRgs_a_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-libLIBRARIES:
clean-libLIBRARIES:
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
distclean-libLIBRARIES:
maintainer-clean-libLIBRARIES:
install-libLIBRARIES: $(lib_LIBRARIES)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(libdir)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
@$(POST_INSTALL)
@list='$(lib_LIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
$(RANLIB) $(DESTDIR)$(libdir)/$$p; \
else :; fi; \
done
uninstall-libLIBRARIES:
@$(NORMAL_UNINSTALL)
list='$(lib_LIBRARIES)'; for p in $$list; do \
rm -f $(DESTDIR)$(libdir)/$$p; \
done
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
libRgs.a: $(libRgs_a_OBJECTS) $(libRgs_a_DEPENDENCIES)
-rm -f libRgs.a
$(AR) cru libRgs.a $(libRgs_a_OBJECTS) $(libRgs_a_LIBADD)
$(RANLIB) libRgs.a
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign src/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
mostlyclean-depend:
clean-depend:
distclean-depend:
-rm -rf .deps
maintainer-clean-depend:
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
< .deps/$(*F).pp > .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm -f .deps/$(*F).pp
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-libLIBRARIES
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-libLIBRARIES
uninstall: uninstall-am
all-am: Makefile $(LIBRARIES)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(libdir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-libLIBRARIES mostlyclean-compile \
mostlyclean-tags mostlyclean-depend mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-libLIBRARIES clean-compile clean-tags clean-depend \
clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-libLIBRARIES distclean-compile distclean-tags \
distclean-depend distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-libLIBRARIES \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-depend maintainer-clean-generic \
distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-libLIBRARIES distclean-libLIBRARIES \
clean-libLIBRARIES maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
install-libLIBRARIES mostlyclean-compile distclean-compile \
clean-compile maintainer-clean-compile tags mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir \
mostlyclean-depend distclean-depend clean-depend \
maintainer-clean-depend info-am info dvi-am dvi check check-am \
installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,226 @@
#ifndef __P
# if defined(__STDC__) || defined(__GNUC__)
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
/*------------------------------------------------------------\
| |
| Tool : RDSGDS |
| |
| File : gds.h |
| |
| Authors : Pierre Vittet |
| Modified by Jacomme Ludovic |
| Date : 04/07/93 |
| |
\------------------------------------------------------------*/
# ifndef RDSGDS_GDS
# define RDSGDS_GDS
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*********
*
* Voici la LISTE DES CODES GDSII correspondant aux differents types d'enregistrement.
*
* Un fichier GDSII est compose d'enregistrements de taille variable. Au debut de chacun
* de ces enregistrements, on trouve invariablement :
* - 2 octets indiquant la taille de l'enregistrement (ces 2 octets compris).
* - un code GDS egalement sur 2 octets (ou le 1er octet des deux donne le type
* de l'enregistrement et le 2eme precise le type des donnees contenues dans cet
* enregistrement).
*
***/
#define HEADER 0x0002
#define BGNLIB 0x0102
#define LIBNAME 0x0206
#define UNITS 0x0305
#define ENDLIB 0x0400
#define BGNSTR 0x0502
#define STRNAME 0x0606
#define ENDSTR 0x0700
#define BOUNDARY 0x0800
#define PATH 0x0900
#define SREF 0x0A00
#define AREF 0x0B00
#define TEXT 0x0C00
#define LAYER0 0x0D02
#define DATATYPE 0x0E02
#define WIDTH 0x0F03
#define XY 0x1003
#define ENDEL 0x1100
#define SNAME 0x1206
#define COLROW 0x1302
#define TEXTNODE 0x1400
#define NODE 0x1500
#define TEXTTYPE 0x1602
#define PRESENTATION 0x1701
#define STRING 0x1906
#define STRANS 0x1A01
#define MAG 0x1B05
#define ANGLE 0x1C05
#define REFLIBS 0x1F06
#define FONTS 0x2006
#define PATHTYPE 0x2102
#define GENERATIONS 0x2202
#define ATTRTABLE 0x2306
#define STYPTABLE 0x2406
#define STRTYPE 0x2502
#define ELFLAGS 0x2601
#define ELKEY 0x2703
#define NODETYPE 0x2A02
#define PROPATTR 0x2B02
#define PROPVALUE 0x2C06
#define BOX 0x2D00
#define BOXTYPE 0x2E02
#define PLEX 0x2F03
#define BGNEXTN 0x3003
#define ENDEXTN 0x3103
#define TAPENUM 0x3202
#define TAPECODE 0x3302
#define STRCLASS 0x3401
#define FORMAT 0x3602
#define MASK 0x3706
#define ENDMASKS 0x3800
/***********
*
* Autres constantes utilisees par le format GDS
* Les valeurs hexa etant a masquer dans les champs qui les necessitent
*
***/
#define LGPROP 126 /* maximum length of the string value associated with the attribute */
/* reserved attribute numbers */
#define PUSRINT 126 /* user integer property */
#define PUSRSTR 127 /* user string or CSD property */
#define LGSTRNAME 32 /* maximum length of a "structure"'s name */
#define LGSTRING 512 /* maximum length of a character string for text presentation */
/* text presentation flags */
#define THPRES 0x0003 /* horizontal presentation */
#define THLEFT 0x0000 /* left */
#define THCENT 0x0001 /* center */
#define THRIGHT 0x0002 /* right */
#define TVPRES 0x000C /* vertical presentation */
#define TVTOP 0x0000 /* top */
#define TVMID 0x0004 /* middle */
#define TVBOT 0x0008 /* bottom */
#define TFONT 0x0030 /* ---- type of font ---- */
#define TFONT0 0x0000 /* font 0 */
#define TFONT1 0x0010 /* font 1 */
#define TFONT2 0x0020 /* font 2 */
#define TFONT3 0x0030 /* font 3 */
/* graphic presentation flags */
#define GABSANG 0x0002 /* absolute angle */
#define GABSMAG 0x0004 /* absolute magnification */
#define GREFLECT 0x8000 /* reflection over the X-axis applied before */
/* angular rotation */
/* element flags */
#define ETEMPL 0x0001 /* TEMPLATE data */
#define EXTERN 0x0002 /* EXTERNAL data */
/* pathtype flags */
#define PSQRFLH 0 /* square-ended path that ends flush with its endpoints */
#define PRND 1 /* round-ended paths */
#define PSQRHW 2 /* square-ended path that ends half-width beyond its endpoints */
#define PVSQR 4 /* STICKS products : path with variable square-ended */
/* extensions */
/* Calma flags : internal use with STICKS products */
#define NOCALMA 0x0000 /* Stream tapes produced by non-Calma progams */
/* Autres constantes existant : nombre maximale de valeurs possibles */
#define NLAYER 64 /* The value of the layer must be in the range of 0 to 63. */
#define NDATATYPE 64 /* The value of the datatype must be in the range of 0 to 63. */
#define NTEXTTYPE 64 /* The value of the texttype must be in the range of 0 to 63. */
#define NNODETYPE 64 /* The value of the nodetype must be in the range of 0 to 63. */
#define NBOXTYPE 64 /* The value of the boxtype must be in the range of 0 to 63. */
#define LGNAME 12 /* max length of library's name, according to CDOS file name conventions */
#define LGLIBNAME 44 /* max length of each reference library's name */
#define NFONTS 4 /* maximum authorized number of textfonts definitions */
#define LGFONTNAME 44 /* names, each name is 44 (maximum) characters long */
#define LGATTRNAME 44 /* max length of attribute definition file's name */
/* format type values */
#define FARC 0 /* ARCHIVE format */
#define FILT 1 /* FILTERED format */
/*------------------------------------------------------------\
| |
| Macro |
| |
\------------------------------------------------------------*/
# define CheckPhysicalGridAligned(c) ((c) % RDS_PHYSICAL_GRID)
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
#ifndef ushort
#define ushort unsigned short
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define type_i unsigned short
#define type_l unsigned short
#define type_c unsigned short
typedef struct { /* enregistrement de la date et de l'heure */
short year; /* annee */
short month; /* mois */
short day; /* jour */
short hour; /* heure */
short min; /* minutes */
short sec; /* secondes */
} date_type;
typedef struct { /* en-tete de l'enregistrement contient les infos : */
short size; /* longueur de l'enregistrement */
short gdscode; /* record type & data type */
} hinfo_type;
typedef double unit_type; /* database unit type */
typedef double angle_type; /* angular rotation factor type */
typedef double mag_type; /* magnification factor type */
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,685 @@
/*------------------------------------------------------------\
| |
| Tool : RDSGDS |
| |
| File : gds_drive.c |
| |
| Authors : Pierre Vittet |
| Modified by Jacomme Ludovic |
| Date : 04/07/93 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <malloc.h>
# include <math.h>
# include <time.h>
# include <sys/types.h>
# include <sys/time.h>
# include <mut.h>
# include <mph.h>
# include <rds.h>
# include <rtl.h>
# include <rpr.h>
# include <rfm.h>
# include <rwi.h>
# include <rut.h>
# include "gds.h"
# include "gds_error.h"
# include "gds_drive.h"
# include "gds_swap.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Macros |
| |
\------------------------------------------------------------*/
#define controle(a) \
if (a != numb) { \
pv_init_error(); \
pv_error.v_error = ENOSPACE; \
(void)fclose(fp); \
pv_give_error("controle"); \
EXIT(1); }
#define entete(a,b) \
infobuf.size = sizeof(hinfo_type) + b/sizeof(char); \
infobuf.gdscode = a; \
if (islittle()) { \
infobuf.size = swaps(infobuf.size); \
infobuf.gdscode = swaps(infobuf.gdscode); \
} \
numb = fwrite((char *)&infobuf, sizeof(hinfo_type), 1, fp); \
controle(1)
#define cadre numb = fwrite(&CADRE, sizeof(char), 1, fp); controle(1)
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/* variables globales mais internes au fichier */
char CADRE = '\0'; /* pour recommencer a ecrire sur un octet pair, on cadre avec le */
/* caractere nul en comblant l'octet impair. */
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/***********
*
* Preliminaires sur les nombres flottants en GDS2.
*
* Un flottant gds est represente par :
* - 1 bit de signe | ces 8 bits occupent le 1er octet
* - 7 bits d'exposant biaise a 64 |
* - 24 ou 56 bits de mantisse selon la precision (les 3,7 octets suivants)
*
* SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM
* SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM
*
* L'exposant doit etre diminue de 64 pour avoir sa valeur reelle.
* Decrit sur 7 bits, cela implique que l'exposant reel est compris entre -64
* et +63 inclus.
* Il s'applique a une puissance de 16.
*
* Donc la valeur absolue du flottant correspondant a ce format est egal a :
*
* mantisse * (16 ^ [exposant -64])
*
* La mantisse est telle que 1/16 <= mantisse < 1 (du fait de la base 16).
*
* En consequence de quoi, la valeur absolue d'un flottant GDS est comprise
* entre
* 1/16.16^(-64) et ~16^63
* donc entre
* 5.397605347e-79 et 7.237005577e75
*
* A ce domaine, il faut ajouter la valeur 0 qui se represente par "tout a zero"
*
***/
/***********
*
* DOUBLE_TO_GDSREAL
*
* Cette fonction prend un nombre flottant et le traduit dans un format propre
* aux reels des fichiers GDS2.
*
* ENTREE : nombre flottant a traduire
* precision voulue 1 : simple precision
* 2 : double precision
*
* RETOUR : pointeur sur une chaine de caracteres contenant la traduction.
* NULL si manque de place memoire.
* depassement de capacite du reel GDS
*
* REMARQUE : Cette chaine sera sur 4 ou 8 octets et ne sera pas terminee
* par un '\0'.
*
**/
static char *
pv_double_to_gdsreal( value, precision )
double value;
short precision;
{
register int i;
char buffer[56], *pt;
pt = (char *)calloc((unsigned)precision * 4, sizeof(char));
if (pt == (char *)NULL) {
pv_init_error();
pv_error.v_error = ENOMEM;
pv_give_error("double_to_gdsreal");
return((char *)NULL);
}
if (value == 0) return(pt); /* la valeur 0 est representee par une zone remplie de 0 */
/* On commence par s'occuper du signe du nombre. */
*pt = (value > 0)? '\0' : '\300';
value = fabs(value);
/* on va chercher la valeur de l'exposant du nombre exprime en base 16. */
i = 0;
while (value >= 1.0) { /* si le nombre correspond a une puissance positive de 16 */
value /= 16.0;
i++;
}
while (value < 0.0625) {/* si le nombre correspond a une puissance negative de 16 */
value *= 16.0;
i--;
}
if (i > 63) { /* On prevoit les cas d'overflow. */
pv_init_error();
pv_error.v_error = EOVERFL;
pv_error.v_textp = "La valeur absolue du nombre est trop grande pour etre traduite en GDS.\nLa limite est : 7.23 E+75";
free(pt);
pv_give_error("double_to_gdsreal");
return((char *)NULL);
} else if (i < -64) { /* et d'underflow. */
pv_init_error();
pv_error.v_error = EOVERFL;
pv_error.v_textp = "La valeur absolue du nombre est trop petite pour etre traduite en GDS.\nLa limite est : 5.4 E-79";
free(pt);
pv_give_error("double_to_gdsreal");
return((char *)NULL);
}
i += 64; /* On biaise l'exposant a 64. Ici, on est sur que 0 <= exp <= 127 (donc sur 7 bits) */
*pt |= (char)i; /* On vient d'ecrire le signe et la valeur de l'exposant biaise a 64 */
/* On va maintenant decomposer, bit a bit, la mantisse dans un tableau de caracteres. */
for (i = 0; i < ( 24 + 32*(precision-1) ); i++) {
value *= 2;
if (value >= 1) {
buffer[i] = '\1';
value -= 1;
} else buffer[i] = '\0';
} /* Puis on replace tous ces bits au sein de quelques octets (3 ou 7 selon la precision) */
for (i = 0; i < ( 24 + 32*(precision-1) ); i++)
pt[1+i/8] |= buffer[i] << (7 - i%8);
return(pt);
}
/***********
*
* ECRIT_GDSREAL
*
* Cette fonction est utilisee pour afficher a l'ecran ce a quoi ressemble un reel au format GDS2.
* Elle ne sert en fait a rien si ce n'est a verifier ce que rend la fonction double_to_gdsreal.
*
****/
# if 0
static void
pv_ecrit_gdsreal( value_str, size )
char *value_str;
short size;
{
register int i, j, k;
char buffer[65];
char buffer2[72];
k = 0;
for (i = 0; i < size; i++)
for (j = 7; j >= 0; j--) /* Pour chaque bit de l'octet */
buffer[k++] = (((value_str[i] >> j) & 0x0001) != 0) ? '1' : '0'; /* Stocker sa valeur dans le tableau */
for (i = 0, j = 0; i < size*8; i++) {
if ( (i != 0) && (i%8 == 0) ) buffer2[j++] = ' ';
buffer2[j] = buffer[i];
j++;
}
buffer2[j] = '\0';
return;
}
# endif
/***********
*
* RDS_TO_GDS_SYM
*
* Cette fonction prend la definition d'une symetrie en RDS et la transpose en
* son equivalent en GDS. En fait, il s'agit aussi d'une scission, le format
* GDS separant clairement la notion de reflection et la rotation.
*
* ENTREE : la symetrie RDS
* adresse du flag pour memoriser si il y a reflection autour de l'axe
* des abcisses
* adresse de stockage de l'angle de rotation
*
* RETOUR : aucun
*
***/
static void
pv_rds_to_gds_sym( rds_sym, refx_p, angle_p )
char rds_sym;
short *refx_p;
double *angle_p;
{
switch (rds_sym) {
case RDS_NOSYM :
*refx_p = 0;
*angle_p = 0.0;
break;
case RDS_ROT_P :
*refx_p = 0;
*angle_p = 90.0;
break;
case RDS_SYMXY :
*refx_p = 0;
*angle_p = 180.0;
break;
case RDS_ROT_M :
*refx_p = 0;
*angle_p = 270.0;
break;
case RDS_SYM_X :
*refx_p = 1;
*angle_p = 180.0;
break;
case RDS_SY_RM :
*refx_p = 1;
*angle_p = 270.0;
break;
case RDS_SYM_Y :
*refx_p = 1;
*angle_p = 0.0;
break;
case RDS_SY_RP :
*refx_p = 1;
*angle_p = 90.0;
}
}
/***********
*
* SAUVE_RECTANGLE
*
***/
static int
pv_sauve_rectangle( rect, fp, layer )
rdsrec_list *rect;
FILE *fp;
short layer;
{
register int numb;
hinfo_type infobuf;
short datatype = 0;
int bool = FALSE;
coord_t tab[6]; /* last one reserved for text */
/* A connectors is written using a specific layer from now on:
* this implies a simple change of layer */
if ((IsRdsConExter(rect) || IsRdsRefCon (rect)) && !IsRdsVia(rect))
layer = GET_GDS_CONNECTOR_LAYER(layer);
else
layer = GET_GDS_LAYER(layer);
tab[0].X = rect->X;
tab[0].Y = rect->Y;
tab[1].X = rect->X;
tab[1].Y = rect->Y + rect->DY;
tab[2].X = rect->X + rect->DX;
tab[2].Y = rect->Y + rect->DY;
tab[3].X = rect->X + rect->DX;
tab[3].Y = rect->Y;
tab[4].X = rect->X;
tab[4].Y = rect->Y;
tab[5].X = rect->X + (rect->DX >> 2);
tab[5].Y = rect->Y + (rect->DY >> 2);
entete(BOUNDARY, 0);
entete(LAYER0, sizeof(short));
if (islittle()) {
layer = swaps(layer);
datatype = swaps(datatype);
tab[0].X = swapl(tab[0].X);
tab[0].Y = swapl(tab[0].Y);
tab[1].X = swapl(tab[1].X);
tab[1].Y = swapl(tab[1].Y);
tab[2].X = swapl(tab[2].X);
tab[2].Y = swapl(tab[2].Y);
tab[3].X = swapl(tab[3].X);
tab[3].Y = swapl(tab[3].Y);
tab[4].X = swapl(tab[4].X);
tab[4].Y = swapl(tab[4].Y);
tab[5].X = swapl(tab[5].X);
tab[5].Y = swapl(tab[5].Y);
}
numb = fwrite((char *)&layer, sizeof(short), 1, fp);
controle(1);
entete(DATATYPE, sizeof(short));
numb = fwrite((char *)&datatype, sizeof(short), 1, fp);
controle(1);
entete(XY, 5 * sizeof(coord_t));
numb = fwrite((char *)tab, sizeof(coord_t), 5, fp);
controle(5);
entete(ENDEL, 0);
/* If the rectangle contains some text, even if it is not a connector,
we drive the text: nodes should be sufficients.
Frederic Petrot: 10/04/96 */
if (rect->NAME != NULL) {
entete(TEXT, 0);
entete(LAYER0, sizeof(short));
numb = fwrite((char *)&layer, sizeof(short), 1, fp);
controle(1);
/* TEXTTYPE values is set to 0, who cares */
entete(TEXTTYPE, sizeof(short));
layer = 0x00;
numb = fwrite((char *)&layer, sizeof(short), 1, fp);
controle(1);
entete(XY, sizeof(coord_t));
numb = fwrite((char *)&tab[5], sizeof(coord_t), 1, fp);
controle(1);
numb = strlen(rect->NAME);
if ((numb % 2) != 0) {
numb += 1;
bool = TRUE;
}
entete(STRING, numb * sizeof(char));
if (fputs(rect->NAME, fp) < 0) {
pv_init_error();
pv_error.v_error = ENOSPACE;
(void)fclose(fp);
pv_give_error("text_string");
return(-1);
}
if (bool) cadre;
entete(ENDEL, 0);
}
return 0;
}
/***********
*
* SAUVE_INSTANCE
*
***/
static int
pv_sauve_instance( inst, fp )
rdsins_list *inst;
FILE *fp;
{
register int numb;
hinfo_type infobuf;
int bool = FALSE;
char *gds_angle;
short ref_x_axis;
double rds_angle;
ushort strans;
entete(SREF, 0);
numb = strlen(inst->FIGNAME);
if ( (numb % 2) != 0 ) {/* Si la longueur du nom est impaire, on la rend paire */
numb += 1; /* car chaque enregistrement doit comporter un nombre */
bool = TRUE; /* pair de caracteres dans un fichier GDS. */
}
entete(SNAME, numb * sizeof(char));
if (fputs(inst->FIGNAME, fp) < 0 ) {
pv_init_error();
pv_error.v_error = ENOSPACE;
(void)fclose(fp);
pv_give_error("sauve_instance");
return(-1);
}
if (bool) cadre;
pv_rds_to_gds_sym(inst->TRANSF, &ref_x_axis, &rds_angle);
if (ref_x_axis || rds_angle) {
strans = (ref_x_axis != 0) ? GREFLECT : 0;
entete(STRANS, sizeof(ushort));
if (islittle())
strans = swaps(strans);
numb = fwrite((char *)&strans, sizeof(ushort), 1, fp);
controle(1);
}
if (rds_angle) {
entete(ANGLE, sizeof(angle_type));
gds_angle = pv_double_to_gdsreal(rds_angle, 2);
if (gds_angle == (char *)NULL) {
(void)fclose(fp);
return(-1);
}
numb = fwrite(gds_angle, sizeof(angle_type), 1, fp);
free(gds_angle);
controle(1);
}
entete(XY, sizeof(coord_t));
if (islittle()) {
long X = swapl(inst->X);
long Y = swapl(inst->Y);
numb = fwrite((char *)&X, sizeof(long), 1, fp);
controle(1);
numb = fwrite((char *)&Y, sizeof(long), 1, fp);
controle(1);
} else {
numb = fwrite((char *)&inst->X, sizeof(long), 1, fp);
controle(1);
numb = fwrite((char *)&inst->Y, sizeof(long), 1, fp);
controle(1);
}
entete(ENDEL, 0);
return(0);
}
/****************
*
* SAUVE_MODELE
*
**********/
static int
pv_sauve_modele( modele, fp, date )
rdsfig_list *modele;
FILE *fp;
date_type *date;
{
register int numb, i;
register rdsrec_list *rect;
register rdsins_list *inst = modele->INSTANCE;
hinfo_type infobuf;
int bool = FALSE;
entete(BGNSTR, 2 * sizeof(date_type));
numb = fwrite((char *)&date, sizeof(date_type), 1, fp);
controle(1);
numb = fwrite((char *)&date, sizeof(date_type), 1, fp);
controle(1);
numb = strlen(modele->NAME);
if ( (numb % 2) != 0 ) { /* Si la longueur du nom est impaire, on la rend paire */
numb += 1; /* car chaque enregistrement doit comporter un nombre */
bool = TRUE; /* pair de caracteres dans un fichier GDS. */
}
entete(STRNAME, numb * sizeof(char));
if ( fputs(modele->NAME, fp) < 0 ) {
pv_init_error();
pv_error.v_error = ENOSPACE;
(void)fclose(fp);
pv_give_error("sauve_modele");
return(-1);
}
if (bool) cadre;
for (i = 0; i < RDS_MAX_LAYER; i++) {
/* layer to be driven :
Layers that the user does not want, or need, to drive in GDS are
supposed to be set to -1, illegal GDS layer number. */
if (GET_GDS_LAYER(i) != RDS_GDS_LAYER_EMPTY) {
if (modele->LAYERTAB[i]) {
rect = modele->LAYERTAB[i];
while (rect) {
if (pv_sauve_rectangle(rect, fp, i) < 0) return -1;
rect = rect->NEXT;
}
}
}
}
while (inst) {
if (pv_sauve_instance(inst, fp) < 0) return -1;
inst = inst->NEXT;
}
entete(ENDSTR, 0);
return 0; /* tout s'est bien passe pendant la sauvegarde sur disque de la structure. */
}
/*------------------------------------------------------------\
| |
| gdssaverdsfig |
| |
\------------------------------------------------------------*/
void gdssaverdsfig( Figure )
rdsfig_list *Figure;
{
int bool = FALSE;
register int numb;
register FILE *fp;
hinfo_type infobuf;
short version = 3;
date_type date;
struct tm *p;
time_t t;
char *u_unit, *m_unit;
ptype_list *model_list;
pv_warning = 1; /* 1 valeur par defaut, envoi de messages. */
/*
* recherche d'un modele RDS dans la liste et retour de son pointeur,
* pointeur sur la figure pere a sauver; son nom servira a creer
* le nom de la librairie GDS (nom interne)
*/
model_list = (ptype_list *)reverse((chain_list *)getrdsmodellist(Figure));
if ( (fp = mbkfopen(Figure->NAME, "gds", "w")) == NULL ) {
pv_init_error();
pv_error.v_error = ENOFILE;
pv_error.v_textp = Figure->NAME;
pv_give_error("savegds");
EXIT(1);
}
tzset();
if (time(&t) == (time_t)-1) { /* recuperation de la date GMT du jour */
(void)fclose(fp);
pv_init_error();
pv_error.v_error = ECLOCK;
pv_give_error("savegds");
EXIT(1);
}
p = localtime(&t); /* decompactage de la date GMT en date locale */
if (p == (struct tm *)NULL) {
(void)fclose(fp);
pv_init_error();
pv_error.v_error = ENOMEM;
pv_give_error("savegds");
EXIT(1);
}
if (islittle()) {
date.year = swaps(p->tm_year);
date.month = swaps(p->tm_mon);
date.day = swaps(p->tm_mday);
date.hour = swaps(p->tm_hour);
date.min = swaps(p->tm_min);
date.sec = swaps(p->tm_sec);
version = swaps(version);
} else {
date.year = p->tm_year;
date.month = p->tm_mon;
date.day = p->tm_mday;
date.hour = p->tm_hour;
date.min = p->tm_min;
date.sec = p->tm_sec;
}
entete(HEADER, sizeof(short));
numb = fwrite((char *)&version, sizeof(short), 1, fp);
controle(1);
entete(BGNLIB, 2 * sizeof(date_type));
numb = fwrite((char *)&date, sizeof(date_type), 1, fp);
controle(1);
numb = fwrite((char *)&date, sizeof(date_type), 1, fp);
controle(1);
numb = strlen(Figure->NAME);
if ((numb % 2) != 0) {/* Si la longueur du nom est impaire, on la rend paire */
numb += 1; /* car chaque enregistrement doit comporter un nombre */
bool = TRUE; /* pair de caracteres dans un fichier GDS. */
}
entete(LIBNAME, numb * sizeof(char));
if ( fputs(Figure->NAME, fp) < 0 ) {
pv_init_error();
pv_error.v_error = ENOSPACE;
(void)fclose(fp);
pv_give_error("savegds");
EXIT(1);
}
if (bool)
cadre;
entete(UNITS, 2 * sizeof(unit_type));
/* who cares about user defined unit ? */
u_unit = pv_double_to_gdsreal(1.0 / RDS_UNIT, 2);
/* cas d'underflow, d'overflow ou de manque d'espace memoire */
if (u_unit == (char *)NULL) {
(void)fclose(fp);
EXIT(1);
}
numb = fwrite(u_unit, sizeof(unit_type), 1, fp);
free(u_unit);
controle(1);
m_unit = pv_double_to_gdsreal( 1.0e-6 / RDS_UNIT, 2);
/* cas d'underflow, d'overflow ou de manque d'espace memoire */
if (m_unit == (char *)NULL) {
(void)fclose(fp);
EXIT(1);
}
numb = fwrite(m_unit, sizeof(unit_type), 1, fp);
free(m_unit);
controle(1);
while (model_list) {
if (pv_sauve_modele((rdsfig_list *)model_list->DATA, fp, &date) < 0)
EXIT(1);
model_list = model_list->NEXT;
}
entete(ENDLIB, 0);
if (fclose(fp) < 0) {
pv_init_error();
pv_error.v_error = EIO;
pv_error.v_textp = "Probleme a la fermeture du fichier.";
pv_give_error("savegds");
EXIT(1);
}
}

View File

@ -0,0 +1,49 @@
#ifndef __P
# if defined(__STDC__) || defined(__GNUC__)
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
/*------------------------------------------------------------\
| |
| Tool : RDSGDS |
| |
| File : gds_drive.h |
| |
| Authors : Pierre Vittet |
| Modified by Jacomme Ludovic |
| Date : 04/07/93 |
| |
\------------------------------------------------------------*/
# ifndef RDSGDS_DRIVE
# define RDSGDS_DRIVE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Macro |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,257 @@
/*------------------------------------------------------------\
| |
| Tool : RDSGDS |
| |
| File : gds_error.c |
| |
| Authors : Pierre Vittet |
| Modified by Jacomme Ludovic |
| Date : 04/07/93 |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Include Files |
| |
\------------------------------------------------------------*/
# include <stdio.h>
# include <mut.h>
# include "gds.h"
# include "gds_error.h"
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
int pv_warning; /* indicateur d'envoi d'avertissement. */
struct var pv_error;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
/*********
*
* GIVE_ERROR
*
* Cette fonction utilise la variable pv_error (struct var) et sert a imprimer
* un message d'erreur sur stderr si le programmeur le desire. Son but est
* d'essayer de documenter de la facon la plus claire possible une erreur.
*
* ENTREE : message a afficher
*
* RETOUR : le numero d'erreur
* 0 si il n'y avait pas d'erreur au depart
*
***/
int pv_give_error ( message )
char *message;
{
register int error_num = pv_error.v_error;
if (!error_num)
return(0); /* s'il n'y a pas eu d'erreur, on sort immediatement */
switch (error_num) {
case ENOMEM :
(void)fprintf(stderr, "%s : Memoire insuffisante !\n", message);
break;
case EIO :
(void)fprintf(stderr, "%s : Erreur d'entree/sortie !\n", message);
break;
case EFTRUNC :
(void)fprintf(stderr, "%s : Fin de fichier prematuree !\n", message);
break;
case ENOFILE :
(void)fprintf(stderr, "%s : Je n'arrive pas a ouvrir le fichier %s !\n", message, pv_error.v_textp);
pv_error.v_textp = (char *)NULL; /* etant donne que textp sert a donner le nom du fichier, on evite de */
break; /* le re-imprimer par la suite. */
case ENOSPACE :
(void)fprintf(stderr, "%s : Il n'y a plus de place sur le disque !\n", message);
break;
case ECLOCK :
(void)fprintf(stderr, "%s : Probleme de lecture de l'horloge interne !\n", message);
break;
case EOVERFL :
(void)fprintf(stderr, "%s : Depassement de capacite !\n", message);
break;
case ENOMODEL :
(void)fprintf(stderr, "%s : Modele inconnu de la base RDS !\n", message);
break;
case ENOCODE :
(void)fprintf(stderr, "%s : Le fichier n'est pas au format voulu !\n", message);
break;
case ENORELE :
(void)fprintf(stderr, "%s : Le fichier correspond a une version trop recente du format !\n", message);
(void)fprintf(stderr, "Il est grand temps de mettre a jour le programme.\n");
break;
case ENODONE :
(void)fprintf(stderr, "%s : La fonction %s n'est pas terminee.", message, pv_error.v_textp);
(void)fprintf(stderr, "Il faudrait peut-etre la finir...\n");
pv_error.v_textp = (char *)NULL;
break;
case ENOTHER :
break;
default :
(void)fprintf(stderr, "%s : Erreur non documentee...\n", message);
(void)fprintf(stderr, "Il faudrait peut-etre mettre a jour les messages d'erreur !\n");
break;
}
if (pv_error.v_textp) /* si il y a un texte supplementaire, */
(void)fprintf(stderr, "%s\n", pv_error.v_textp); /* on l'imprime. */
pv_init_error(); /* une fois qu'on a utilise le contenu de pv_error, on la re-initialise. */
EXIT(1);
return(error_num);
}
/*********
*
* INIT_V
*
* La fonction est utilisee pour remettre a zero chaque champ de la variable
* pv_error.
*
***/
void pv_init_error()
{
pv_error.v_error = 0;
pv_error.v_textp = (char *)NULL;
}
/*********
*
* SET_V_ERROR
*
* Cette fonction, appelee depuis la macro traitebool, ne sert qu'a positionner
* le champs v_error de la variable v, interne au fichier.
*
***/
void
pv_set_pv_error( error_number )
int error_number;
{
pv_init_error();
switch (error_number) {
case TRUNCERR : /* Ici, pas d'erreur d'E/S mais le fichier */
pv_error.v_error = EFTRUNC; /* n'est pas complet. Voir pv_error */
break;
case NOMEMORY :
pv_error.v_error = ENOMEM;
break;
case IOERR :
pv_error.v_error = EIO;
break;
case CODEINCONNU :
pv_error.v_error = ENOCODE;
break;
case ATTRTABLERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur ATTRTABLE";
break;
case BGNSTRERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur BGNSTR";
break;
case STRTYPERR :
case STYPTABLERR :
case TEXTNODERR :
pv_error.v_error = ENORELE;
break;
case MASKERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur MASK";
break;
case BOUNDARYERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur BOUNDARY";
break;
case PATHERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur PATH";
break;
case SREFERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur SREF";
break;
case AREFERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur AREF";
break;
case TEXTERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur AREF";
break;
case NODERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur NODE";
break;
case BOXERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur BOX";
break;
case REFLIBSERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur REFLIBS";
break;
case FONTSERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur FONTS";
break;
case STRNAMERR :
pv_error.v_error = ENOTHER;
pv_error.v_textp = "Erreur sur STRNAMERR";
break;
case FALSE :
case TRUE :
break; /* Ici, rien a faire, v_error a du etre positionne */
default :
pv_error.v_error = error_number;
break;
}
}
/***********
*
* EMET_WARNING
*
* Cette fonction est utilisee pour envoyer des messages d'avertissement a la
* console sur la sortie standard stderr. Ces messages ont pour but de donner
* a l'utilisateur des indications lorsque le parser de GDS se trouve en face
* de problemes insurmontables de traduction mais non bloquants. Par exemple,
* un cas typique est celui ou un objet GDS ne trouve pas d'equivalent dans
* le contexte RDS (i.e. un "path" ou l'equivalent d'un fil) ou encore si une
* operation geometrique est appliquee a un objet mais n'existe pas en RDS.
*
***/
void
pv_emet_warning( Name, texte1, texte2 )
char *Name, *texte1, *texte2;
{
if (pv_warning)
{
if (texte2)
(void)fprintf(stderr, "%s : %s %s.\n", Name, texte1, texte2);
else
(void)fprintf(stderr, "%s : %s.\n", Name, texte1);
}
}

View File

@ -0,0 +1,135 @@
#ifndef __P
# if defined(__STDC__) || defined(__GNUC__)
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
/*------------------------------------------------------------\
| |
| Tool : RDSGDS |
| |
| File : gds_error.h |
| |
| Authors : Pierre Vittet |
| Modified by Jacomme Ludovic |
| Date : 04/07/93 |
| |
\------------------------------------------------------------*/
# ifndef RDSGDS_ERROR
# define RDSGDS_ERROR
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/* erreurs generales */
#define ENOMEM 1 /* No enough core. */
#define EIO 2 /* IO error. */
#define EFTRUNC 3 /* The file is teuncated somewhere. */
#define ENOFILE 4 /* Cannot open file. */
#define ENOSPACE 5 /* No more space on disk. */
#define ECLOCK 6 /* Cannot read internal clock well. */
#define EOVERFL 7 /* Overflow or underflow. */
#define ENOMODEL 8 /* Unknown model in Rds. */
#define ENODONE 99
/* Programme en cours de finition... Cela permet de definir par exemple l'en-tete d'une */
/* fonction et de ne pas faire son corps. C'est utile si on doit fabriquer une librai- */
/* rie et que l'on est en retard : n'importe qui peut quand meme inclure cette fonction */
/* dans un executable, il ne se passera rien lors de son appel. Il suffit simplement de */
/* recompiler lorsque la librairie est terminee. */
/* erreurs specifiques aux parser/driver */
#define ENOCODE 101 /* Le code rencontre n'est pas reconnu.
*/
#define ENORELE 102 /* Le code existe bien mais correspond a une version trop recente du format d
e stockage */
/* (GDS2, CIF...), dans la version avec laquelle on travaille, ce code etait
envisage */
/* mais pas encore implemente.
*/
#define ENOTHER 255 /* Any other (wierd !) error. */
/*********
*
* Voici la liste des valeurs que peut prendre la variable "error" dans toutes
* les fonctions de lecture qui vont suivre.
* Remarque : "error" correspond a "a" dans la macro traitebool et a "c" dans la macro
* setbool (bien qu'elle y prenne, dans la pratique, toujours la valeur TRUNCERR).
*
***/
#define TRUNCERR TRUE + 2 /* Comme ca, on est sur que c'est different de */
#define NOMEMORY TRUE + 3 /* la valeur qui peut avoir ete definie pour */
#define IOERR TRUE + 4 /* TRUE */
#define CODEINCONNU TRUE + 5
#define ATTRTABLERR TRUE + 6
#define BGNSTRERR TRUE + 7
#define STYPTABLERR TRUE + 8
#define MASKERR TRUE + 9
#define STRTYPERR TRUE + 10
#define BOUNDARYERR TRUE + 11
#define PATHERR TRUE + 12
#define SREFERR TRUE + 13
#define AREFERR TRUE + 14
#define TEXTERR TRUE + 15
#define NODERR TRUE + 16
#define BOXERR TRUE + 17
#define REFLIBSERR TRUE + 18
#define FONTSERR TRUE + 19
#define TEXTNODERR TRUE + 20
#define STRNAMERR TRUE + 21
/*------------------------------------------------------------\
| |
| Macro |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*********
*
* STRUCT VAR
*
* Cette structure est utilisee pour contenir certaines variables du programme.
*
***/
struct var {
short v_error; /* code d'erreur */
char *v_textp; /* pointeur vers un texte quelconque. */
/* Peut, par exemple, etre utilise pour completer un message d'erreur */
};
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
extern int pv_warning;
extern struct var pv_error;
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern int pv_give_error __P((char *message));
extern void pv_init_error __P(());
extern void pv_set_pv_error __P((int error_number));
extern void pv_emet_warning __P((char *Name, char *texte1, char *texte2));
# endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
#ifndef __P
# if defined(__STDC__) || defined(__GNUC__)
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
/*------------------------------------------------------------\
| |
| Tool : RDSGDS |
| |
| File : gds_parse.h |
| |
| Authors : Pierre Vittet |
| Modified by Jacomme Ludovic |
| Date : 04/07/93 |
| |
\------------------------------------------------------------*/
# ifndef RDSGDS_PARSE
# define RDSGDS_PARSE
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/* conversion to meters :
GDS internally defines a unit, let says GDS_UNIT, that is so that
GDS_UNIT is defined in meters.
RDS defines its unit so that RDS_UNIT_PARAM is defined in microns.
So RDS_UNIT_PARAM * MICRONS_IN_METER is given in meters, and :
Xgds * GDS_UNIT = Xrds / (RDS_UNIT * MICRONS_IN_METER). */
#define MICRONS_IN_METER 1000000
/*------------------------------------------------------------\
| |
| Macro |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
typedef struct node_list
{
struct node_list *NEXT;
char *NAME;
char LAYER;
long X;
long Y;
} node_list;
/*------------------------------------------------------------\
| |
| Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
# endif

View File

@ -0,0 +1,99 @@
/* This file is moreorless a verbatim copy of the swaptype file issued from
the tool Pwet.
Author: Frederic Petrot */
#include "gds_swap.h"
/* return 0 for big-endian, 1 for little-endian */
#ifdef __STDC__
int islittle(void)
#else
int islittle()
#endif
{
int x = 0x00000001;
return *(char *)&x;
}
/* I assume that I know the sizeof all relevant types...
Clean implementations would loop on the sizeof. */
#ifdef __STDC__
char swapc(char k)
#else
char swapc(k)
char k;
#endif
{
char t;
t = k;
return t;
}
#ifdef __STDC__
short swaps(short s)
#else
short swaps(s)
short s;
#endif
{
short t;
*((char *)&t + 1) = *(char *)&s;
*(char *)&t = *((char *)&s + 1);
return t;
}
#ifdef __STDC__
int swapi(int i)
#else
int swapi(i)
int i;
#endif
{
int t;
*((char *)&t + 3) = *(char *)&i;
*((char *)&t + 2) = *((char *)&i + 1);
*((char *)&t + 1) = *((char *)&i + 2);
*(char *)&t = *((char *)&i + 3);
return t;
}
#ifdef __STDC__
long swapl(long l)
#else
long swapl(l)
long l;
#endif
{
long t;
*((char *)&t + 3) = *(char *)&l;
*((char *)&t + 2) = *((char *)&l + 1);
*((char *)&t + 1) = *((char *)&l + 2);
*(char *)&t = *((char *)&l + 3);
return t;
}
#ifdef __STDC__
double swapd(double d)
#else
double swapd(d)
double d;
#endif
{
double t;
*((char *)&t + 7) = *((char *)&d + 0);
*((char *)&t + 6) = *((char *)&d + 1);
*((char *)&t + 5) = *((char *)&d + 2);
*((char *)&t + 4) = *((char *)&d + 3);
*((char *)&t + 3) = *((char *)&d + 4);
*((char *)&t + 2) = *((char *)&d + 5);
*((char *)&t + 1) = *((char *)&d + 6);
*((char *)&t + 0) = *((char *)&d + 7);
return t;
}

View File

@ -0,0 +1,22 @@
#ifndef __P
# if defined(__STDC__) || defined(__GNUC__)
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
#ifdef __STDC__
int islittle(void);
char swapc(char);
short swaps(short);
int swapi(int);
long swapl(long);
double swapd(double);
#else
extern int islittle __P(());
extern char swapc __P(());
extern short swaps __P(());
extern int swapi __P(());
extern long swapl __P(());
extern double swapd __P(());
#endif

View File

@ -0,0 +1,47 @@
#ifndef __P
# if defined(__STDC__) || defined(__GNUC__)
# define __P(x) x
# else
# define __P(x) ()
# endif
#endif
/*------------------------------------------------------------\
| |
| Tool : RGS |
| |
| File : rgs113.h |
| |
| Authors : Jacomme Ludovic |
| |
| Date : 27.06.95 |
| |
\------------------------------------------------------------*/
# ifndef RGS_113_H
# define RGS_113_H
/*------------------------------------------------------------\
| |
| Constants |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Types |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Global Variables |
| |
\------------------------------------------------------------*/
/*------------------------------------------------------------\
| |
| Functions |
| |
\------------------------------------------------------------*/
extern rdsfig_list * gdsloadrdsfig __P((rdsfig_list *Figure, char *Name, char Mode));
extern void gdssaverdsfig __P((rdsfig_list *Figure));
# endif