diff --git a/alliance/src/rds/Makefile.am b/alliance/src/rds/Makefile.am new file mode 100644 index 00000000..07243f94 --- /dev/null +++ b/alliance/src/rds/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src man3 diff --git a/alliance/src/rds/Makefile.in b/alliance/src/rds/Makefile.in new file mode 100644 index 00000000..d994bbd3 --- /dev/null +++ b/alliance/src/rds/Makefile.in @@ -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 man3 +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: diff --git a/alliance/src/rds/configure b/alliance/src/rds/configure new file mode 100644 index 00000000..18fbe348 --- /dev/null +++ b/alliance/src/rds/configure @@ -0,0 +1,1636 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=src/rds.h + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:556: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:609: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 +if test "$program_transform_name" = s,x,x,; then + program_transform_name= +else + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED + program_transform_name="`echo $program_transform_name|sed -f conftestsed`" + rm -f conftestsed +fi +test "$program_prefix" != NONE && + program_transform_name="s,^,${program_prefix},; $program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" + +# sed with no file args requires a program. +test "$program_transform_name" = "" && program_transform_name="s,x,x," + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=rds + +VERSION=2.1 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <> confdefs.h <&6 +echo "configure:712: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:725: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:738: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:751: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:764: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:789: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:844: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:874: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:925: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:957: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 968 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:999: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1004: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1032: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1064: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1144: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1248: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1325: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +INCLUDES=-I${ALLIANCE_TOP}/include +LDFLAGS=-L${ALLIANCE_TOP}/lib + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo " +Makefile +src/Makefile +man3/Makefile +" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@RANLIB@%$RANLIB%g +s%@INCLUDES@%$INCLUDES%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/alliance/src/rds/configure.in b/alliance/src/rds/configure.in new file mode 100644 index 00000000..b740c0e2 --- /dev/null +++ b/alliance/src/rds/configure.in @@ -0,0 +1,52 @@ +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 +dnl $Id: configure.in,v 1.1 2002/03/13 13:37:35 fred Exp $ +dnl +dnl +AC_INIT(src/rds.h) +AM_INIT_AUTOMAKE(rds, 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 +man3/Makefile +]) diff --git a/alliance/src/rds/man3/Makefile.am b/alliance/src/rds/man3/Makefile.am new file mode 100644 index 00000000..de78909f --- /dev/null +++ b/alliance/src/rds/man3/Makefile.am @@ -0,0 +1,55 @@ +man_MANS = addrdsfig.3 \ + addrdsfigrec.3 \ + addrdsins.3 \ + addrdsinsrec.3 \ + addrdsrecwindow.3 \ + allocrdsfig.3 \ + allocrdsins.3 \ + allocrdsrec.3 \ + allocrdsrecwin.3 \ + allocrdswin.3 \ + allocrdswindow.3 \ + allocrdswinrec.3 \ + buildrdswindow.3 \ + conmbkrds.3 \ + delrdsfig.3 \ + delrdsfigrec.3 \ + delrdsins.3 \ + delrdsinsrec.3 \ + delrdsrecwindow.3 \ + destroyrdswindow.3 \ + figmbkrds.3 \ + freerdsfig.3 \ + freerdsins.3 \ + freerdsrec.3 \ + getrdsmodellist.3 \ + insconmbkrds.3 \ + insmbkrds.3 \ + insrefmbkrds.3 \ + inssegmbkrds.3 \ + instanceface.3 \ + insviambkrds.3 \ + loadrdsfig.3 \ + loadrdsparam.3 \ + modelmbkrds.3 \ + rdsalloc.3 \ + rdsenv.3 \ + rdsfree.3 \ + refmbkrds.3 \ + roundrdsrec.3 \ + saverdsfig.3 \ + searchrdsfig.3 \ + segmbkrds.3 \ + viambkrds.3 \ + viewrdsfig.3 \ + viewrdsins.3 \ + viewrdsparam.3 \ + viewrdsrec.3 \ + viewrdswindow.3 \ + viewrfmcon.3 \ + viewrfmfig.3 \ + viewrfmins.3 \ + viewrfmrec.3 \ + viewrfmref.3 \ + viewrfmseg.3 \ + viewrfmvia.3 diff --git a/alliance/src/rds/man3/Makefile.in b/alliance/src/rds/man3/Makefile.in new file mode 100644 index 00000000..0dde3e1b --- /dev/null +++ b/alliance/src/rds/man3/Makefile.in @@ -0,0 +1,219 @@ +# 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@ + +man_MANS = addrdsfig.3 addrdsfigrec.3 addrdsins.3 addrdsinsrec.3 addrdsrecwindow.3 allocrdsfig.3 allocrdsins.3 allocrdsrec.3 allocrdsrecwin.3 allocrdswin.3 allocrdswindow.3 allocrdswinrec.3 buildrdswindow.3 conmbkrds.3 delrdsfig.3 delrdsfigrec.3 delrdsins.3 delrdsinsrec.3 delrdsrecwindow.3 destroyrdswindow.3 figmbkrds.3 freerdsfig.3 freerdsins.3 freerdsrec.3 getrdsmodellist.3 insconmbkrds.3 insmbkrds.3 insrefmbkrds.3 inssegmbkrds.3 instanceface.3 insviambkrds.3 loadrdsfig.3 loadrdsparam.3 modelmbkrds.3 rdsalloc.3 rdsenv.3 rdsfree.3 refmbkrds.3 roundrdsrec.3 saverdsfig.3 searchrdsfig.3 segmbkrds.3 viambkrds.3 viewrdsfig.3 viewrdsins.3 viewrdsparam.3 viewrdsrec.3 viewrdswindow.3 viewrfmcon.3 viewrfmfig.3 viewrfmins.3 viewrfmrec.3 viewrfmref.3 viewrfmseg.3 viewrfmvia.3 + +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_CLEAN_FILES = +man3dir = $(mandir)/man3 +MANS = $(man_MANS) + +NROFF = nroff +DIST_COMMON = Makefile.am Makefile.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 man3/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-man3: + $(mkinstalldirs) $(DESTDIR)$(man3dir) + @list='$(man3_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.3*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \ + done + +uninstall-man3: + @list='$(man3_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.3*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \ + rm -f $(DESTDIR)$(man3dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man3 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man3 +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = man3 + +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 man3/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 +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-exec: install-exec-am + +install-data-am: install-man +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-man +uninstall: uninstall-am +all-am: Makefile $(MANS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 + + +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-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: 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: install-man3 uninstall-man3 install-man uninstall-man 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 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: diff --git a/alliance/src/rds/man3/addrdsfig.3 b/alliance/src/rds/man3/addrdsfig.3 new file mode 100644 index 00000000..e3b167f1 --- /dev/null +++ b/alliance/src/rds/man3/addrdsfig.3 @@ -0,0 +1,94 @@ +.\" $Id: addrdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)addrdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +addrdsfig +.XE +.XS0 \n% +.ti 0.2i +addrdsfig +.XE0 \} +.TH ADDRDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +addrdsfig \- adds a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include"rdsnnn.h" +rdsfig_list \(**addrdsfig( Name, Size ) + char \(**Name; + unsigned int Size; +.SH PARAMETER +.TP 20 +\fIName\fP +Name of the figure to add to the figures's list. +.TP +\fISize\fP +Size of the user structure (if defined) added to the rdsrec_list structure. +.SH DESCRIPTION +The addrdsfig function adds a new figure called 'Name' to the head of figures's list and becomes itself the list head (HEAD_RDSFIG pointer). +.br +The field \fINAME\fP of the figure is set to \'Name\'. +.br +The field \fISIZE\fP of the figure is set to \'Size\'. +.br +The field MODE of the figure is set to \'A\'. +.PP +\fINote\fI : +.PP +Name allocation is done with the namealloc() MBK function. +.PP +If user structure isn't defined, the user has to set parameter 'Size' to 0L. +.SH RETURN VALUE +Pointer to the newly created figure.It's also the HEAD_RDSFIG pointer. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**RdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = \fBaddrdsfig\fP ("core",sizeof ( UserStruct ) ); + printf("FIGURE NAME = %s\\n",RdsFigure->NAME); + /\(** The new figure is head of figure list \(**/ + printf("HEAD_RDSFIG : FIGURE NAME = %s\\n",HEAD_RDSFIG->NAME); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR delrdsfig, +.BR viewrdsfig + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/addrdsfigrec.3 b/alliance/src/rds/man3/addrdsfigrec.3 new file mode 100644 index 00000000..a57fb972 --- /dev/null +++ b/alliance/src/rds/man3/addrdsfigrec.3 @@ -0,0 +1,141 @@ +.\" $Id: addrdsfigrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)addrdsfigrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +addrdsfigrec +.XE +.XS0 \n% +.ti 0.2i +addrdsfigrec +.XE0 \} +.TH ADDRDSFIGREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + addrdsfigrec \- adds a rectangle to a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" +rdsrec_list \(**addrdsfigrec( Figure, Name, Layer, X, Y, Dx, Dy ) + rdsfig_list \(**Figure; + char \(**Name; + char Layer; + long X; + long Y; + long Dx; + long Dy; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +figure which contains the rectangle to add. +.TP +\fIName\fP +name of the rectangle to add. +.TP +\fILayer\fP +Layer of the rectangle to add. +.TP +\fIX,Y,DX,DY\fP +Dimensions of the rectangle to add. +.SH DESCRIPTION +\fBaddrdsfigrec\fP creates an adds a rectangle in the figure called \fIFigure\fP. +The size of the user structure to add next to the structure rdsrec_list (if it +exists) is defined by the field \fBSIZE\fP of the figure who has to contain +the rectangle. The rectangle is added in front of the list, and becomes itself +the list head associated to the defined layer in parameters of the function. +The fields of the rectangle structure are modified as follows : +.br +The field \fINAME\fP is set to \fBName\fP. +.br +The field \fIX\fP is set to \fBX\fP. +.br +The field \fIY\fP is set to \fBY\fP. +.br +The field \fIDX\fP is set to \fBDx\fP. +.br +The field \fIDY\fP is set to \fBDy\fP. +.br +The field \fIFLAGS\fP is modified with the value \fBLayer\fP. +.SH RETURN VALUE +\fBaddrdsfigrec\fP returns a pointer to the newly added rectangle. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "mutnnn.h" +#include "rdsnnn.h" +#include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + # define POINTER_STRING(R) \\ + \\ + (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->STRING ) + main() + { + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Rectangle; + char Layer; + rdsrec_list \(**ScanRec; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + Rectangle = \fBaddrdsfigrec\fP (RdsFigure, + "Alu1",RDS_ALU1, + 2,4,12,1); + POINTER_STRING(Rectangle) = namealloc ("rectangle_alu1"); + ... + /\(** + print caracteristics of all rectangles of the Rds figure + \(**/ + for ( Layer = 0 ; Layer < RDS_MAX_LAYER ; Layer ++ ) + { + for ( + ScanRec = RdsFigure->LAYERTAB[Layer] ; + ScanRec != (rdsrec_list \(**) NULL ; + ScanRec = ScanRec->NEXT + ) + { + printf("Rectangle->LAYER = %s\\n", + RDS_LAYER_NAME[GetRdsLayer(ScanRec)]); + printf("Rectangle->NAME = %s\\n",ScanRec->NAME); + printf("Rectangle->X = %ld\\n",ScanRec->X); + printf("Rectangle->Y = %ld\\n",ScanRec->Y); + printf("Rectangle->DX = %ld\\n",ScanRec->DX); + printf("Rectangle->DY = %ld\\n",ScanRec->DY); + printf("Rectangle->STRING = %s\\n",POINTER_STRING(ScanRec)); + } + } + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR delrdsfigrec, +.BR viewrdsfig + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/addrdsins.3 b/alliance/src/rds/man3/addrdsins.3 new file mode 100644 index 00000000..eefb9e60 --- /dev/null +++ b/alliance/src/rds/man3/addrdsins.3 @@ -0,0 +1,142 @@ +.\" $Id: addrdsins.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)addrdsins.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +addrdsins +.XE +.XS0 \n% +.ti 0.2i +addrdsins +.XE0 \} +.TH ADDRDSINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + addrdsins \- adds an instance to a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" +rdsins_list \(**addrdsins( Figure, Model, Name, Sym, X, Y ) + rdsfig_list \(**Figure; + char \(**Model; + char \(**Name; + char Sym; + long X; + long Y; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +figure which contains the instance. +.TP +\fIModel\fP +Name of the model of the instance. +.TP +\fIName\fP +Name of the instance in the figure at which it belongs. +.TP +\fISym\fP +Symmetry applied to the instance. +.RS +.TP 20 +possible values : +.TP +\fBRDS_NOSYM\fP +no symmetry. +.TP +\fBRDS_ROT_P\fP +90 degrees rotation counter clockwise. +.TP +\fBRDS_SYMXY\fP +symmetry with regard to a horizontal and vertical axis. +.TP +\fBRDS_ROT_M\fP +90 degrees rotation clockwise. +.TP +\fBRDS_SYM_X\fP +symmetry with regard to a vertical axis. +.TP +\fBRDS_SY_RM\fP +symmetry with regard to a vertical axis and 90 degrees clockwise. +.TP +\fBRDS_SYM_Y\fP +symmetry with regard to a horizontal axis. +.TP +\fBRDS_SY_RP\fP +symmetry with regard to a horizontal axis and 90 degrees rotation counter clockwise. +.RE +.TP +\fIX,Y\fP +position of the lower left corner of the instance in the figure after symmetry. +.SH DESCRIPTION +The \fIaddrdsins\fP function adds an instance to the head of instances's list in the figure +described in function parameter. Some fields of rdsins_list structure +are modified as follows : +.br +The field \fIFIGNAME\fP is set to \fBModel\fP +.br +The field \fIINSNAME\fP is set to \fBName\fP +.br +The field \fIX\fP is set to \fBX\fP +.br +The field \fIY\fP is set to \fBY\fP +.br +The field \fITRANSF\fP is set to \fBSym\fP +.br +The field \fISIZE\fP is set to \fBFigure->SIZE\fP +.SH RETURN VALUE +\fBaddrdsins\fP returns a pointer to the newly created instance which is head of instances's list of the figure. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "mutnnn.h" +#include "rdsnnn.h" +#include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**RdsFigure; + rdsins_list \(**Instance; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = \fBaddrdsins\fP (RdsFigure,"na2_y","and2",RDS_NOSYM,8,6); + printf("(RdsFigure->INSTANCE)->NAME = %s\\n", + (RdsFigure->INSTANCE)->NAME); + /\(** Instance is head of instance list of the figure \(**/ + printf("Instance->NAME = %s\\n", Instance->NAME); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR delrdsins, +.BR viewrdsins + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/addrdsinsrec.3 b/alliance/src/rds/man3/addrdsinsrec.3 new file mode 100644 index 00000000..4f3a2862 --- /dev/null +++ b/alliance/src/rds/man3/addrdsinsrec.3 @@ -0,0 +1,141 @@ +.\" $Id: addrdsinsrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)addrdsinsrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +addrdsinsrec +.XE +.XS0 \n% +.ti 0.2i +addrdsinsrec +.XE0 \} +.TH ADDRDSINSREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + addrdsinsrec \- adds a rectangle to an instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include"rdsnnn.h" + rdsrec_list \(**addrdsinsrec( Instance, Name, Layer, X, Y, Dx, Dy ) + rdsins_list \(**Instance; + char \(**Name; + char Layer; + long X; + long Y; + long Dx; + long Dy; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstance\fP +The instance which contains the rectangle to add. +.TP +\fIName\fP +Name of the rectangle to add. +.TP +\fILayer\fP +Layer of the rectangle to add. +.TP +\fIX,Y,DX,DY\fP +Dimensions of the the rectangle to add. +.SH DESCRIPTION +This function creates an adds a rectangle to an instance. The size of the user structure to add (if if exists) next to the structure rdsrec_list is defined by the field SIZE of the instance which has to contain the rectangle. The rectangle is chained to the head of the rectangles's list associated to the defined layer in parameters of the function addrdsinsrec(). The fields of the rectangle structure are modified as follows : +.PP +The field \fINAME\fP is set to \'Name\'. +.br +The field \fIX\fP is set to \'X\'. +.br +The field \fIY\fP is set to \'Y\'. +.br +The field \fIDX\fP is set to \'Dx\'. +.br +The field \fIDY\fP is set to \'Dy\'. +.br +The field \fIFLAGS\fP is modified with the value \'Layer\'. +.PP +\fINote\fP : +.PP +\- This function uses MBK namealloc() function. +.PP +\- coordinates of the rectangle are related to the instance before geometrical transformation. +.SH RETURN VALUE +The pointer to the added rectangle. It is also the head of rectangles's list associated to the corresponding layer. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + # define POINTER_STRING(R) \\ + \\ + (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->STRING ) + main() + { + rdsfig_list \(**RdsFigure; + rdsins_list \(**Instance; + rdsrec_list \(**Rectangle; + char Layer; + rdsrec_list \(**ScanRec; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = addrdsins (RdsFigure,"na2_y","and2",RDS_NOSYM,8,6); + Rectangle = \fBaddrdsinsrec\fP (Instance,"Alu1",RDS_ALU1,2,4,12,1); + POINTER_STRING( Rectangle ) = namealloc ("un_alu1"); + /\(** + Displays caracteristics of all the rectangles of the instance + \(**/ + for ( Layer = 0 ; Layer < RDS_MAX_LAYER ; Layer ++ ) + { + for ( + ScanRec = Instance->LAYERTAB[Layer] ; + ScanRec != (rdsrec_list \(**) NULL ; + ScanRec = ScanRec->NEXT + ) + { + printf("Rectangle->LAYER = %s\\n", + RDS_LAYER_NAME[GetRdsLayer(ScanRec)]); + printf("Rectangle->NAME = %s\\n",ScanRec->NAME); + printf("Rectangle->X = %ld\\n",ScanRec->X); + printf("Rectangle->Y = %ld\\n",ScanRec->Y); + printf("Rectangle->DX = %ld\\n",ScanRec->DX); + printf("Rectangle->DY = %ld\\n",ScanRec->DY); + printf("Rectangle->STRING = %s\\n",POINTER_STRING(ScanRec)); + } + } + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR delrdsinsrec, +.BR viewrdsins + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/addrdsrecwindow.3 b/alliance/src/rds/man3/addrdsrecwindow.3 new file mode 100644 index 00000000..a88322b9 --- /dev/null +++ b/alliance/src/rds/man3/addrdsrecwindow.3 @@ -0,0 +1,129 @@ +.\" $Id: addrdsrecwindow.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)addrdsrecwindow.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +addrdsrecwindow +.XE +.XS0 \n% +.ti 0.2i +addrdsrecwindow +.XE0 \} +.TH ADDRDSRECWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +addrdsrecwindow \- adds a rectangle in the windowing of rds structure. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" + void addrdsrecwindow( Rectangle, RdsWindow ) + rdsrec_list \(**Rectangle; + rdswindow \(**RdsWindow; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIRectangle\fP +The rectangle to add to the windowing. +.TP +\fIRdsWindow\fP +The head of the windowing which has to contain the rectangle. +.SH DESCRIPTION +The \fIaddrdsrecwindow\fP function inserts a rdsrec_list rectangle structure in the windowing of the rds structure. The rectangle is added in one or many windows of the table (it depends on his dimensions). The field \'USER\' of the rectangle is used to point to the list of windows which contains the rectangle. So, the field \'USER\' has to be saved in an added structure to the rdsrec_list structure if librfm functions are used because somes use the field \'USER\' to link rectangles (see librds about field \'USER\'). +.TP +\fINote\fP +If the rectangle is contained in only one window, then the field \'USER\' points to a "rdswin_list" window structure. +.br +If the rectangle is contained in many windows, the field \'USER\' points to a "rdsrecwin_list" structure which is a list which contains windows. +.PP +To know if a rectangle belongs to one or many windows, use the macro \fIIsRdsOneWindow\fP defined in librwi. +.SH RETURN VALUE +none +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + # define POINTER_LINKREC(R) \\ + \\ + (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->LINKREC ) + typedef struct UserStruct + { + void \(**LINKREC; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdswindow \(**RdsWindow; + rdswin_list \(**ScanWin; + rdsrecwin_list \(**ScanRecWin; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig( "core",sizeof ( UserStruct ) ); + Rectangle = + addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,5,1); + /\(** Using the field \'USER\' \(**/ + Rectangle->USER = Rectangle; + . . . . + RdsWindow = allocrdswindow(); + RdsWindow->XMIN = -200; + RdsWindow->YMIN = -200; + RdsWindow->XMAX = 200; + RdsWindow->YMAX = 200; + RdsWindow->DX = 4; + RdsWindow->DY = 4; + RdsWindow->SIDE = 100; + RdsWindow->SIZE = RdsWindow->DX \(** RdsWindow->DY ; + RdsWindow->WINTAB = allocrdswin( RdsWindow->SIZE ); + /\(** Save the field \'USER\' of the rectangle \(**/ + POINTER_LINKREC(Rectangle) = Rectangle->USER; + /\(** \(**/ \fBaddrdsrecwindow\fP( Rectangle, RdsWindow ); + /\(** windows associated to a rectangle are pointed by the + field \'USER\' of the rectangle \(**/ + /\(** getting windows (pointer \(**ScanWin) of a rectangle \(**/ + if ( IsRdsOneWindow(Rectangle) ) + { + ScanWin = (rdswin_list \(**) Rectangle->USER; + } + else + { + ScanRecWin = Rectangle->USER; + while ( ScanRecWin != NULL ) + { + ScanWin = (rdswin_list \(**) (ScanRecWin)->WINDOW; + ScanRecWin = ScanRecWin->NEXT; + } + } + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi, +.BR delrdsrecwindow + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdsfig.3 b/alliance/src/rds/man3/allocrdsfig.3 new file mode 100644 index 00000000..afb5a7b2 --- /dev/null +++ b/alliance/src/rds/man3/allocrdsfig.3 @@ -0,0 +1,74 @@ +.\" $Id: allocrdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdsfig +.XE +.XS0 \n% +.ti 0.2i +allocrdsfig +.XE0 \} +.TH ALLOCRDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + allocrdsfig \- allocs memory for a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" +rdsfig_list \(**allocrdsfig() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIallocrdsfig\fP function allocates a memory block for rdsfig_list structure. Fields contained in the structure are set to NULL for pointers or 0L for numbers. +.TP +NOTE: Allocation by block ( see rdsalloc() function ). +.SH RETURN VALUE +\fBallocrdsfig\fP returns a pointer to the rdsfig_list structure allocated. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + main() + { + rdsfig_list \(**RdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = \fBallocrdsfig\fP (); + RdsFigure->NAME = namealloc ("core"); + ... + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR rdsalloc, +.BR rdsfree, +.BR freerdsfig + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdsins.3 b/alliance/src/rds/man3/allocrdsins.3 new file mode 100644 index 00000000..84fdffd5 --- /dev/null +++ b/alliance/src/rds/man3/allocrdsins.3 @@ -0,0 +1,75 @@ +.\" $Id: allocrdsins.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdsins.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdsins +.XE +.XS0 \n% +.ti 0.2i +allocrdsins +.XE0 \} +.TH ALLOCRDSINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + allocrdsins \- allocates memory for an instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include"rdsnnn.h" +rdsins_list \(**allocrdsins() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +Allocates a memory block for rdsins_list structure. Fields contained in the structure are set to NULL for the pointers and 0L for numbers. +.PP +NOTE: Allocation by block ( see rdsalloc() function ). +.SH RETURN VALUE +The pointer to the allocated instance. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + main() + { + rdsins_list \(**RdsInstance; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsInstance = \fBallocrdsins\fP (); + RdsInstance->FIGNAME = namealloc ("na2_y"); + RdsInstance->INSNAME = namealloc ("and2"); + ... + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR freerdsins, +.BR rdsalloc, +.BR rdsfree + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdsrec.3 b/alliance/src/rds/man3/allocrdsrec.3 new file mode 100644 index 00000000..8332ddb1 --- /dev/null +++ b/alliance/src/rds/man3/allocrdsrec.3 @@ -0,0 +1,96 @@ +.\" $Id: allocrdsrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdsrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdsrec +.XE +.XS0 \n% +.ti 0.2i +allocrdsrec +.XE0 \} +.TH ALLOCRDSREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + allocrdsrec \- allocates memory for a rectangle +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include"rdsnnn.h" +rdsrec_list \(**allocrdsrec( Size ) + unsigned int Size; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fISize\fP +Size of the added structure to the rdsrec_list structure. +.SH DESCRIPTION +Allocates a memory block for rdsrec_list structure and an added structure defined by the user. Fields contained in the two structures are set to NULL for pointers and 0L for numbers. +.PP +NOTE: Allocation by heap ( see rdsalloc function ). +.SH RETURN VALUE +The pointer to the rectangle structure allocated. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + # include "mutnnn.h" + # include "rdsnnn.h" + # include "rtlnnn.h" + /\(** Name and fields of UserStruct are defined by the user \(**/ + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + # define POINTER_STRING(R) \\ + \\ + (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->STRING ) + # define POINTER_USER1(R) \\ + \\ + (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->USER1 ) + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + mbkenv(); + rdsenv(); + loadrdsparam(); + Rectangle = \fBallocrdsrec\fP ( sizeof ( UserStruct ) ); + Rectangle->X = 20; + Rectangle->Y = 20; + Rectangle->DX = 48; + Rectangle->DY = 8; + POINTER_STRING (Rectangle) = (char \(**) malloc (strlen ("Alu1")+1); + strcpy(POINTER_STRING(Rectangle),"Alu1"); + POINTER_USER1 (Rectangle) = (void \(**) Figure; + ... + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR freerdsrec, +.BR rdsalloc, +.BR rdsfree + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdsrecwin.3 b/alliance/src/rds/man3/allocrdsrecwin.3 new file mode 100644 index 00000000..3f612fd6 --- /dev/null +++ b/alliance/src/rds/man3/allocrdsrecwin.3 @@ -0,0 +1,84 @@ +.\" $Id: allocrdsrecwin.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdsrecwin.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdsrecwin +.XE +.XS0 \n% +.ti 0.2i +allocrdsrecwin +.XE0 \} +.TH ALLOCRDSRECWIN 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +allocrdsrecwin \- allocates a structure used to know windows which contains a rectangle. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" + rdsrecwin_list \(**allocrdsrecwin() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIallocrdsrecwin\fP function allocates a rdsrecwin_list structure item. This structure contains a pointer to a window structure so it permits to chain all windows which contains a same rectangle (see librwi). +.SH RETURN VALUE +The pointer to the newly allocated structure is returned. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + # define POINTER_WINDOW(R) \\ + \\ + (((UserStruct \(**)((char \(**)(R)+sizeof(rdsrec_list)))->WINDOW ) + typedef struct UserStruct + { + rdsrecwin_list \(**WINDOW; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdswin_list \(**Window; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig( "core",sizeof ( UserStruct ) ); + Rectangle = + addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,5,1); + POINTER_WINDOW (Rectangle) = \fBallocrdsrecwin\fP(); + . . . . + Window = ... + (POINTER_WINDOW (Rectangle))->WINDOW = Window; + . . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdswin.3 b/alliance/src/rds/man3/allocrdswin.3 new file mode 100644 index 00000000..c0a2ded1 --- /dev/null +++ b/alliance/src/rds/man3/allocrdswin.3 @@ -0,0 +1,78 @@ +.\" $Id: allocrdswin.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdswin.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdswin +.XE +.XS0 \n% +.ti 0.2i +allocrdswin +.XE0 \} +.TH ALLOCRDSWIN 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +allocrdswin \- allocates window's table +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" + rdswin_list \(**allocrdswin( Number ) + unsigned int Number; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fINumber\fP +Number of windows contained in the window's table. +.SH DESCRIPTION +The \fIallocrdswin\fP allocates a window's table. The number of windows is specified by the parameter \'Number\' of the function. To determine the size of the parameter \'Number\', the user has to multiplicate width by height of his table in number of windows. Each item of the table is a pointer to a rdswin_list structure which contains rectangles sorted by layer (see librwi). +.SH RETURN VALUE +The pointer to the table is returned. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size for the table +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + main() + { + rdswindow \(**RdsWindow; + RdsWindow = allocrdswindow(); + RdsWindow->XMIN = -200; + RdsWindow->YMIN = -200; + RdsWindow->XMAX = 200; + RdsWindow->YMAX = 200; + RdsWindow->DX = 4; + RdsWindow->DY = 4; + RdsWindow->SIDE = 100; + RdsWindow->SIZE = RdsWindow->DX \(** RdsWindow->DY ; + RdsWindow->WINTAB = \fBallocrdswin\fP( RdsWindow->SIZE ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdswindow.3 b/alliance/src/rds/man3/allocrdswindow.3 new file mode 100644 index 00000000..1392d820 --- /dev/null +++ b/alliance/src/rds/man3/allocrdswindow.3 @@ -0,0 +1,78 @@ +.\" $Id: allocrdswindow.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdswindow.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdswindow +.XE +.XS0 \n% +.ti 0.2i +allocrdswindow +.XE0 \} +.TH ALLOCRDSWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +allocrdswindow \- allocates a window structure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" + rdswindow \(**allocrdswindow() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIallocrdswindow\fP allocates a window structure (rdswindow) which is used to create an \'object\' window (see librwi). It contains fields information about the window's table and the pointer to the window's table. It's the head of windowing. +.SH RETURN VALUE +The pointer to the rdswindow structure allocated is returned. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + main() + { + rdswindow \(**RdsWindow; + RdsWindow = \fBallocrdswindow\fP(); + RdsWindow->XMIN = -200; + RdsWindow->YMIN = -200; + RdsWindow->XMAX = 200; + RdsWindow->YMAX = 200; + RdsWindow->DX = 4; + RdsWindow->DY = 4; + RdsWindow->SIDE = 100; + RdsWindow->SIZE = RdsWindow->DX \(** RdsWindow->DY ; + RdsWindow->WINTAB = allocrdswin( RdsWindow->SIZE ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi, +.BR buildrdswindow, +.BR destroyrdswindow, +.BR viewrdswindow + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/allocrdswinrec.3 b/alliance/src/rds/man3/allocrdswinrec.3 new file mode 100644 index 00000000..52f1478b --- /dev/null +++ b/alliance/src/rds/man3/allocrdswinrec.3 @@ -0,0 +1,83 @@ +.\" $Id: allocrdswinrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)allocrdswinrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +allocrdswinrec +.XE +.XS0 \n% +.ti 0.2i +allocrdswinrec +.XE0 \} +.TH ALLOCRDSWINREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +allocrdswinrec \- allocates a structure used to create a list of tables of rectangles. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" + rdswinrec_list \(**allocrdswinrec() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIallocrdswinrec\fP function allocates a data structure named "rdswinrec_list" used to contain rectangles. This structure contains a list of tables of rdsrec_list structures (see librwi and librds). +.SH RETURN VALUE +The pointer to the newly allocated structure is returned. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + main() + { + rdsrec_list \(**Rectangle; + rdswinrec_list \(**WinRec, \(**HeadWinRec; + mbkenv(); + rdsenv(); + loadrdsparam(); + WinRec = HeadWinRec = \fBallocrdswinrec\fP(); + /\(** Fill the table with rectangles \(**/ + for ( Counter = 0 ; Counter < RWI_MAX_REC ; Counter ++ ) + { + if ( Rectangle == (rdsrec_list \(**) NULL ) break; + WinRec->RECTAB[Counter] = Rectangle; + Rectangle = Rectangle->NEXT; + } + if ( Counter == RWI_MAX_REC ) + { + /\(** the table is full : allocation of a new table \(**/ + WinRec->NEXT = allocrdswinrec(); + WinRec = WinRec->NEXT; + } + . . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/buildrdswindow.3 b/alliance/src/rds/man3/buildrdswindow.3 new file mode 100644 index 00000000..e4d88bd8 --- /dev/null +++ b/alliance/src/rds/man3/buildrdswindow.3 @@ -0,0 +1,119 @@ +.\" $Id: buildrdswindow.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)buildrdswindow.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +buildrdswindow +.XE +.XS0 \n% +.ti 0.2i +buildrdswindow +.XE0 \} +.TH BUILDRDSWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +buildrdswindow \- builds windowing of a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" + rdswindow \(**buildrdswindow( Figure ) + rdsfig_list \(**Figure; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +The figure where has to be built the windowing. +.SH DESCRIPTION +The \fIbuildrdswindow\fP function permits to build windowing on the figure named \'Figure\'. +.SH RETURN VALUE +The pointer to the windowing structure "rdswindow". +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdswindow \(**Window; + long X,Y,Offset; + rdswin_list \(**Win; + rdswinrec_list \(**WinRec; + rdsrec_list \(**ScanRec; + char Layer; + char Index; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("na2_y",'A'); + RdsFigure = figmbkrds(MbkFigure,0,0); + Window = \fBbuildrdswindow\fP ( RdsFigure ); + /\(** gets each window of the table \(**/ + for ( X = 0 ; X < Window->DX ; X ++ ) + for ( Y = 0 ; Y < Window->DY ; Y ++ ) + { + printf("WINDOW (%ld,%ld)\\n",X,Y); + Offset = Y \(** Window->DX + X; + Win = Window->WINTAB + Offset; + /\(** gets all rectangles of a window \(**/ + for ( Layer = 0 ; Layer < RWI_MAX_LAYER ; Layer ++ ) + { + printf("LAYER = %s\\n",RDS_LAYER_NAME[Layer]); + for ( WinRec = Win->LAYERTAB[ Layer ]; + WinRec != (rdswinrec_list \(**)NULL; + WinRec = WinRec->NEXT ) + { + for ( + Index = 0; + Index < RWI_MAX_REC; + Index++ + ) + { + ScanRec = WinRec->RECTAB[ Index ]; + /\(** prints dimensions of each rectangle \(**/ + if ( ScanRec != NULL ) + printf("X=%ld, Y=%ld, DX=%ld, DY=%ld\\n", + ScanRec->X,ScanRec->Y,ScanRec->DX, + ScanRec->DY); + else break; + } + } + } + } + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi, +.BR allocrdswindow, +.BR destroyrdswindow, +.BR viewrdswindow + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/conmbkrds.3 b/alliance/src/rds/man3/conmbkrds.3 new file mode 100644 index 00000000..f44e2728 --- /dev/null +++ b/alliance/src/rds/man3/conmbkrds.3 @@ -0,0 +1,89 @@ +.\" $Id: conmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)conmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +conmbkrds +.XE +.XS0 \n% +.ti 0.2i +conmbkrds +.XE0 \} +.TH CONMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + conmbkrds \- converts MBK connector to RDS rectangle +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rfmnnn.h" + rdsrec_list \(**conmbkrds( Figure, Connector ) + rdsfig_list \(**Figure; + phcon_list \(**Connector; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +Rds Figure which has to receive the connector. +.TP +\fIConnector\fP +MBK connector to convert to RDS format. +.SH DESCRIPTION +The \fIconmbkrds\fP function creates a RDS rectangle (connector) with a connector from MBK structure \fIphcon_list\fP. The RDS rectangle is added to the figure defined in parameter of the function. +.SH RETURN VALUE +The pointer to the RDS rectangle created. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Con; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHCON = + addphcon ( MbkFigure,NORTH, "in_1", 9, 15, ALU1, 2); + Con = \fBconmbkrds\fI (RdsFigure, MbkFigure->PHCON); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR viewrfmcon, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/delrdsfig.3 b/alliance/src/rds/man3/delrdsfig.3 new file mode 100644 index 00000000..4e347bfa --- /dev/null +++ b/alliance/src/rds/man3/delrdsfig.3 @@ -0,0 +1,84 @@ +.\" $Id: delrdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)delrdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +delrdsfig +.XE +.XS0 \n% +.ti 0.2i +delrdsfig +.XE0 \} +.TH DELRDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + delrdsfig \- deletes a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" +int delrdsfig( Name ) + char \(**Name; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIName\fP +Name of the figure to delete. +.SH DESCRIPTION +This function deletes the figure called \'\fIName\fP\' from the list of figures in memory. All objets (instances and rectangles) contained in this figure are deleted and freed. +.TP +\fINOTE\fP : The figure is identified by its name. +.SH RETURN VALUE +1 => The figure has been deleted. +.TP +0 => The figure doesn't exist. +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdsins_list \(**Instance; + int Result; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = delrdsfig (Figure,"na2_y","and2",RDS_NOSYM,8,6); + Rectangle = + addrdsfigrec(RdsFigure,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + destruction of the figure , its instance, its rectangle + \(**/ + Result = \fBdelrdsfig\fP ( "core" ); + if ( Result == 0 ) printf("Figure 'core' not found !\\n"); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR allocrdsfig + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/delrdsfigrec.3 b/alliance/src/rds/man3/delrdsfigrec.3 new file mode 100644 index 00000000..1a87e76a --- /dev/null +++ b/alliance/src/rds/man3/delrdsfigrec.3 @@ -0,0 +1,84 @@ +.\" $Id: delrdsfigrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)delrdsfigrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +delrdsfigrec +.XE +.XS0 \n% +.ti 0.2i +delrdsfigrec +.XE0 \} +.TH DELRDSFIGREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +delrdsfigrec \- deletes a rectangle of a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include"rdsnnn.h" + int delrdsfigrec( Figure, Rectangle ) + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +Figure which contains the rectangle to delete. +.TP +\fIRectangle\fP +The rectangle to delete +.SH DESCRIPTION +The \fIdelrdsfigrec\fP function deletes a rectangle object (which is composed of the rdsrec_list structure and an eventually added structure) from a figure. +.SH RETURN VALUE +1 => The rectangle has been deleted. +.br +0 => The rectangle doesn't exist. +.SH ERRORS +None +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + int Result; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Rectangle = + addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + deletes the rectangle of the figure + \(**/ + Result = \fBdelrdsfigrec\fP ( Figure,Rectangle ); + if ( Result == 0 ) printf("Rectangle not found !\\n"); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR allocrdsfigrec + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/delrdsins.3 b/alliance/src/rds/man3/delrdsins.3 new file mode 100644 index 00000000..d1cf75be --- /dev/null +++ b/alliance/src/rds/man3/delrdsins.3 @@ -0,0 +1,86 @@ +.\" $Id: delrdsins.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)delrdsins.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +delrdsins +.XE +.XS0 \n% +.ti 0.2i +delrdsins +.XE0 \} +.TH DELRDSINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + delrdsins \- deletes an instance of a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" +int delrdsins( Figure, Name ) + rdsfig_list \(**Figure; + char \(**Name; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +figure which contains the instance to delete. +.TP +\fIName\fP +Name of the instance to delete in the figure 'Figure'. +.SH DESCRIPTION +Deletes an instance and objects contained in it. The instance is identified by its name in the figure which contains it. This instance is warrantied to be unique, because its name is an identifier at the given hierarchical level. +.SH RETURN VALUE +1 => the instance has been deleted. +.TP +0 => the instance doesn't exist. +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdsins_list \(**Instance; + int Result; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = addrdsins (Figure,"na2_y","and2",RDS_NOSYM,8,6); + Rectangle = + addrdsinsrec(Instance,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + destruction of instance and its objects + \(**/ + Result = \fBdelrdsins\fP ( Figure,"and2" ); + if ( Result == 0 ) printf("Instance 'and2' not found !\\n"); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR allocrdsins + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/delrdsinsrec.3 b/alliance/src/rds/man3/delrdsinsrec.3 new file mode 100644 index 00000000..577b2554 --- /dev/null +++ b/alliance/src/rds/man3/delrdsinsrec.3 @@ -0,0 +1,86 @@ +.\" $Id: delrdsinsrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)delrdsinsrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +delrdsinsrec +.XE +.XS0 \n% +.ti 0.2i +delrdsinsrec +.XE0 \} +.TH DELRDSINSREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +delrdsinsrec \- deletes a rectangle of an instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include"rdsnnn.h" + int delrdsinsrec( Instance, Rectangle ) + rdsins_list \(**Instance; + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstance\fP +Instance which contains the rectangle to delete. +.TP +\fIRectangle\fP +The rectangle to delete. +.SH DESCRIPTION +The \fIdelrdsinsrec\fP function deletes a rectangle of an RDS instance. +.SH RETURN VALUE +1 => The rectangle has been deleted. +.br +0 => The rectangle doesn't exist. +.SH ERRORS +None +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdsins_list \(**Instance; + int Result; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = addrdsins (Figure,"na2_y","and2",RDS_NOSYM,8,6); + Rectangle = + addrdsinsrec(Instance,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + destruction of the rectangle of the instance + \(**/ + Result = \fBdelrdsinsrec\fP ( Instance,Rectangle ); + if ( Result == 0 ) printf("Rectangle not found !\\n"); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR allocrdsinsrec + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/delrdsrecwindow.3 b/alliance/src/rds/man3/delrdsrecwindow.3 new file mode 100644 index 00000000..b3cee3fc --- /dev/null +++ b/alliance/src/rds/man3/delrdsrecwindow.3 @@ -0,0 +1,95 @@ +.\" $Id: delrdsrecwindow.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)delrdsrecwindow.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +delrdsrecwindow +.XE +.XS0 \n% +.ti 0.2i +delrdsrecwindow +.XE0 \} +.TH DELRDSRECWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +delrdsrecwindow \- deletes a rectangle from the windowing of rds structure. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" +void delrdsrecwindow( Rectangle, RdsWindow ) + rdsrec_list \(**Rectangle; + rdswindow \(**RdsWindow; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIRectangle\fP +The rectangle to delete from the windowing. +.TP +\fIRdsWindow\fP +Pointer to the windowing of rds structure. +.SH DESCRIPTION +The \fIdelrdsrecwindow\fP function deletes a rectangle from the windowing of the rds structure. Some fields of the rectangle structure are modified : +.br +Field \'USER\' is set to NULL. +.br +Field \'FLAGS\' is modified (bits about the windowing - see librds : the field \'FLAGS\' of rdsrec_list structure). +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + void \(**POINTER; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdswindow \(**RdsWindow; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig( "core",sizeof ( UserStruct ) ); + Rectangle = + addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,5,1); + RdsWindow = allocrdswindow(); + RdsWindow->XMIN = -200; + RdsWindow->YMIN = -200; + RdsWindow->XMAX = 200; + RdsWindow->YMAX = 200; + RdsWindow->DX = 4; + RdsWindow->DY = 4; + RdsWindow->SIDE = 100; + RdsWindow->SIZE = RdsWindow->DX \(** RdsWindow->DY ; + RdsWindow->WINTAB = allocrdswin( RdsWindow->SIZE ); + addrdsrecwindow( Rectangle, RdsWindow ); + . . . + /\(** \(**/ \fBdelrdsrecwindow\fP( Rectangle, RdsWindow ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi, +.BR addrdsrecwindow + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/destroyrdswindow.3 b/alliance/src/rds/man3/destroyrdswindow.3 new file mode 100644 index 00000000..bf55ddc0 --- /dev/null +++ b/alliance/src/rds/man3/destroyrdswindow.3 @@ -0,0 +1,80 @@ +.\" $Id: destroyrdswindow.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)destroyrdswindow.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +destroyrdswindow +.XE +.XS0 \n% +.ti 0.2i +destroyrdswindow +.XE0 \} +.TH DESTROYRDSWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +destroyrdswindow \- destroys windowing of a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" +void destroyrdswindow( Figure, RdsWindow ) + rdsfig_list \(**Figure; + rdswindow \(**RdsWindow; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +The figure where has to be destroyed the windowing. +.TP +\fIRdsWindow\fP +Pointer to the head of windowing (rdswindow structure) to destroy. +.SH DESCRIPTION +The \fIdestroyrdswindow\fP function destroys the windowing applied to a figure and built with the \fIbuildrdswindow\fP function. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdswindow \(**Window; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("na2_y",'A'); + RdsFigure = figmbkrds(MbkFigure,0,0); + Window = buildrdswindow ( RdsFigure ); + . . . + /\(** \(**/ \fBdestroyrdswindow\fP ( RdsFigure, Window ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi, +.BR buildrdswindow, +.BR allocrdswindow, +.BR viewrdswindow + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/figmbkrds.3 b/alliance/src/rds/man3/figmbkrds.3 new file mode 100644 index 00000000..5e6816b6 --- /dev/null +++ b/alliance/src/rds/man3/figmbkrds.3 @@ -0,0 +1,92 @@ +.\" $Id: figmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)figmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +figmbkrds +.XE +.XS0 \n% +.ti 0.2i +figmbkrds +.XE0 \} +.TH FIGMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + figmbkrds \- converts MBK figure to RDS figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" +rdsfig_list \(**figmbkrds( FigureMbk, Size, Lynx ) + phfig_list \(**FigureMbk; + unsigned int Size; + char Lynx; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigureMbk\fP +Figure Mbk to convert to RDS figure. +.TP +\fISize\fP +Size of the user structure (if it exists) added to the rdsrec_list structure. If the user structure doesn't exist, the parameter 'Size' has to be set to 0L. +.TP +\fILynx\fP +Flag used for the segment conversion. If the parameter Lynx is set to 0 then this is the +normal conversion mode. If the parameter Lynx is set to 1 then the rds structure generated permits to extract equipotentials rectangles. +.SH DESCRIPTION +The \fIfigmbkrds\fP function creates a RDS figure with a figure from MBK structure \fIphfig_list\fP which is converted to RDS format. +.SH RETURN VALUE +The pointer to the newly created RDS figure. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("na2_y",'A'); + RdsFigure = \fBfigmbkrds\fP (MbkFigure,sizeof(UserStruct),0); + viewrdsfig ( RdsFigure ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR viewrfmfig, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/freerdsfig.3 b/alliance/src/rds/man3/freerdsfig.3 new file mode 100644 index 00000000..95a9cb3b --- /dev/null +++ b/alliance/src/rds/man3/freerdsfig.3 @@ -0,0 +1,69 @@ +.\" $Id: freerdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)freerdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +freerdsfig +.XE +.XS0 \n% +.ti 0.2i +freerdsfig +.XE0 \} +.TH FREERDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + freerdsfig \- frees memory associated to a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" +void freerdsfig( Figure ) + rdsfig_list \(**Figure; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +it's the pointer of the figure to be deleted. +.SH DESCRIPTION +This function free the memory associated to the figure. Memory place used by the Pointers of the rdsfig_list structure is not free so the user has to free these pointers before calling the freerdsfig function. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "mutnnn.h" +#include "rdsnnn.h" +#include "rtlnnn.h" + main() + { + rdsfig_list \(**Figure; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = allocrdsfig (); + Figure->NAME = rdsalloc(strlen("core")+1,RDS_ALLOC_BLOCK); + strcpy(Figure->NAME,"core"); + ... + rdsfree (Figure->NAME,RDS_ALLOC_BLOCK); + /\(** \(**/ \fBfreerdsfig\fP ( Figure,RDS_ALLOC_BLOCK); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR allocrdsfig + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/freerdsins.3 b/alliance/src/rds/man3/freerdsins.3 new file mode 100644 index 00000000..fe76b17d --- /dev/null +++ b/alliance/src/rds/man3/freerdsins.3 @@ -0,0 +1,69 @@ +.\" $Id: freerdsins.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)freerdsins.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +freerdsins +.XE +.XS0 \n% +.ti 0.2i +freerdsins +.XE0 \} +.TH FREERDSINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + freerdsins \- frees memory associated to an instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + void freerdsins ( Instance ) + rdsins_list \(**Instance; +.ft R +.fi +.SH PARAMETER +.TP 20 + \fIInstance\fP +Pointer of the instance to free +.SH DESCRIPTION +This function frees the memory associated to the instance. Memory place used by the Pointers of the rdsins_list structure is not free so the user has to free these pointers before calling the freerdsins() function. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + main() + { + rdsins_list \(**Instance; + mbkenv(); + rdsenv(); + loadrdsparam(); + Instance = allocrdsins (); + Instance->NAME = rdsalloc(strlen("and1")+1,RDS_ALLOC_BLOCK); + strcpy(Instance->NAME,"and1"); + ... + rdsfree (Instance->NAME,RDS_ALLOC_BLOCK); + /\(** \(**/ \fBfreerdsins\fP ( Instance,RDS_ALLOC_BLOCK); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR allocrdsins + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/freerdsrec.3 b/alliance/src/rds/man3/freerdsrec.3 new file mode 100644 index 00000000..149a0131 --- /dev/null +++ b/alliance/src/rds/man3/freerdsrec.3 @@ -0,0 +1,76 @@ +.\" $Id: freerdsrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)freerdsrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +freerdsrec +.XE +.XS0 \n% +.ti 0.2i +freerdsrec +.XE0 \} +.TH FREERDSREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + freerdsrec \- free memory associated to a rectangle +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + void freerdsrec( Rectangle, Size ) + rdsrec_list \(**Rectangle; + unsigned int Size; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIRectangle\fP +Pointer of the rectangle structure to free. +.TP +\fISize\fP +Size of the structure added (if it exists) to rdsrec_list structure. +.SH DESCRIPTION +This function deletes the memory associated to the rectangle. Memory used is both memory of rdsrec_list structure and memory of the structure added by the user. If the user structure doesn't exist, the parameter \'Size\' must be to 0L. Memory place used by the Pointers of the rdsrec_list structure (and the added structure) is not deleted so the user has to free these pointers before calling the freerdsrec() function. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsrec_list \(**Rectangle; + mbkenv(); + rdsenv(); + loadrdsparam(); + Rectangle = allocrdsrec ( sizeof ( UserStruct ) ); + ... + /\(** \(**/ \fBfreerdsrec\fP ( Rectangle, sizeof ( UserStruct ) ); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR freerdsrec, +.BR rdsfree + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/getrdsmodellist.3 b/alliance/src/rds/man3/getrdsmodellist.3 new file mode 100644 index 00000000..5df38e3d --- /dev/null +++ b/alliance/src/rds/man3/getrdsmodellist.3 @@ -0,0 +1,95 @@ +.\" $Id: getrdsmodellist.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)getrdsmodellist.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +getrdsmodellist +.XE +.XS0 \n% +.ti 0.2i +getrdsmodellist +.XE0 \} +.TH GETRDSMODELLIST 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +getrdsmodellist \- gets model list of the instances of a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rutnnn.h" + ptype_list \(**getrdsmodellist( Figure ) + rdsfig_list \(**Figure; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +The figure which contains the models to extract. +.SH DESCRIPTION +The \fIgetrdsmodellist\fP function gets list of instance's models of the figure \'Figure\'. The data structure returned "ptype_list" is defined ( in MBK library mutnnn.h ) as follows : +.RS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +typedef struct ptype + { + struct ptype \(**NEXT; /\(** next pointer \(**/ + void \(**DATA; /\(** generic pointer \(**/ + long TYPE; /\(** type \(**/ + } ptype_list; +.ft R +.fi +.RE +.PP +The field \'DATA\' of ptype_list structure contains the pointer to the rdsfig_list structure. +.SH RETURN VALUE +The getrdsmodellist function returns a pointer which is head of pointer's list of the instances's models of the figure. If the list is empty, NULL pointer is returned. +.SH ERRORS +none +.SH EXAMPLE : +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rutnnn.h" + #include "rtlnnn.h" + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + ptype_list \(**FigureList; + ptype_list \(**ScanFigureList; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("core",'A'); + RdsFigure = figmbkrds(MbkFigure,0,0); + FigureList = \fBgetrdsmodellist\fP( RdsFigure ); + for ( + ScanFigureList = FigureList ; + ScanFigureList != (ptype_list \(**) NULL ; + ScanFigureList = ScanFigureList->NEXT + ) + viewrdsfig ( (rdsfig_list \(**) ScanFigureList->DATA ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librut, +.BR Mut library + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/insconmbkrds.3 b/alliance/src/rds/man3/insconmbkrds.3 new file mode 100644 index 00000000..3fa648a8 --- /dev/null +++ b/alliance/src/rds/man3/insconmbkrds.3 @@ -0,0 +1,111 @@ +.\" $Id: insconmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)insconmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +insconmbkrds +.XE +.XS0 \n% +.ti 0.2i +insconmbkrds +.XE0 \} +.TH INSCONMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + insconmbkrds \- adds in RDS instance all the connectors of MBK instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" +rdsrec_list \(**insconmbkrds( InstanceMbk, ModelMbk, InstanceRds ) + phins_list \(**InstanceMbk; + phfig_list \(**ModelMbk; + rdsins_list \(**InstanceRds; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstanceMbk\fP +The MBK instance which contains the connectors to convert. +.TP +\fIModelMbk\fP +Pointer to the model of the MBK instance. +.TP +\fIInstanceRds\fP +The instance which has to receive converted connectors from MBK to RDS format. +.SH DESCRIPTION +This function adds in the RDS instance all connectors from the MBK instance converted to RDS format. All newly created connectors are chained each other (circulary list) using the USER field of the rdsrec_list structure (see librds). +.SH RETURN VALUE +Pointer to the head of list of the added rectangles to the RDS instance. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + phins_list \(**MbkInstance; + phfig_list \(**MbkModelInstance; + rdsfig_list \(**RdsFigure; + rdsins_list \(**RdsInstance; + rdsrec_list \(**RdsConnectorList; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** creates MbkFigure Named "core" \(**/ + MbkFigure = addphfig("core"); + /\(** creates RdsFigure named "core_2" \(**/ + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + /\(** adds Mbk instance "n1_y" to MbkFigure named "core" \(**/ + MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9); + /\(** gets Model of instance n1_y \(**/ + MbkModelInstance = getphfig("n1_y",'A'); + /\(** creates Rds instance named "block_1" added to RdsFigure \(**/ + RdsInstance = + addrdsins(RdsFigure,"block","block_1",RDS_NOSYM,8,6); + /\(** + adds connectors of "inv_1" instance Mbk in Rds instance named + "block_1" + \(**/ + RdsConnectorList = \fBinsconmbkrds\fP ( MbkInstance, + MbkModelInstance, + RdsInstance ); + viewrfmrec ( RdsConnectorList ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm +.BR librds, +.BR viewrfmrec, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/insmbkrds.3 b/alliance/src/rds/man3/insmbkrds.3 new file mode 100644 index 00000000..d86de5c2 --- /dev/null +++ b/alliance/src/rds/man3/insmbkrds.3 @@ -0,0 +1,117 @@ +.\" $Id: insmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)insmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +insmbkrds +.XE +.XS0 \n% +.ti 0.2i +insmbkrds +.XE0 \} +.TH INSMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +insmbkrds \- converts MBK figure to RDS figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" +rdsins_list \(**insmbkrds( FigureRds, InstanceMbk, Mode, Lynx ) + rdsfig_list \(**FigureRds; + phins_list \(**InstanceMbk; + char Mode; + char Lynx; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigureRds\fP +The Rds figure which has to receive the RDS instance issue to the MBK instance conversion. +.TP +\fIInstanceMbk\fP +MBK instance which has to be converted and added to the RDS figure. +.TP +\fIMode\fP +This field can take three values : +.RS +.PP +\'A\' : All the cell is loaded in ram. +.PP +\'P\' : Only information concerning the model interface is present, that means connector +s and the abutment box. +.PP +\'C\' : Finishes to fill an already loaded figure in \'P\' mode, in order to have it all in memory. After this, the conversion is applied. +.PP +\fINote\fP : The loading mode here is the \fBMBK\fP mode. +.RE +.TP +\fILynx\fP +Flag used for the segment conversion. If the parameter Lynx is set to 0 then thi +s is the normal conversion mode. If the parameter Lynx is set to 1 then the rds +structure generated permits to extract equipotentials rectangles. +.SH DESCRIPTION +The \fIinsmbkrds\fP function creates in the RDS figure the RDS instance issue to the convertion of the MBK instance to RDS format. If the parameter \'Mode\' is set to \'A\' then all the instance is loaded, else if parameter \'Mode\' is set to \'P\' then connectors and abutment box and through routes are loaded (for more information, see getphfig and loadphfig MBK functions). +.SH RETURN VALUE +A pointer to the newly created instance is returned. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + phins_list \(**MbkInstance; + rdsfig_list \(**RdsFigure; + rdsins_list \(**RdsInstance; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** create MbkFigure Named "core" \(**/ + MbkFigure = addphfig("core"); + /\(** add Mbk instance "n1_y" to MbkFigure named "core" \(**/ + MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9); + /\(** create RdsFigure named "core_2" \(**/ + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + /\(** create RdsInstance with MbkInstance \(**/ + RdsInstance = \fBinsmbkrds\fP ( RdsFigure, MbkInstance, 'A', 0 ); + viewrdsins ( RdsInstance ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR librds, +.BR viewrfmins, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/insrefmbkrds.3 b/alliance/src/rds/man3/insrefmbkrds.3 new file mode 100644 index 00000000..90f28cb4 --- /dev/null +++ b/alliance/src/rds/man3/insrefmbkrds.3 @@ -0,0 +1,111 @@ +.\" $Id: insrefmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)insrefmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +insrefmbkrds +.XE +.XS0 \n% +.ti 0.2i +insrefmbkrds +.XE0 \} +.TH INSREFMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +insrefmbkrds \- adds in RDS instance all the references of MBK instance. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" +rdsrec_list \(**insrefmbkrds( InstanceMbk, ModelMbk, InstanceRds ) + phins_list \(**InstanceMbk; + phfig_list \(**ModelMbk; + rdsins_list \(**InstanceRds; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstanceMbk\fP +MBK instance which contains references to treat. +.TP +\fIModelMbk\fP +Pointer to the model of the MBK instance. +.TP +\fIInstanceRds\fP +RDS Instance which has to receive converted references from MBK to RDS format. +.SH DESCRIPTION +The \fIinsrefmbkrds\fP function adds in the RDS instance all references of the MBK instance converted to RDS format. All newly created references are chained each other (circulary list) using the USER field of the rdsrec_list structure. +.SH RETURN VALUE +Pointer to the head of list of the added rectangles to the RDS instance. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + phins_list \(**MbkInstance; + phfig_list \(**MbkModelInstance; + rdsfig_list \(**RdsFigure; + rdsins_list \(**RdsInstance; + rdsrec_list \(**RdsReferenceList; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** creates MbkFigure Named "core" \(**/ + MbkFigure = addphfig("core"); + /\(** creates RdsFigure named "core_2" \(**/ + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + /\(** adds Mbk instance "n1_y" to MbkFigure named "core" \(**/ + MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9); + /\(** Gets Model of instance n1_y \(**/ + MbkModelInstance = getphfig("n1_y",'A'); + /\(** creates Rds instance named "block_1" added to RdsFigure \(**/ + RdsInstance = + addrdsins(RdsFigure,"block","block_1",RDS_NOSYM,8,6); + /\(** + adds reference of "inv_1" instance Mbk in Rds instance + named "block_1" + \(**/ + RdsReferenceList = \fBinsrefmbkrds\fP ( MbkInstance, + MbkModelInstance, + RdsInstance ); + viewrfmrec ( RdsReferenceList ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR librds, +.BR viewrfmrec, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/inssegmbkrds.3 b/alliance/src/rds/man3/inssegmbkrds.3 new file mode 100644 index 00000000..4a03c96e --- /dev/null +++ b/alliance/src/rds/man3/inssegmbkrds.3 @@ -0,0 +1,122 @@ +.\" $Id: inssegmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)inssegmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +inssegmbkrds +.XE +.XS0 \n% +.ti 0.2i +inssegmbkrds +.XE0 \} +.TH INSSEGMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +inssegmbkrds \- adds in RDS instance all the segments of MBK instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rdsnnn.h" + rdsrec_list \(**inssegmbkrds( InstanceMbk, ModelMbk, InstanceRds, Lynx ) + phins_list \(**InstanceMbk; + phfig_list \(**ModelMbk; + rdsins_list \(**InstanceRds; + char Lynx; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstanceMbk\fP +The MBK instance which contains the segments to convert. +.TP +\fIModelMbk\fP +Pointer to the model of the MBK instance. +.TP +\fIInstanceRds\fP +The instance which has to receive converted segments from MBK to RDS format. +.TP +\fILynx\fP +Flag used for the segment conversion. If the parameter Lynx is set to 0 then thi +s is the normal conversion mode. If the parameter Lynx is set to 1 then the rds structure generated permits to extract equipotentials rectangles. +.SH DESCRIPTION +The \fIinssegmbkrds\fP function adds in the RDS instance all segments of the MBK instance converted to RDS format. All newly created segments are chained each other (circulary list) using the USER field of the rdsrec_list structure. +.SH RETURN VALUE +Pointer to the head of list of the added rectangles to the RDS instance. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + phins_list \(**MbkInstance; + phfig_list \(**MbkModelInstance; + rdsfig_list \(**RdsFigure; + rdsins_list \(**RdsInstance; + rdsrec_list \(**RdsSegmentList; + rdsrec_list \(**ScanSegment; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** creates MbkFigure Named "core" \(**/ + MbkFigure = addphfig("core"); + /\(** creates RdsFigure named "core_2" \(**/ + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + /\(** adds Mbk instance "n1_y" to MbkFigure named "core" \(**/ + MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9); + /\(** Gets Model of instance n1_y \(**/ + MbkModelInstance = getphfig("n1_y",'A'); + /\(** creates Rds instance named "block_1" added to RdsFigure \(**/ + RdsInstance = + addrdsins(RdsFigure,"block","block_1",RDS_NOSYM,8,6); + /\(** + adds segments of "inv_1" instance Mbk in Rds instance + named "block_1" + \(**/ + RdsSegmentList = \fBinssegmbkrds\fP ( MbkInstance, + MbkModelInstance, + RdsInstance,0 ); + viewrdsrec ( RdsSegmentList ); + for ( ScanSegment = RdsSegmentList->USER ; + ScanSegment != RdsSegmentList ; + ScanSegment = ScanSegment->USER ) + { + viewrdsrec ( (rdsrec_list \(**) ScanSegment ); + } + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR librds, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/instanceface.3 b/alliance/src/rds/man3/instanceface.3 new file mode 100644 index 00000000..8416f56f --- /dev/null +++ b/alliance/src/rds/man3/instanceface.3 @@ -0,0 +1,80 @@ +.\" $Id: instanceface.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)instanceface.2 2.11 91/08/22 ; Labo masi cao-vlsi; Author : Frederic Petrot +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +instanceface +.XE +.XS1 \n% +.ti 0.2i +instanceface +.XE1 \} +.TH INSTANCEFACE 3 "October 1, 1997" "ASIM/LIP6" "MBK PHYSICAL UTILITY FUNCTIONS" +.SH NAME +instanceface \- returns the face of a connector in a placed instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "mph403.h" +void \(**instanceface(modelface, symmetry) +char modelface, symmetry; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fImodelface\fP +Face of a connector in its figure. +.TP 20 +\fIsymmetry\fP +Geometrical operation applied to the instanciation of the figure. +.SH DESCRIPTION +\fBinstanceface\fP determines the orientation of a connector in an instance of +its model. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "mph403.h" +char channelFace(channelDir, i, c) +char channelDir; +phins_list *i; +phcon_list *c; +{ + if (channelDir == VER) + switch (instanceface(c->ORIENT, i->TRANSF)) { + case EAST : + return WEST; + case WEST : + return EAST; + default : + return instanceface(c->ORIENT, i->TRANSF); + } + else + switch (instanceface(c->ORIENT, i->TRANSF)) { + case NORTH : + return SOUTH; + case SOUTH : + return NORTH; + default : + return instanceface(c->ORIENT, i->TRANSF); + } +} +.ft R +.fi +.SH SEE ALSO +.BR mbk (1), +.BR phcon (3), +.BR phfig (3), +.BR phins (3). + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/insviambkrds.3 b/alliance/src/rds/man3/insviambkrds.3 new file mode 100644 index 00000000..e368f7ac --- /dev/null +++ b/alliance/src/rds/man3/insviambkrds.3 @@ -0,0 +1,117 @@ +.\" $Id: insviambkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)insviambkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +insviambkrds +.XE +.XS0 \n% +.ti 0.2i +insviambkrds +.XE0 \} +.TH INSVIAMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +insviambkrds \- adds to RDS instance all the contacts from MBK instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + rdsrec_list \(**insviambkrds( InstanceMbk, ModelMbk, InstanceRds ) + phins_list \(**InstanceMbk; + phfig_list \(**ModelMbk; + rdsins_list \(**InstanceRds; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstanceMbk\fP +The MBK instance which contains the contacts to convert. +.TP +\fIModelMbk\fP +Pointer to the model of the MBK instance. +.TP +\fIInstanceRds\fP +The instance which has to receive converted segments from MBK to RDS format. +.SH DESCRIPTION +This function adds in the RDS instance all the contacts of the MBK instance converted to RDS format. All newly created segments are chained each other (circulary list) using the USER field of the rdsrec_list structure. +.SH RETURN VALUE +Pointer to the head of list of the added rectangles to the RDS instance. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + phins_list \(**MbkInstance; + phfig_list \(**MbkModelInstance; + rdsfig_list \(**RdsFigure; + rdsins_list \(**RdsInstance; + rdsrec_list \(**RdsViaList; + rdsrec_list \(**ScanVia; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** creates MbkFigure Named "core" \(**/ + MbkFigure = addphfig("core"); + /\(** creates RdsFigure named "core_2" \(**/ + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + /\(** adds Mbk instance "n1_y" to MbkFigure named "core" \(**/ + MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9); + /\(** Gets Model of instance n1_y \(**/ + MbkModelInstance = getphfig("n1_y",'A'); + /\(** creates Rds instance named "block_1" added to RdsFigure \(**/ + RdsInstance = + addrdsins(RdsFigure,"block","block_1",RDS_NOSYM,8,6); + /\(** + adds contacts of "inv_1" instance Mbk in Rds instance + named "block_1" + \(**/ + RdsViaList = \fBinsviambkrds\fP ( MbkInstance, + MbkModelInstance, + RdsInstance); + viewrdsrec ( RdsViaList ); + for ( ScanVia = RdsViaList->USER ; + ScanVia != RdsViaList ; + ScanVia = ScanVia->USER ) + { + viewrdsrec ( (rdsrec_list \(**) ScanVia ); + } + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR librds, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/loadrdsfig.3 b/alliance/src/rds/man3/loadrdsfig.3 new file mode 100644 index 00000000..a5c5c96e --- /dev/null +++ b/alliance/src/rds/man3/loadrdsfig.3 @@ -0,0 +1,90 @@ +.\" $Id: loadrdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)loadrdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +loadrdsfig +.XE +.XS0 \n% +.ti 0.2i +loadrdsfig +.XE0 \} +.TH LOADRDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +loadrdsfig \- give back a pointer to a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rtlnnn.h" + void loadrdsfig( Figure, Name, Mode ) + rdsfig_list \(**Figure; + char \(**Name; + char Mode; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +Pointer to the RDS Figure created. +.TP +\fIName\fP +Name of the model of the figure. +.TP +\fIMODE\fP : +Caracter indicating the status of the figure in memory. +.PP +This field can take three values : +.RS +.TP +\fI\'A\'\fP +All the cell is loaded in ram (The figure, its rectangles and its instances empty). +.TP +\fI\'P\'\fP +Only information concerning the model interface is present, that means : connectors, the abutment box and through routes of the figure. +.TP +\fI\'V\'\fP +Visualization mode : all is loaded in RAM : The figure, its rectangles, its instances and the rectangles of its instances. +.SH DESCRIPTION +The \fIloadrdsfig\fP function loads in memory a cell model from disk. The loadrdsfig function in fact performs a call to a parser ,chosen by the RDS_IN environment variable. +.SH RETURN VALUE +The pointer to the created figure. (it's the parameter \'Figure\' of the loadrdsfig function). +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rtl103.h: Unknown rds input format" +.ft R +.RS +The input format defined by the unix environment variable RDS_IN is not supported by the driver (supported formats are "cif" and "gds"). +.PP +Other errors can appear because the loadrdsfig function calls cif and gds parsers. +.SH EXAMPLE + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + main() + { + rdsfig_list \(**RdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** \(**/ \fBloadrdsfig\fP (RdsFigure, "core", 'A'); + viewrdsfig( Figure ); + } +.ft R +.fi +.SH SEE ALSO +.BR librtl, +.BR getrdsfig, +.BR rdsenv, +.BR RDS_IN + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/loadrdsparam.3 b/alliance/src/rds/man3/loadrdsparam.3 new file mode 100644 index 00000000..06c52a9b --- /dev/null +++ b/alliance/src/rds/man3/loadrdsparam.3 @@ -0,0 +1,78 @@ +.\" $Id: loadrdsparam.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)loadrdsparam.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +loadrdsparam +.XE +.XS0 \n% +.ti 0.2i +loadrdsparam +.XE0 \} +.TH LOADRDSPARAM 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +loadrdsparam \- load parameters from symbolic to real conversion. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +void loadrdsparam() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIloadrdsparam\fP function loads parameters contained in a file with extention ".rds" which is the translation file from symbolic to real. Some of these files are contained in the path "/labo/etc".See them for more information. +.br +When programming, this function must be called before using the functions of the RFM library ( MBK to RDS convertion functions). +.br +The name of the file "nnn.rds" is set with the environment variable of unix system "RDS_TECHNO_NAME". For more information about it, see the RTL library. +Before calling the loadrdsparam function, environment variables must be set by using the function \fIrdsenv\fP. +.SH RETURN VALUE +none +.SH ERRORS +Errors can appear during loading of the "file.rds". All error messages have the header "Rpr203:" and an explanation of the error. +.br +example : +.br +"Rpr203: Some tables missing" +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + #include "rprnnn.h" + #include "rfmnnn.h" + main() + { + rdsfig_list *RdsFigure; + phfig_list *MbkFigure; + mbkenv(); + rdsenv(); + /* */ \fBloadrdsparam\fP (); + MbkFigure = getphfig ( "na2_y", 'A' ); + RdsFigure = figmbkrds ( MbkFigure, 0, 1); + viewrfmfig ( MbkFigure, RdsFigure ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librpr, +.BR librtl, +.BR rdsenv, +.BR mbkenv + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/modelmbkrds.3 b/alliance/src/rds/man3/modelmbkrds.3 new file mode 100644 index 00000000..c11752a0 --- /dev/null +++ b/alliance/src/rds/man3/modelmbkrds.3 @@ -0,0 +1,93 @@ +.\" $Id: modelmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)modelmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +modelmbkrds +.XE +.XS0 \n% +.ti 0.2i +modelmbkrds +.XE0 \} +.TH MODELMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + modelmbkrds \- gets all models of instances contained in a figure. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rfmnnn.h" +rdsfig_list \(**modelmbkrds( Figure, Lynx ) + rdsfig_list \(**Figure; + char Lynx; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP : +The figure which has to be treated. +.TP +\fILynx\fP : +Flag used for the segment conversion. If the parameter Lynx is set to 0 then this is the normal conversion mode. If the parameter Lynx is set to 1 then the rds structure generated permits to extract equipotentials rectangles. +.SH DESCRIPTION +The \fImodelmbkrds\fP function gets all models of instances of the RDS figure and chains them to the head of figures's list. For each newly created figure, the function is applied recursively. So the function flats all models contained in the figure named \'Figure\'. +.SH RETURN VALUE +Pointer to the head of the list of figures. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.RE +.PP +Other errors can be generated by the getphfig function called in the modelmbkrds function (see getphfig). +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsfig_list \(**RdsModelList; + rdsfig_list \(**ScanRdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("core",'A'); + RdsFigure = figmbkrds(MbkFigure,0,1); + RdsModelList = \fBmodelmbkrds\fP (RdsFigure,1); + for ( ScanRdsFigure = RdsModelList ; + ScanRdsFigure != NULL ; + ScanRdsFigure = ScanRdsFigure->NEXT ) + { + viewrfmfig ( ScanRdsFigure ); + } + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR viewrfmfig, +.BR getphfig, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/rdsalloc.3 b/alliance/src/rds/man3/rdsalloc.3 new file mode 100644 index 00000000..a95faba5 --- /dev/null +++ b/alliance/src/rds/man3/rdsalloc.3 @@ -0,0 +1,79 @@ +.\" $Id: rdsalloc.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)rdsalloc.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +rdsalloc +.XE +.XS0 \n% +.ti 0.2i +rdsalloc +.XE0 \} +.TH RDSALLOC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + rdsalloc \- memory allocation function +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + char \(**rdsalloc( Size, Heap ) + unsigned int Size; + char Heap; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fISize\fP +memory size to allocate +.TP +\fIHeap\fP +takes the values RDS_ALLOC_BLOCK or RDS_ALLOC_HEAP (two defined constants). +.SH DESCRIPTION +The \fIrdsalloc\fP function can do memory allocation by block or by heap. If the user wants to allocate by block, he sets the parameter Heap to the constant RDS_ALLOC_BLOCK else, he wants to allocate by heap so the parameter Heap is set to RDS_ALLOC_HEAP. +If rdsalloc is used with the constant RDS_ALLOC_BLOCK then rdsalloc is used as standard language C function malloc(). +If the user allocates by heap then : +At the first allocation of the block of \fIsize\fP the parameter \'Size\', a heap of size multiple of the block Size is allocated. When another allocation of the same size is done then if the the heap isn't full then a pointer (of \fIsize\fP=\'Size\') is returned else a new heap is allocated and a pointer returned. Like this, the user does really one allocation (he has many pointers) to minimize fragmentation. Heap allocation is usefull if the user has to allocate many pointers of the same size (ex: rdsrec_list structure). +.TP +Note: Memory place allocated is set to NULL. +.SH RETURN VALUE +pointer to the allocated memory is returned. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired. +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + main() + { + rdsrec_list \(**Rectangle; + rdsfig_list \(**Figure; + Rectangle = + (rdsrec_list \(**) \fBrdsalloc\fP (sizeof(rdsrec_list \(**),RDS_ALLOC_HEAP); + Figure = + (rdsfig_list \(**) \fBrdsalloc\fP (sizeof(rdsfig_list \(**),RDS_ALLOC_BLOCK); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR rdsfree + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/rdsenv.3 b/alliance/src/rds/man3/rdsenv.3 new file mode 100644 index 00000000..031d0033 --- /dev/null +++ b/alliance/src/rds/man3/rdsenv.3 @@ -0,0 +1,73 @@ +.\" $Id: rdsenv.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)rdsenv.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +rdsenv +.XE +.XS0 \n% +.ti 0.2i +rdsenv +.XE0 \} +.TH RDSENV 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +rdsenv \- set user preference +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rtlnnn.h" +void rdsenv() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIrdsenv\fP function sets the user preferences through unix environment variables. if all the variables are not defined, default values are used. +.TP +\fIRDS_TECHNO_NAME\fP +Path to the RDS technology file. The default value is "/labo/etc/cmos.rds". +.TP +\fIRDS_IN\fP +Defines the physical input file format demanded by the user. The two possible formats are "cif" and "gds". By default, its value is set to "gds". +.TP +\fIRDS_OUT\fP +Defines the physical output file format demanded by the user. The two possible formats are "cif" and "gds". By default, its value is set to "gds". +.SH RETURN VALUE +none +.SH ERRORS +nothing +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rtlnnn.h" + main() + { + rdsfig_list \(**RdsFigure; + mbkenv(); + /\(** \(**/ \fBrdsenv\fP (); + loadrdsparam(); + loadrdsfig(RdsFigure, "core", 'A'); + } +.ft R +.fi +.SH SEE ALSO +.BR librtl, +.BR loadrdsfig, +.BR saverdsfig, +.BR RDS_IN, +.BR RDS_OUT, +.BR RDS_TECHNO_NAME + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/rdsfree.3 b/alliance/src/rds/man3/rdsfree.3 new file mode 100644 index 00000000..60bb9006 --- /dev/null +++ b/alliance/src/rds/man3/rdsfree.3 @@ -0,0 +1,75 @@ +.\" $Id: rdsfree.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)rdsfree.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +rdsfree +.XE +.XS0 \n% +.ti 0.2i +rdsfree +.XE0 \} +.TH RDSFREE 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + rdsfree \- free memory place +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + void rdsfree( Pointer, Size ) + char \(**Pointer; + unsigned int Size; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIPointer\fP +pointer to the memory to free. +.TP +\fISize\fP +Size of the memory to free. +.SH DESCRIPTION +The \fIrdsfree\fP function deletes memory of \fIsize\fP=\'Size\' allocated with rdsalloc function. If the parameter Size is set to ZERO (or RDS_ALLOC_BLOCK) then the memory is deleted by BLOCK else the memory is deleted by HEAP. +.PP +\fINote\fP : A memory allocated by BLOCK (resp. by HEAP) must be deleted by BLOCK (resp. by HEAP). +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + main() + { + rdsrec_list \(**Rectangle; + rdsfig_list \(**Figure; + Figure = allocrdsfig (); + Rectangle = allocrdsrec (); + Rectangle->X = 20; + Rectangle->Y = 20; + Rectangle->DX = 48; + Rectangle->DY = 8; + ... + /\(** \(**/ \fBrdsfree\fP ( Rectangle, sizeof (rdsrec_list)); + /\(** deletes a figure allocated by block \(**/ + /\(** \(**/ \fBrdsfree\fP ( Figure , RDS_ALLOC_BLOCK); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR rdsalloc + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/refmbkrds.3 b/alliance/src/rds/man3/refmbkrds.3 new file mode 100644 index 00000000..5f1e71e2 --- /dev/null +++ b/alliance/src/rds/man3/refmbkrds.3 @@ -0,0 +1,88 @@ +.\" $Id: refmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)refmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +refmbkrds +.XE +.XS0 \n% +.ti 0.2i +refmbkrds +.XE0 \} +.TH REFMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +refmbkrds \- adds to RDS figure a references from a MBK figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + rdsrec_list \(**refmbkrds( Figure, Reference ) + rdsfig_list \(**Figure; + phref_list \(**Reference; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +The RDS figure which has to receive the reference to convert. +.TP +\fIReference\fP +MBK reference to convert to RDS rectangle. +.SH DESCRIPTION +The \fIrefmbkrds\fP function creates a RDS reference with a MBK reference. The reference is attached to the RDS figure in parameter of the refmbkrds function. +.SH RETURN VALUE +Pointer to the newly created RDS reference. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Ref; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHREF = addphref ( MbkFigure,"ref_con", "ref_1", 9, 15); + Ref = \fBrefmbkrds\fP (RdsFigure, MbkFigure->PHREF); + viewrdsrec ( Ref ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR viewrfmref, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/roundrdsrec.3 b/alliance/src/rds/man3/roundrdsrec.3 new file mode 100644 index 00000000..bdc0518c --- /dev/null +++ b/alliance/src/rds/man3/roundrdsrec.3 @@ -0,0 +1,79 @@ +.\" $Id: roundrdsrec.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)roundrdsrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +roundrdsrec +.XE +.XS0 \n% +.ti 0.2i +roundrdsrec +.XE0 \} +.TH ROUNDRDSREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +roundrdsrec \- adjusts a rectangle to lambda grid step +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + void roundrdsrec( Rectangle ) + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIRectangle\fP +RDS rectangle to treat. +.SH DESCRIPTION +the \fIroundrdsrec\fP function adjusts (in lambda) to lower grid step for rectangle extremity which has coordinates (X,Y), adjusts to upper grid step for rectangle extremity which has coordinates (X+DX,Y+DY). +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Rectangle; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + Rectangle = + addrdsfigrec(RdsFigure, "seg", RDS_ALU1, 2.5, 3.5, 6, 7); + viewrfmrec ( Rectangle ); + /\(** \(**/ \fBroundrdsrec\fP ( Rectangle ); + /\(** view rectangle after rounding \(**/ + viewrfmrec ( Rectangle ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR viewrfmrec +.BR et_un_autre_see_also + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/saverdsfig.3 b/alliance/src/rds/man3/saverdsfig.3 new file mode 100644 index 00000000..02c59ede --- /dev/null +++ b/alliance/src/rds/man3/saverdsfig.3 @@ -0,0 +1,72 @@ +.\" $Id: saverdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)saverdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +saverdsfig +.XE +.XS0 \n% +.ti 0.2i +saverdsfig +.XE0 \} +.TH SAVERDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +saverdsfig \- save a physical figure on disk. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rtlnnn.h" + void saverdsfig( Figure ) + rdsfig_list \(**Figure; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +Pointer to the RDS Figure to save. +.SH DESCRIPTION +The \fIsaverdsfig\fP function writes on disk the contents of the figure pointer to by rdsfig_list. The savephfig function in fact performs a call to a driver, choosen by the RDS_OUT environment variable. +.SH RETURN VALUE +none +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rtl103.h: Unknown rds output format" +.ft R +.RS +The output format defined by the unix environment variable RDS_OUT is not supported by the driver (supported formats are "cif" and "gds"). +.PP +Other errors can appear because the saverdsfig function calls cif and gds drivers. +.SH EXAMPLE + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + main() + { + rdsfig_list \(**RdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + loadrdsfig( RdsFigure, "core", 'A'); + RdsFigure->NAME = namealloc ( "core_2" ); + /\(** \(**/ \fBsaverdsfig\fP ( RdsFigure ); + } +.ft R +.fi +.SH SEE ALSO +.BR librtl, +.BR loadrdsfig, +.BR rdsenv, +.BR getrdsfig, +.BR RDS_OUT + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/searchrdsfig.3 b/alliance/src/rds/man3/searchrdsfig.3 new file mode 100644 index 00000000..4e93a880 --- /dev/null +++ b/alliance/src/rds/man3/searchrdsfig.3 @@ -0,0 +1,71 @@ +.\" $Id: searchrdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)searchrdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +searchrdsfig +.XE +.XS0 \n% +.ti 0.2i +searchrdsfig +.XE0 \} +.TH SEARCHRDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +searchrdsfig \- searchs by name a figure in the list of figures +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rutnnn.h" + rdsfig_list \(**searchrdsfig( Name ) + char \(**Name; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIName\fP +Name of the figure to search. +.SH DESCRIPTION +The \fIsearchrdsfig\fP function searchs a figure by its name in the list of figures in memory. +.SH RETURN VALUE +Pointer to the figure searched. If the figure is not found then pointer NULL is returned. +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rutnnn.h" + #include "rtlnnn.h" + main() + { + rdsfig_list \(**Figure; + rdsfig_list \(**ScanFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig("na2",0); + Figure = addrdsfig("no2",0); + Figure = addrdsfig("xr2",0); + Figure = addrdsfig("n03",0); + ScanFigure = \fBsearchrdsfig\fP("xr2"); + viewrdsfig ( ScanFigure ); + } +.ft R +.fi +.SH SEE ALSO +.BR librtl, +.BR librds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/segmbkrds.3 b/alliance/src/rds/man3/segmbkrds.3 new file mode 100644 index 00000000..01dab995 --- /dev/null +++ b/alliance/src/rds/man3/segmbkrds.3 @@ -0,0 +1,95 @@ +.\" $Id: segmbkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)segmbkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +segmbkrds +.XE +.XS0 \n% +.ti 0.2i +segmbkrds +.XE0 \} +.TH SEGMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +segmbkrds \- adds to RDS figure a segment from a MBK figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + rdsrec_list \(**segmbkrds( Figure, Segment, Lynx ) + rdsfig_list \(**Figure; + phseg_list \(**Segment; + char Lynx; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +The RDS figure which has to receive the converted segment. +.TP +\fISegment\fP +MBK segment to convert to RDS rectangle. +.TP +\fILynx\fP +Flag used for the segment conversion. If the parameter Lynx is set to 0 then this is the normal conversion mode. If the parameter Lynx is set to 1 then the rds structure generated permits to extract equipotentials rectangles. +.SH DESCRIPTION +The \fIsegmbkrds\fP function converts and creates a RDS segment from a MBK segment. The segment is attached to the RDS figure in parameter of the segmbkrds function. See the \fIrdsfig_list\fP structure in librds. +.SH RETURN VALUE +Pointer to the newly created RDS segment. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Segment; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = + addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHSEG = + addphseg ( MbkFigure, ALU1, 1, 1, 1, 2, 12, "seg_alu1"); + Segment = \fBsegmbkrds\fP (RdsFigure, MbkFigure->PHSEG, 0); + viewrdsrec ( Segment ); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR librfm, +.BR viewrfmseg, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viambkrds.3 b/alliance/src/rds/man3/viambkrds.3 new file mode 100644 index 00000000..99bd9aa2 --- /dev/null +++ b/alliance/src/rds/man3/viambkrds.3 @@ -0,0 +1,96 @@ +.\" $Id: viambkrds.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)viambkrds.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viambkrds +.XE +.XS0 \n% +.ti 0.2i +viambkrds +.XE0 \} +.TH VIAMBKRDS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viambkrds \- adds to RDS figure a contact from a MBK figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + rdsrec_list \(**viambkrds( Figure, Via, Lynx ) + rdsfig_list \(**Figure; + phvia_list \(**Via; + char Lynx; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +The RDS figure which has to receive the converted contact. +.TP +\fIVia\fP +MBK contact to convert to RDS rectangles. +.TP +\fILynx\fP +Flag used for the via conversion. If the parameter Lynx is set to 0 then this is the normal conversion mode. If the parameter Lynx is set to 1 then the rds structure generated permits to extract equipotentials rectangles. +.SH DESCRIPTION +The \fIviambkrds\fP function converts and creates a RDS contact from a MBK contact. The contact is attached to the RDS figure in parameter of the viambkrds function. See the \fIrdsfig_list\fP structure of librds. +.TP +\fINote\fP : +This function generates many rectangles to create a RDS contact. These rectangle are chained each other (circulary list) with the field USER of the rdsrec_list structure. +.SH RETURN VALUE +Pointer to one of the RDS rectangles created. +.SH ERRORS +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +"Rds202: rdsalloc error, can't continue !" +.ft R +.RS +it's impossible to allocate the memory size desired +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Via; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHVIA = addphvia ( MbkFigure, CONT_VIA, 4, 7); + Via = \fBviambkrds\fP (RdsFigure, MbkFigure->PHVIA); + viewrfmvia ( MbkFigure->PHVIA, Via ); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR librfm, +.BR viewrfmvia, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrdsfig.3 b/alliance/src/rds/man3/viewrdsfig.3 new file mode 100644 index 00000000..8ec7b6f7 --- /dev/null +++ b/alliance/src/rds/man3/viewrdsfig.3 @@ -0,0 +1,93 @@ +.\" $Id: viewrdsfig.3,v 1.1 2002/03/13 13:37:37 fred Exp $ +.\" @(#)viewrdsfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrdsfig +.XE +.XS0 \n% +.ti 0.2i +viewrdsfig +.XE0 \} +.TH VIEWRDSFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME + viewrdsfig \- view caracteristics of a figure +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + void viewrdsfig( Figure ) + rdsins_list \(**Figure; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigure\fP +Pointer to the figure to visualize. +.SH DESCRIPTION +The \fIviewrdsfig\fP function displays caracteristics of the figure called \'Figure\' and all the objets contained in this figure. +.TP +figure's parameters displayed to screen : +.RS +.TP +\fINAME\fP +figure's name. +.TP +\fIMODE\fP +loading mode of the figure. +.TP +\fISIZE\fP +size of user structure added to the rdsrec_list structure. +.RE +Displays also rectangle and instance parameters of the figure (see viewrdsins and viewrdsrec functions). +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdsins_list \(**Instance; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = addrdsins (Figure,"na2_y","and2",RDS_NOSYM,8,6); + Rectangle = + addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + visualization of the figure and its items + \(**/ + /\(** \(**/ \fBviewrdsfig\fP ( Figure ); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR viewrdsrec, +.BR viewrdsins + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrdsins.3 b/alliance/src/rds/man3/viewrdsins.3 new file mode 100644 index 00000000..f461254a --- /dev/null +++ b/alliance/src/rds/man3/viewrdsins.3 @@ -0,0 +1,99 @@ +.\" $Id: viewrdsins.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrdsins.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrdsins +.XE +.XS0 \n% +.ti 0.2i +viewrdsins +.XE0 \} +.TH VIEWRDSINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrdsins \- Displays caracteristics of an instance +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + void viewrdsins( Instance ) + rdsins_list \(**Instance; +.ft R +.fi +.SH PARAMETERS +.TP 20 +\fIInstance\fP +Instance to display. +.SH DESCRIPTION +The \fIviewrdsins\fP function displays caracteristics of the instance pointed by \'Instance\' and its items. +.TP +instance's parameters displayed : +.RS +.TP 20 +\fIINSNAME\fP +name of the instance. +.TP +\fIFIGNAME\fP +model's name of the instance. +.TP +\fIX,Y\fP +position of the lower left corner of the instance. +.TP +\fITRANSF\fP +transformation applied to the instance. +.TP +\fISIZE\fP +size of the user structure added to the rdsrec_list structure. +.RE +This function displays also rectangles of the instance (see viewrdsrec() function). +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + rdsins_list \(**Instance; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Instance = addrdsins (Figure,"na2_y","and2",RDS_NOSYM,8,6); + Rectangle = + addrdsinsrec(Instance,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + visualization of the instance and its rectangle + \(**/ + /\(** \(**/ \fBviewrdsins\fP ( Instance ); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR viewrdsfig, +.BR viewrdsrec + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrdsparam.3 b/alliance/src/rds/man3/viewrdsparam.3 new file mode 100644 index 00000000..1d42b8aa --- /dev/null +++ b/alliance/src/rds/man3/viewrdsparam.3 @@ -0,0 +1,66 @@ +.\" $Id: viewrdsparam.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrdsparam.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrdsparam +.XE +.XS0 \n% +.ti 0.2i +viewrdsparam +.XE0 \} +.TH VIEWRDSPARAM 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrdsparam \- displays tables in memory filled by loadrdsparam function. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +void viewrdsparam() +.ft R +.fi +.SH PARAMETER +none +.SH DESCRIPTION +The \fIviewrdsparam\fP function displays tables in RAM filled by the loadrdsparam function. +For more information, see loadrdsparam function. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + #include "rprnnn.h" + #include "rfmnnn.h" + main() + { + rdsfig_list \(**RdsFigure; + phfig_list \(**MbkFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** \(**/ \fBviewrdsparam\fP (); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librpr, +.BR loadrdsparam + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrdsrec.3 b/alliance/src/rds/man3/viewrdsrec.3 new file mode 100644 index 00000000..5577d5a8 --- /dev/null +++ b/alliance/src/rds/man3/viewrdsrec.3 @@ -0,0 +1,81 @@ +.\" $Id: viewrdsrec.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrdsrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrdsrec +.XE +.XS0 \n% +.ti 0.2i +viewrdsrec +.XE0 \} +.TH VIEWRDSREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrdsrec \- Displays caracteristics of a rectangle +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "rdsnnn.h" + void viewrdsrec( Rectangle ) + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETERS +\fIRectangle\fP +The rectangle to display. +.SH DESCRIPTION +The \fIviewrdsrec\fP function displays rectangle's caracteristics : +.RS +.TP 20 +\- its coordinates (X,Y,DX,DY) +.TP +\- its Layer +.TP +\- its name +.TP +\- its field FLAGS +.RE +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rtlnnn.h" + main() + { + rdsfig_list \(**Figure; + rdsrec_list \(**Rectangle; + mbkenv(); + rdsenv(); + loadrdsparam(); + Figure = addrdsfig ("core",sizeof ( UserStruct ) ); + Rectangle = + addrdsfigrec(Figure,"Alu1",RDS_ALU1,2,4,12,1); + /\(** + visualization of rectangle's caracteristics + \(**/ + /* */ \fBviewrdsrec\fP ( Rectangle ); + } +.ft R +.fi +.SH SEE ALSO +.BR librds, +.BR viewrdsfig, +.BR viewrdsins + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrdswindow.3 b/alliance/src/rds/man3/viewrdswindow.3 new file mode 100644 index 00000000..10db5037 --- /dev/null +++ b/alliance/src/rds/man3/viewrdswindow.3 @@ -0,0 +1,80 @@ +.\" $Id: viewrdswindow.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrdswindow.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrdswindow +.XE +.XS0 \n% +.ti 0.2i +viewrdswindow +.XE0 \} +.TH VIEWRDSWINDOW 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrdswindow \- displays caracteristics of the windowing. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rwinnn.h" +void viewrdswindow( RdsWindow ) + rdswindow \(**RdsWindow; +.ft R +.fi +.SH PARAMETER +\fIRdsWindow\fP : +The head of the windowing of the RDS structure. +.SH DESCRIPTION +The \fIviewrdswindow\fP function displays : +.PP +Caracteristics of the windowing (number of windows, width, height,size of a window,...). +.br +Size and position of each window. +.br +All the rectangles of each window. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rwinnn.h" + #include "rtlnnn.h" + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdswindow \(**Window; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("na2_y",'A'); + RdsFigure = figmbkrds(MbkFigure,0,0); + Window = buildrdswindow ( RdsFigure ); + /\(** \(**/ \fBviewrdswindow\fP ( Window ); + . . . + } +.ft R +.fi +.SH SEE ALSO +.BR librwi, +.BR buildrdswindow, +.BR destroyrdswindow, +.BR allocrdswindow + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmcon.3 b/alliance/src/rds/man3/viewrfmcon.3 new file mode 100644 index 00000000..64969bb0 --- /dev/null +++ b/alliance/src/rds/man3/viewrfmcon.3 @@ -0,0 +1,83 @@ +.\" $Id: viewrfmcon.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmcon.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmcon +.XE +.XS0 \n% +.ti 0.2i +viewrfmcon +.XE0 \} +.TH VIEWRFMCON 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmcon \- displays connector caracteristics in MBK and RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + void viewrfmcon( Connector, Rectangle ) + phcon_list \(**Connector; + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIConnector\fP +MBK Connector to visualizate +.TP +\fIRectangle\fP +RDS Connector to visualizate +.SH DESCRIPTION +The \fIviewrfmcon\fP function displays caracteristics of a connector in MBK and RDS format. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**RdsConnector; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = + addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHCON = + addphcon ( MbkFigure, NORTH, "c_1", 14, 5, ALU1, 2); + RdsConnector = conmbkrds(RdsFigure, MbkFigure->PHCON); + /\(** \(**/ \fBviewrfmcon\fP ( MbkFigure->PHCON, RdsConnector ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR conmbkrds, +.BR insconmbkrds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmfig.3 b/alliance/src/rds/man3/viewrfmfig.3 new file mode 100644 index 00000000..bcdf1924 --- /dev/null +++ b/alliance/src/rds/man3/viewrfmfig.3 @@ -0,0 +1,79 @@ +.\" $Id: viewrfmfig.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmfig.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmfig +.XE +.XS0 \n% +.ti 0.2i +viewrfmfig +.XE0 \} +.TH VIEWRFMFIG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmfig \- displays figure caracteristics in MBK and RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + void viewrfmfig( FigureMbk, FigureRds ) + phfig_list \(**FigureMbk; + rdsfig_list \(**FigureRds; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIFigureMbk\fP +MBK figure to visualizate +.TP +\fIFigureRds\fP +RDS figure to visualizate +.SH DESCRIPTION +The \fIviewrfmfig\fP function displays caracteristics of a figure in MBK and RDS format. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + mbkenv(); + rdsenv(); + loadrdsparam(); + MbkFigure = getphfig("na2_y",'A'); + RdsFigure = figmbkrds(FigureMbk,sizeof(UserStruct),0); + /\(** view Mbk and Rds Figure \(**/ + /\(** \(**/ \fBviewrfmfig\fP ( MbkFigure, RdsFigure ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR figmbkrds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmins.3 b/alliance/src/rds/man3/viewrfmins.3 new file mode 100644 index 00000000..7575c5f2 --- /dev/null +++ b/alliance/src/rds/man3/viewrfmins.3 @@ -0,0 +1,87 @@ +.\" $Id: viewrfmins.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmins.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmins +.XE +.XS0 \n% +.ti 0.2i +viewrfmins +.XE0 \} +.TH VIEWRFMINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmins \- displays instance caracteristics in MBK and RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + void viewrfmins( InstanceMbk, InstanceRds ) + phins_list \(**InstanceMbk; + rdsins_list \(**InstanceRds; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIInstanceMbk\fP +MBK instance to visualizate +.TP +\fIInstanceRds\fP +RDS instance to visualizate +.SH DESCRIPTION +The \fIviewrfmins\fP function displays caracteristics of an instance in MBK and RDS format. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + phins_list \(**MbkInstance; + rdsfig_list \(**RdsFigure; + rdsins_list \(**RdsInstance; + mbkenv(); + rdsenv(); + loadrdsparam(); + /\(** creates MbkFigure Named "core" \(**/ + MbkFigure = addphfig("core"); + /\(** adds Mbk instance "n1_y" to MbkFigure named "core" \(**/ + MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9); + /\(** creates RdsFigure named "core_2" \(**/ + RdsFigure = addrdsfig("core_2",sizeof(UserStruct)); + /\(** creates RdsInstance with MbkInstance \(**/ + RdsInstance = insmbkrds ( RdsFigure, MbkInstance, 'A', 0 ); + /\(** views Mbk and Rds Instance \(**/ + /\(** \(**/ \fBviewrfmins\fP ( MbkInstance, RdsInstance ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR insmbkrds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmrec.3 b/alliance/src/rds/man3/viewrfmrec.3 new file mode 100644 index 00000000..4dde858c --- /dev/null +++ b/alliance/src/rds/man3/viewrfmrec.3 @@ -0,0 +1,75 @@ +.\" $Id: viewrfmrec.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmrec.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmrec +.XE +.XS0 \n% +.ti 0.2i +viewrfmrec +.XE0 \} +.TH VIEWRFMREC 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmrec \- displays rectangle caracteristics in RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + Void viewrfmrec( Rectangle ) + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIRectangle\fP +RDS rectangle to visualizate. +.SH DESCRIPTION +The \fIviewrfmrec\fP function displays all rectangles which constitute a RDS object. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**Via; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHVIA = addphvia ( MbkFigure, CONT_VIA, 4, 7); + Via = viambkrds(RdsFigure, MbkFigure->PHVIA); + /\(** \(**/ \fBviewrfmrec\fP ( Via ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmref.3 b/alliance/src/rds/man3/viewrfmref.3 new file mode 100644 index 00000000..0e8322e8 --- /dev/null +++ b/alliance/src/rds/man3/viewrfmref.3 @@ -0,0 +1,81 @@ +.\" $Id: viewrfmref.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmref.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmref +.XE +.XS0 \n% +.ti 0.2i +viewrfmref +.XE0 \} +.TH VIEWRFMREF 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmref \- displays reference caracteristics in MBK and RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + void viewrfmref( Reference, Rectangle ) + phref_list \(**Reference; + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIreference\fP +MBK reference to visualizate. +.TP +\fIRectangle\fP +RDS reference to visualizate. +.SH DESCRIPTION +The \fIviewrfmref\fP function displays caracteristics of a reference in MBK and RDS format. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**RdsReference; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHREF = addphref ( MbkFigure, "ref_con", "rc_1", 2, 12); + RdsReference = refmbkrds(RdsFigure, MbkFigure->PHREF); + /\(** \(**/ \fBviewrfmref\fP ( MbkFigure->PHREF, RdsReference); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR refmbkrds, +.BR insrefmbkrds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmseg.3 b/alliance/src/rds/man3/viewrfmseg.3 new file mode 100644 index 00000000..fc77bceb --- /dev/null +++ b/alliance/src/rds/man3/viewrfmseg.3 @@ -0,0 +1,83 @@ +.\" $Id: viewrfmseg.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmseg.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmseg +.XE +.XS0 \n% +.ti 0.2i +viewrfmseg +.XE0 \} +.TH VIEWRFMSEG 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmseg \- displays segment caracteristics in MBK and RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" + void viewrfmseg( Segment, Rectangle ) + phseg_list \(**Segment; + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fISegment\fP +MBK segment to visualizate. +.TP +\fIRectangle\fP +RDS segment to visualizate. +.SH DESCRIPTION +The \fIviewrfmseg\fP function displays caracteristics of a segment in MBK and RDS format. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**RdsSegment; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = + addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHSEG = + addphseg ( MbkFigure, ALU1, 1, 1, 1, 2, 12, "seg_alu1"); + RdsSegment = segmbkrds(RdsFigure, MbkFigure->PHSEG,0); + /\(** \(**/ \fBviewrfmseg\fP ( MbkFigure->PHSEG, RdsSegment ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR segmbkrds, +.BR inssegmbkrds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/man3/viewrfmvia.3 b/alliance/src/rds/man3/viewrfmvia.3 new file mode 100644 index 00000000..29bb49db --- /dev/null +++ b/alliance/src/rds/man3/viewrfmvia.3 @@ -0,0 +1,81 @@ +.\" $Id: viewrfmvia.3,v 1.1 2002/03/13 13:37:38 fred Exp $ +.\" @(#)viewrfmvia.1 1.11 93/08/18 ; Labo masi cao-vlsi +.if t \{\ +.so man1/alc_contents.mac +.XS \n% +.ti 0.2i +viewrfmvia +.XE +.XS0 \n% +.ti 0.2i +viewrfmvia +.XE0 \} +.TH VIEWRFMVIA 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS" +.SH NAME +viewrfmvia \- displays contact caracteristics in MBK and RDS format. +.so man1/alc_origin.1 +.SH SYNOPSYS +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} +#include "rfmnnn.h" +void viewrfmvia( Via, Rectangle ) + phvia_list \(**Via; + rdsrec_list \(**Rectangle; +.ft R +.fi +.SH PARAMETER +.TP 20 +\fIVia\fP +MBK contact to visualizate. +.TP +\fIRectangle\fP +RDS contact Rds to visualizate. +.SH DESCRIPTION +The \fIviewrfmvia\fP function displays caracteristics of a contact in MBK and RDS format. +.SH RETURN VALUE +nothing +.SH ERRORS +none +.SH EXAMPLE +.ta 3n 6n 9n 12n 15n 18n 21n +.nf +.if n \{\ +.ft B \} +.if t \{\ +.ft CR \} + #include "mphnnn.h" + #include "mutnnn.h" + #include "rdsnnn.h" + #include "rfmnnn.h" + #include "rtlnnn.h" + typedef struct UserStruct + { + char \(**STRING; + void \(**USER1; + } UserStruct; + main() + { + phfig_list \(**MbkFigure; + rdsfig_list \(**RdsFigure; + rdsrec_list \(**RdsVia; + mbkenv(); + rdsenv(); + loadrdsparam(); + RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) ); + MbkFigure->PHVIA = addphvia ( MbkFigure, CONT_VIA, 3, 7); + RdsVia = viambkrds(RdsFigure, MbkFigure->PHVIA); + /\(** \(**/ \fBviewrfmvia\fP ( MbkFigure->PHVIA, RdsVia ); + } +.ft R +.fi +.SH SEE ALSO +.BR librfm, +.BR viambkrds, +.BR insviambkrds + + +.so man1/alc_bug_report.1 + diff --git a/alliance/src/rds/src/Makefile.am b/alliance/src/rds/src/Makefile.am new file mode 100644 index 00000000..f699f256 --- /dev/null +++ b/alliance/src/rds/src/Makefile.am @@ -0,0 +1,20 @@ +lib_LIBRARIES = libRds.a \ + libRut.a \ + libRfm.a \ + libRpr.a \ + libRwi.a \ + libRtl.a +CFLAGS = @CFLAGS@ \ + -DRTL_DEFAULT_TECHNO=\"etc/cmos_12.rds\" \ + -DALLIANCE_TOP=\"${ALLIANCE_TOP}\" + +include_HEADERS = rds.h rfm.h rtl.h rwi.h rpr.h rut.h +libRds_a_SOURCES = rdsalloc.c rdsfree.c rdsadd.c rdsdel.c rdsview.c \ + rdserror.c rdsdebug.c +libRut_a_SOURCES = rutacces.c rutpoly.c rutequi.c rutunify.c ruterror.c +libRfm_a_SOURCES = rfmacces.c rfmview.c rfmerror.c +libRpr_a_SOURCES = rprparse.c rprview.c rprerror.c +libRwi_a_SOURCES = rwialloc.c rwidel.c rwierror.c rwiget.c rwiadd.c \ + rwibuild.c rwidestroy.c rwifree.c rwiview.c +libRtl_a_SOURCES = rtlacces.c rtlenv.c rtlerror.c + diff --git a/alliance/src/rds/src/Makefile.in b/alliance/src/rds/src/Makefile.in new file mode 100644 index 00000000..5fdeb0d1 --- /dev/null +++ b/alliance/src/rds/src/Makefile.in @@ -0,0 +1,389 @@ +# 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 = libRds.a libRut.a libRfm.a libRpr.a libRwi.a libRtl.a + +CFLAGS = @CFLAGS@ -DRTL_DEFAULT_TECHNO=\"etc/cmos_12.rds\" -DALLIANCE_TOP=\"${ALLIANCE_TOP}\" + + +include_HEADERS = rds.h rfm.h rtl.h rwi.h rpr.h rut.h +libRds_a_SOURCES = rdsalloc.c rdsfree.c rdsadd.c rdsdel.c rdsview.c rdserror.c rdsdebug.c + +libRut_a_SOURCES = rutacces.c rutpoly.c rutequi.c rutunify.c ruterror.c +libRfm_a_SOURCES = rfmacces.c rfmview.c rfmerror.c +libRpr_a_SOURCES = rprparse.c rprview.c rprerror.c +libRwi_a_SOURCES = rwialloc.c rwidel.c rwierror.c rwiget.c rwiadd.c rwibuild.c rwidestroy.c rwifree.c rwiview.c + +libRtl_a_SOURCES = rtlacces.c rtlenv.c rtlerror.c +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +CONFIG_CLEAN_FILES = +LIBRARIES = $(lib_LIBRARIES) + + +DEFS = @DEFS@ -I. -I$(srcdir) +CPPFLAGS = @CPPFLAGS@ +LIBS = @LIBS@ +libRds_a_LIBADD = +libRds_a_OBJECTS = rdsalloc.o rdsfree.o rdsadd.o rdsdel.o rdsview.o \ +rdserror.o rdsdebug.o +libRut_a_LIBADD = +libRut_a_OBJECTS = rutacces.o rutpoly.o rutequi.o rutunify.o ruterror.o +libRfm_a_LIBADD = +libRfm_a_OBJECTS = rfmacces.o rfmview.o rfmerror.o +libRpr_a_LIBADD = +libRpr_a_OBJECTS = rprparse.o rprview.o rprerror.o +libRwi_a_LIBADD = +libRwi_a_OBJECTS = rwialloc.o rwidel.o rwierror.o rwiget.o rwiadd.o \ +rwibuild.o rwidestroy.o rwifree.o rwiview.o +libRtl_a_LIBADD = +libRtl_a_OBJECTS = rtlacces.o rtlenv.o rtlerror.o +AR = ar +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +HEADERS = $(include_HEADERS) + +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/rdsadd.P .deps/rdsalloc.P .deps/rdsdebug.P \ +.deps/rdsdel.P .deps/rdserror.P .deps/rdsfree.P .deps/rdsview.P \ +.deps/rfmacces.P .deps/rfmerror.P .deps/rfmview.P .deps/rprerror.P \ +.deps/rprparse.P .deps/rprview.P .deps/rtlacces.P .deps/rtlenv.P \ +.deps/rtlerror.P .deps/rutacces.P .deps/rutequi.P .deps/ruterror.P \ +.deps/rutpoly.P .deps/rutunify.P .deps/rwiadd.P .deps/rwialloc.P \ +.deps/rwibuild.P .deps/rwidel.P .deps/rwidestroy.P .deps/rwierror.P \ +.deps/rwifree.P .deps/rwiget.P .deps/rwiview.P +SOURCES = $(libRds_a_SOURCES) $(libRut_a_SOURCES) $(libRfm_a_SOURCES) $(libRpr_a_SOURCES) $(libRwi_a_SOURCES) $(libRtl_a_SOURCES) +OBJECTS = $(libRds_a_OBJECTS) $(libRut_a_OBJECTS) $(libRfm_a_OBJECTS) $(libRpr_a_OBJECTS) $(libRwi_a_OBJECTS) $(libRtl_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: + +libRds.a: $(libRds_a_OBJECTS) $(libRds_a_DEPENDENCIES) + -rm -f libRds.a + $(AR) cru libRds.a $(libRds_a_OBJECTS) $(libRds_a_LIBADD) + $(RANLIB) libRds.a + +libRut.a: $(libRut_a_OBJECTS) $(libRut_a_DEPENDENCIES) + -rm -f libRut.a + $(AR) cru libRut.a $(libRut_a_OBJECTS) $(libRut_a_LIBADD) + $(RANLIB) libRut.a + +libRfm.a: $(libRfm_a_OBJECTS) $(libRfm_a_DEPENDENCIES) + -rm -f libRfm.a + $(AR) cru libRfm.a $(libRfm_a_OBJECTS) $(libRfm_a_LIBADD) + $(RANLIB) libRfm.a + +libRpr.a: $(libRpr_a_OBJECTS) $(libRpr_a_DEPENDENCIES) + -rm -f libRpr.a + $(AR) cru libRpr.a $(libRpr_a_OBJECTS) $(libRpr_a_LIBADD) + $(RANLIB) libRpr.a + +libRwi.a: $(libRwi_a_OBJECTS) $(libRwi_a_DEPENDENCIES) + -rm -f libRwi.a + $(AR) cru libRwi.a $(libRwi_a_OBJECTS) $(libRwi_a_LIBADD) + $(RANLIB) libRwi.a + +libRtl.a: $(libRtl_a_OBJECTS) $(libRtl_a_DEPENDENCIES) + -rm -f libRtl.a + $(AR) cru libRtl.a $(libRtl_a_OBJECTS) $(libRtl_a_LIBADD) + $(RANLIB) libRtl.a + +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(includedir) + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + list='$(include_HEADERS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(includedir)/$$p; \ + 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: $(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-includeHEADERS +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-includeHEADERS +uninstall: uninstall-am +all-am: Makefile $(LIBRARIES) $(HEADERS) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) + + +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 uninstall-includeHEADERS \ +install-includeHEADERS 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: diff --git a/alliance/src/rds/src/main.c b/alliance/src/rds/src/main.c new file mode 100644 index 00000000..ee021710 --- /dev/null +++ b/alliance/src/rds/src/main.c @@ -0,0 +1,146 @@ +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rfm.h" +# include "rwi.h" +# include "rut.h" + +void Syntax( Name ) + + char *Name; +{ + fprintf( stdout, "%s [options] in out\n", Name ); + fprintf( stdout, " -r : real figure\n" ); + fprintf( stdout, " -f : flatten figure\n" ); + fprintf( stdout, " -v : display figure \n" ); + fprintf( stdout, " -s : save figure \n" ); + + exit( 1 ); +} + +int main( argc, argv ) + + int argc; + char *argv[]; +{ + rdsfig_list *FigureRds; + phfig_list *FigureMbk; + + char *InputName; + char *OutputName; + char FlagSymbolic; + char FlagFlatten; + char FlagVerbose; + char FlagSave; + char FlagParam; + + int Number; + + if ( argc < 2 ) + { + Syntax( argv[ 0 ] ); + } + + mbkenv(); + rdsenv(); + + if ( argc < 2 ) + { + Syntax( argv[ 0 ] ); + } + + FlagSymbolic = 1; + FlagFlatten = 0; + FlagVerbose = 0; + FlagSave = 0; + FlagParam = 0; + + rdsbegin(); + loadrdsparam(); + + InputName = (char *)NULL; + OutputName = (char *)NULL; + + for ( Number = 1; + Number < argc; + Number++ ) + { + if ( ! strcmp( argv[ Number ], "-r" )) FlagSymbolic = 0; + else + if ( ! strcmp( argv[ Number ], "-f" )) FlagFlatten = 1; + else + if ( ! strcmp( argv[ Number ], "-v" )) FlagVerbose = 1; + else + if ( ! strcmp( argv[ Number ], "-s" )) FlagSave = 1; + else + if ( ! strcmp( argv[ Number ], "-p" )) FlagParam = 1; + else + if ( InputName == NULL ) InputName = argv[ Number ]; + else + if ( OutputName == NULL ) OutputName = argv[ Number ]; + } + + if ( InputName == NULL ) + { + Syntax( argv[ 0 ] ); + } + + if ( OutputName == NULL ) + { + OutputName = InputName; + } + + if ( FlagParam ) + { + viewrdsparam(); + } + + if ( FlagSymbolic ) + { + fprintf( stdout, "Load figure MBK\n" ); + FigureMbk = getphfig( InputName, 'A' ); + + if ( FlagFlatten ) + { + fprintf( stdout, "Flatten figure MBK\n" ); + rflattenphfig( FigureMbk, YES, NO ); + } + + fprintf( stdout, "Translate figure MBK -> RDS\n" ); + FigureRds = figmbkrds( FigureMbk, RDS_EQUI_SIZE, 0 ); + + fprintf( stdout, "Translate model MBK -> RDS\n" ); + modelmbkrds( FigureRds, 0 ); + } + else + { + fprintf( stdout, "Load figure RDS\n" ); + FigureRds = getrdsfig( InputName, 'A', RDS_EQUI_SIZE ); + + if ( FlagFlatten ) + { + fprintf( stdout, "Flatten figure RDS\n" ); + rflattenrdsfig( FigureRds, RDS_YES, RDS_NO ); + } + } + + if ( FlagVerbose ) + { + fprintf( stdout, "Display figure RDS\n" ); + viewrdsfig( FigureRds ); + } + + if ( FlagSave ) + { + FigureRds->NAME = namealloc( OutputName ); + fprintf( stdout, "Save figure RDS\n" ); + saverdsfig( FigureRds ); + } + + rdsend(); + return( 0 ); + } diff --git a/alliance/src/rds/src/prout.c b/alliance/src/rds/src/prout.c new file mode 100644 index 00000000..8cb8d5a5 --- /dev/null +++ b/alliance/src/rds/src/prout.c @@ -0,0 +1,242 @@ +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rfm.h" +# include "rwi.h" +# include "rut.h" + +rdsrec_list *reverseequi( HeadEqui ) + + rdsrec_list *HeadEqui; +{ + rdsrec_list *PrevEqui; + rdsrec_list *NextEqui; + rdsrec_list *ScanEqui; + unsigned char EndEqui; + + PrevEqui = (rdsrec_list *)NULL; + ScanEqui = HeadEqui; + EndEqui = 1; + + while ( ScanEqui != (rdsrec_list *)NULL ) + { + NextEqui = RDS_EQUI( ScanEqui ); + RDS_EQUI( ScanEqui ) = PrevEqui; + PrevEqui = ScanEqui; + + if ( IsRdsEndEqui( ScanEqui ) ) + { + if ( ! EndEqui ) + { + ClearRdsEndEqui( ScanEqui ); + EndEqui = 1; + } + } + else + if ( EndEqui ) + { + SetRdsEndEqui( ScanEqui ); + EndEqui = 0; + } + + ScanEqui = NextEqui; + } + + return( PrevEqui ); +} + +void viewrdsequi( HeadEqui ) + + rdsrec_list *HeadEqui; +{ + rdsrec_list *ScanEqui; + + for ( ScanEqui = HeadEqui; + ScanEqui != (rdsrec_list *)NULL; + ScanEqui = RDS_EQUI( ScanEqui ) ) + { + viewrdsrec( ScanEqui ); + + if ( IsRdsEndEqui( ScanEqui ) ) + { + fprintf( stdout, "EndEqui\n" ); + } + } +} + +void Syntax( Name ) + + char *Name; +{ + fprintf( stdout, "%s [-r -f -R -u] in out\n", Name ); + fprintf( stdout, " -r : real figure\n" ); + fprintf( stdout, " -f : flatten figure\n" ); + fprintf( stdout, " -R : reverse equi\n" ); + fprintf( stdout, " -V : display figure \n" ); + fprintf( stdout, " -S : save figure \n" ); + fprintf( stdout, " -u : unify\n" ); + + exit( 1 ); +} + +int main( argc, argv ) + + int argc; + char *argv[]; +{ + rdsfig_list *FigureRds; + phfig_list *FigureMbk; + rdswindow *WindowRds; + rdsrec_list *HeadEqui; + + char *InputName; + char *OutputName; + char FlagSymbolic; + char FlagFlatten; + char FlagReverse; + char FlagUnify; + char FlagDebug; + char FlagVerbose; + char FlagSave; + + int Number; + + if ( argc < 2 ) + { + Syntax( argv[ 0 ] ); + } + + mbkenv(); + rdsenv(); + + if ( argc < 2 ) + { + Syntax( argv[ 0 ] ); + } + + FlagSymbolic = 1; + FlagFlatten = 0; + FlagReverse = 0; + FlagUnify = 0; + FlagDebug = 0; + FlagVerbose = 0; + FlagSave = 0; + + InputName = (char *)NULL; + OutputName = (char *)NULL; + + for ( Number = 1; + Number < argc; + Number++ ) + { + if ( ! strcmp( argv[ Number ], "-r" )) FlagSymbolic = 0; + else + if ( ! strcmp( argv[ Number ], "-f" )) FlagFlatten = 1; + else + if ( ! strcmp( argv[ Number ], "-R" )) FlagReverse = 1; + else + if ( ! strcmp( argv[ Number ], "-u" )) FlagUnify = 1; + else + if ( ! strcmp( argv[ Number ], "-debug" )) FlagDebug = 1; + else + if ( ! strcmp( argv[ Number ], "-R" )) FlagReverse = 1; + else + if ( ! strcmp( argv[ Number ], "-V" )) FlagVerbose = 1; + else + if ( ! strcmp( argv[ Number ], "-S" )) FlagSave = 1; + else + if ( InputName == NULL ) InputName = argv[ Number ]; + else + if ( OutputName == NULL ) OutputName = argv[ Number ]; + } + + if ( InputName == NULL ) + { + Syntax( argv[ 0 ] ); + } + + if ( OutputName == NULL ) + { + OutputName = InputName; + } + + if ( FlagDebug ) + { + rdsdebug(); + } + + rdsbegin(); + loadrdsparam(); + + if ( FlagSymbolic ) + { + fprintf( stdout, "Load figure MBK\n" ); + FigureMbk = getphfig( InputName, 'A' ); + + if ( FlagFlatten ) + { + fprintf( stdout, "Flatten figure MBK\n" ); + rflattenphfig( FigureMbk, YES, NO ); + } + + fprintf( stdout, "Translate figure MBK -> RDS\n" ); + FigureRds = figmbkrds( FigureMbk, RDS_EQUI_SIZE, 0 ); + + fprintf( stdout, "Translate model MBK -> RDS\n" ); + modelmbkrds( FigureRds, 0 ); + } + else + { + fprintf( stdout, "Load figure RDS\n" ); + FigureRds = getrdsfig( InputName, 'A', RDS_EQUI_SIZE ); + + if ( FlagFlatten ) + { + fprintf( stdout, "Flatten figure RDS\n" ); + rflattenrdsfig( FigureRds, RDS_YES, RDS_NO ); + } + } + + if ( FlagSave ) + { + fprintf( stdout, "Save figure RDS in prout\n" ); + FigureRds->NAME = namealloc( "prout" ); + saverdsfig( FigureRds ); + } + + if ( FlagVerbose ) + { + viewrdsfig( FigureRds ); + } + + fprintf( stdout, "Build window RDS\n" ); + WindowRds = buildrdswindow( FigureRds ); + fprintf( stdout, "Build equi\n" ); + HeadEqui = equirdsfig( FigureRds, WindowRds ); + + fprintf( stdout, "Destroy window RDS\n" ); + destroyrdswindow( FigureRds, WindowRds ); + + if ( FlagReverse ) + { + fprintf( stdout, "Reverse equi\n" ); + HeadEqui = reverseequi( HeadEqui ); + } + + if ( FlagUnify ) + { + fprintf( stdout, "Unify figure RDS\n" ); + unifyrdsfig( FigureRds, HeadEqui ); + } + + FigureRds->NAME = namealloc( OutputName ); + fprintf( stdout, "Save figure RDS\n" ); + saverdsfig( FigureRds ); + + rdsend(); + return( 0 ); + } diff --git a/alliance/src/rds/src/rds.h b/alliance/src/rds/src/rds.h new file mode 100644 index 00000000..8ec6e71a --- /dev/null +++ b/alliance/src/rds/src/rds.h @@ -0,0 +1,696 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rds210.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_210_H +# define RDS_210_H + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc | +| | +\------------------------------------------------------------*/ + +# define RDS_ALLOC_BLOCK 0 +# define RDS_ALLOC_HEAP 1 + +/*------------------------------------------------------------\ +| | +| Allocation Macros | +| | +\------------------------------------------------------------*/ + +# define rdsallocblock( SizeOf ) \ + \ + ( rdsalloc( ( SizeOf ), RDS_ALLOC_BLOCK ) ) + +# define rdsallocheap( SizeOf ) \ + \ + ( rdsalloc( ( SizeOf ), RDS_ALLOC_HEAP ) ) + +# define rdsfreeblock( Pointer ) \ + \ + ( rdsfree( (char *)( Pointer ), (unsigned int)0 ) ) + +# define rdsfreeheap( Pointer, SizeOf ) \ + \ + ( rdsfree( (char *)( Pointer ), (unsigned int)( SizeOf ) ) ) + +/*------------------------------------------------------------\ +| | +| Instance Symmetry | +| | +\------------------------------------------------------------*/ + +# define RDS_NOSYM 0 +# define RDS_ROT_P 1 +# define RDS_SYMXY 2 +# define RDS_ROT_M 3 +# define RDS_SYM_X 4 +# define RDS_SY_RM 5 +# define RDS_SYM_Y 6 +# define RDS_SY_RP 7 + +# define RDS_MAX_TRANSF ( RDS_SY_RP + 1 ) + +/*------------------------------------------------------------\ +| | +| Rds Layers | +| | +\------------------------------------------------------------*/ + +# define RDS_LAYER_NWELL 0 +# define RDS_LAYER_PWELL 1 +# define RDS_LAYER_NIMP 2 +# define RDS_LAYER_PIMP 3 +# define RDS_LAYER_ACTIV 4 +# define RDS_LAYER_NDIF 5 +# define RDS_LAYER_PDIF 6 +# define RDS_LAYER_NTIE 7 +# define RDS_LAYER_PTIE 8 +# define RDS_LAYER_POLY 9 +# define RDS_LAYER_GATE 10 +# define RDS_LAYER_VPOLY 11 +# define RDS_LAYER_TPOLY 12 +# define RDS_LAYER_POLY2 13 +# define RDS_LAYER_CONT 14 +# define RDS_LAYER_TPOLY2 15 +# define RDS_LAYER_TCONT 16 +# define RDS_LAYER_CONT2 17 +# define RDS_LAYER_ALU1 18 +# define RDS_LAYER_VALU1 19 +# define RDS_LAYER_TALU1 20 +# define RDS_LAYER_VIA1 21 +# define RDS_LAYER_TVIA1 22 +# define RDS_LAYER_ALU2 23 +# define RDS_LAYER_VALU2 24 +# define RDS_LAYER_TALU2 25 +# define RDS_LAYER_VIA2 26 +# define RDS_LAYER_TVIA2 27 +# define RDS_LAYER_ALU3 28 +# define RDS_LAYER_VALU3 29 +# define RDS_LAYER_TALU3 30 +# define RDS_LAYER_VIA3 31 +# define RDS_LAYER_TVIA3 32 +# define RDS_LAYER_ALU4 33 +# define RDS_LAYER_VALU4 34 +# define RDS_LAYER_TALU4 35 +# define RDS_LAYER_VIA4 36 +# define RDS_LAYER_TVIA4 37 +# define RDS_LAYER_ALU5 38 +# define RDS_LAYER_VALU5 39 +# define RDS_LAYER_TALU5 40 +# define RDS_LAYER_VIA5 41 +# define RDS_LAYER_TVIA5 42 +# define RDS_LAYER_ALU6 43 +# define RDS_LAYER_VALU6 44 +# define RDS_LAYER_TALU6 45 +# define RDS_LAYER_VIA6 46 +# define RDS_LAYER_TVIA6 47 +# define RDS_LAYER_ALU7 48 +# define RDS_LAYER_VALU7 49 +# define RDS_LAYER_TALU7 50 +# define RDS_LAYER_VIA7 51 +# define RDS_LAYER_TVIA7 52 +# define RDS_LAYER_ALU8 53 +# define RDS_LAYER_VALU8 54 +# define RDS_LAYER_TALU8 55 +# define RDS_LAYER_VIA8 56 +# define RDS_LAYER_TVIA8 57 +# define RDS_LAYER_ALU9 58 +# define RDS_LAYER_CPAS 59 +# define RDS_LAYER_REF 60 +# define RDS_LAYER_USER0 61 +# define RDS_LAYER_USER1 62 +# define RDS_LAYER_USER2 63 +# define RDS_LAYER_USER3 64 +# define RDS_LAYER_USER4 65 +# define RDS_LAYER_USER5 66 +# define RDS_LAYER_USER6 67 +# define RDS_LAYER_USER7 68 +# define RDS_LAYER_USER8 69 +# define RDS_LAYER_USER9 70 +# define RDS_LAYER_ABOX 71 + +# define RDS_ALL_LAYER ( RDS_LAYER_ABOX + 1 ) + +# define RDS_LAYER_UNUSED (unsigned char)255 + +/*------------------------------------------------------------\ +| | +| Dynamic Layers | +| | +\------------------------------------------------------------*/ + +# define RDS_NWELL RDS_DYNAMIC_LAYER[ RDS_LAYER_NWELL ] +# define RDS_PWELL RDS_DYNAMIC_LAYER[ RDS_LAYER_PWELL ] +# define RDS_NIMP RDS_DYNAMIC_LAYER[ RDS_LAYER_NIMP ] +# define RDS_PIMP RDS_DYNAMIC_LAYER[ RDS_LAYER_PIMP ] +# define RDS_ACTIV RDS_DYNAMIC_LAYER[ RDS_LAYER_ACTIV ] +# define RDS_NDIF RDS_DYNAMIC_LAYER[ RDS_LAYER_NDIF ] +# define RDS_PDIF RDS_DYNAMIC_LAYER[ RDS_LAYER_PDIF ] +# define RDS_NTIE RDS_DYNAMIC_LAYER[ RDS_LAYER_NTIE ] +# define RDS_PTIE RDS_DYNAMIC_LAYER[ RDS_LAYER_PTIE ] +# define RDS_POLY RDS_DYNAMIC_LAYER[ RDS_LAYER_POLY ] +# define RDS_GATE RDS_DYNAMIC_LAYER[ RDS_LAYER_GATE ] +# define RDS_VPOLY RDS_DYNAMIC_LAYER[ RDS_LAYER_VPOLY ] +# define RDS_TPOLY RDS_DYNAMIC_LAYER[ RDS_LAYER_TPOLY ] +# define RDS_POLY2 RDS_DYNAMIC_LAYER[ RDS_LAYER_POLY2 ] +# define RDS_TPOLY2 RDS_DYNAMIC_LAYER[ RDS_LAYER_TPOLY2 ] +# define RDS_CONT RDS_DYNAMIC_LAYER[ RDS_LAYER_CONT ] +# define RDS_TCONT RDS_DYNAMIC_LAYER[ RDS_LAYER_TCONT ] +# define RDS_CONT2 RDS_DYNAMIC_LAYER[ RDS_LAYER_CONT2 ] + +# define RDS_ALU1 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU1 ] +# define RDS_VALU1 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU1 ] +# define RDS_TALU1 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU1 ] +# define RDS_VIA1 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA1 ] +# define RDS_TVIA1 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA1 ] + +# define RDS_ALU2 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU2 ] +# define RDS_VALU2 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU2 ] +# define RDS_TALU2 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU2 ] +# define RDS_VIA2 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA2 ] +# define RDS_TVIA2 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA2 ] + +# define RDS_ALU3 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU3 ] +# define RDS_VALU3 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU3 ] +# define RDS_TALU3 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU3 ] +# define RDS_VIA3 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA3 ] +# define RDS_TVIA3 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA3 ] + +# define RDS_ALU4 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU4 ] +# define RDS_VALU4 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU4 ] +# define RDS_TALU4 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU4 ] +# define RDS_VIA4 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA4 ] +# define RDS_TVIA4 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA4 ] + +# define RDS_ALU5 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU5 ] +# define RDS_VALU5 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU5 ] +# define RDS_TALU5 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU5 ] +# define RDS_VIA5 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA5 ] +# define RDS_TVIA5 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA5 ] + +# define RDS_ALU6 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU6 ] +# define RDS_VALU6 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU6 ] +# define RDS_TALU6 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU6 ] +# define RDS_VIA6 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA6 ] +# define RDS_TVIA6 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA6 ] + +# define RDS_ALU7 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU7 ] +# define RDS_VALU7 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU7 ] +# define RDS_TALU7 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU7 ] +# define RDS_VIA7 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA7 ] +# define RDS_TVIA7 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA7 ] + +# define RDS_ALU8 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU8 ] +# define RDS_VALU8 RDS_DYNAMIC_LAYER[ RDS_LAYER_VALU8 ] +# define RDS_TALU8 RDS_DYNAMIC_LAYER[ RDS_LAYER_TALU8 ] +# define RDS_VIA8 RDS_DYNAMIC_LAYER[ RDS_LAYER_VIA8 ] +# define RDS_TVIA8 RDS_DYNAMIC_LAYER[ RDS_LAYER_TVIA8 ] + +# define RDS_ALU9 RDS_DYNAMIC_LAYER[ RDS_LAYER_ALU9 ] +# define RDS_CPAS RDS_DYNAMIC_LAYER[ RDS_LAYER_CPAS ] +# define RDS_REF RDS_DYNAMIC_LAYER[ RDS_LAYER_REF ] +# define RDS_USER0 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER0 ] +# define RDS_USER1 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER1 ] +# define RDS_USER2 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER2 ] +# define RDS_USER3 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER3 ] +# define RDS_USER4 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER4 ] +# define RDS_USER5 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER5 ] +# define RDS_USER6 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER6 ] +# define RDS_USER7 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER7 ] +# define RDS_USER8 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER8 ] +# define RDS_USER9 RDS_DYNAMIC_LAYER[ RDS_LAYER_USER9 ] +# define RDS_ABOX RDS_DYNAMIC_LAYER[ RDS_LAYER_ABOX ] + +/*------------------------------------------------------------\ +| | +| Layer | +| | +\------------------------------------------------------------*/ + +# define RDS_LAYER_MASK (long)(0x000000FF) + +/*------------------------------------------------------------\ +| | +| Layer Macros | +| | +\------------------------------------------------------------*/ + +# define GetRdsLayer( R ) \ + \ + ((unsigned int)( ((R)->FLAGS) & RDS_LAYER_MASK ) ) + +# define SetRdsLayer( R, L ) \ + \ + ((R)->FLAGS = ((R)->FLAGS & ~RDS_LAYER_MASK) | (L) ) + +/*------------------------------------------------------------\ +| | +| Mbk Type | +| | +\------------------------------------------------------------*/ + +# define MBK_CONNECTOR_MASK (long)(0x00000100) +# define MBK_SEGMENT_MASK (long)(0x00000200) +# define MBK_REFERENCE_MASK (long)(0x00000300) +# define MBK_VIA_MASK (long)(0x00000400) +# define MBK_INSTANCE_MASK (long)(0x00000500) +# define MBK_FIGURE_MASK (long)(0x00000600) + +# define RDS_MBK_TYPE_MASK (long)(0x00000F00) + +/*------------------------------------------------------------\ +| | +| Mbk Type Macro | +| | +\------------------------------------------------------------*/ + +# define GetRdsMbkType( R ) \ + \ + ((R)->FLAGS & RDS_MBK_TYPE_MASK ) + +# define SetRdsMbkType( R, T ) \ + \ + ((R)->FLAGS = ( (R)->FLAGS & ~RDS_MBK_TYPE_MASK) | (T) ) + +/*------------------------------------------------------------\ +| | +| Is Mbk Type | +| | +\------------------------------------------------------------*/ + +# define IsRdsConnector( R ) \ + \ + (((R)->FLAGS & RDS_MBK_TYPE_MASK) == MBK_CONNECTOR_MASK ) + +# define IsRdsSegment( R ) \ + \ + (((R)->FLAGS & RDS_MBK_TYPE_MASK) == MBK_SEGMENT_MASK ) + +# define IsRdsReference( R ) \ + \ + (((R)->FLAGS & RDS_MBK_TYPE_MASK) == MBK_REFERENCE_MASK ) + +# define IsRdsVia( R ) \ + \ + (((R)->FLAGS & RDS_MBK_TYPE_MASK) == MBK_VIA_MASK ) + +# define IsRdsInstance( R ) \ + \ + (((R)->FLAGS & RDS_MBK_TYPE_MASK) == MBK_INSTANCE_MASK ) + +# define IsRdsFigure( R ) \ + \ + (((R)->FLAGS & RDS_MBK_TYPE_MASK) == MBK_FIGURE_MASK ) + +/*------------------------------------------------------------\ +| | +| Set Mbk Type | +| | +\------------------------------------------------------------*/ + +# define SetRdsConnector( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_MBK_TYPE_MASK ) | MBK_CONNECTOR_MASK ) + +# define SetRdsSegment( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_MBK_TYPE_MASK ) | MBK_SEGMENT_MASK ) + +# define SetRdsReference( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_MBK_TYPE_MASK ) | MBK_REFERENCE_MASK ) + +# define SetRdsVia( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_MBK_TYPE_MASK ) | MBK_VIA_MASK ) + +# define SetRdsInstance( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_MBK_TYPE_MASK ) | MBK_INSTANCE_MASK ) + +# define SetRdsFigure( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_MBK_TYPE_MASK ) | MBK_FIGURE_MASK ) + +/*------------------------------------------------------------\ +| | +| Extract Type | +| | +\------------------------------------------------------------*/ + +# define RDS_FIG_REC_MASK (long)(0x00008000) + +# define RDS_CON_EXTER_MASK (long)(0x00001000) +# define RDS_CON_INTER_MASK (long)(0x00002000) +# define RDS_REF_REF_MASK (long)(0x00003000) +# define RDS_REF_CON_MASK (long)(0x00004000) +# define RDS_TRANS_GATE_MASK (long)(0x00005000) + +# define RDS_EXTRACT_TYPE_MASK (long)(0x00007000) + +/*------------------------------------------------------------\ +| | +| Extract Type Macros | +| | +\------------------------------------------------------------*/ + +# define GetRdsExtractType( R ) \ + \ + ( (R)->FLAGS & RDS_EXTRACT_TYPE_MASK ) + +# define SetRdsExtractType( R, E ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_EXTRACT_TYPE_MASK ) | (E) ) + +/*------------------------------------------------------------\ +| | +| Is Extract Type | +| | +\------------------------------------------------------------*/ + +# define IsRdsTransGate( R ) \ + \ + (((R)->FLAGS & RDS_EXTRACT_TYPE_MASK) == RDS_TRANS_GATE_MASK) + +# define IsRdsConExter( R ) \ + \ + (((R)->FLAGS & RDS_EXTRACT_TYPE_MASK) == RDS_CON_EXTER_MASK ) + +# define IsRdsConInter( R ) \ + \ + (((R)->FLAGS & RDS_EXTRACT_TYPE_MASK) == RDS_CON_INTER_MASK ) + +# define IsRdsRefRef( R ) \ + \ + (((R)->FLAGS & RDS_EXTRACT_TYPE_MASK) == RDS_REF_REF_MASK ) + +# define IsRdsRefCon( R ) \ + \ + (((R)->FLAGS & RDS_EXTRACT_TYPE_MASK) == RDS_REF_CON_MASK ) + +# define IsRdsFigRec( R ) \ + \ + ((R)->FLAGS & RDS_FIG_REC_MASK ) + +/*------------------------------------------------------------\ +| | +| Set Extract Type | +| | +\------------------------------------------------------------*/ + +# define SetRdsTransGate( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_EXTRACT_TYPE_MASK ) | RDS_TRANS_GATE_MASK ) + +# define SetRdsConExter( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_EXTRACT_TYPE_MASK ) | RDS_CON_EXTER_MASK ) + +# define SetRdsConInter( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_EXTRACT_TYPE_MASK ) | RDS_CON_INTER_MASK ) + +# define SetRdsRefRef( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_EXTRACT_TYPE_MASK ) | RDS_REF_REF_MASK ) + +# define SetRdsRefCon( R ) \ + \ + ( (R)->FLAGS = ((R)->FLAGS \ + \ + & ~RDS_EXTRACT_TYPE_MASK ) | RDS_REF_CON_MASK ) + +# define SetRdsFigRec( R ) \ + \ + ( (R)->FLAGS |= RDS_FIG_REC_MASK ) + +# define ClearRdsFigRec( R ) \ + \ + ( (R)->FLAGS &= ~RDS_FIG_REC_MASK ) + +/*------------------------------------------------------------\ +| | +| Debug Macros | +| | +\------------------------------------------------------------*/ + +# define rdsbegin() \ + \ + do \ + { \ + if ( RDS_DEBUG_ON ) addrdsdebug(__LINE__,__FILE__); \ + } \ + while ( 0 ) + +# define rdsend() \ + \ + do \ + { \ + if ( RDS_DEBUG_ON ) delrdsdebug(); \ + } \ + while ( 0 ) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Rectangle | +| | +\------------------------------------------------------------*/ + + typedef struct rdsrec_list + + { + struct rdsrec_list *NEXT; + long X; + long Y; + long DX; + long DY; + long FLAGS; + char *NAME; + void *USER; + + } rdsrec_list; + +/*------------------------------------------------------------\ +| | +| Rds Instance | +| | +\------------------------------------------------------------*/ + + typedef struct rdsins_list + + { + struct rdsins_list *NEXT; + char *FIGNAME; + char *INSNAME; + long X; + long Y; + char TRANSF; + unsigned short SIZE; + char FLAGS; + struct rdsrec_list **LAYERTAB; + struct rdsrec_list **COURONNE; + void *USER; + + } rdsins_list; + +/*------------------------------------------------------------\ +| | +| Rds Figure | +| | +\------------------------------------------------------------*/ + + typedef struct rdsfig_list + + { + struct rdsfig_list *NEXT; + char *NAME; + struct rdsrec_list **LAYERTAB; + struct rdsins_list *INSTANCE; + char MODE; + unsigned short SIZE; + char FLAGS; + char *FLAGTAB; + struct rdsrec_list **BBOXTAB; + void *USER; + + } rdsfig_list; + +/*------------------------------------------------------------\ +| | +| Rds Debug | +| | +\------------------------------------------------------------*/ + + typedef struct rdsdebug_list + { + struct rdsdebug_list *NEXT; + int LINE; + char *NAME; + + } rdsdebug_list; + +/*------------------------------------------------------------\ +| | +| Global Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Head List | +| | +\------------------------------------------------------------*/ + + extern rdsfig_list *HEAD_RDSFIG; + extern rdsdebug_list *HEAD_RDSDEBUG; + +/*------------------------------------------------------------\ +| | +| Debug Mode | +| | +\------------------------------------------------------------*/ + + extern char RDS_DEBUG_ON; + +/*------------------------------------------------------------\ +| | +| Name | +| | +\------------------------------------------------------------*/ + + extern char **RDS_LAYER_NAME; + extern char *RDS_ALL_LAYER_NAME[ RDS_ALL_LAYER ]; + extern char *RDS_TRANSF_NAME [ RDS_MAX_TRANSF ]; + +/*------------------------------------------------------------\ +| | +| Dynamic Layers | +| | +\------------------------------------------------------------*/ + + extern unsigned char RDS_DYNAMIC_LAYER[ RDS_ALL_LAYER ]; + extern unsigned char *RDS_STATIC_LAYER; + extern unsigned char RDS_MAX_LAYER; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------------*/ + + extern char * rdsalloc __P((unsigned long Size, char Heap)); + extern rdsfig_list * allocrdsfig __P(()); + extern rdsins_list * allocrdsins __P(()); + extern rdsrec_list * allocrdsrec __P((unsigned long Size)); + extern rdsdebug_list * allocrdsdebug __P(()); + +/*------------------------------------------------------------\ +| | +| Free Functions | +| | +\------------------------------------------------------------*/ + + extern void rdsfree __P((char *Pointer, unsigned int Size)); + extern void freerdsfig __P((rdsfig_list *Figure)); + extern void freerdsins __P((rdsins_list *Instance)); + extern void freerdsrec __P((rdsrec_list *Rectangle, unsigned int Size)); + extern void freerdsdebug __P((rdsdebug_list *Debug)); + +/*------------------------------------------------------------\ +| | +| Add Functions | +| | +\------------------------------------------------------------*/ + + extern rdsrec_list * addrdsfigrec __P((rdsfig_list *Figure, char *Name, char Layer, long X, long Y, long Dx, long Dy)); + extern rdsrec_list * addrdsinsrec __P((rdsins_list *Instance, char *Name, char Layer, long X, long Y, long Dx, long Dy)); + extern rdsins_list * addrdsins __P((rdsfig_list *Figure, char *Model, char *Name, char Sym, long X, long Y)); + extern rdsfig_list * addrdsfig __P((char *Name, unsigned short Size)); + extern void addrdsdebug __P((int Line, char *File)); + +/*------------------------------------------------------------\ +| | +| Del Functions | +| | +\------------------------------------------------------------*/ + + extern int delrdsfigrec __P((rdsfig_list *Figure, rdsrec_list *Rectangle)); + extern int delrdsinsrec __P((rdsins_list *Instance, rdsrec_list *Rectangle)); + extern int delrdsins __P((rdsfig_list *Figure, char *Name)); + extern int delrdsfig __P((char *Name)); + extern void delrdsdebug __P(()); + +/*------------------------------------------------------------\ +| | +| View Functions | +| | +\------------------------------------------------------------*/ + + extern void viewrdsrec __P((rdsrec_list *Rectangle)); + extern void viewrdsins __P((rdsins_list *Instance)); + extern void viewrdsfig __P((rdsfig_list *Figure)); + +/*------------------------------------------------------------\ +| | +| Debug Functions | +| | +\------------------------------------------------------------*/ + + extern void rdsdebug __P(()); + +# endif diff --git a/alliance/src/rds/src/rdsadd.c b/alliance/src/rds/src/rdsadd.c new file mode 100644 index 00000000..e0133412 --- /dev/null +++ b/alliance/src/rds/src/rdsadd.c @@ -0,0 +1,178 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsadd.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include "rds.h" + +# include "rdsadd.h" +# include "rdserror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Add Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Add Figure | +| | +\------------------------------------------------------------*/ + +rdsfig_list *addrdsfig( Name, Size ) + + char *Name; + unsigned short Size; +{ + rdsfig_list *Figure; + + Figure = allocrdsfig(); + + Figure->NAME = namealloc( Name ); + Figure->SIZE = Size; + Figure->MODE = 'A'; + Figure->NEXT = HEAD_RDSFIG; + + HEAD_RDSFIG = Figure; + + return( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Rds Add Instance | +| | +\------------------------------------------------------------*/ + +rdsins_list *addrdsins( Figure, Model, Name, Sym, X, Y ) + + rdsfig_list *Figure; + char *Model; + char *Name; + char Sym; + long X; + long Y; +{ + rdsins_list *Instance; + + Instance = allocrdsins(); + + Instance->FIGNAME = namealloc( Model ); + Instance->INSNAME = namealloc( Name ); + Instance->X = X; + Instance->Y = Y; + Instance->TRANSF = Sym; + Instance->SIZE = Figure->SIZE; + Instance->NEXT = Figure->INSTANCE; + + Figure->INSTANCE = Instance; + + return( Instance ); +} + +/*------------------------------------------------------------\ +| | +| Rds Add Rectangle in Instance | +| | +\------------------------------------------------------------*/ + +rdsrec_list *addrdsinsrec( Instance, Name, Layer, X, Y, Dx, Dy ) + + rdsins_list *Instance; + char *Name; + char Layer; + long X; + long Y; + long Dx; + long Dy; +{ + rdsrec_list *Rectangle; + + Rectangle = allocrdsrec( Instance->SIZE ); + + Rectangle->NAME = namealloc( Name ); + Rectangle->X = X; + Rectangle->Y = Y; + Rectangle->DX = Dx; + Rectangle->DY = Dy; + Rectangle->FLAGS = (unsigned char)(Layer); + Rectangle->NEXT = Instance->LAYERTAB[ (unsigned int)Layer ]; + + Instance->LAYERTAB[ (unsigned int)Layer ] = Rectangle; + + ClearRdsFigRec( Rectangle ); + + return( Rectangle ); +} + +/*------------------------------------------------------------\ +| | +| Rds Add Rectangle in Figure | +| | +\------------------------------------------------------------*/ + +rdsrec_list *addrdsfigrec( Figure, Name, Layer, X, Y, Dx, Dy ) + + rdsfig_list *Figure; + char *Name; + char Layer; + long X; + long Y; + long Dx; + long Dy; +{ + rdsrec_list *Rectangle; + + Rectangle = allocrdsrec( Figure->SIZE ); + + Rectangle->NAME = namealloc( Name ); + Rectangle->X = X; + Rectangle->Y = Y; + Rectangle->DX = Dx; + Rectangle->DY = Dy; + Rectangle->FLAGS = (unsigned char)(Layer); + Rectangle->NEXT = Figure->LAYERTAB[ (unsigned int)Layer ]; + + Figure->LAYERTAB[ (unsigned int)Layer ] = Rectangle; + + SetRdsFigRec( Rectangle ); + + return( Rectangle ); +} + diff --git a/alliance/src/rds/src/rdsadd.h b/alliance/src/rds/src/rdsadd.h new file mode 100644 index 00000000..d93742d1 --- /dev/null +++ b/alliance/src/rds/src/rdsadd.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsadd.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_ADD_H +# define RDS_ADD_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rdsalloc.c b/alliance/src/rds/src/rdsalloc.c new file mode 100644 index 00000000..80a3bca0 --- /dev/null +++ b/alliance/src/rds/src/rdsalloc.c @@ -0,0 +1,386 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsalloc.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include +# include + +# include +# include "rds.h" + +# include "rdsalloc.h" +# include "rdserror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Head List | +| | +\------------------------------------------------------------*/ + + rdsfig_list *HEAD_RDSFIG = (rdsfig_list *)NULL; + +/*------------------------------------------------------------\ +| | +| Name | +| | +\------------------------------------------------------------*/ + + char *RDS_ALL_LAYER_NAME[ RDS_ALL_LAYER ] = + + { + "RDS_NWELL", + "RDS_PWELL", + "RDS_NIMP ", + "RDS_PIMP ", + "RDS_ACTIV", + "RDS_NDIF ", + "RDS_PDIF ", + "RDS_NTIE ", + "RDS_PTIE ", + "RDS_POLY ", + "RDS_GATE ", + "RDS_VPOLY", + "RDS_TPOLY", + "RDS_POLY2", + "RDS_CONT ", + "RDS_TPOLY2", + "RDS_TCONT", + "RDS_CONT2", + "RDS_ALU1 ", + "RDS_VALU1", + "RDS_TALU1", + "RDS_VIA1 ", + "RDS_TVIA1", + "RDS_ALU2 ", + "RDS_VALU2", + "RDS_TALU2", + "RDS_VIA2 ", + "RDS_TVIA2", + "RDS_ALU3 ", + "RDS_VALU3", + "RDS_TALU3", + "RDS_VIA3 ", + "RDS_TVIA3", + "RDS_ALU4 ", + "RDS_VALU4", + "RDS_TALU4", + "RDS_VIA4 ", + "RDS_TVIA4", + "RDS_ALU5 ", + "RDS_VALU5", + "RDS_TALU5", + "RDS_VIA5 ", + "RDS_TVIA5", + "RDS_ALU6 ", + "RDS_VALU6", + "RDS_TALU6", + "RDS_VIA6 ", + "RDS_TVIA6", + "RDS_ALU7 ", + "RDS_VALU7", + "RDS_TALU7", + "RDS_VIA7 ", + "RDS_TVIA7", + "RDS_ALU8 ", + "RDS_VALU8", + "RDS_TALU8", + "RDS_VIA8 ", + "RDS_TVIA8", + "RDS_ALU9 ", + "RDS_CPAS ", + "RDS_REF ", + "RDS_USER0", + "RDS_USER1", + "RDS_USER2", + "RDS_USER3", + "RDS_USER4", + "RDS_USER5", + "RDS_USER6", + "RDS_USER7", + "RDS_USER8", + "RDS_USER9", + "RDS_ABOX" + }; + + char *RDS_TRANSF_NAME [ RDS_MAX_TRANSF ] = + + { + "NOSYM", + "ROT_P", + "SYMXY", + "ROT_M", + "SYM_X", + "SY_RM", + "SYM_Y", + "SY_RP" + }; + + char **RDS_LAYER_NAME = RDS_ALL_LAYER_NAME; + +/*------------------------------------------------------------\ +| | +| Dynamic Layers | +| | +\------------------------------------------------------------*/ + + unsigned char RDS_DYNAMIC_LAYER[ RDS_ALL_LAYER ] = + + { + RDS_LAYER_NWELL, + RDS_LAYER_PWELL, + RDS_LAYER_NIMP , + RDS_LAYER_PIMP , + RDS_LAYER_ACTIV, + RDS_LAYER_NDIF , + RDS_LAYER_PDIF , + RDS_LAYER_NTIE , + RDS_LAYER_PTIE , + RDS_LAYER_POLY , + RDS_LAYER_GATE , + RDS_LAYER_VPOLY, + RDS_LAYER_TPOLY, + RDS_LAYER_POLY2, + RDS_LAYER_CONT , + RDS_LAYER_TPOLY2, + RDS_LAYER_TCONT, + RDS_LAYER_CONT2, + RDS_LAYER_ALU1 , + RDS_LAYER_VALU1, + RDS_LAYER_TALU1, + RDS_LAYER_VIA1 , + RDS_LAYER_TVIA1, + RDS_LAYER_ALU2 , + RDS_LAYER_VALU2, + RDS_LAYER_TALU2, + RDS_LAYER_VIA2 , + RDS_LAYER_TVIA2, + RDS_LAYER_ALU3 , + RDS_LAYER_VALU3, + RDS_LAYER_TALU3, + RDS_LAYER_VIA3 , + RDS_LAYER_TVIA3, + RDS_LAYER_ALU4 , + RDS_LAYER_VALU4, + RDS_LAYER_TALU4, + RDS_LAYER_VIA4 , + RDS_LAYER_TVIA4, + RDS_LAYER_ALU5 , + RDS_LAYER_VALU5, + RDS_LAYER_TALU5, + RDS_LAYER_VIA5 , + RDS_LAYER_TVIA5, + RDS_LAYER_ALU6 , + RDS_LAYER_VALU6, + RDS_LAYER_TALU6, + RDS_LAYER_VIA6 , + RDS_LAYER_TVIA6, + RDS_LAYER_ALU7 , + RDS_LAYER_VALU7, + RDS_LAYER_TALU7, + RDS_LAYER_VIA7 , + RDS_LAYER_TVIA7, + RDS_LAYER_ALU8 , + RDS_LAYER_VALU8, + RDS_LAYER_TALU8, + RDS_LAYER_VIA8 , + RDS_LAYER_TVIA8, + RDS_LAYER_ALU9 , + RDS_LAYER_CPAS , + RDS_LAYER_REF , + RDS_LAYER_USER0, + RDS_LAYER_USER1, + RDS_LAYER_USER2, + RDS_LAYER_USER3, + RDS_LAYER_USER4, + RDS_LAYER_USER5, + RDS_LAYER_USER6, + RDS_LAYER_USER7, + RDS_LAYER_USER8, + RDS_LAYER_USER9, + RDS_LAYER_ABOX + }; + + unsigned char *RDS_STATIC_LAYER = RDS_DYNAMIC_LAYER; + unsigned char RDS_MAX_LAYER = RDS_ALL_LAYER; + +/*------------------------------------------------------------\ +| | +| Alloc Heap | +| | +\------------------------------------------------------------*/ + + char *RdsHeapHeadArray[ 256 ]; + static char InitRdsHeapHeadArray = 1; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Alloc | +| | +\------------------------------------------------------------*/ + +char *rdsalloc( Size, Heap ) + + unsigned long Size; + char Heap; +{ + long Counter; + unsigned long Index; + char *Pointer; + char **Prev; + char *Scan; + + if ( InitRdsHeapHeadArray == 1 ) + { + InitRdsHeapHeadArray = 0; + + for ( Counter = 0; Counter < 256 ; Counter++ ) + { + RdsHeapHeadArray[ Counter ] = (char *)NULL; + } + } + + Index = ( Size + 3 ) >> 2; + + if ( ( Heap == RDS_ALLOC_BLOCK ) || + ( Index > 255 ) ) + { + if ( !( Pointer = malloc( Size ) ) ) + { + rdserror( RDS_ALLOC_ERROR, (char *)NULL ); + } + + bzero( Pointer, Size ); + + return( Pointer ); + } + + Size = Index << 2; + + if ( RdsHeapHeadArray[ Index ] == (char *)NULL ) + { + if ( !( Pointer = malloc( Size << RDS_ALLOC_SHIFT ) ) ) + { + rdserror( RDS_ALLOC_ERROR, (char *)NULL ); + } + + Scan = (char *)(Pointer + Size); + + Prev = &RdsHeapHeadArray[ Index ]; + + for ( Counter = 1; Counter < RDS_ALLOC_SIZE; Counter++ ) + { + *Prev = Scan; Prev = (char **)Scan; Scan = (char *)(Scan + Size); + } + + *Prev = (char *)NULL; + + RdsHeapHeadArray[ Index ] = (char *)(Pointer + Size); + + bzero( Pointer, Size ); + + return( Pointer ); + } + + Pointer = RdsHeapHeadArray[ Index ]; + + RdsHeapHeadArray[ Index ] = *((char **)RdsHeapHeadArray[ Index ]); + + bzero( Pointer, Size ); + + return( Pointer ); +} + +/*------------------------------------------------------------\ +| | +| Rds Alloc Figure | +| | +\------------------------------------------------------------*/ + +rdsfig_list *allocrdsfig() +{ + rdsfig_list *Figure; + void *Pointer; + + Figure = (rdsfig_list *)rdsallocblock( sizeof( rdsfig_list) ); + Pointer = (void *)rdsallocblock( sizeof(rdsrec_list *) * RDS_MAX_LAYER ); + Figure->LAYERTAB = (rdsrec_list **)Pointer; + Pointer = (void *)rdsallocblock( sizeof(rdsrec_list *) * RDS_MAX_LAYER ); + Figure->BBOXTAB = (rdsrec_list **)Pointer; + Pointer = (void *)rdsallocblock( sizeof( char ) * RDS_MAX_LAYER ); + Figure->FLAGTAB = (char *)Pointer; + + return( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Rds Alloc Instance | +| | +\------------------------------------------------------------*/ + +rdsins_list *allocrdsins() +{ + rdsins_list *Instance; + void *Pointer; + + Instance = (rdsins_list *)rdsallocblock( sizeof( rdsins_list ) ); + Pointer = (void *)rdsallocblock( sizeof(rdsrec_list *) * RDS_MAX_LAYER ); + Instance->LAYERTAB = (rdsrec_list **)Pointer; + Pointer = (void *)rdsallocblock( sizeof(rdsrec_list *) * RDS_MAX_LAYER ); + Instance->COURONNE = (rdsrec_list **)Pointer; + + return( Instance ); +} + +/*------------------------------------------------------------\ +| | +| Rds Alloc Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *allocrdsrec( Size ) + + unsigned long Size; +{ + return( (rdsrec_list *)( rdsallocheap( sizeof( rdsrec_list ) + Size ) ) ); +} diff --git a/alliance/src/rds/src/rdsalloc.h b/alliance/src/rds/src/rdsalloc.h new file mode 100644 index 00000000..37d9a74a --- /dev/null +++ b/alliance/src/rds/src/rdsalloc.h @@ -0,0 +1,59 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsalloc.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_ALLOC_H +# define RDS_ALLOC_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RDS_ALLOC_SIZE 512 +# define RDS_ALLOC_SHIFT 9 + +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ + +# define bzero(b,len) memset((b), 0, (size_t)(len)) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + extern char *RdsHeapHeadArray[ 256 ]; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rdsdebug.c b/alliance/src/rds/src/rdsdebug.c new file mode 100644 index 00000000..e63fdbbf --- /dev/null +++ b/alliance/src/rds/src/rdsdebug.c @@ -0,0 +1,158 @@ +/*------------------------------------------------------------\ +| | +| Tool : Rds | +| | +| File : rdsadebug.c | +| | +| Date : 25.10.94 | +| | +| Author : Jacomme Ludovic | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include "rds.h" + +# include "rdsdebug.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + rdsdebug_list *HEAD_RDSDEBUG = (rdsdebug_list *)NULL; + char RDS_DEBUG_ON = 0; + +/*------------------------------------------------------------\ +| | +| Privates | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Alloc Debug | +| | +\------------------------------------------------------------*/ + +rdsdebug_list *allocrdsdebug() +{ + return( (rdsdebug_list *)(rdsallocheap( sizeof( rdsdebug_list ) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Rds Free Debug | +| | +\------------------------------------------------------------*/ + +void freerdsdebug( Debug ) + + rdsdebug_list *Debug; +{ + rdsfreeheap( (char *)Debug, sizeof( rdsdebug_list ) ); +} + +/*------------------------------------------------------------\ +| | +| traprdsdebug | +| | +\------------------------------------------------------------*/ + +void traprdsdebug() +{ + rdsdebug_list *ScanDebug; + + for ( ScanDebug = HEAD_RDSDEBUG; + ScanDebug != (rdsdebug_list *)NULL; + ScanDebug = ScanDebug->NEXT ) + { + fprintf( stdout, "rdsdebug: file %s line %d\n", + ScanDebug->NAME, ScanDebug->LINE ); + } + + fflush( stdout ); + + signal( SIGQUIT, traprdsdebug ); + signal( SIGSEGV, SIG_DFL ); + signal( SIGBUS , SIG_DFL ); + signal( SIGILL , SIG_DFL ); +} + +/*------------------------------------------------------------\ +| | +| rdsdebug | +| | +\------------------------------------------------------------*/ + +void rdsdebug() +{ + signal( SIGSEGV, traprdsdebug ); + signal( SIGBUS, traprdsdebug ); + signal( SIGILL, traprdsdebug ); + signal( SIGQUIT, traprdsdebug ); + + RDS_DEBUG_ON = 1; +} + +/*------------------------------------------------------------\ +| | +| addrdsdebug | +| | +\------------------------------------------------------------*/ + +void addrdsdebug( Line, File ) + + int Line; + char *File; +{ + rdsdebug_list *NewDebug; + + NewDebug = allocrdsdebug(); + NewDebug->NEXT = HEAD_RDSDEBUG; + NewDebug->LINE = Line; + NewDebug->NAME = File; + HEAD_RDSDEBUG = NewDebug; +} + +/*------------------------------------------------------------\ +| | +| delrdsdebug | +| | +\------------------------------------------------------------*/ + +void delrdsdebug() +{ + rdsdebug_list *DelDebug; + + DelDebug = HEAD_RDSDEBUG; + + if ( DelDebug != (rdsdebug_list *)NULL ) + { + HEAD_RDSDEBUG = DelDebug->NEXT; + freerdsdebug( DelDebug ); + } +} diff --git a/alliance/src/rds/src/rdsdebug.h b/alliance/src/rds/src/rdsdebug.h new file mode 100644 index 00000000..6608f326 --- /dev/null +++ b/alliance/src/rds/src/rdsdebug.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : Rds | +| | +| File : rdsdebug.h | +| | +| Date : 27.06.95 | +| | +| Author : Jacomme Ludovic | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_DEBUG_H +# define RDS_DEBUG_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rdsdel.c b/alliance/src/rds/src/rdsdel.c new file mode 100644 index 00000000..3a1d46b7 --- /dev/null +++ b/alliance/src/rds/src/rdsdel.c @@ -0,0 +1,256 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsdel.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include "rds.h" + +# include "rdsdel.h" +# include "rdserror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Del Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Del Figure | +| | +\------------------------------------------------------------*/ + +int delrdsfig( Name ) + + char *Name; +{ + rdsfig_list *Figure; + rdsfig_list **Previous; + rdsins_list *Instance; + rdsrec_list *Rectangle; + void *Save; + int Layer; + + Name = namealloc( Name ); + Previous = &HEAD_RDSFIG; + + for ( Figure = HEAD_RDSFIG; + Figure != (rdsfig_list *)NULL; + Figure = Figure->NEXT ) + { + if ( Figure->NAME == Name ) break; + + Previous = &Figure->NEXT; + } + + if ( Figure == (rdsfig_list *)NULL ) + + return( 0 ); + + *Previous = Figure->NEXT; + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + Rectangle = Figure->LAYERTAB[ Layer ]; + + while ( Rectangle != (rdsrec_list *)NULL ) + { + Save = (void *)(Rectangle->NEXT); + + freerdsrec( Rectangle, Figure->SIZE ); + + Rectangle = (rdsrec_list *)Save; + } + } + + Instance = Figure->INSTANCE; + + while ( Instance != (rdsins_list *)NULL ) + { + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + Rectangle = Instance->LAYERTAB[ Layer ]; + + while ( Rectangle != (rdsrec_list *)NULL ) + { + Save = (void *)(Rectangle->NEXT); + + freerdsrec( Rectangle, Figure->SIZE ); + + Rectangle = (rdsrec_list *)Save; + } + } + + Save = (void *)(Instance->NEXT); + + freerdsins( Instance ); + + Instance = (rdsins_list *)Save; + } + + freerdsfig( Figure ); + + return( 1 ); +} + +/*------------------------------------------------------------\ +| | +| Rds Del Instance | +| | +\------------------------------------------------------------*/ + +int delrdsins( Figure, Name ) + + rdsfig_list *Figure; + char *Name; +{ + rdsins_list **Previous; + rdsins_list *Instance; + rdsrec_list *Rectangle; + void *Save; + int Layer; + + Name = namealloc( Name ); + Previous = &Figure->INSTANCE; + + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + if ( Instance->INSNAME == Name ) break; + + Previous = &Instance->NEXT; + } + + if ( Instance == (rdsins_list *)NULL ) + + return( 0 ); + + *Previous = Instance->NEXT; + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + Rectangle = Instance->LAYERTAB[ Layer ]; + + while ( Rectangle != (rdsrec_list *)NULL ) + { + Save = (void *)(Rectangle->NEXT); + + freerdsrec( Rectangle, Figure->SIZE ); + + Rectangle = (rdsrec_list *)Save; + } + } + + freerdsins( Instance ); + + return( 1 ); +} + +/*------------------------------------------------------------\ +| | +| Rds Del Rectangle In Instance | +| | +\------------------------------------------------------------*/ + +int delrdsinsrec( Instance, Rectangle ) + + rdsins_list *Instance; + rdsrec_list *Rectangle; +{ + rdsrec_list **Previous; + rdsrec_list *Scan; + + Previous = &Instance->LAYERTAB[ GetRdsLayer( Rectangle ) ]; + + for ( Scan = Instance->LAYERTAB[ GetRdsLayer( Rectangle ) ]; + Scan != (rdsrec_list *)NULL; + Scan = Scan->NEXT ) + { + if ( Scan == Rectangle ) break; + + Previous = &Scan->NEXT; + } + + if ( Scan == (rdsrec_list *)NULL ) + + return( 0 ); + + *Previous = Rectangle->NEXT; + + freerdsrec( Rectangle, Instance->SIZE ); + + return( 1 ); +} + +/*------------------------------------------------------------\ +| | +| Rds Del Rectangle In Figure | +| | +\------------------------------------------------------------*/ + +int delrdsfigrec( Figure, Rectangle ) + + rdsfig_list *Figure; + rdsrec_list *Rectangle; +{ + rdsrec_list **Previous; + rdsrec_list *Scan; + + Previous = &Figure->LAYERTAB[ GetRdsLayer( Rectangle ) ]; + + for ( Scan = Figure->LAYERTAB[ GetRdsLayer( Rectangle ) ]; + Scan != (rdsrec_list *)NULL; + Scan = Scan->NEXT ) + { + if ( Scan == Rectangle ) break; + + Previous = &Scan->NEXT; + } + + if ( Scan == (rdsrec_list *)NULL ) + + return( 0 ); + + *Previous = Rectangle->NEXT; + + freerdsrec( Rectangle, Figure->SIZE ); + + return( 1 ); +} + diff --git a/alliance/src/rds/src/rdsdel.h b/alliance/src/rds/src/rdsdel.h new file mode 100644 index 00000000..c2272b2d --- /dev/null +++ b/alliance/src/rds/src/rdsdel.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsdel.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_DEL_H +# define RDS_DEL_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rdserror.c b/alliance/src/rds/src/rdserror.c new file mode 100644 index 00000000..41384f91 --- /dev/null +++ b/alliance/src/rds/src/rdserror.c @@ -0,0 +1,75 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdserror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include "rds.h" + +# include "rdserror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void rds_error( Error, Text, File, Line ) + + char Error; + char *Text; + char *File; + long Line; +{ + char Name[ 128 ]; + + strcpy( Name, File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "rds:%s%ld ", Name, Line ); + + switch( Error ) + { + case RDS_ALLOC_ERROR : + + fprintf( stderr, "alloc error, can't continue !\n"); + + break; + + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + EXIT( 1 ); +} diff --git a/alliance/src/rds/src/rdserror.h b/alliance/src/rds/src/rdserror.h new file mode 100644 index 00000000..84ff1f2f --- /dev/null +++ b/alliance/src/rds/src/rdserror.h @@ -0,0 +1,57 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdserror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_ERROR_H +# define RDS_ERROR_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RDS_ALLOC_ERROR 0 + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define rdserror( E, V ) (rds_error( (E), (V), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rds_error __P((char Error, char *Text, char *File, long Line)); + +# endif diff --git a/alliance/src/rds/src/rdsfree.c b/alliance/src/rds/src/rdsfree.c new file mode 100644 index 00000000..4b448dc7 --- /dev/null +++ b/alliance/src/rds/src/rdsfree.c @@ -0,0 +1,122 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsfree.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include +# include + + +# include +# include "rds.h" + +# include "rdsalloc.h" +# include "rdsfree.h" +# include "rdserror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Free | +| | +\------------------------------------------------------------*/ + +void rdsfree( Pointer, Size ) + + char *Pointer; + unsigned int Size; +{ + unsigned int Index; + + Index = ( Size + 3 ) >> 2; + + if ( ( Size == 0 ) || + ( Index > 255 ) ) + { + free( Pointer ); + } + else + { + *((char **)Pointer) = RdsHeapHeadArray[ Index ]; + + RdsHeapHeadArray[ Index ] = Pointer; + } +} + +/*------------------------------------------------------------\ +| | +| Rds Free Figure | +| | +\------------------------------------------------------------*/ + +void freerdsfig( Figure ) + + rdsfig_list *Figure; +{ + rdsfreeblock( (char *)Figure->LAYERTAB ); + rdsfreeblock( (char *)Figure->FLAGTAB ); + rdsfreeblock( (char *)Figure->BBOXTAB ); + rdsfreeblock( (char *)Figure ); +} + +/*------------------------------------------------------------\ +| | +| Rds Free Instance | +| | +\------------------------------------------------------------*/ + +void freerdsins( Instance ) + + rdsins_list *Instance; +{ + rdsfreeblock( (char *)Instance->LAYERTAB ); + rdsfreeblock( (char *)Instance->COURONNE ); + rdsfreeblock( (char *)Instance ); +} + +/*------------------------------------------------------------\ +| | +| Rds Free Rectangle | +| | +\------------------------------------------------------------*/ + +void freerdsrec( Rectangle, Size ) + + rdsrec_list *Rectangle; + unsigned int Size; +{ + rdsfreeheap( (char *)Rectangle, sizeof( rdsrec_list ) + Size); +} diff --git a/alliance/src/rds/src/rdsfree.h b/alliance/src/rds/src/rdsfree.h new file mode 100644 index 00000000..041181ba --- /dev/null +++ b/alliance/src/rds/src/rdsfree.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsfree.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_FREE_H +# define RDS_FREE_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rdsview.c b/alliance/src/rds/src/rdsview.c new file mode 100644 index 00000000..499cffbb --- /dev/null +++ b/alliance/src/rds/src/rdsview.c @@ -0,0 +1,160 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsview.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include +# include "rds.h" + +# include "rdsview.h" +# include "rdserror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| View Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| View Rds Rectangle | +| | +\------------------------------------------------------------*/ + +void viewrdsrec( Rectangle ) + + rdsrec_list *Rectangle; +{ + char *LayerName; + + LayerName = RDS_LAYER_NAME[ GetRdsLayer( Rectangle ) ]; + + fprintf( stdout, "\n\t--> Rectangle" ); + + if ( Rectangle->NAME != (char *)NULL ) + { + fprintf( stdout, "\n\t\tNAME : %s" , Rectangle->NAME ); + } + else + { + fprintf( stdout, "\n\t\tNAME : NO NAME" ); + } + + fprintf( stdout, "\n\t\tX : %ld" , Rectangle->X ); + fprintf( stdout, "\n\t\tY : %ld" , Rectangle->Y ); + fprintf( stdout, "\n\t\tDX : %ld" , Rectangle->DX ); + fprintf( stdout, "\n\t\tDY : %ld" , Rectangle->DY ); + fprintf( stdout, "\n\t\tFLAGS : %0lX", Rectangle->FLAGS ); + fprintf( stdout, "\n\t\tLAYER : %s" , LayerName ); +} + +/*------------------------------------------------------------\ +| | +| View Rds Instance | +| | +\------------------------------------------------------------*/ + +void viewrdsins( Instance ) + + rdsins_list *Instance; +{ + int Layer; + rdsrec_list *Rectangle; + char *TransfName; + + TransfName = RDS_TRANSF_NAME[ (int)Instance->TRANSF ]; + + fprintf( stdout, "\n--> Instance" ); + + fprintf( stdout, "\n\tINSNAME : %s" , Instance->INSNAME ); + fprintf( stdout, "\n\tFIGNAME : %s" , Instance->FIGNAME ); + fprintf( stdout, "\n\tX : %ld", Instance->X ); + fprintf( stdout, "\n\tY : %ld", Instance->Y ); + fprintf( stdout, "\n\tTRANSF : %s" , TransfName ); + fprintf( stdout, "\n\tSIZE : %d" , Instance->SIZE ); + fprintf( stdout, "\n\tFLAGS : %x" , Instance->FLAGS ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Instance->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + viewrdsrec( Rectangle ); + } + } +} + +/*------------------------------------------------------------\ +| | +| View Rds Figure | +| | +\------------------------------------------------------------*/ + +void viewrdsfig( Figure ) + + rdsfig_list *Figure; +{ + int Layer; + rdsins_list *Instance; + rdsrec_list *Rectangle; + + fprintf( stdout, "\n--> Figure" ); + + fprintf( stdout, "\n\tNAME : %s", Figure->NAME ); + fprintf( stdout, "\n\tMODE : %c", Figure->MODE ); + fprintf( stdout, "\n\tSIZE : %d", Figure->SIZE ); + fprintf( stdout, "\n\tFLAGS : %x", Figure->FLAGS ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Figure->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + viewrdsrec( Rectangle ); + } + } + + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + viewrdsins( Instance ); + } +} diff --git a/alliance/src/rds/src/rdsview.h b/alliance/src/rds/src/rdsview.h new file mode 100644 index 00000000..3eb7e567 --- /dev/null +++ b/alliance/src/rds/src/rdsview.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rdsview.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RDS_VIEW_H +# define RDS_VIEW_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rfm.h b/alliance/src/rds/src/rfm.h new file mode 100644 index 00000000..e6d17a08 --- /dev/null +++ b/alliance/src/rds/src/rfm.h @@ -0,0 +1,93 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : Rfm 212 | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 01.08.93 | +| | +\------------------------------------------------------------*/ + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# ifndef RFM_212 +# define RFM_212 + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Special Macros | +| | +\------------------------------------------------------------*/ + +# define RfmRoundHigh(X) \ + \ + (((X)>=0) ? ((((X) + ( RDS_PHYSICAL_GRID >> 1 )) \ + / RDS_PHYSICAL_GRID ) * \ + RDS_PHYSICAL_GRID ) \ + : (((X) / RDS_PHYSICAL_GRID ) * \ + RDS_PHYSICAL_GRID ) ) + +# define RfmRoundLow(X) \ + \ + (((X)>=0) ? (((X) / RDS_PHYSICAL_GRID ) * \ + RDS_PHYSICAL_GRID ) \ + : ((((X) - ( RDS_PHYSICAL_GRID >> 1 )) \ + / RDS_PHYSICAL_GRID ) * \ + RDS_PHYSICAL_GRID ) ) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern rdsrec_list * segmbkrds __P((rdsfig_list *Figure, phseg_list *Segment, char Lynx)); + extern rdsrec_list * viambkrds __P((rdsfig_list *Figure, phvia_list *Via, char Lynx)); + extern rdsrec_list * refmbkrds __P((rdsfig_list *Figure, phref_list *Reference)); + extern rdsrec_list * conmbkrds __P((rdsfig_list *Figure, phcon_list *Connector)); + extern rdsrec_list * aboxmbkrds __P((phfig_list *FigureMbk, rdsfig_list *FigureRds)); + + extern rdsrec_list * insconmbkrds __P((phins_list *InstanceMbk, phfig_list *ModelMbk, rdsins_list *InstanceRds)); + extern rdsrec_list * insviambkrds __P((phins_list *InstanceMbk, phfig_list *ModelMbk, rdsins_list *InstanceRds, char Lynx)); + extern rdsrec_list * insrefmbkrds __P((phins_list *InstanceMbk, phfig_list *ModelMbk, rdsins_list *InstanceRds)); + extern rdsrec_list * inssegmbkrds __P((phins_list *InstanceMbk, phfig_list *ModelMbk, rdsins_list *InstanceRds, char Lynx)); + + extern rdsins_list * insmbkrds __P((rdsfig_list *FigureRds, phins_list *InstanceMbk, char Mode, char Lynx)); + extern rdsfig_list * figmbkrds __P((phfig_list *FigureMbk, unsigned int Size, char Lynx)); + extern rdsfig_list * modelmbkrds __P((rdsfig_list *Figure, char Lynx)); + + extern void viewrfmrec __P((rdsrec_list *Rectangle)); + extern void viewrfmseg __P((phseg_list *Segment, rdsrec_list *Rectangle)); + extern void viewrfmvia __P((phvia_list *Via, rdsrec_list *Rectangle)); + extern void viewrfmref __P((phref_list *Reference, rdsrec_list *Rectangle)); + extern void viewrfmcon __P((phcon_list *Connector, rdsrec_list *Rectangle)); + extern void viewrfmins __P((phins_list *InstanceMbk, rdsins_list *InstanceRds)); + extern void viewrfmfig __P((phfig_list *FigureMbk, rdsfig_list *FigureRds)); + + extern void roundrdsrec __P((rdsrec_list *Rectangle)); + +# endif diff --git a/alliance/src/rds/src/rfmacces.c b/alliance/src/rds/src/rfmacces.c new file mode 100644 index 00000000..a9c1749f --- /dev/null +++ b/alliance/src/rds/src/rfmacces.c @@ -0,0 +1,1953 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : Rfmacces.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rfm.h" +# include "rwi.h" +# include "rut.h" + +# include "rfmacces.h" +# include "rfmerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + static char *RfmRefRef = (char *)NULL; + + static char RfmNewConnectorOrient[ RDS_MAX_TRANSF ] = + + { + 1, /* NOSYM */ + 0, /* ROT_P */ + 1, /* SYMXY */ + 0, /* ROT_M */ + 1, /* SYM_X */ + 0, /* SY_RM */ + 1, /* SYM_Y */ + 0 /* SY_RP */ + }; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| MBK Segment To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *segmbkrds( Figure, Segment, Lynx ) + + rdsfig_list *Figure; + phseg_list *Segment; + char Lynx; +{ + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long X1; + long Y1; + long X2; + long Y2; + long WS; + + long X1R; + long Y1R; + long X2R; + long Y2R; + + char TRANS; + long DLR; + long DWR; + long OFFSET; + char USE; + + int LayerMbk; + int LayerRds; + int SegConMbk; + int GateRds; + int Index; + + Rectangle = (rdsrec_list *)NULL; + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + + X1 = Segment->X1 * RDS_LAMBDA / SCALE_X; + X2 = Segment->X2 * RDS_LAMBDA / SCALE_X; + Y1 = Segment->Y1 * RDS_LAMBDA / SCALE_X; + Y2 = Segment->Y2 * RDS_LAMBDA / SCALE_X; + WS = Segment->WIDTH * RDS_LAMBDA / SCALE_X; + + X1R = Y1R = X2R = Y2R = 0; + + LayerMbk = Segment->LAYER; + Index = 0; + + if ( ( LayerMbk >= CALU1 ) && + ( LayerMbk <= CALU9 ) ) SegConMbk = 1; + else SegConMbk = 0; + + GateRds = GET_LYNX_TRANSISTOR_GATE_LAYER( LayerMbk ); + LayerRds = GET_SEGMENT_LAYER( LayerMbk, Index ); + + while ( LayerRds != RDS_SEGMENT_EMPTY ) + { + TRANS = GET_SEGMENT_TRANS ( LayerMbk, Index ); + DLR = GET_SEGMENT_DLR ( LayerMbk, Index ); + DWR = GET_SEGMENT_DWR ( LayerMbk, Index ); + OFFSET = GET_SEGMENT_OFFSET( LayerMbk, Index ); + USE = GET_SEGMENT_USE ( LayerMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + if ( TRANS == RDS_TRANS_VW ) + { + switch ( Segment->TYPE ) + { + case LEFT : X1R = X1 - DLR; + Y1R = Y1 - ( ( WS + DWR ) >> 1 ) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + ( ( WS + DWR ) >> 1 ) + OFFSET; + + break; + + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 - ( ( WS + DWR ) >> 1 ) - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + ( ( WS + DWR ) >> 1 ) - OFFSET; + + break; + + case DOWN : X1R = X1 - ( ( WS + DWR ) >> 1 ) - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + ( ( WS + DWR ) >> 1 ) - OFFSET; + Y2R = Y2 + DLR; + + break; + + case UP : X1R = X1 - ( ( WS + DWR ) >> 1 ) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + ( ( WS + DWR ) >> 1 ) + OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + else + if ( TRANS == RDS_TRANS_LCW ) + { + switch ( Segment->TYPE ) + { + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 + (WS >> 1) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + (WS >> 1) + DWR + OFFSET; + + break; + + case LEFT : X1R = X1 - DLR; + Y1R = Y1 - (WS >> 1) - DWR - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 - (WS >> 1) - OFFSET; + + break; + + case UP : X1R = X1 - (WS >> 1) - DWR - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 - (WS >> 1) - OFFSET; + Y2R = Y2 + DLR; + + break; + + case DOWN : X1R = X1 + (WS >> 1) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + (WS >> 1) + DWR + OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + else + if ( TRANS == RDS_TRANS_RCW ) + { + switch ( Segment->TYPE ) + { + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 - (WS >> 1) - DWR - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 - (WS >> 1) - OFFSET; + + break; + + case LEFT : X1R = X1 - DLR; + Y1R = Y1 + (WS >> 1) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + (WS >> 1) + DWR + OFFSET; + + break; + + case UP : X1R = X1 + (WS >> 1) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + (WS >> 1) + DWR + OFFSET; + Y2R = Y2 + DLR; + + break; + + case DOWN : X1R = X1 - (WS >> 1) - DWR - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 - (WS >> 1) - OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsfigrec( Figure, Segment->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsSegment( Rectangle ); + + if ( SegConMbk ) SetRdsConExter( Rectangle ); + + if ( LayerRds == GateRds ) + { + SetRdsTransGate( Rectangle ); + } + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_SEGMENT_LAYER( LayerMbk, Index ); + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Via To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *viambkrds( Figure, Via, Lynx ) + + rdsfig_list *Figure; + phvia_list *Via; + char Lynx; +{ + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long Xvia; + long Yvia; + long WSX; + long WSY; + + long X1R; + long Y1R; + long X2R; + long Y2R; + + long BX1R; + long BY1R; + long BX2R; + long BY2R; + + long VX1R; + long VY1R; + long VX2R; + long VY2R; + + long SIDE; + long SIZE; + long STEP; + long SIDE_STEP; + long DWR; + long OVERLAP; + long MIN_DWR; + long MAX_OVER; + char USE; + + int ViaMbk; + int LayerRds; + int Index; + + ViaMbk = Via->TYPE; + + Rectangle = (rdsrec_list *)NULL; + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + OVERLAP = 0; + DWR = 0; + + Xvia = Via->XVIA * RDS_LAMBDA / SCALE_X; + Yvia = Via->YVIA * RDS_LAMBDA / SCALE_X; + + if ( ( Via->DX != 0 ) || + ( Via->DY != 0 ) ) + { + WSX = Via->DX * RDS_LAMBDA / SCALE_X; + WSY = Via->DY * RDS_LAMBDA / SCALE_X; + + LayerRds = GET_BIGVIA_HOLE_LAYER( ViaMbk, 0 ); + + if ( LayerRds != RDS_BIGVIA_HOLE_EMPTY ) + { + X1R = Y1R = X2R = Y2R = 0; +/* +** Metal rectangles +*/ + Index = 0; + MIN_DWR = -1; + MAX_OVER = 0; + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_BIGVIA_METAL_EMPTY ) + { + DWR = GET_BIGVIA_METAL_DWR( ViaMbk, Index ); + OVERLAP = GET_BIGVIA_METAL_OVERLAP( ViaMbk, Index ); + USE = GET_BIGVIA_METAL_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + if ( ( MIN_DWR == -1 ) || + ( MIN_DWR > DWR ) ) MIN_DWR = DWR; + + if ( MAX_OVER < OVERLAP ) MAX_OVER = OVERLAP; + } + + Index = Index + 1; + + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + } + + if ( MIN_DWR < 0 ) MIN_DWR = 0; +/* +** Hole rectangles +*/ + Index = 0; + LayerRds = GET_BIGVIA_HOLE_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_BIGVIA_HOLE_EMPTY ) + { + SIDE = GET_BIGVIA_HOLE_SIDE( ViaMbk, Index ); + STEP = GET_BIGVIA_HOLE_STEP( ViaMbk, Index ); + USE = GET_BIGVIA_HOLE_USE( ViaMbk, Index ); + + SIDE_STEP = SIDE + STEP; + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + if ( SIDE_STEP == 0 ) break; + + X1R = Xvia + OVERLAP - ( ( WSX + DWR ) >> 1 ); + Y1R = Yvia + OVERLAP - ( ( WSY + DWR ) >> 1 ); + X2R = Xvia - OVERLAP + ( ( WSX + DWR ) >> 1 ); + Y2R = Yvia - OVERLAP + ( ( WSY + DWR ) >> 1 ); + + X1R = X1R + (SIDE >> 1); + Y1R = Y1R + (SIDE >> 1); + + X1R = RfmRoundLow ( X1R ); + X2R = RfmRoundHigh( X2R ); + Y1R = RfmRoundLow ( Y1R ); + Y2R = RfmRoundHigh( Y2R ); + + if ( X1R >= 0 ) X1R = ( (X1R + SIDE_STEP - 1) / SIDE_STEP ) * SIDE_STEP; + else X1R = ( X1R / SIDE_STEP ) * SIDE_STEP; + + if ( Y1R >= 0 ) Y1R = ( (Y1R + SIDE_STEP - 1) / SIDE_STEP ) * SIDE_STEP; + else Y1R = ( Y1R / SIDE_STEP ) * SIDE_STEP; + + BX1R = X1R; + + while ( BX1R <= X2R ) + { + BX1R = BX1R - (SIDE >> 1); + BX2R = BX1R + SIDE; + VX1R = RfmRoundLow ( BX1R ); + VX2R = RfmRoundHigh( BX2R ); + + if ( VX2R > X2R ) break; + + BY1R = Y1R; + + while ( BY1R <= Y2R ) + { + BY1R = BY1R - (SIDE >> 1); + BY2R = BY1R + SIDE; + VY1R = RfmRoundLow ( BY1R ); + VY2R = RfmRoundHigh( BY2R ); + + if ( VY2R > Y2R ) break; + + Rectangle = addrdsfigrec( Figure, (char *)0, + LayerRds, VX1R, VY1R, + VX2R - VX1R, VY2R - VY1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + + BY1R = BY2R + STEP + (SIDE >> 1); + } + + BX1R = BX2R + STEP + (SIDE >> 1); + } + } + + Index = Index + 1; + + LayerRds = GET_BIGVIA_HOLE_LAYER( ViaMbk, Index ); + } +/* +** Metal rectangles +*/ + if ( Rectangle != (rdsrec_list *)0 ) + { + Index = 0; + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_BIGVIA_METAL_EMPTY ) + { + DWR = GET_BIGVIA_METAL_DWR( ViaMbk, Index ); + USE = GET_BIGVIA_METAL_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + X1R = Xvia - ( ( WSX + DWR ) >> 1 ); + Y1R = Yvia - ( ( WSY + DWR ) >> 1 ); + X2R = Xvia + ( ( WSX + DWR ) >> 1 ); + Y2R = Yvia + ( ( WSY + DWR ) >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsfigrec( Figure, Via->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + } + } + } + else + { + LayerRds = GET_TURNVIA_LAYER( ViaMbk, 0 ); + + if ( LayerRds != RDS_TURNVIA_EMPTY ) + { + X1R = Y1R = X2R = Y2R = 0; + + Index = 0; + + LayerRds = GET_TURNVIA_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_TURNVIA_EMPTY ) + { + DWR = GET_TURNVIA_DWR( ViaMbk, Index ); + USE = GET_TURNVIA_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + X1R = Xvia - ( ( WSX + DWR ) >> 1 ); + Y1R = Yvia - ( ( WSY + DWR ) >> 1 ); + X2R = Xvia + ( ( WSX + DWR ) >> 1 ); + Y2R = Yvia + ( ( WSY + DWR ) >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsfigrec( Figure, Via->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_TURNVIA_LAYER( ViaMbk, Index ); + } + } + } + } + + if ( First == (rdsrec_list *)0 ) + { + Index = 0; + LayerRds = GET_VIA_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_VIA_EMPTY ) + { + USE = GET_VIA_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + SIZE = GET_VIA_SIZE( ViaMbk, Index ); + + X1R = Xvia - ( SIZE >> 1 ); + Y1R = Yvia - ( SIZE >> 1 ); + X2R = Xvia + ( SIZE >> 1 ); + Y2R = Yvia + ( SIZE >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsfigrec( Figure, Via->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_VIA_LAYER( ViaMbk, Index ); + } + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Ref To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *refmbkrds( Figure, Reference ) + + rdsfig_list *Figure; + phref_list *Reference; +{ + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long Xref; + long Yref; + + long X1R; + long Y1R; + long X2R; + long Y2R; + + long SIZE; + + int RefMbk; + int LayerRds; + int Index; + + if ( RfmRefRef == (char *)NULL ) + { + RfmRefRef = namealloc( "ref_ref" ); + } + + Rectangle = (rdsrec_list *)NULL; + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + + Xref = Reference->XREF * RDS_LAMBDA / SCALE_X; + Yref = Reference->YREF * RDS_LAMBDA / SCALE_X; + + RefMbk = (Reference->FIGNAME == RfmRefRef)? MBK_REF_REF:MBK_REF_CON; + Index = 0; + LayerRds = GET_REFERENCE_LAYER( RefMbk, Index ); + + while ( LayerRds != RDS_REFERENCE_EMPTY ) + { + SIZE = GET_REFERENCE_SIZE( RefMbk, Index ); + + X1R = Xref - ( SIZE >> 1 ); + Y1R = Yref - ( SIZE >> 1 ); + X2R = Xref + ( SIZE >> 1 ); + Y2R = Yref + ( SIZE >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsfigrec( Figure, Reference->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsReference( Rectangle ); + + if ( RefMbk == MBK_REF_REF ) + { + SetRdsRefRef( Rectangle ); + } + else + { + SetRdsRefCon( Rectangle ); + } + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + + + Index = Index + 1; + + LayerRds = GET_REFERENCE_LAYER( RefMbk, Index ); + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Connector To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *conmbkrds( Figure, Connector ) + + rdsfig_list *Figure; + phcon_list *Connector; +{ + rdsrec_list *Rectangle; + + long Xcon; + long Ycon; + + long X1R; + long Y1R; + long X2R; + long Y2R; + long WS; + + long DWR; + long DER; + + int LayerMbk; + int LayerRds; + + Rectangle = (rdsrec_list *)NULL; + + Xcon = Connector->XCON * RDS_LAMBDA / SCALE_X; + Ycon = Connector->YCON * RDS_LAMBDA / SCALE_X; + WS = Connector->WIDTH * RDS_LAMBDA / SCALE_X; + + LayerMbk = Connector->LAYER; + LayerRds = GET_CONNECTOR_LAYER( LayerMbk ); + + if ( LayerRds != RDS_CONNECTOR_EMPTY ) + { + DWR = GET_CONNECTOR_DWR( LayerMbk ); + DER = GET_CONNECTOR_DER( LayerMbk ); + + if ( ( Connector->ORIENT == EAST ) || + ( Connector->ORIENT == WEST ) ) + { + X1R = Xcon - DER; + Y1R = Ycon - (( WS + DWR ) >> 1); + X2R = Xcon + DER; + Y2R = Ycon + (( WS + DWR ) >> 1); + } + else + { + X1R = Xcon - (( WS + DWR ) >> 1); + Y1R = Ycon - DER; + X2R = Xcon + (( WS + DWR ) >> 1); + Y2R = Ycon + DER; + } + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsfigrec( Figure, Connector->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsConnector( Rectangle ); + SetRdsConExter( Rectangle ); + + Rectangle->USER = (void *)Rectangle; + } + + return( Rectangle ); +} + +/*------------------------------------------------------------\ +| | +| MBK Instance Segment To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *inssegmbkrds( InstanceMbk, ModelMbk, InstanceRds, Lynx ) + + phins_list *InstanceMbk; + phfig_list *ModelMbk; + rdsins_list *InstanceRds; + char Lynx; +{ + phseg_list *Segment; + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long SegX1; + long SegX2; + long SegY1; + long SegY2; + + long X1; + long Y1; + long X2; + long Y2; + long WS; + + long X1R; + long Y1R; + long X2R; + long Y2R; + + long DLR; + long DWR; + long OFFSET; + int TRANS; + int USE; + long Swap; + + int LayerMbk; + int LayerRds; + int SegConMbk; + int Index; + int Type; + + Rectangle = (rdsrec_list *)NULL; + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + + X1R = Y1R = X2R = Y2R = 0; + + Type = LEFT; + + for ( Segment = ModelMbk->PHSEG; + Segment != (phseg_list *)NULL; + Segment = Segment->NEXT ) + { + LayerMbk = Segment->LAYER; + + if ( ( LayerMbk >= CALU1 ) && + ( LayerMbk <= CALU9 ) ) SegConMbk = 1; + else SegConMbk = 0; + + SegX1 = Segment->X1; + SegY1 = Segment->Y1; + SegX2 = Segment->X2; + SegY2 = Segment->Y2; + + if ( Segment->TYPE == LEFT ) + { + Swap = SegX2; SegX2 = SegX1; SegX1 = Swap; + } + else + if ( Segment->TYPE == DOWN ) + { + Swap = SegY2; SegY2 = SegY1; SegY1 = Swap; + } + + xyflat + ( &X1 , &Y1, + SegX1 , SegY1, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + xyflat + ( &X2 , &Y2, + SegX2 , SegY2, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + if ( ( InstanceMbk->TRANSF == NOSYM ) || + ( InstanceMbk->TRANSF == SYMXY ) || + ( InstanceMbk->TRANSF == ROT_P ) || + ( InstanceMbk->TRANSF == ROT_M ) ) + { + if ( X1 < X2 ) Type = RIGHT; + if ( Y1 < Y2 ) Type = UP; + if ( X1 > X2 ) { Swap = X1; X1 = X2; X2 = Swap; Type = LEFT; } + if ( Y1 > Y2 ) { Swap = Y1; Y1 = Y2; Y2 = Swap; Type = DOWN; } + } + else + { + if ( X1 < X2 ) Type = LEFT; + if ( Y1 < Y2 ) Type = DOWN; + if ( X1 > X2 ) { Swap = X1; X1 = X2; X2 = Swap; Type = RIGHT; } + if ( Y1 > Y2 ) { Swap = Y1; Y1 = Y2; Y2 = Swap; Type = UP; } + } + + X1 = X1 * RDS_LAMBDA / SCALE_X; + X2 = X2 * RDS_LAMBDA / SCALE_X; + Y1 = Y1 * RDS_LAMBDA / SCALE_X; + Y2 = Y2 * RDS_LAMBDA / SCALE_X; + WS = Segment->WIDTH * RDS_LAMBDA / SCALE_X; + + Index = 0; + LayerRds = GET_SEGMENT_LAYER( LayerMbk, Index ); + + while ( LayerRds != RDS_SEGMENT_EMPTY ) + { + TRANS = GET_SEGMENT_TRANS ( LayerMbk, Index ); + DLR = GET_SEGMENT_DLR ( LayerMbk, Index ); + DWR = GET_SEGMENT_DWR ( LayerMbk, Index ); + OFFSET = GET_SEGMENT_OFFSET( LayerMbk, Index ); + USE = GET_SEGMENT_USE ( LayerMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + if ( TRANS == RDS_TRANS_VW ) + { + switch ( Type ) + { + case LEFT : X1R = X1 - DLR; + Y1R = Y1 - ( ( WS + DWR ) >> 1 ) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + ( ( WS + DWR ) >> 1 ) + OFFSET; + + break; + + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 - ( ( WS + DWR ) >> 1 ) - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + ( ( WS + DWR ) >> 1 ) - OFFSET; + + break; + + case DOWN : X1R = X1 - ( ( WS + DWR ) >> 1 ) - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + ( ( WS + DWR ) >> 1 ) - OFFSET; + Y2R = Y2 + DLR; + + break; + + case UP : X1R = X1 - ( ( WS + DWR ) >> 1 ) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + ( ( WS + DWR ) >> 1 ) + OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + else + if ( TRANS == RDS_TRANS_LCW ) + { + switch ( Type ) + { + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 + (WS >> 1) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + (WS >> 1) + DWR + OFFSET; + + break; + + case LEFT : X1R = X1 - DLR; + Y1R = Y1 - (WS >> 1) - DWR - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 - (WS >> 1) - OFFSET; + + break; + + case UP : X1R = X1 - (WS >> 1) - DWR - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 - (WS >> 1) - OFFSET; + Y2R = Y2 + DLR; + + break; + + case DOWN : X1R = X1 + (WS >> 1) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + (WS >> 1) + DWR + OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + else + if ( TRANS == RDS_TRANS_RCW ) + { + switch ( Type ) + { + case RIGHT : X1R = X1 - DLR; + Y1R = Y1 - (WS >> 1) - DWR - OFFSET; + X2R = X2 + DLR; + Y2R = Y2 - (WS >> 1) - OFFSET; + + break; + + case LEFT : X1R = X1 - DLR; + Y1R = Y1 + (WS >> 1) + OFFSET; + X2R = X2 + DLR; + Y2R = Y2 + (WS >> 1) + DWR + OFFSET; + + break; + + case UP : X1R = X1 + (WS >> 1) + OFFSET; + Y1R = Y1 - DLR; + X2R = X2 + (WS >> 1) + DWR + OFFSET; + Y2R = Y2 + DLR; + + break; + + case DOWN : X1R = X1 - (WS >> 1) - DWR - OFFSET; + Y1R = Y1 - DLR; + X2R = X2 - (WS >> 1) - OFFSET; + Y2R = Y2 + DLR; + + break; + } + } + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsinsrec( InstanceRds, Segment->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsSegment( Rectangle ); + + if ( SegConMbk ) SetRdsConInter( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_SEGMENT_LAYER( LayerMbk, Index ); + } + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Instance Via To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *insviambkrds( InstanceMbk, ModelMbk, InstanceRds, Lynx ) + + phins_list *InstanceMbk; + phfig_list *ModelMbk; + rdsins_list *InstanceRds; + char Lynx; +{ + phvia_list *Via; + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long Xvia; + long Yvia; + long WSX; + long WSY; + + long X1R; + long Y1R; + long X2R; + long Y2R; + + long BX1R; + long BY1R; + long BX2R; + long BY2R; + + long VX1R; + long VY1R; + long VX2R; + long VY2R; + + long SIDE; + long SIZE; + long STEP; + long SIDE_STEP; + long DWR; + long OVERLAP; + long MIN_DWR; + long MAX_OVER; + char USE; + + int ViaMbk; + int LayerRds; + int Index; + + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + DWR = 0; + OVERLAP = 0; + + for ( Via = ModelMbk->PHVIA; + Via != (phvia_list *)NULL; + Via = Via->NEXT ) + { + ViaMbk = Via->TYPE; + + VX1R = Via->XVIA - (Via->DX >> 1); + VY1R = Via->YVIA - (Via->DY >> 1); + VX2R = VX1R + Via->DX; + VY2R = VY1R + Via->DY; + + xyflat + ( &X1R , &Y1R, + VX1R , VY1R, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + xyflat + ( &X2R , &Y2R, + VX2R , VY2R, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + if ( X1R > X2R ) + { + Xvia = X1R; + X1R = X2R; + X2R = Xvia; + } + + if ( Y1R > Y2R ) + { + Yvia = Y1R; + Y1R = Y2R; + Y2R = Yvia; + } + + Xvia = ( ( X1R + X2R ) >> 1 ) * RDS_LAMBDA / SCALE_X; + Yvia = ( ( Y1R + Y2R ) >> 1 ) * RDS_LAMBDA / SCALE_X; + + Rectangle = (rdsrec_list *)NULL; + + if ( ( Via->DX != 0 ) || + ( Via->DY != 0 ) ) + { + WSX = ( X2R - X1R ) * RDS_LAMBDA / SCALE_X; + WSY = ( Y2R - Y1R ) * RDS_LAMBDA / SCALE_X; + + LayerRds = GET_BIGVIA_HOLE_LAYER( ViaMbk, 0 ); + + if ( LayerRds != RDS_BIGVIA_HOLE_EMPTY ) + { + X1R = Y1R = X2R = Y2R = 0; +/* +** Metal rectangles +*/ + Index = 0; + MIN_DWR = -1; + MAX_OVER = 0; + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_BIGVIA_METAL_EMPTY ) + { + DWR = GET_BIGVIA_METAL_DWR( ViaMbk, Index ); + OVERLAP = GET_BIGVIA_METAL_OVERLAP( ViaMbk, Index ); + USE = GET_BIGVIA_METAL_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + if ( ( MIN_DWR == -1 ) || + ( MIN_DWR > DWR ) ) MIN_DWR = DWR; + + if ( MAX_OVER < OVERLAP ) MAX_OVER = OVERLAP; + } + + Index = Index + 1; + + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + } + + if ( MIN_DWR < 0 ) MIN_DWR = 0; +/* +** Hole rectangles +*/ + Index = 0; + LayerRds = GET_BIGVIA_HOLE_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_BIGVIA_HOLE_EMPTY ) + { + SIDE = GET_BIGVIA_HOLE_SIDE( ViaMbk, Index ); + STEP = GET_BIGVIA_HOLE_STEP( ViaMbk, Index ); + USE = GET_BIGVIA_HOLE_USE( ViaMbk, Index ); + + SIDE_STEP = SIDE + STEP; + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + if ( SIDE_STEP == 0 ) break; + + X1R = Xvia + OVERLAP - ( ( WSX + DWR ) >> 1 ); + Y1R = Yvia + OVERLAP - ( ( WSY + DWR ) >> 1 ); + X2R = Xvia - OVERLAP + ( ( WSX + DWR ) >> 1 ); + Y2R = Yvia - OVERLAP + ( ( WSY + DWR ) >> 1 ); + + X1R = X1R + (SIDE >> 1); + Y1R = Y1R + (SIDE >> 1); + + X1R = RfmRoundLow ( X1R ); + X2R = RfmRoundHigh( X2R ); + Y1R = RfmRoundLow ( Y1R ); + Y2R = RfmRoundHigh( Y2R ); + + if ( X1R >= 0 ) X1R = ( (X1R + SIDE_STEP - 1) / SIDE_STEP ) * SIDE_STEP; + else X1R = ( X1R / SIDE_STEP ) * SIDE_STEP; + + if ( Y1R >= 0 ) Y1R = ( (Y1R + SIDE_STEP - 1) / SIDE_STEP ) * SIDE_STEP; + else Y1R = ( Y1R / SIDE_STEP ) * SIDE_STEP; + + BX1R = X1R; + + while ( BX1R <= X2R ) + { + BX1R = BX1R - (SIDE >> 1); + BX2R = BX1R + SIDE; + VX1R = RfmRoundLow ( BX1R ); + VX2R = RfmRoundHigh( BX2R ); + + if ( VX2R > X2R ) break; + + BY1R = Y1R; + + while ( BY1R <= Y2R ) + { + BY1R = BY1R - (SIDE >> 1); + BY2R = BY1R + SIDE; + VY1R = RfmRoundLow ( BY1R ); + VY2R = RfmRoundHigh( BY2R ); + + if ( VY2R > Y2R ) break; + + Rectangle = addrdsinsrec( InstanceRds, (char *)0, + LayerRds, VX1R, VY1R, + VX2R - VX1R, VY2R - VY1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + + BY1R = BY2R + STEP + (SIDE >> 1); + } + + BX1R = BX2R + STEP + (SIDE >> 1); + } + } + + Index = Index + 1; + + LayerRds = GET_BIGVIA_HOLE_LAYER( ViaMbk, Index ); + } +/* +** Metal rectangles +*/ + if ( Rectangle != (rdsrec_list *)0 ) + { + Index = 0; + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_BIGVIA_METAL_EMPTY ) + { + DWR = GET_BIGVIA_METAL_DWR( ViaMbk, Index ); + USE = GET_BIGVIA_METAL_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + X1R = Xvia - ( ( WSX + DWR ) >> 1 ); + Y1R = Yvia - ( ( WSY + DWR ) >> 1 ); + X2R = Xvia + ( ( WSX + DWR ) >> 1 ); + Y2R = Yvia + ( ( WSY + DWR ) >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsinsrec( InstanceRds, Via->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_BIGVIA_METAL_LAYER( ViaMbk, Index ); + } + } + } + else + { + LayerRds = GET_TURNVIA_LAYER( ViaMbk, 0 ); + + if ( LayerRds != RDS_TURNVIA_EMPTY ) + { + X1R = Y1R = X2R = Y2R = 0; + + Index = 0; + + LayerRds = GET_TURNVIA_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_TURNVIA_EMPTY ) + { + DWR = GET_TURNVIA_DWR( ViaMbk, Index ); + USE = GET_TURNVIA_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + X1R = Xvia - ( ( WSX + DWR ) >> 1 ); + Y1R = Yvia - ( ( WSY + DWR ) >> 1 ); + X2R = Xvia + ( ( WSX + DWR ) >> 1 ); + Y2R = Yvia + ( ( WSY + DWR ) >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsinsrec( InstanceRds, Via->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_TURNVIA_LAYER( ViaMbk, Index ); + } + } + } + } + + if ( Rectangle == (rdsrec_list *)0 ) + { + Index = 0; + LayerRds = GET_VIA_LAYER( ViaMbk, Index ); + + while ( LayerRds != RDS_VIA_EMPTY ) + { + USE = GET_VIA_USE( ViaMbk, Index ); + + if ( ( ( USE == RDS_USE_ALL ) ) || + ( ( USE == RDS_USE_EXTRACT ) && ( Lynx ) ) || + ( ( USE == RDS_USE_DRC ) && ( ! Lynx ) ) ) + { + SIZE = GET_VIA_SIZE( ViaMbk, Index ); + + X1R = Xvia - ( SIZE >> 1 ); + Y1R = Yvia - ( SIZE >> 1 ); + X2R = Xvia + ( SIZE >> 1 ); + Y2R = Yvia + ( SIZE >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsinsrec( InstanceRds, Via->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsVia( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + + Index = Index + 1; + + LayerRds = GET_VIA_LAYER( ViaMbk, Index ); + } + } + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Instance Reference To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *insrefmbkrds( InstanceMbk, ModelMbk, InstanceRds ) + + phins_list *InstanceMbk; + phfig_list *ModelMbk; + rdsins_list *InstanceRds; + +{ + phref_list *Reference; + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long Xref; + long Yref; + + long X1R; + long Y1R; + long X2R; + long Y2R; + + long SIZE; + + int RefMbk; + int LayerRds; + int Index; + + if ( RfmRefRef == (char *)NULL ) + { + RfmRefRef = namealloc( "ref_ref" ); + } + + Rectangle = (rdsrec_list *)NULL; + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + + for ( Reference = ModelMbk->PHREF; + Reference != (phref_list *)NULL; + Reference = Reference->NEXT ) + { + xyflat + ( &Xref , &Yref, + Reference->XREF , Reference->YREF, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + Xref = Xref * RDS_LAMBDA / SCALE_X; + Yref = Yref * RDS_LAMBDA / SCALE_X; + + RefMbk = (Reference->FIGNAME == RfmRefRef)? MBK_REF_REF:MBK_REF_CON; + Index = 0; + LayerRds = GET_REFERENCE_LAYER( RefMbk, Index ); + + while ( LayerRds != RDS_REFERENCE_EMPTY ) + { + SIZE = GET_REFERENCE_SIZE( RefMbk, Index ); + + X1R = Xref - ( SIZE >> 1 ); + Y1R = Yref - ( SIZE >> 1 ); + X2R = Xref + ( SIZE >> 1 ); + Y2R = Yref + ( SIZE >> 1 ); + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsinsrec( InstanceRds, Reference->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsReference( Rectangle ); + + if ( RefMbk == MBK_REF_REF ) + { + SetRdsRefRef( Rectangle ); + } + else + { + SetRdsRefCon( Rectangle ); + } + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + + Index = Index + 1; + + LayerRds = GET_REFERENCE_LAYER( RefMbk, Index ); + } + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Instance Connector To RDS Rectangle | +| | +\------------------------------------------------------------*/ + +rdsrec_list *insconmbkrds( InstanceMbk, ModelMbk, InstanceRds ) + + phins_list *InstanceMbk; + phfig_list *ModelMbk; + rdsins_list *InstanceRds; + { + phcon_list *Connector; + rdsrec_list *Rectangle; + rdsrec_list *First; + rdsrec_list *Link; + + long Xcon; + long Ycon; + + long X1R; + long Y1R; + long X2R; + long Y2R; + long WS; + + long DWR; + long DER; + + int Orient; + int LayerMbk; + int LayerRds; + + Rectangle = (rdsrec_list *)NULL; + First = (rdsrec_list *)NULL; + Link = (rdsrec_list *)NULL; + + for ( Connector = ModelMbk->PHCON; + Connector != (phcon_list *)NULL; + Connector = Connector->NEXT ) + { + xyflat + ( &Xcon , &Ycon, + Connector->XCON , Connector->YCON, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + Xcon = Xcon * RDS_LAMBDA / SCALE_X; + Ycon = Ycon * RDS_LAMBDA / SCALE_X; + WS = Connector->WIDTH * RDS_LAMBDA / SCALE_X; + + LayerMbk = Connector->LAYER; + LayerRds = GET_CONNECTOR_LAYER( LayerMbk ); + + if ( LayerRds != RDS_REFERENCE_EMPTY ) + { + DWR = GET_CONNECTOR_DWR( LayerMbk ); + DER = GET_CONNECTOR_DER( LayerMbk ); + Orient = RfmNewConnectorOrient[ (int)InstanceMbk->TRANSF ]; + + if ( ( Connector->ORIENT == EAST ) || + ( Connector->ORIENT == WEST ) ) + { + Orient = ! Orient; + } + + if ( Orient != 1 ) /* EAST AND WEST */ + { + X1R = Xcon - DER; + Y1R = Ycon - ( ( WS + DWR ) >> 1 ); + X2R = Xcon + DER; + Y2R = Ycon + ( ( WS + DWR ) >> 1 ); + } + else + { + X1R = Xcon - ( ( WS + DWR ) >> 1 ); + Y1R = Ycon - DER; + X2R = Xcon + ( ( WS + DWR ) >> 1 ); + Y2R = Ycon + DER; + } + + X1R = RfmRoundLow ( X1R ); + Y1R = RfmRoundLow ( Y1R ); + X2R = RfmRoundHigh( X2R ); + Y2R = RfmRoundHigh( Y2R ); + + Rectangle = addrdsinsrec( InstanceRds, Connector->NAME, + LayerRds, X1R, Y1R, + X2R - X1R, Y2R - Y1R ); + + SetRdsConnector( Rectangle ); + SetRdsConInter( Rectangle ); + + if ( First == (rdsrec_list *)NULL ) + { + First = Rectangle; + Link = Rectangle; + } + else + { + Link->USER = (void *)Rectangle; + Link = Rectangle; + } + } + } + + if ( First != (rdsrec_list *)NULL ) Link->USER = (void *)First; + + return( First ); +} + +/*------------------------------------------------------------\ +| | +| MBK Instance To RDS Instance | +| | +\------------------------------------------------------------*/ + +rdsins_list *insmbkrds( FigureRds, InstanceMbk, Mode, Lynx ) + + rdsfig_list *FigureRds; + phins_list *InstanceMbk; + char Mode; + char Lynx; +{ + rdsins_list *InstanceRds; + rdsrec_list *Rectangle; + phfig_list *ModelMbk; + + long Xins; + long Yins; + long Xab1; + long Xab2; + long Yab1; + long Yab2; + long Swap; + + ModelMbk = getphfig( InstanceMbk->FIGNAME, Mode ); + + xyflat + ( &Xins , &Yins, + 0 , 0, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + xyflat + ( &Xab1 , &Yab1, + ModelMbk->XAB1 , ModelMbk->YAB1, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + xyflat + ( &Xab2 , &Yab2, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->XINS , InstanceMbk->YINS, + ModelMbk->XAB1 , ModelMbk->YAB1, + ModelMbk->XAB2 , ModelMbk->YAB2, + InstanceMbk->TRANSF + ); + + Xins = RfmRoundLow( Xins * RDS_LAMBDA / SCALE_X ); + Yins = RfmRoundLow( Yins * RDS_LAMBDA / SCALE_X ); + Xab1 = RfmRoundLow( Xab1 * RDS_LAMBDA / SCALE_X ); + Yab1 = RfmRoundLow( Yab1 * RDS_LAMBDA / SCALE_X ); + Xab2 = RfmRoundHigh( Xab2 * RDS_LAMBDA / SCALE_X ); + Yab2 = RfmRoundHigh( Yab2 * RDS_LAMBDA / SCALE_X ); + + InstanceRds = addrdsins( FigureRds, + InstanceMbk->FIGNAME, InstanceMbk->INSNAME, + InstanceMbk->TRANSF, + Xins, Yins ); + + if ( Xab1 > Xab2 ) { Swap = Xab1; Xab1 = Xab2; Xab2 = Swap; } + if ( Yab1 > Yab2 ) { Swap = Yab1; Yab1 = Yab2; Yab2 = Swap; } + + Rectangle = addrdsinsrec( InstanceRds, InstanceMbk->INSNAME, + RDS_ABOX, Xab1, Yab1, Xab2 - Xab1, Yab2 - Yab1 ); + + SetRdsInstance( Rectangle ); + + Rectangle->USER = (void *)Rectangle; + + inssegmbkrds( InstanceMbk, ModelMbk, InstanceRds, Lynx ); + insconmbkrds( InstanceMbk, ModelMbk, InstanceRds ); + insrefmbkrds( InstanceMbk, ModelMbk, InstanceRds ); + insviambkrds( InstanceMbk, ModelMbk, InstanceRds, Lynx ); + + return( InstanceRds ); +} + +/*------------------------------------------------------------\ +| | +| MBK Abox to RDS Abox | +| | +\------------------------------------------------------------*/ + + rdsrec_list *aboxmbkrds( FigureMbk, FigureRds ) + + phfig_list *FigureMbk; + rdsfig_list *FigureRds; +{ + rdsrec_list *Rectangle; + long XAB1; + long XAB2; + long YAB1; + long YAB2; + + XAB1 = RfmRoundLow( FigureMbk->XAB1 * RDS_LAMBDA / SCALE_X ); + XAB2 = RfmRoundLow( FigureMbk->XAB2 * RDS_LAMBDA / SCALE_X ); + YAB1 = RfmRoundHigh( FigureMbk->YAB1 * RDS_LAMBDA / SCALE_X ); + YAB2 = RfmRoundHigh( FigureMbk->YAB2 * RDS_LAMBDA / SCALE_X ); + + if ( ( XAB1 != 0 ) || ( XAB2 != 0 ) || + ( YAB1 != 0 ) || ( YAB2 != 0 ) ) + { + Rectangle = + + addrdsfigrec( FigureRds, FigureMbk->NAME, + RDS_ABOX, + XAB1, YAB1, XAB2 - XAB1, YAB2 - YAB1 ); + + SetRdsFigure( Rectangle ); + + Rectangle->USER = (void *)Rectangle; + + return( Rectangle ); + } + + return( (rdsrec_list *)NULL ); +} + +/*------------------------------------------------------------\ +| | +| MBK Figure To RDS Figure | +| | +\------------------------------------------------------------*/ + +rdsfig_list *figmbkrds( FigureMbk, Size, Lynx ) + + phfig_list *FigureMbk; + unsigned int Size; + char Lynx; +{ + rdsfig_list *FigureRds; + void *Pointer; + + FigureRds = addrdsfig( FigureMbk->NAME, Size ); + + aboxmbkrds( FigureMbk, FigureRds ); + + for ( Pointer = (void *)(FigureMbk->PHSEG); + Pointer != (void *)NULL; + Pointer = (void *)(((phseg_list *)Pointer)->NEXT)) + { + segmbkrds( FigureRds, (phseg_list *)Pointer, Lynx ); + } + + for ( Pointer = (void *)(FigureMbk->PHCON); + Pointer != (void *)NULL; + Pointer = (void *)(((phcon_list *)Pointer)->NEXT)) + { + conmbkrds( FigureRds, (phcon_list *)Pointer); + } + + for ( Pointer = (void *)(FigureMbk->PHREF); + Pointer != (void *)NULL; + Pointer = (void *)(((phref_list *)Pointer)->NEXT)) + { + refmbkrds( FigureRds, (phref_list *)Pointer); + } + + for ( Pointer = (void *)(FigureMbk->PHVIA); + Pointer != (void *)NULL; + Pointer = (void *)(((phvia_list *)Pointer)->NEXT)) + { + viambkrds( FigureRds, (phvia_list *)Pointer, Lynx ); + } + + for ( Pointer = (void *)(FigureMbk->PHINS); + Pointer != (void *)NULL; + Pointer = (void *)(((phins_list *)Pointer)->NEXT)) + { + insmbkrds( FigureRds, (phins_list *)Pointer, 'P', Lynx ); + } + + return( FigureRds ); +} + +/*------------------------------------------------------------\ +| | +| Model Mbk To Rds | +| | +\------------------------------------------------------------*/ + +rdsfig_list *modelmbkrds( Figure, Lynx ) + + rdsfig_list *Figure; + char Lynx; +{ + rdsfig_list *HeadFig; + rdsfig_list *StopFig; + rdsfig_list *ScanFig; + rdsfig_list **Previous; + phfig_list *FigureMbk; + rdsins_list *Instance; + + + ScanFig = HEAD_RDSFIG; + Previous = &HEAD_RDSFIG; + + while ( ScanFig != (rdsfig_list *)NULL ) + { + if ( ScanFig == Figure ) break; + + Previous = &ScanFig->NEXT; + ScanFig = ScanFig->NEXT; + } + + if ( ScanFig == (rdsfig_list *)NULL ) + { + return( (rdsfig_list *)NULL ); + } + + *Previous = Figure->NEXT; + Figure->NEXT = HEAD_RDSFIG; + HEAD_RDSFIG = Figure; + + StopFig = Figure->NEXT; + + do + { + HeadFig = HEAD_RDSFIG; + + for ( ScanFig = HeadFig; + ScanFig != StopFig; + ScanFig = ScanFig->NEXT ) + { + for ( Instance = ScanFig->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + if ( searchrdsfig( Instance->FIGNAME ) == (rdsfig_list *)NULL ) + { + FigureMbk = getphfig( Instance->FIGNAME, 'A' ); + figmbkrds( FigureMbk, Figure->SIZE, Lynx ); + } + } + } + + StopFig = HeadFig; + } + while ( HeadFig != HEAD_RDSFIG ); + + return( HEAD_RDSFIG ); +} diff --git a/alliance/src/rds/src/rfmacces.h b/alliance/src/rds/src/rfmacces.h new file mode 100644 index 00000000..bd1b6e96 --- /dev/null +++ b/alliance/src/rds/src/rfmacces.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rfmacces.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 01.08.93 | +| | +\------------------------------------------------------------*/ + +# ifndef RFM_ACCES_H +# define RFM_ACCES_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rfmerror.c b/alliance/src/rds/src/rfmerror.c new file mode 100644 index 00000000..70ede962 --- /dev/null +++ b/alliance/src/rds/src/rfmerror.c @@ -0,0 +1,68 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rfmerror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include "rfmerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void rfm_error( Error, Text, File, Line ) + + char Error; + char *Text; + char *File; + long Line; +{ + char Name[ 128 ]; + + strcpy( Name, File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "rfm:%s%ld ", Name, Line ); + + switch( Error ) + { + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + EXIT( 1 ); +} + diff --git a/alliance/src/rds/src/rfmerror.h b/alliance/src/rds/src/rfmerror.h new file mode 100644 index 00000000..9a89e1c1 --- /dev/null +++ b/alliance/src/rds/src/rfmerror.h @@ -0,0 +1,54 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rfmerror.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RFM_ERROR_H +# define RFM_ERROR_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define rfmerror( E, V ) (rfm_error( (E), (V), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rfm_error __P((char Error, char *Text, char *File, long Line)); + +# endif diff --git a/alliance/src/rds/src/rfmview.c b/alliance/src/rds/src/rfmview.c new file mode 100644 index 00000000..d3252623 --- /dev/null +++ b/alliance/src/rds/src/rfmview.c @@ -0,0 +1,317 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rfmview.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include "rds.h" +# include "rpr.h" +# include "rfm.h" +# include "rwi.h" +# include "rut.h" + +# include "rfmview.h" +# include "rfmerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| View Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| View Linked Rectangle | +| | +\------------------------------------------------------------*/ + +void viewrfmrec( Rectangle ) + + rdsrec_list *Rectangle; +{ + rdsrec_list *Scan; + char *LayerName; + + long X; + long Y; + long DX; + long DY; + + Scan = Rectangle; + + if ( Scan != (rdsrec_list *)NULL ) + { + do + { + LayerName = RDS_LAYER_NAME[ GetRdsLayer( Scan ) ]; + + fprintf( stdout, "\n--> in rectangle" ); + + X = Scan->X * SCALE_X / RDS_LAMBDA; + Y = Scan->Y * SCALE_X / RDS_LAMBDA; + DX = Scan->DX * SCALE_X / RDS_LAMBDA; + DY = Scan->DY * SCALE_X / RDS_LAMBDA; + + if ( Scan->NAME != (char *)NULL ) + { + fprintf( stdout, "\n\tNAME : %s" , Scan->NAME ); + } + else + { + fprintf( stdout, "\n\tNAME : NO NAME" ); + } + + fprintf( stdout, "\n\tX : %ld" , X ); + fprintf( stdout, "\n\tY : %ld" , Y ); + fprintf( stdout, "\n\tDX : %ld" , DX ); + fprintf( stdout, "\n\tDY : %ld" , DY ); + fprintf( stdout, "\n\tFLAGS : %0lX", Scan->FLAGS ); + fprintf( stdout, "\n\tLAYER : %s" , LayerName ); + + Scan = (rdsrec_list *)(Scan->USER); + } + while ( Scan != Rectangle ); + } +} + +/*------------------------------------------------------------\ +| | +| View Segment Translation | +| | +\------------------------------------------------------------*/ + +void viewrfmseg( Segment, Rectangle ) + + phseg_list *Segment; + rdsrec_list *Rectangle; +{ + char *LayerName; + + LayerName = MBK_LAYER_NAME[ (int)Segment->LAYER ]; + + fprintf( stdout, "\n--> Translate segment" ); + + if ( Segment->NAME != (char *)NULL ) + { + fprintf( stdout, "\n\tNAME : %s" , Segment->NAME ); + } + else + { + fprintf( stdout, "\n\tNAME : NO NAME" ); + } + + fprintf( stdout, "\n\tX1 : %ld", Segment->X1 ); + fprintf( stdout, "\n\tY1 : %ld", Segment->Y1 ); + fprintf( stdout, "\n\tX2 : %ld", Segment->X2 ); + fprintf( stdout, "\n\tY2 : %ld", Segment->Y2 ); + fprintf( stdout, "\n\tWIDTH : %ld", Segment->WIDTH ); + fprintf( stdout, "\n\tLAYER : %s" , LayerName ); + + viewrfmrec( Rectangle ); + + fprintf( stdout, "\n<-- End" ); +} + +/*------------------------------------------------------------\ +| | +| View Via Translation | +| | +\------------------------------------------------------------*/ + +void viewrfmvia( Via, Rectangle ) + + phvia_list *Via; + rdsrec_list *Rectangle; +{ + char *ViaName; + + ViaName = MBK_VIA_NAME[ (int)Via->TYPE ]; + + fprintf( stdout, "\n--> Translate via" ); + + fprintf( stdout, "\n\tXVIA : %ld", Via->XVIA ); + fprintf( stdout, "\n\tYVIA : %ld", Via->YVIA ); + fprintf( stdout, "\n\tTYPE : %s" , ViaName ); + + viewrfmrec( Rectangle ); + + fprintf( stdout, "\n<-- End" ); +} + +/*------------------------------------------------------------\ +| | +| View Reference Translation | +| | +\------------------------------------------------------------*/ + +void viewrfmref( Reference, Rectangle ) + + phref_list *Reference; + rdsrec_list *Rectangle; +{ + fprintf( stdout, "\n--> Translate reference" ); + + fprintf( stdout, "\n\tXREF : %ld", Reference->XREF ); + fprintf( stdout, "\n\tYREF : %ld", Reference->YREF ); + fprintf( stdout, "\n\tTYPE : %s" , Reference->FIGNAME ); + + viewrfmrec( Rectangle ); + + fprintf( stdout, "\n<-- End" ); +} + +/*------------------------------------------------------------\ +| | +| View Connector Translation | +| | +\------------------------------------------------------------*/ + +void viewrfmcon( Connector, Rectangle ) + + phcon_list *Connector; + rdsrec_list *Rectangle; +{ + char *LayerName; + + LayerName = MBK_LAYER_NAME[ (int)Connector->LAYER ]; + + fprintf( stdout, "\n--> Translate connector" ); + + if ( Connector->NAME != (char *)NULL ) + { + fprintf( stdout, "\n\tNAME : %s" , Connector->NAME ); + } + else + { + fprintf( stdout, "\n\tNAME : NO NAME" ); + } + + fprintf( stdout, "\n\tXCON : %ld", Connector->XCON ); + fprintf( stdout, "\n\tYCON : %ld", Connector->YCON ); + fprintf( stdout, "\n\tWIDTH : %ld", Connector->WIDTH ); + fprintf( stdout, "\n\tLAYER : %s" , LayerName ); + + viewrfmrec( Rectangle ); + + fprintf( stdout, "\n<-- End" ); +} + +/*------------------------------------------------------------\ +| | +| View Instance Translation | +| | +\------------------------------------------------------------*/ + +void viewrfmins( InstanceMbk, InstanceRds ) + + phins_list *InstanceMbk; + rdsins_list *InstanceRds; +{ + char *TransfName; + + long X; + long Y; + + TransfName = RDS_TRANSF_NAME[ (int)InstanceMbk->TRANSF ]; + + fprintf( stdout, "\n--> Translate instance" ); + + fprintf( stdout, "\n\tINSNAME : %s" , InstanceMbk->INSNAME ); + fprintf( stdout, "\n\tFIGNAME : %s" , InstanceMbk->FIGNAME ); + fprintf( stdout, "\n\tXINS : %ld", InstanceMbk->XINS ); + fprintf( stdout, "\n\tYINS : %ld", InstanceMbk->YINS ); + fprintf( stdout, "\n\tTRANSF : %s" , TransfName ); + + TransfName = RDS_TRANSF_NAME[ (int)InstanceRds->TRANSF ]; + + fprintf( stdout, "\n--> in instance" ); + + X = InstanceRds->X * SCALE_X / RDS_LAMBDA; + Y = InstanceRds->Y * SCALE_X / RDS_LAMBDA; + + fprintf( stdout, "\n\tINSNAME : %s" , InstanceRds->INSNAME ); + fprintf( stdout, "\n\tFIGNAME : %s" , InstanceRds->FIGNAME ); + fprintf( stdout, "\n\tX : %ld", X ); + fprintf( stdout, "\n\tY : %ld", Y ); + fprintf( stdout, "\n\tTRANSF : %s" , TransfName ); + fprintf( stdout, "\n\tSIZE : %d" , InstanceRds->SIZE ); + + fprintf( stdout, "\n<-- End" ); +} + +/*------------------------------------------------------------\ +| | +| View Figure Translation | +| | +\------------------------------------------------------------*/ + +void viewrfmfig( FigureMbk, FigureRds ) + + phfig_list *FigureMbk; + rdsfig_list *FigureRds; +{ + fprintf( stdout, "\n--> Translate figure" ); + + fprintf( stdout, "\n\tNAME : %s" , FigureMbk->NAME ); + + fprintf( stdout, "\n--> in figure" ); + + fprintf( stdout, "\n\tNAME : %s" , FigureRds->NAME ); + fprintf( stdout, "\n\tMODE : %c" , FigureRds->MODE ); + fprintf( stdout, "\n\tSIZE : %d" , FigureRds->SIZE ); + + fprintf( stdout, "\n<-- End" ); +} + +/*------------------------------------------------------------\ +| | +| Round Rds Rectangle | +| | +\------------------------------------------------------------*/ + +void roundrdsrec( Rectangle ) + + rdsrec_list *Rectangle; +{ + long X2, Y2; + + X2 = RfmRoundHigh( Rectangle->X + Rectangle->DX ); + Y2 = RfmRoundHigh( Rectangle->Y + Rectangle->DY ); + + Rectangle->X = RfmRoundLow( Rectangle->X ); + Rectangle->Y = RfmRoundLow( Rectangle->Y ); + Rectangle->DX = X2 - Rectangle->X; + Rectangle->DY = Y2 - Rectangle->Y; +} diff --git a/alliance/src/rds/src/rfmview.h b/alliance/src/rds/src/rfmview.h new file mode 100644 index 00000000..906fb6a7 --- /dev/null +++ b/alliance/src/rds/src/rfmview.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rfmview.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RFM_VIEW_H +# define RFM_VIEW_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rpr.h b/alliance/src/rds/src/rpr.h new file mode 100644 index 00000000..1c3bc853 --- /dev/null +++ b/alliance/src/rds/src/rpr.h @@ -0,0 +1,460 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rpr214.h | +| | +| Authors : Jacomme Ludovic | +| Picault Stephane *4p* | +| | +| Date : 27.06.95 | +| 15.07.98 *4p* | +| | +\------------------------------------------------------------*/ + +# ifndef RPR_214_H +# define RPR_214_H + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Lynx Define | +| | +\------------------------------------------------------------*/ + +# define RDS_LYNX_GRAPH_FIELD 25 +# define RDS_LYNX_GRAPH_EMPTY (unsigned char)255 +# define RDS_LYNX_CAPA_FIELD 2 +# define RDS_LYNX_CAPA_EMPTY 0.0 +# define RDS_LYNX_RESISTOR_FIELD 1 +# define RDS_LYNX_RESISTOR_EMPTY 0.0 +# define RDS_LYNX_TRANSISTOR_FIELD 6 +# define RDS_LYNX_TRANSISTOR_EMPTY (unsigned char)255 +# define RDS_LYNX_DIFFUSION_FIELD 25 +# define RDS_LYNX_DIFFUSION_EMPTY (unsigned char)255 + +# define RDS_IMPLICIT 1 /*4p*/ +# define RDS_EXPLICIT (unsigned char)255 /*4p*/ + +# define RDS_LYNX_BULK_IMPLICIT_FIELD 1 /*4p*/ +# define RDS_LYNX_BULK_IMPLICIT_EMPTY RDS_EXPLICIT /*4p*/ + +/*------------------------------------------------------------\ +| | +| S2R Define | +| | +\------------------------------------------------------------*/ + +# define S2R_NOTREAT (unsigned char)255 +# define S2R_TREAT 1 + +# define RDS_S2R_POST_TREAT_FIELD 2 +# define RDS_S2R_OVERSIZE_FIELD 1 +# define RDS_S2R_RING_WIDTH_FIELD 1 +# define RDS_S2R_LAYER_WIDTH_FIELD 1 + +# define RDS_S2R_POST_TREAT_EMPTY S2R_NOTREAT +# define RDS_S2R_OVERSIZE_EMPTY (long)0 +# define RDS_S2R_RING_WIDTH_EMPTY (long)0 +# define RDS_S2R_LAYER_WIDTH_EMPTY (long)0 + +/*------------------------------------------------------------\ +| | +| Mbk Define | +| | +\------------------------------------------------------------*/ + +# define RDS_TRANS_VW (unsigned char)0 +# define RDS_TRANS_LCW (unsigned char)1 +# define RDS_TRANS_RCW (unsigned char)2 + +# define RDS_MAX_TRANS ( RDS_TRANS_RCW + 1 ) + +# define MBK_REF_REF 0 +# define MBK_REF_CON 1 + +# define MBK_MAX_LAYER ( LAST_LAYER + 1 ) +# define MBK_MAX_VIA ( LAST_CONTACT + 1 ) +# define MBK_MAX_REFERENCE 2 +# define MBK_MAX_SYMMETRY ( SY_RP + 1 ) +# define MBK_MAX_ORIENT 4 + +# define RDS_SEGMENT_FIELD 120 +# define RDS_VIA_FIELD 60 +# define RDS_CONNECTOR_FIELD 3 +# define RDS_REFERENCE_FIELD 60 + +# define RDS_SEGMENT_EMPTY (long)-1 +# define RDS_VIA_EMPTY (long)-1 +# define RDS_CONNECTOR_EMPTY (long)-1 +# define RDS_REFERENCE_EMPTY (long)-1 + +# define RDS_USE_ALL (unsigned char)0 +# define RDS_USE_EXTRACT (unsigned char)1 +# define RDS_USE_DRC (unsigned char)2 + +# define RDS_MAX_USE ( RDS_USE_DRC + 1 ) + +# define RDS_BIGVIA_HOLE_FIELD 80 +# define RDS_BIGVIA_METAL_FIELD 80 +# define RDS_TURNVIA_FIELD 60 + +# define RDS_BIGVIA_HOLE_EMPTY (long)-1 +# define RDS_BIGVIA_METAL_EMPTY (long)-1 +# define RDS_TURNVIA_EMPTY (long)-1 + +/*------------------------------------------------------------\ +| | +| Parser Define | +| | +\------------------------------------------------------------*/ + +# define RDS_CIF_LAYER_FIELD 1 +# define RDS_GDS_LAYER_FIELD 2 + +# define RDS_CIF_LAYER_EMPTY (char *)NULL +# define RDS_GDS_LAYER_EMPTY (unsigned char)255 + +/*------------------------------------------------------------\ +| | +| Lynx Macros | +| | +\------------------------------------------------------------*/ + +# define GET_LYNX_GRAPH_LAYER( Layer, Index ) \ + \ + ( ( Index >= RDS_LYNX_GRAPH_FIELD ) ? \ + ( RDS_LYNX_GRAPH_EMPTY ) : \ + ( RDS_LYNX_GRAPH_TABLE [ (int)(Layer) ][ ( Index ) ] ) ) + +# define GET_LYNX_SURFACE_CAPA_LAYER( Layer ) \ + \ + ( RDS_LYNX_CAPA_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_LYNX_PERIMETER_CAPA_LAYER( Layer ) \ + \ + ( RDS_LYNX_CAPA_TABLE [ (int)(Layer) ][ 1 ] ) + +# define GET_LYNX_DIFFUSION_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 2 >= RDS_LYNX_DIFFUSION_FIELD ) ? \ + ( RDS_LYNX_DIFFUSION_EMPTY ) : \ + ( RDS_LYNX_DIFFUSION_TABLE [ (int)(Layer) ][ (int)(Index)*2 + 0 ] ) ) + +# define GET_LYNX_DIFFUSION_Y_OR_N( Layer, Index ) \ + \ + ( ( (int)(Index) * 2 >= RDS_LYNX_DIFFUSION_FIELD ) ? \ + ( RDS_LYNX_DIFFUSION_EMPTY ) : \ + ( RDS_LYNX_DIFFUSION_TABLE [ (int)(Layer) ][ (int)(Index)*2 + 1 ] ) ) + +# define GET_LYNX_RESISTOR_LAYER( Layer ) \ + \ + ( RDS_LYNX_RESISTOR_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_LYNX_TRANSISTOR_TYPE( Layer ) \ + \ + ( RDS_LYNX_TRANSISTOR_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_LYNX_TRANSISTOR_CX( Layer ) \ + \ + ( RDS_LYNX_TRANSISTOR_TABLE [ (int)(Layer) ][ 1 ] ) + +# define GET_LYNX_TRANSISTOR_GATE_LAYER( Layer ) \ + \ + ( RDS_LYNX_TRANSISTOR_TABLE [ (int)(Layer) ][ 2 ] ) + +# define GET_LYNX_TRANSISTOR_DIFF_LAYER( Layer ) \ + \ + ( RDS_LYNX_TRANSISTOR_TABLE [ (int)(Layer) ][ 3 ] ) + +# define GET_LYNX_TRANSISTOR_ACTIV_LAYER( Layer ) \ + \ + ( RDS_LYNX_TRANSISTOR_TABLE [ (int)(Layer) ][ 4 ] ) + +/*4p*/ +# define GET_LYNX_TRANSISTOR_BULK_LAYER( Layer ) \ + \ + ( RDS_LYNX_TRANSISTOR_TABLE [ (int)(Layer) ][ 5 ] ) + +/*4p*/ +# define GET_LYNX_BULK_IMPLICIT( Layer ) \ + \ + ( RDS_LYNX_BULK_IMPLICIT_TABLE [ (int)(Layer) ][ 0 ] ) + + +/*------------------------------------------------------------\ +| | +| S2R Macros | +| | +\------------------------------------------------------------*/ + +# define GET_S2R_POST_Y_OR_N( Layer ) \ + \ + ( RDS_S2R_POST_TREAT_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_S2R_POST_COMPLEMENTARY( Layer ) \ + \ + ( RDS_S2R_POST_TREAT_TABLE [ (int)(Layer) ][ 1 ] ) + +# define GET_S2R_OVERSIZE( Layer ) \ + \ + ( RDS_S2R_OVERSIZE_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_S2R_RING_WIDTH( Layer ) \ + \ + ( RDS_S2R_RING_WIDTH_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_S2R_LAYER_WIDTH( Layer ) \ + \ + ( RDS_S2R_LAYER_WIDTH_TABLE [ (int)(Layer) ][ 0 ] ) + +/*------------------------------------------------------------\ +| | +| Mbk Macros | +| | +\------------------------------------------------------------*/ + +# define GET_SEGMENT_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 6 >= RDS_SEGMENT_FIELD ) ? \ + ( RDS_SEGMENT_EMPTY ) : \ + ( RDS_SEGMENT_TABLE [ (int)(Layer) ][ (int)(Index) * 6 + 0 ] ) ) + +# define GET_SEGMENT_TRANS( Layer, Index ) \ + \ + ( ( (int)(Index) * 6 >= RDS_SEGMENT_FIELD ) ? \ + ( RDS_SEGMENT_EMPTY ) : \ + ( RDS_SEGMENT_TABLE [ (int)(Layer) ][ (int)(Index) * 6 + 1 ] ) ) + +# define GET_SEGMENT_DLR( Layer, Index ) \ + \ + ( ( (int)(Index) * 6 >= RDS_SEGMENT_FIELD ) ? \ + ( RDS_SEGMENT_EMPTY ) : \ + ( RDS_SEGMENT_TABLE [ (int)(Layer) ][ (int)(Index) * 6 + 2 ] ) ) + +# define GET_SEGMENT_DWR( Layer, Index ) \ + \ + ( ( (int)(Index) * 6 >= RDS_SEGMENT_FIELD ) ? \ + ( RDS_SEGMENT_EMPTY ) : \ + ( RDS_SEGMENT_TABLE [ (int)(Layer) ][ (int)(Index) * 6 + 3 ] ) ) + +# define GET_SEGMENT_OFFSET( Layer, Index ) \ + \ + ( ( (int)(Index) * 6 >= RDS_SEGMENT_FIELD ) ? \ + ( RDS_SEGMENT_EMPTY ) : \ + ( RDS_SEGMENT_TABLE [ (int)(Layer) ][ (int)(Index) * 6 + 4 ] ) ) + +# define GET_SEGMENT_USE( Layer, Index ) \ + \ + ( ( (int)(Index) * 6 >= RDS_SEGMENT_FIELD ) ? \ + ( RDS_SEGMENT_EMPTY ) : \ + ( RDS_SEGMENT_TABLE [ (int)(Layer) ][ (int)(Index) * 6 + 5 ] ) ) + +# define GET_CONNECTOR_LAYER( Layer ) \ + \ + ( RDS_CONNECTOR_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_CONNECTOR_DER( Layer ) \ + \ + ( RDS_CONNECTOR_TABLE [ (int)(Layer) ][ 1 ] ) + +# define GET_CONNECTOR_DWR( Layer ) \ + \ + ( RDS_CONNECTOR_TABLE [ (int)(Layer) ][ 2 ] ) + +# define GET_VIA_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 3 >= RDS_VIA_FIELD ) ? \ + ( RDS_VIA_EMPTY ) : \ + ( RDS_VIA_TABLE [ (int)(Layer) ][ (int)(Index) * 3 + 0 ] ) ) + +# define GET_VIA_SIZE( Layer, Index ) \ + \ + ( ( (int)(Index) * 3 >= RDS_VIA_FIELD ) ? \ + ( RDS_VIA_EMPTY ) : \ + ( RDS_VIA_TABLE [ (int)(Layer) ][ (int)(Index) * 3 + 1 ] ) ) + +# define GET_VIA_USE( Layer, Index ) \ + \ + ( ( (int)(Index) * 3 >= RDS_VIA_FIELD ) ? \ + ( RDS_VIA_EMPTY ) : \ + ( RDS_VIA_TABLE [ (int)(Layer) ][ (int)(Index) * 3 + 2 ] ) ) + +# define GET_REFERENCE_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 2 >= RDS_REFERENCE_FIELD ) ? \ + ( RDS_REFERENCE_EMPTY ) : \ + ( RDS_REFERENCE_TABLE [ (int)(Layer) ][ (int)(Index) * 2 + 0 ] )) + +# define GET_REFERENCE_SIZE( Layer, Index ) \ + \ + ( ( (int)(Index) * 2 >= RDS_REFERENCE_FIELD ) ? \ + ( RDS_REFERENCE_EMPTY ) : \ + ( RDS_REFERENCE_TABLE [ (int)(Layer) ][ (int)(Index) * 2 + 1 ] )) + +/*------------------------------------------------------------\ +| | +| Big Via Macros | +| | +\------------------------------------------------------------*/ + +# define GET_BIGVIA_HOLE_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_HOLE_FIELD ) ? \ + ( RDS_BIGVIA_HOLE_EMPTY ) : \ + ( RDS_BIGVIA_HOLE_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 0 ] ) ) + +# define GET_BIGVIA_HOLE_SIDE( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_HOLE_FIELD ) ? \ + ( RDS_BIGVIA_HOLE_EMPTY ) : \ + ( RDS_BIGVIA_HOLE_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 1 ] ) ) + +# define GET_BIGVIA_HOLE_STEP( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_HOLE_FIELD ) ? \ + ( RDS_BIGVIA_HOLE_EMPTY ) : \ + ( RDS_BIGVIA_HOLE_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 2 ] ) ) + +# define GET_BIGVIA_HOLE_USE( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_HOLE_FIELD ) ? \ + ( RDS_BIGVIA_HOLE_EMPTY ) : \ + ( RDS_BIGVIA_HOLE_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 3 ] ) ) + +# define GET_BIGVIA_METAL_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_METAL_FIELD ) ? \ + ( RDS_BIGVIA_METAL_EMPTY ) : \ + ( RDS_BIGVIA_METAL_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 0 ] ) ) + +# define GET_BIGVIA_METAL_DWR( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_METAL_FIELD ) ? \ + ( RDS_BIGVIA_METAL_EMPTY ) : \ + ( RDS_BIGVIA_METAL_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 1 ] ) ) + +# define GET_BIGVIA_METAL_OVERLAP( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_METAL_FIELD ) ? \ + ( RDS_BIGVIA_METAL_EMPTY ) : \ + ( RDS_BIGVIA_METAL_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 2 ] ) ) + +# define GET_BIGVIA_METAL_USE( Layer, Index ) \ + \ + ( ( (int)(Index) * 4 >= RDS_BIGVIA_METAL_FIELD ) ? \ + ( RDS_BIGVIA_METAL_EMPTY ) : \ + ( RDS_BIGVIA_METAL_TABLE [ (int)(Layer) ][ (int)(Index) * 4 + 3 ] ) ) + +/*------------------------------------------------------------\ +| | +| Turn Via Macros | +| | +\------------------------------------------------------------*/ + +# define GET_TURNVIA_LAYER( Layer, Index ) \ + \ + ( ( (int)(Index) * 3 >= RDS_TURNVIA_FIELD ) ? \ + ( RDS_TURNVIA_EMPTY ) : \ + ( RDS_TURNVIA_TABLE [ (int)(Layer) ][ (int)(Index) * 3 + 0 ] ) ) + +# define GET_TURNVIA_DWR( Layer, Index ) \ + \ + ( ( (int)(Index) * 3 >= RDS_TURNVIA_FIELD ) ? \ + ( RDS_TURNVIA_EMPTY ) : \ + ( RDS_TURNVIA_TABLE [ (int)(Layer) ][ (int)(Index) * 3 + 1 ] ) ) + +# define GET_TURNVIA_USE( Layer, Index ) \ + \ + ( ( (int)(Index) * 3 >= RDS_TURNVIA_FIELD ) ? \ + ( RDS_TURNVIA_EMPTY ) : \ + ( RDS_TURNVIA_TABLE [ (int)(Layer) ][ (int)(Index) * 3 + 2 ] ) ) + +/*------------------------------------------------------------\ +| | +| Parser Macros | +| | +\------------------------------------------------------------*/ + +# define GET_CIF_LAYER( Layer ) \ + \ + ( RDS_CIF_LAYER_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_GDS_LAYER( Layer ) \ + \ + ( RDS_GDS_LAYER_TABLE [ (int)(Layer) ][ 0 ] ) + +# define GET_GDS_CONNECTOR_LAYER( Layer ) \ + \ + ( RDS_GDS_LAYER_TABLE [ (int)(Layer) ][ 1 ] ) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + extern long RDS_PHYSICAL_GRID; + extern long RDS_LAMBDA; + extern long RDS_LAMBDA2; + extern long RDS_UNIT; + extern long RDS_UNIT2; + + extern unsigned char RDS_S2R_POST_TREAT_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_POST_TREAT_FIELD ]; + extern long RDS_S2R_OVERSIZE_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_OVERSIZE_FIELD ]; + extern long RDS_S2R_RING_WIDTH_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_RING_WIDTH_FIELD ]; + extern long RDS_S2R_LAYER_WIDTH_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_LAYER_WIDTH_FIELD ]; + + extern long RDS_SEGMENT_TABLE [ MBK_MAX_LAYER ][ RDS_SEGMENT_FIELD ]; + extern long RDS_VIA_TABLE [ MBK_MAX_VIA ][ RDS_VIA_FIELD ]; + extern long RDS_CONNECTOR_TABLE [ MBK_MAX_LAYER ][ RDS_CONNECTOR_FIELD ]; + extern long RDS_REFERENCE_TABLE [ MBK_MAX_REFERENCE ][ RDS_REFERENCE_FIELD ]; + + extern long RDS_BIGVIA_HOLE_TABLE[ MBK_MAX_VIA ][ RDS_BIGVIA_HOLE_FIELD ]; + extern long RDS_BIGVIA_METAL_TABLE[ MBK_MAX_VIA ][ RDS_BIGVIA_METAL_FIELD ]; + extern long RDS_TURNVIA_TABLE[ MBK_MAX_VIA ][ RDS_TURNVIA_FIELD ]; + + extern unsigned char RDS_GDS_LAYER_TABLE [ RDS_ALL_LAYER ][ RDS_GDS_LAYER_FIELD ]; + extern char *RDS_CIF_LAYER_TABLE [ RDS_ALL_LAYER ][ RDS_CIF_LAYER_FIELD ]; + + extern unsigned char RDS_LYNX_BULK_IMPLICIT_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_BULK_IMPLICIT_FIELD ]; + + extern float RDS_LYNX_CAPA_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_CAPA_FIELD ]; + extern float RDS_LYNX_RESISTOR_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_RESISTOR_FIELD ]; + + extern unsigned char RDS_LYNX_GRAPH_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_GRAPH_FIELD ]; + extern unsigned char RDS_LYNX_TRANSISTOR_TABLE [ MBK_MAX_LAYER ][ RDS_LYNX_TRANSISTOR_FIELD ]; + extern unsigned char RDS_LYNX_DIFFUSION_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_DIFFUSION_FIELD ]; + + extern char MBK_LAYER_NAME[ MBK_MAX_LAYER ][ 12 ]; + extern char MBK_VIA_NAME [ MBK_MAX_VIA ][ 12 ]; + extern char RDS_TRANS_NAME [ RDS_MAX_TRANS ][ 4 ]; + extern char RDS_USE_NAME [ RDS_MAX_USE ][ 4 ]; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void loadrdsparam __P(()); + extern void viewrdsparam __P(()); + +# endif diff --git a/alliance/src/rds/src/rprerror.c b/alliance/src/rds/src/rprerror.c new file mode 100644 index 00000000..792dd56a --- /dev/null +++ b/alliance/src/rds/src/rprerror.c @@ -0,0 +1,179 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rprerror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rwi.h" +# include "rut.h" + +# include "rprerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void rpr_error( Error, Text, Data, File, Line ) + + char Error; + char *Text; + long Data; + char *File; + long Line; +{ + char Name[ 128 ]; + + strcpy( Name, File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "rpr:%s%ld error ", Name, Line ); + + switch( Error ) + { + case RPR_DEFINE_MISSING : + + fprintf( stderr, "some defines missing\n"); + break; + + case RPR_TABLE_MISSING : + + fprintf( stderr, "some tables missing\n"); + break; + + case RPR_LINE_EXPECTED : + + fprintf( stderr, "%s expected line %lu\n", Text, Data ); + break; + + case RPR_UNKNOWN_DEFINE : + + fprintf( stderr, "unknown define %s line %lu\n", + Text, Data ); + break; + + case RPR_NOT_DEFINED : + + fprintf( stderr, "%s not defined line %lu\n", + Text, Data ); + break; + + case RPR_MULTIPLE_GRID : + + fprintf( stderr, "%s not multiple of physical grid line %lu\n", + Text, Data ); + break; + + case RPR_TOO_SMAL : + + fprintf( stderr, "%s too smal line %lu\n", + Text, Data ); + break; + + case RPR_MISSING_VALUE : + + fprintf( stderr, "missing value line %lu\n", Data ); + break; + + case RPR_MISSING_NAME : + + fprintf( stderr, "missing name of %s line %lu\n", + Text, Data ); + break; + + case RPR_ILLEGAL_FLOAT : + + fprintf( stderr, "illegal floating point number %s line %lu\n", + Text, Data ); + break; + + case RPR_UNEXPECTED_LINE : + + fprintf( stderr, "%s unexpected line %lu\n", + Text, Data ); + break; + + case RPR_UNEXPECTED_EOF : + + fprintf( stderr, "unexpected end of file, missing definitions\n"); + break; + + case RPR_TOO_MANY_WORDS : + + fprintf( stderr, "too many words %s unexpected line %lu\n", + Text, Data ); + break; + + case RPR_MISSING_TABLE : + + fprintf( stderr, "table %s Missing value line %lu\n", + Text, Data ); + break; + + case RPR_OPEN_FILE : + + fprintf( stderr, "can't open file\n" ); + break; + + case RPR_MISSING_POST : + + fprintf( stderr, "missing %s value in postreat table line %lu\n", + Text , Data ); + break; + + case RPR_NEGATIVE_VALUE : + + fprintf( stderr, "%s has to be positive value line %lu\n", + Text , Data ); + break; + + case RPR_SYNTAX_ERROR : + + fprintf( stderr, "syntax Error %s at line %lu\n", + Text , Data ); + break; + + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + fprintf( stderr, "in technological file %s\n", RDS_TECHNO_NAME ); + + EXIT( 1 ); +} diff --git a/alliance/src/rds/src/rprerror.h b/alliance/src/rds/src/rprerror.h new file mode 100644 index 00000000..acbb72ca --- /dev/null +++ b/alliance/src/rds/src/rprerror.h @@ -0,0 +1,79 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rprerror.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RPR_ERROR_H +# define RPR_ERROR_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rpr Error Constants | +| | +\------------------------------------------------------------*/ + +# define RPR_DEFINE_MISSING 0 +# define RPR_TABLE_MISSING 1 +# define RPR_LINE_EXPECTED 2 +# define RPR_UNKNOWN_DEFINE 3 +# define RPR_NOT_DEFINED 4 +# define RPR_MULTIPLE_GRID 5 +# define RPR_TOO_SMAL 6 +# define RPR_MISSING_VALUE 7 +# define RPR_MISSING_NAME 8 +# define RPR_ILLEGAL_FLOAT 9 +# define RPR_UNEXPECTED_LINE 10 +# define RPR_UNEXPECTED_EOF 11 +# define RPR_TOO_MANY_WORDS 12 +# define RPR_MISSING_TABLE 13 +# define RPR_OPEN_FILE 14 +# define RPR_MISSING_POST 15 +# define RPR_NEGATIVE_VALUE 16 +# define RPR_SYNTAX_ERROR 17 + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define rprerror( E, V, D ) (rpr_error( (E), (V), (D), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rpr_error __P((char Error, char *Text, long Data, char *File, long Line)); + +# endif diff --git a/alliance/src/rds/src/rprparse.c b/alliance/src/rds/src/rprparse.c new file mode 100644 index 00000000..1c441225 --- /dev/null +++ b/alliance/src/rds/src/rprparse.c @@ -0,0 +1,3005 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rprparse.c | +| | +| Authors : Jacomme Ludovic | +| Picault Stephane *4p* | +| | +| Date : 27.06.95 | +| 15.07.98 *4p* | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rwi.h" +# include "rut.h" + +# include "rprerror.h" +# include "rprparse.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + long RDS_PHYSICAL_GRID; + long RDS_LAMBDA; + long RDS_LAMBDA2; + long RDS_UNIT; + long RDS_UNIT2; + +/*------------------------------------------------------------\ +| | +| Table variables | +| | +\------------------------------------------------------------*/ + + unsigned char RDS_S2R_POST_TREAT_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_POST_TREAT_FIELD ]; + long RDS_S2R_OVERSIZE_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_OVERSIZE_FIELD ]; + long RDS_S2R_RING_WIDTH_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_RING_WIDTH_FIELD ]; + long RDS_S2R_LAYER_WIDTH_TABLE [ RDS_ALL_LAYER ][ RDS_S2R_LAYER_WIDTH_FIELD ]; + + long RDS_SEGMENT_TABLE [ MBK_MAX_LAYER ][ RDS_SEGMENT_FIELD ]; + long RDS_VIA_TABLE [ MBK_MAX_VIA ][ RDS_VIA_FIELD ]; + long RDS_CONNECTOR_TABLE [ MBK_MAX_LAYER ][ RDS_CONNECTOR_FIELD ]; + long RDS_REFERENCE_TABLE [ MBK_MAX_REFERENCE ][ RDS_REFERENCE_FIELD ]; + + long RDS_BIGVIA_HOLE_TABLE[ MBK_MAX_VIA ][ RDS_BIGVIA_HOLE_FIELD ]; + long RDS_BIGVIA_METAL_TABLE[ MBK_MAX_VIA ][ RDS_BIGVIA_METAL_FIELD ]; + long RDS_TURNVIA_TABLE[ MBK_MAX_VIA ][ RDS_TURNVIA_FIELD ]; + + char *RDS_CIF_LAYER_TABLE [ RDS_ALL_LAYER ][ RDS_CIF_LAYER_FIELD ]; + unsigned char RDS_GDS_LAYER_TABLE [ RDS_ALL_LAYER ][ RDS_GDS_LAYER_FIELD ]; + + unsigned char RDS_LYNX_BULK_IMPLICIT_TABLE /*4p*/ + [ RDS_ALL_LAYER ][ RDS_LYNX_BULK_IMPLICIT_FIELD ]; /*4p*/ + + unsigned char RDS_LYNX_GRAPH_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_GRAPH_FIELD ]; + float RDS_LYNX_CAPA_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_CAPA_FIELD ]; + float RDS_LYNX_RESISTOR_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_RESISTOR_FIELD ]; + unsigned char RDS_LYNX_TRANSISTOR_TABLE [ MBK_MAX_LAYER ][ RDS_LYNX_TRANSISTOR_FIELD ]; + unsigned char RDS_LYNX_DIFFUSION_TABLE [ RDS_ALL_LAYER ][ RDS_LYNX_DIFFUSION_FIELD ]; + +/*------------------------------------------------------------\ +| | +| Keywords variables | +| | +\------------------------------------------------------------*/ + + static char KeywordDefined = 0; + + static char *DefineKeyword; + static char *TableKeyword; + static char *EndTableKeyword; + static char *EndRecordKeyword; + static char *LambdaKeyword; + static char *PhysicalGridKeyword; + static char *SegmentKeyword; + static char *ViaKeyword; + static char *ConnectorKeyword; + static char *ReferenceKeyword; + static char *CifLayerKeyword; + static char *GdsLayerKeyword; + static char *S2RPostTreatKeyword; + static char *S2ROversizeKeyword; + static char *S2RRingWidthKeyword; + static char *S2RLayerWidthKeyword; + static char *LynxGraphKeyword; + static char *LynxCapaKeyword; + static char *LynxResistorKeyword; + static char *LynxTransistorKeyword; + static char *LynxDiffusionKeyword; + static char *LynxBulkImplicitKeyword; /*4p*/ + static char *BigViaHoleKeyword; + static char *BigViaMetalKeyword; + static char *TurnViaKeyword; + + static char *DrcRulesKeword; + + static keyword KeywordDefine [ RPR_MAX_KEYWORD ] = + + { + { "all", RDS_USE_ALL }, + { "alu1", ALU1 }, + { "alu2", ALU2 }, + { "alu3", ALU3 }, + { "alu4", ALU4 }, + { "alu5", ALU5 }, + { "alu6", ALU6 }, + { "alu7", ALU7 }, + { "alu8", ALU8 }, + { "alu9", ALU9 }, + { "c_x_n", C_X_N }, + { "c_x_p", C_X_P }, + { "calu1", CALU1 }, + { "calu2", CALU2 }, + { "calu3", CALU3 }, + { "calu4", CALU4 }, + { "calu5", CALU5 }, + { "calu6", CALU6 }, + { "calu7", CALU7 }, + { "calu8", CALU8 }, + { "calu9", CALU9 }, + { "cont_body_n", CONT_BODY_N }, + { "cont_body_p", CONT_BODY_P }, + { "cont_dif_n", CONT_DIF_N }, + { "cont_dif_p", CONT_DIF_P }, + { "cont_poly", CONT_POLY }, + { "cont_poly2", CONT_POLY2 }, + { "cont_turn1", CONT_TURN1 }, + { "cont_turn2", CONT_TURN2 }, + { "cont_turn3", CONT_TURN3 }, + { "cont_turn4", CONT_TURN4 }, + { "cont_turn5", CONT_TURN5 }, + { "cont_turn6", CONT_TURN6 }, + { "cont_turn7", CONT_TURN7 }, + { "cont_turn8", CONT_TURN8 }, + { "cont_turn9", CONT_TURN9 }, + { "cont_via", CONT_VIA }, + { "cont_via2", CONT_VIA2 }, + { "cont_via3", CONT_VIA3 }, + { "cont_via4", CONT_VIA4 }, + { "cont_via5", CONT_VIA5 }, + { "cont_via6", CONT_VIA6 }, + { "cont_via7", CONT_VIA7 }, + { "cont_via8", CONT_VIA8 }, + { "drc", RDS_USE_DRC }, + { "explicit", RDS_EXPLICIT }, /*4p*/ + { "ext", RDS_USE_EXTRACT }, + { "implicit", RDS_IMPLICIT }, /*4p*/ + { "lcw", RDS_TRANS_LCW }, + { "ndif", NDIF }, + { "notreat", S2R_NOTREAT }, + { "ntie", NTIE }, + { "ntrans", NTRANS }, + { "null", S2R_NOTREAT }, + { "nwell", NWELL }, + { "pdif", PDIF }, + { "poly", POLY }, + { "poly2", POLY2 }, + { "ptie", PTIE }, + { "ptrans", PTRANS }, + { "pwell", PWELL }, + { "rcw", RDS_TRANS_RCW }, + { "rds_abox", RDS_LAYER_ABOX }, + { "rds_activ", RDS_LAYER_ACTIV }, + { "rds_alu1", RDS_LAYER_ALU1 }, + { "rds_alu2", RDS_LAYER_ALU2 }, + { "rds_alu3", RDS_LAYER_ALU3 }, + { "rds_alu4", RDS_LAYER_ALU4 }, + { "rds_alu5", RDS_LAYER_ALU5 }, + { "rds_alu6", RDS_LAYER_ALU6 }, + { "rds_alu7", RDS_LAYER_ALU7 }, + { "rds_alu8", RDS_LAYER_ALU8 }, + { "rds_alu9", RDS_LAYER_ALU9 }, + { "rds_cont", RDS_LAYER_CONT }, + { "rds_cont2", RDS_LAYER_CONT2 }, + { "rds_cpas", RDS_LAYER_CPAS }, + { "rds_gate", RDS_LAYER_GATE }, + { "rds_ndif", RDS_LAYER_NDIF }, + { "rds_nimp", RDS_LAYER_NIMP }, + { "rds_ntie", RDS_LAYER_NTIE }, + { "rds_nwell", RDS_LAYER_NWELL }, + { "rds_pdif", RDS_LAYER_PDIF }, + { "rds_pimp", RDS_LAYER_PIMP }, + { "rds_poly", RDS_LAYER_POLY }, + { "rds_poly2", RDS_LAYER_POLY2 }, + { "rds_ptie", RDS_LAYER_PTIE }, + { "rds_pwell", RDS_LAYER_PWELL }, + { "rds_ref", RDS_LAYER_REF }, + { "rds_talu1", RDS_LAYER_TALU1 }, + { "rds_talu2", RDS_LAYER_TALU2 }, + { "rds_talu3", RDS_LAYER_TALU3 }, + { "rds_talu4", RDS_LAYER_TALU4 }, + { "rds_talu5", RDS_LAYER_TALU5 }, + { "rds_talu6", RDS_LAYER_TALU6 }, + { "rds_talu7", RDS_LAYER_TALU7 }, + { "rds_talu8", RDS_LAYER_TALU8 }, + { "rds_tcont", RDS_LAYER_TCONT }, + { "rds_tpoly", RDS_LAYER_TPOLY }, + { "rds_tpoly2", RDS_LAYER_TPOLY2 }, + { "rds_tvia1", RDS_LAYER_TVIA1 }, + { "rds_tvia2", RDS_LAYER_TVIA2 }, + { "rds_tvia3", RDS_LAYER_TVIA3 }, + { "rds_tvia4", RDS_LAYER_TVIA4 }, + { "rds_tvia5", RDS_LAYER_TVIA5 }, + { "rds_tvia6", RDS_LAYER_TVIA6 }, + { "rds_tvia7", RDS_LAYER_TVIA7 }, + { "rds_tvia8", RDS_LAYER_TVIA8 }, + { "rds_user0", RDS_LAYER_USER0 }, + { "rds_user1", RDS_LAYER_USER1 }, + { "rds_user2", RDS_LAYER_USER2 }, + { "rds_user3", RDS_LAYER_USER3 }, + { "rds_user4", RDS_LAYER_USER4 }, + { "rds_user5", RDS_LAYER_USER5 }, + { "rds_user6", RDS_LAYER_USER6 }, + { "rds_user7", RDS_LAYER_USER7 }, + { "rds_user8", RDS_LAYER_USER8 }, + { "rds_user9", RDS_LAYER_USER9 }, + { "rds_valu1", RDS_LAYER_VALU1 }, + { "rds_valu2", RDS_LAYER_VALU2 }, + { "rds_valu3", RDS_LAYER_VALU3 }, + { "rds_valu4", RDS_LAYER_VALU4 }, + { "rds_valu5", RDS_LAYER_VALU5 }, + { "rds_valu6", RDS_LAYER_VALU6 }, + { "rds_valu7", RDS_LAYER_VALU7 }, + { "rds_valu8", RDS_LAYER_VALU8 }, + { "rds_via1", RDS_LAYER_VIA1 }, + { "rds_via2", RDS_LAYER_VIA2 }, + { "rds_via3", RDS_LAYER_VIA3 }, + { "rds_via4", RDS_LAYER_VIA4 }, + { "rds_via5", RDS_LAYER_VIA5 }, + { "rds_via6", RDS_LAYER_VIA6 }, + { "rds_via7", RDS_LAYER_VIA7 }, + { "rds_via8", RDS_LAYER_VIA8 }, + { "rds_vpoly", RDS_LAYER_VPOLY }, + { "ref_con", MBK_REF_CON }, + { "ref_ref", MBK_REF_REF }, + { "talu1", TALU1 }, + { "talu2", TALU2 }, + { "talu3", TALU3 }, + { "talu4", TALU4 }, + { "talu5", TALU5 }, + { "talu6", TALU6 }, + { "talu7", TALU7 }, + { "talu8", TALU8 }, + { "tpoly", TPOLY }, + { "tpoly2", TPOLY2 }, + { "treat", S2R_TREAT }, + { "vw", RDS_TRANS_VW } + }; + +/*------------------------------------------------------------\ +| | +| Name | +| | +\------------------------------------------------------------*/ + + char RDS_TRANS_NAME [ RDS_MAX_TRANS ][ 4 ] = + + { + "VW ", + "LCW", + "RCW" + }; + + char RDS_USE_NAME [ RDS_MAX_USE ][ 4 ] = + + { + "ALL", + "EXT", + "DRC" + }; + + char MBK_VIA_NAME [ MBK_MAX_VIA ][ 12 ] = + + { + "CONT_POLY ", + "CONT_DIF_N ", + "CONT_DIF_P ", + "CONT_BODY_N", + "CONT_BODY_P", + "CONT_VIA ", + "CONT_VIA2 ", + "CONT_VIA3 ", + "CONT_VIA4 ", + "CONT_VIA5 ", + "CONT_VIA6 ", + "CONT_VIA7 ", + "CONT_VIA8 ", + "CONT_POLY2 ", + "C_X_N ", + "C_X_P ", + "CONT_TURN1 ", + "CONT_TURN2 ", + "CONT_TURN3 ", + "CONT_TURN4 ", + "CONT_TURN5 ", + "CONT_TURN6 ", + "CONT_TURN7 ", + "CONT_TURN8 ", + "CONT_TURN9 " + }; + + char MBK_LAYER_NAME [ MBK_MAX_LAYER ][ 12 ] = + + { + "NWELL ", + "PWELL ", + "NTIE ", + "PTIE ", + "NDIF ", + "PDIF ", + "NTRANS ", + "PTRANS ", + "NTRANS_FAST", + "PTRANS_FAST", + "NTRANS_HVIO", + "PTRANS_HVIO", + "POLY ", + "POLY2 ", + "ALU1 ", + "ALU2 ", + "ALU3 ", + "ALU4 ", + "ALU5 ", + "ALU6 ", + "ALU7 ", + "ALU8 ", + "ALU9 ", + "TPOLY ", + "TPOLY2 ", + "TALU1 ", + "TALU2 ", + "TALU3 ", + "TALU4 ", + "TALU5 ", + "TALU6 ", + "TALU7 ", + "TALU8 ", + "TALU9 ", + "CALU1 ", + "CALU2 ", + "CALU3 ", + "CALU4 ", + "CALU5 ", + "CALU6 ", + "CALU7 ", + "CALU8 ", + "CALU9 " + }; + +/*------------------------------------------------------------\ +| | +| File variables | +| | +\------------------------------------------------------------*/ + + static FILE *RprFile; + static char RprBuffer[ RPR_MAX_BUFFER ]; + static long RprCurrentLine = 0; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rpr Ascii to float (small numbers) | +| | +\------------------------------------------------------------*/ + +double RprAtof( integer ) + + char *integer; +{ + char *decimal; + long shift; + long i; + + if ((decimal = strchr( integer, '.')) != (char *)0 ) + { + *decimal = '\0'; + + decimal++; + + for(i=strlen(decimal),shift=1 ; i; shift*=10, i--); + + if (atol(integer) < 0) + { + return (double)(atol(integer)*shift - atol(decimal))/(double)(shift); + } + else + { + return (double)(atol(integer)*shift + atol(decimal))/(double)(shift); + } + } + else + { + return (double)(atol(integer)); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Upper Case | +| | +\------------------------------------------------------------*/ + +char *RprUpperCase( Name ) + + char *Name; +{ + char *Target; + int Index; + + if ( Name == (char *)NULL ) return( (char *)NULL ); + + Target = (char *)rdsallocblock( strlen( Name ) + 1 ); + + for ( Index = 0; Name[ Index ]; Index++ ) + { + Target[ Index ] = (char)toupper( Name[ Index ] ); + } + Target[ Index ] = '\0'; + + return( Target ); +} + +/*------------------------------------------------------------\ +| | +| Rpr File Get String | +| | +\------------------------------------------------------------*/ + +char *RprFileGetString( String, Size ) + + char *String; + int Size; +{ + register char *RegisterString; + register int Register; + + RegisterString = String; + Register = 0; + + while (--Size > 0 && (Register = getc( RprFile )) != EOF ) + { + if ((*RegisterString++ = Register) == '\\') + { + if ((Register = getc( RprFile )) == '\n') + { + RprCurrentLine++; + + *(RegisterString - 1) = ' '; + } + else + { + ungetc( Register, RprFile ); + } + } + else + { + if ( Register == '\n') break; + } + } + + *RegisterString = '\0'; + + return ( ( Register == EOF ) && + ( RegisterString == String ) ) ? (char *)NULL : String; +} + +/*------------------------------------------------------------\ +| | +| Rpr File Get Line | +| | +\------------------------------------------------------------*/ + +void RprGetLine( Buffer ) + + char *Buffer; +{ + char *Check; + char *String; + char OneComment; + + do + { + OneComment = 0; + + Check = RprFileGetString( Buffer, RPR_MAX_BUFFER ); + + if ( Check != (char *)NULL ) + { + RprCurrentLine++; + } + else + { + rprerror( RPR_UNEXPECTED_EOF, (char *)NULL, RprCurrentLine ); + } + + if ( ( String = strchr( Buffer, RPR_COMMENT_CHAR )) != (char *)0 ) + { + if ( String == Buffer ) + { + OneComment = 1; + } + else + { + *(String - 1) = '\0'; + } + } + + while (*Buffer != '\0' && strchr( RPR_SEPARATORS_STRING, *Buffer)) + { + Buffer = Buffer + 1;; + } + + if (*Buffer == '\0') OneComment = 1; + + } + while ( OneComment == 1); +} + +/*------------------------------------------------------------\ +| | +| Rpr Check Keyword | +| | +\------------------------------------------------------------*/ + +char RprCheckKeyword( Word ) + + char *Word; +{ + if ( ( Word == DefineKeyword ) || + ( Word == TableKeyword ) ) + { + return 1; + } + else + { + return 0; + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Get First word | +| | +\------------------------------------------------------------*/ + +char *RprGetFirstWord( Buffer, IsKeyword ) + + char *Buffer; + char IsKeyword; +{ + char *String; + + if ( ( String = (char *)strtok( Buffer, RPR_SEPARATORS_STRING )) != (char *)0 ) + { + String = namealloc( String ); + + if ( ( IsKeyword ) && RprCheckKeyword( String ) ) + { + rprerror( RPR_UNEXPECTED_LINE, String, RprCurrentLine ); + } + } + return( String ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Get Next word | +| | +\------------------------------------------------------------*/ + +char *RprGetNextWord( IsKeyword ) + + char IsKeyword; +{ + char *String; + + if ( ( String = (char *)strtok( (char *)NULL, RPR_SEPARATORS_STRING )) != (char *)0 ) + { + String = namealloc( String ); + + if ( ( IsKeyword ) && RprCheckKeyword( String ) ) + { + rprerror( RPR_UNEXPECTED_LINE, String, RprCurrentLine ); + } + } + + return( String ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Translate Param | +| | +\------------------------------------------------------------*/ + +long RprTranslateParam( Param ) + + double Param; +{ + double Multiple; + + Param = Param * RDS_UNIT; + Multiple = Param / RDS_PHYSICAL_GRID; + + if ( RDS_UNIT == -1 ) + { + rprerror( RPR_NOT_DEFINED, PhysicalGridKeyword, RprCurrentLine ); + } + + if ( (Multiple < (floor(Multiple + (double).5) - RPR_EPSILON )) || + (Multiple > (floor(Multiple + (double).5) + RPR_EPSILON )) ) + { + sprintf( RprBuffer, "%g", Param / RDS_UNIT ); + + rprerror( RPR_MULTIPLE_GRID, RprBuffer, RprCurrentLine ); + } + + return( ( long )Param ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Compute Rds Unit | +| | +\------------------------------------------------------------*/ + +void RprComputeRdsUnit( PhysicalGrid ) + + double PhysicalGrid; +{ + long Number; + long RdsUnit; + + if ( PhysicalGrid <= 0 ) + { + rprerror( RPR_NEGATIVE_VALUE, PhysicalGridKeyword, RprCurrentLine ); + } + + RdsUnit = 1; + + for ( Number = 1; + ! RprEqual( PhysicalGrid * (double)RdsUnit, (double)Number ); + Number = Number + 1 ) + { + if ( RdsUnit > RPR_MAX_RDS_UNIT ) + { + rprerror( RPR_TOO_SMAL, PhysicalGridKeyword, RprCurrentLine ); + } + + for ( RdsUnit = RdsUnit - 1; + PhysicalGrid * (double)RdsUnit + RPR_EPSILON < (double)Number; + RdsUnit = RdsUnit + 1 ); + + if ( RprEqual( PhysicalGrid * (double)RdsUnit, (double)Number )) + + break; + } + + RDS_UNIT = RdsUnit << 1; + RDS_PHYSICAL_GRID = Number << 1; + RDS_UNIT2 = RDS_UNIT * RDS_UNIT; +} + +/*------------------------------------------------------------\ +| | +| Rpr Keyword Compare | +| | +\------------------------------------------------------------*/ + +int RprKeywordCompare( FirstKey, SecondKey ) + + keyword *FirstKey; + keyword *SecondKey; +{ + return strcmp( FirstKey->NAME, SecondKey->NAME ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Get String Value | +| | +\------------------------------------------------------------*/ + +long RprGetStringValue( String ) + + char *String; +{ + double FloatValue; + long Value; + keyword *Keyword; + keyword Entry; + + if ( strchr( String, '.' )) + { + if ( sscanf( String, "%lf", &FloatValue) ) + + return( RprTranslateParam( FloatValue ) ); + + rprerror( RPR_ILLEGAL_FLOAT, String, RprCurrentLine ); + } + else + { + if ( sscanf( String, "%ld", &Value) ) + + return ( RprTranslateParam( (double)Value) ); + + Entry.NAME = String; + + Keyword = (keyword *)bsearch( (char *)(&Entry), + (char *)KeywordDefine, + RPR_MAX_KEYWORD, sizeof( keyword ), + RprKeywordCompare ); + + if ( Keyword != (keyword *)NULL ) + { + + if ( ! strncmp( String, "rds", 3 ) ) + { + RDS_DYNAMIC_LAYER[ (int)Keyword->VALUE ] = 1; + } + + return( Keyword->VALUE ); + } + + rprerror( RPR_UNEXPECTED_LINE, String, RprCurrentLine ); + } + + return( -1 ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Get String Float | +| | +\------------------------------------------------------------*/ + +float RprGetStringFloat( String ) + + char *String; +{ + float FloatValue; + + if ( sscanf( String, "%f", &FloatValue) ) + + return( FloatValue ); + + rprerror( RPR_ILLEGAL_FLOAT, String, RprCurrentLine ); + + return( 0.0 ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Get Number | +| | +\------------------------------------------------------------*/ + +long RprGetNumber( String ) + + char *String; +{ + long Value; + + if ( sscanf( String, "%ld", &Value )) return Value; + + rprerror( RPR_UNEXPECTED_LINE, "number", RprCurrentLine ); + + return( -1 ); +} + +/*------------------------------------------------------------\ +| | +| Rpr Skip Table | +| | +\------------------------------------------------------------*/ + +void RprSkipTable() + +{ + char EndTable; + char *FirstWord; + + EndTable = 0; + + while ( EndTable != 1 ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Segment | +| | +\------------------------------------------------------------*/ + +void RprReadSegment() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_SEGMENT_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field % 6 != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_SEGMENT_TABLE [ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_SEGMENT_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Connector | +| | +\------------------------------------------------------------*/ + +void RprReadConnector() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_CONNECTOR_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field % 3 != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_CONNECTOR_TABLE [ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_CONNECTOR_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Reference | +| | +\------------------------------------------------------------*/ + +void RprReadReference() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_REFERENCE ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_REFERENCE ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_REFERENCE_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( ( Field & 1 ) != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_REFERENCE_TABLE [ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_REFERENCE_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Via | +| | +\------------------------------------------------------------*/ + +void RprReadVia() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_VIA ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_VIA ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_VIA_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field % 3 != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_VIA_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_VIA_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Big Via Hole | +| | +\------------------------------------------------------------*/ + +void RprReadBigViaHole() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_VIA ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_VIA ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_BIGVIA_HOLE_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field % 4 != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_BIGVIA_HOLE_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_BIGVIA_HOLE_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Big Via Metal | +| | +\------------------------------------------------------------*/ + +void RprReadBigViaMetal() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_VIA ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_VIA ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_BIGVIA_METAL_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field % 4 != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_BIGVIA_METAL_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_BIGVIA_METAL_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Turn Via | +| | +\------------------------------------------------------------*/ + +void RprReadTurnVia() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_VIA ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_VIA ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_TURNVIA_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field % 3 != 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_TURNVIA_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_TURNVIA_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Cif Layer | +| | +\------------------------------------------------------------*/ + +void RprReadCifLayer() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_CIF_LAYER_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_CIF_LAYER_TABLE[ Layer ][ Field ] = RprUpperCase( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_CIF_LAYER_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Gds Layer | +| | +\------------------------------------------------------------*/ + +void RprReadGdsLayer() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_GDS_LAYER_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_GDS_LAYER_TABLE[ Layer ][ Field ] = atoi( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_GDS_LAYER_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Post Treat | +| | +\------------------------------------------------------------*/ + +void RprReadS2RPostTreat() + +{ + int Layer; + int LayerCount; + int EndTable; + int EndRecord; + int Field; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_S2R_POST_TREAT_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_S2R_POST_TREAT_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_S2R_POST_TREAT_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Over Size | +| | +\------------------------------------------------------------*/ + +void RprReadS2ROversize() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_S2R_OVERSIZE_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_S2R_OVERSIZE_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_S2R_OVERSIZE_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Ring Width | +| | +\------------------------------------------------------------*/ + +void RprReadS2RRingWidth() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_S2R_RING_WIDTH_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_S2R_RING_WIDTH_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_S2R_RING_WIDTH_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Layer Width | +| | +\------------------------------------------------------------*/ + +void RprReadS2RLayerWidth() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_S2R_LAYER_WIDTH_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_S2R_LAYER_WIDTH_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_S2R_LAYER_WIDTH_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Lynx Graph | +| | +\------------------------------------------------------------*/ + +void RprReadLynxGraph() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_LYNX_GRAPH_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_LYNX_GRAPH_TABLE [ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_LYNX_GRAPH_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Lynx Diffusion | +| | +\------------------------------------------------------------*/ + +void RprReadLynxDiffusion() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_LYNX_DIFFUSION_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field & 0x1 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + if ( Field & 0x1 ) + { + RDS_LYNX_DIFFUSION_TABLE [ Layer ][ Field ] = atoi( FirstWord ); + } + else + { + RDS_LYNX_DIFFUSION_TABLE [ Layer ][ Field ] = RprGetStringValue( FirstWord ); + } + + Field = Field + 1; + } + } + + if ( Field == RDS_LYNX_DIFFUSION_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Lynx Capa | +| | +\------------------------------------------------------------*/ + +void RprReadLynxCapa() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_LYNX_CAPA_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + if ( Field == 0 ) + { + RDS_LYNX_CAPA_TABLE [ Layer ][ 0 ] = + + RprGetStringFloat( FirstWord ) / RDS_UNIT2; + } + else + { + RDS_LYNX_CAPA_TABLE [ Layer ][ Field ] = + + RprGetStringFloat( FirstWord ) / RDS_UNIT; + } + + Field = Field + 1; + } + } + + if ( Field == RDS_LYNX_CAPA_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Lynx Resistor | +| | +\------------------------------------------------------------*/ + +void RprReadLynxResistor() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_LYNX_RESISTOR_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + EndRecord = 1; + } + else + { + RDS_LYNX_RESISTOR_TABLE [ Layer ][ Field ] = + + RprGetStringFloat( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_LYNX_RESISTOR_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Lynx Transistor | +| | +\------------------------------------------------------------*/ + +void RprReadLynxTransistor() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= MBK_MAX_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < MBK_MAX_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_LYNX_TRANSISTOR_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field < RDS_LYNX_TRANSISTOR_FIELD ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_LYNX_TRANSISTOR_TABLE [ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_LYNX_TRANSISTOR_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Read Lynx Bulk Implicit | +| | +\------------------------------------------------------------*/ + +void RprReadLynxBulkImplicit() + +{ + int Layer; + int LayerCount; + int Field; + int EndTable; + int EndRecord; + char *FirstWord; + + EndTable = 0; + LayerCount = 0; + + while ( ( EndTable != 1 ) && + ( LayerCount <= RDS_ALL_LAYER ) ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 1 ); + + if ( FirstWord == EndTableKeyword ) + { + EndTable = 1; + } + else + if ( LayerCount < RDS_ALL_LAYER ) + { + Layer = RprGetStringValue( FirstWord ); + EndRecord = 0; + Field = 0; + + while ( ( EndRecord != 1 ) && + ( Field < RDS_LYNX_BULK_IMPLICIT_FIELD ) ) + { + FirstWord = RprGetNextWord( 1 ); + + if ( FirstWord == EndRecordKeyword ) + { + if ( Field == 0 ) + { + rprerror( RPR_MISSING_VALUE, (char *)NULL, RprCurrentLine ); + } + + EndRecord = 1; + } + else + { + RDS_LYNX_BULK_IMPLICIT_TABLE[ Layer ][ Field ] = RprGetStringValue( FirstWord ); + + Field = Field + 1; + } + } + + if ( Field == RDS_LYNX_BULK_IMPLICIT_FIELD ) + { + FirstWord = RprGetNextWord( 0 ); + + if ( FirstWord != EndRecordKeyword ) + { + rprerror( RPR_TOO_MANY_WORDS, FirstWord, RprCurrentLine ); + } + } + } + + LayerCount = LayerCount + 1; + } + + if ( EndTable == 0 ) + { + rprerror( RPR_LINE_EXPECTED, EndTableKeyword, RprCurrentLine); + } +} +/*------------------------------------------------------------\ +| | +| Rpr Read Parameters | +| | +\------------------------------------------------------------*/ + +void RprReadParam() + +{ + char *FirstWord; + char *SecondWord; + long Continue; + double FloatValue; + + Continue = 0; + + while ( Continue != RPR_ALL_DEFINED_MASK ) + { + RprGetLine( RprBuffer ); + + FirstWord = RprGetFirstWord( RprBuffer, 0); + + if ( FirstWord == DefineKeyword ) + { + FirstWord = RprGetNextWord( 1 ); + + if (! FirstWord ) + { + rprerror( RPR_MISSING_NAME, DefineKeyword, RprCurrentLine ); + } + + SecondWord = RprGetNextWord(1); + + if (! SecondWord ) + { + rprerror( RPR_MISSING_VALUE, SecondWord, RprCurrentLine ); + } + + if ( FirstWord == PhysicalGridKeyword ) + { + sscanf( SecondWord, "%lf", &FloatValue); + + RprComputeRdsUnit( FloatValue ); + + Continue |= RPR_PHYSICAL_GRID_MASK; + } + else + if ( FirstWord == LambdaKeyword ) + { + sscanf( SecondWord, "%lf", &FloatValue); + + if ( FloatValue <= 0 ) + { + rprerror( RPR_NEGATIVE_VALUE, LambdaKeyword, RprCurrentLine ); + } + + RDS_LAMBDA = RprTranslateParam( FloatValue ); + RDS_LAMBDA2 = RDS_LAMBDA * RDS_LAMBDA; + + Continue |= RPR_LAMBDA_MASK; + } + else + { + rprerror( RPR_UNKNOWN_DEFINE, FirstWord, RprCurrentLine ); + } + } + else + if ( FirstWord == TableKeyword ) + { + if (!( FirstWord = RprGetNextWord(1))) + { + rprerror( RPR_MISSING_NAME, TableKeyword, RprCurrentLine ); + } + + if ( FirstWord == S2RPostTreatKeyword ) + { + RprReadS2RPostTreat(); + + Continue |= RPR_S2R_POST_TREAT_MASK; + } + else + if ( FirstWord == SegmentKeyword ) + { + RprReadSegment(); + + Continue |= RPR_SEGMENT_MASK; + } + else + if ( FirstWord == ConnectorKeyword ) + { + RprReadConnector(); + + Continue |= RPR_CONNECTOR_MASK; + }else + if ( FirstWord == ReferenceKeyword ) + { + RprReadReference(); + + Continue |= RPR_REFERENCE_MASK; + } + else + if ( FirstWord == ViaKeyword ) + { + RprReadVia(); + + Continue |= RPR_VIA_MASK; + } + else + if ( FirstWord == CifLayerKeyword ) + { + RprReadCifLayer(); + + Continue |= RPR_CIF_LAYER_MASK; + } + else + if ( FirstWord == GdsLayerKeyword ) + { + RprReadGdsLayer(); + + Continue |= RPR_GDS_LAYER_MASK; + } + else + if ( FirstWord == S2ROversizeKeyword ) + { + RprReadS2ROversize(); + + Continue |= RPR_S2R_OVERSIZE_MASK; + } + else + if ( FirstWord == S2RRingWidthKeyword ) + { + RprReadS2RRingWidth(); + + Continue |= RPR_S2R_RING_WIDTH_MASK; + } + else + if ( FirstWord == S2RLayerWidthKeyword ) + { + RprReadS2RLayerWidth(); + + Continue |= RPR_S2R_LAYER_WIDTH_MASK; + } + else + if ( FirstWord == LynxGraphKeyword ) + { + RprReadLynxGraph(); + + Continue |= RPR_LYNX_GRAPH_MASK; + } + else + if ( FirstWord == LynxDiffusionKeyword ) + { + RprReadLynxDiffusion(); + + Continue |= RPR_LYNX_DIFFUSION_MASK; + } + else + if ( FirstWord == LynxCapaKeyword ) + { + RprReadLynxCapa(); + + Continue |= RPR_LYNX_CAPA_MASK; + } + else + if ( FirstWord == LynxResistorKeyword ) + { + RprReadLynxResistor(); + + Continue |= RPR_LYNX_RESISTOR_MASK; + } + else + if ( FirstWord == LynxTransistorKeyword ) + { + RprReadLynxTransistor(); + + Continue |= RPR_LYNX_TRANSISTOR_MASK; + } + else /*4p*/ + if ( FirstWord == LynxBulkImplicitKeyword ) /* */ + { /* */ + RprReadLynxBulkImplicit(); /* */ + /* */ + Continue |= RPR_LYNX_BULK_IMPLICIT_MASK; /* */ + } /*4p*/ + else /*4p*/ + if ( FirstWord == BigViaHoleKeyword ) + { + RprReadBigViaHole(); + + Continue |= RPR_BIGVIA_HOLE_MASK; + } + else + if ( FirstWord == BigViaMetalKeyword ) + { + RprReadBigViaMetal(); + + Continue |= RPR_BIGVIA_METAL_MASK; + } + else + if ( FirstWord == TurnViaKeyword ) + { + RprReadTurnVia(); + + Continue |= RPR_TURNVIA_MASK; + } + else RprSkipTable(); + } + else + { + if ( FirstWord != DrcRulesKeword ) + { + rprerror( RPR_SYNTAX_ERROR, FirstWord, RprCurrentLine ); + } + else + { + rprerror( RPR_UNEXPECTED_EOF, (char *)0, RprCurrentLine ); + } + } + } +} + +/*------------------------------------------------------------\ +| | +| Rpr Post Parameters | +| | +\------------------------------------------------------------*/ + +void RprPostParam() + +{ + int Field; + int Layer; + int Dynamic; + int Convert; + + for ( Layer = RDS_LAYER_USER0; Layer <= RDS_LAYER_ABOX; Layer++ ) + { + RDS_DYNAMIC_LAYER[ Layer ] = 1; + } + + Dynamic = 0; + + for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) + { + if ( RDS_DYNAMIC_LAYER[ Layer ] == 1 ) + { + RDS_DYNAMIC_LAYER[ Layer ] = Dynamic++; + } + } + + RDS_MAX_LAYER = Dynamic; + + if ( RDS_LAYER_NAME != RDS_ALL_LAYER_NAME ) + { + rdsfreeblock( RDS_LAYER_NAME ); + } + + if ( RDS_STATIC_LAYER != RDS_DYNAMIC_LAYER ) + { + rdsfreeblock( RDS_STATIC_LAYER ); + } + + RDS_LAYER_NAME = (char **)rdsallocblock( sizeof( char *) * RDS_MAX_LAYER ); + RDS_STATIC_LAYER = (char *)rdsallocblock( sizeof( char ) * RDS_MAX_LAYER ); + + for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) + { + Dynamic = RDS_DYNAMIC_LAYER[ Layer ]; + + if ( Dynamic != RDS_LAYER_UNUSED ) + { + RDS_LAYER_NAME[ Dynamic ] = RDS_ALL_LAYER_NAME[ Layer ]; + RDS_STATIC_LAYER[ Dynamic ] = Layer; + + for ( Field = 0; Field < RDS_S2R_POST_TREAT_FIELD; Field++ ) + { + Convert = RDS_S2R_POST_TREAT_TABLE [ Layer ][ Field ]; + + if ( ( Field == 1 ) && + ( Convert != RDS_S2R_POST_TREAT_EMPTY ) ) + { + Convert = RDS_DYNAMIC_LAYER[ Convert ]; + } + + RDS_S2R_POST_TREAT_TABLE [ Dynamic ][ Field ] = Convert; + } + + for ( Field = 0; Field < RDS_GDS_LAYER_FIELD; Field++ ) + { + RDS_GDS_LAYER_TABLE [ Dynamic ][ Field ] = + RDS_GDS_LAYER_TABLE [ Layer ][ Field ]; + } + + for ( Field = 0; Field < RDS_CIF_LAYER_FIELD; Field++ ) + { + RDS_CIF_LAYER_TABLE [ Dynamic ][ Field ] = + RDS_CIF_LAYER_TABLE [ Layer ][ Field ]; + } + + for ( Field = 0; Field < RDS_LYNX_BULK_IMPLICIT_FIELD; Field++ ) /*4p*/ + { /* */ + RDS_LYNX_BULK_IMPLICIT_TABLE [ Dynamic ][ Field ] = /* */ + RDS_LYNX_BULK_IMPLICIT_TABLE [ Layer ][ Field ]; /* */ + } /*4p*/ + + for ( Field = 0; Field < RDS_S2R_OVERSIZE_FIELD; Field++ ) + { + RDS_S2R_OVERSIZE_TABLE [ Dynamic ][ Field ] = + RDS_S2R_OVERSIZE_TABLE [ Layer ][ Field ]; + } + + for ( Field = 0; Field < RDS_S2R_RING_WIDTH_FIELD; Field++ ) + { + RDS_S2R_RING_WIDTH_TABLE [ Dynamic ][ Field ] = + RDS_S2R_RING_WIDTH_TABLE [ Layer ][ Field ]; + } + + for ( Field = 0; Field < RDS_S2R_LAYER_WIDTH_FIELD; Field++ ) + { + RDS_S2R_LAYER_WIDTH_TABLE [ Dynamic ][ Field ] = + RDS_S2R_LAYER_WIDTH_TABLE [ Layer ][ Field ]; + } + + for ( Field = 0; Field < RDS_LYNX_GRAPH_FIELD; Field++ ) + { + Convert = RDS_LYNX_GRAPH_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_LYNX_GRAPH_EMPTY ) + { + Convert = RDS_DYNAMIC_LAYER[ Convert ]; + } + + RDS_LYNX_GRAPH_TABLE [ Dynamic ][ Field ] = Convert; + } + + for ( Field = 0; Field < RDS_LYNX_DIFFUSION_FIELD; Field++ ) + { + Convert = RDS_LYNX_DIFFUSION_TABLE [ Layer ][ Field ]; + + if ( ( Field & 0x1 ) == 0 ) + { + if ( Convert != RDS_LYNX_DIFFUSION_EMPTY ) + { + Convert = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + + RDS_LYNX_DIFFUSION_TABLE [ Dynamic ][ Field ] = Convert; + } + + for ( Field = 0; Field < RDS_LYNX_CAPA_FIELD; Field++ ) + { + RDS_LYNX_CAPA_TABLE[ Dynamic ][ Field ] = + RDS_LYNX_CAPA_TABLE[ Layer ][ Field ]; + } + + for ( Field = 0; Field < RDS_LYNX_RESISTOR_FIELD; Field++ ) + { + RDS_LYNX_RESISTOR_TABLE[ Dynamic ][ Field ] = + RDS_LYNX_RESISTOR_TABLE[ Layer ][ Field ]; + } + } + } + + for ( Layer = 0; Layer < MBK_MAX_LAYER; Layer++ ) + { + for ( Field = 0; Field < RDS_SEGMENT_FIELD; Field++ ) + { + if ( Field % 6 == 0 ) + { + Convert = RDS_SEGMENT_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_SEGMENT_EMPTY ) + { + RDS_SEGMENT_TABLE[ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + + for ( Field = 0; Field < RDS_LYNX_TRANSISTOR_FIELD; Field++ ) + { + if ( Field >= 2 ) + { + Convert = RDS_LYNX_TRANSISTOR_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_LYNX_TRANSISTOR_EMPTY ) + { + RDS_LYNX_TRANSISTOR_TABLE[ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + + for ( Field = 0; Field < RDS_CONNECTOR_FIELD; Field++ ) + { + if ( Field == 0 ) + { + Convert = RDS_CONNECTOR_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_CONNECTOR_EMPTY ) + { + RDS_CONNECTOR_TABLE [ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + } + + for ( Layer = 0; Layer < MBK_MAX_REFERENCE; Layer++ ) + { + for ( Field = 0; Field < RDS_REFERENCE_FIELD; Field++ ) + { + if ( ( Field & 1 ) == 0 ) + { + Convert = RDS_REFERENCE_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_REFERENCE_EMPTY ) + { + RDS_REFERENCE_TABLE [ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_VIA_FIELD; Field++ ) + { + if ( Field % 3 == 0 ) + { + Convert = RDS_VIA_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_VIA_EMPTY ) + { + RDS_VIA_TABLE [ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_BIGVIA_HOLE_FIELD; Field++ ) + { + if ( Field % 4 == 0 ) + { + Convert = RDS_BIGVIA_HOLE_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_BIGVIA_HOLE_EMPTY ) + { + RDS_BIGVIA_HOLE_TABLE [ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_BIGVIA_METAL_FIELD; Field++ ) + { + if ( Field % 4 == 0 ) + { + Convert = RDS_BIGVIA_METAL_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_BIGVIA_METAL_EMPTY ) + { + RDS_BIGVIA_METAL_TABLE [ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_TURNVIA_FIELD; Field++ ) + { + if ( Field % 3 == 0 ) + { + Convert = RDS_TURNVIA_TABLE [ Layer ][ Field ]; + + if ( Convert != RDS_TURNVIA_EMPTY ) + { + RDS_TURNVIA_TABLE [ Layer ][ Field ] = RDS_DYNAMIC_LAYER[ Convert ]; + } + } + } + } +} + +/*------------------------------------------------------------\ +| | +| Rds Load Parameters | +| | +\------------------------------------------------------------*/ + +void loadrdsparam() + +{ + int Field; + int Layer; + + if ( ! KeywordDefined ) + { + DefineKeyword = namealloc( DEFINE_KEYWORD ); + TableKeyword = namealloc( TABLE_KEYWORD ); + EndTableKeyword = namealloc( END_TABLE_KEYWORD ); + EndRecordKeyword = namealloc( END_RECORD_KEYWORD ); + LambdaKeyword = namealloc( LAMBDA_KEYWORD ); + PhysicalGridKeyword = namealloc( PHYSICAL_GRID_KEYWORD ); + SegmentKeyword = namealloc( SEGMENT_KEYWORD ); + ViaKeyword = namealloc( VIA_KEYWORD ); + ConnectorKeyword = namealloc( CONNECTOR_KEYWORD ); + ReferenceKeyword = namealloc( REFERENCE_KEYWORD ); + CifLayerKeyword = namealloc( CIF_LAYER_KEYWORD ); + GdsLayerKeyword = namealloc( GDS_LAYER_KEYWORD ); + S2ROversizeKeyword = namealloc( S2R_OVERSIZE_KEYWORD ); + S2RRingWidthKeyword = namealloc( S2R_RING_WIDTH_KEYWORD ); + S2RLayerWidthKeyword = namealloc( S2R_LAYER_WIDTH_KEYWORD ); + S2RPostTreatKeyword = namealloc( S2R_POST_TREAT_KEYWORD ); + LynxGraphKeyword = namealloc( LYNX_GRAPH_KEYWORD ); + LynxCapaKeyword = namealloc( LYNX_CAPA_KEYWORD ); + LynxResistorKeyword = namealloc( LYNX_RESISTOR_KEYWORD ); + LynxTransistorKeyword = namealloc( LYNX_TRANSISTOR_KEYWORD ); + LynxDiffusionKeyword = namealloc( LYNX_DIFFUSION_KEYWORD ); + LynxBulkImplicitKeyword = namealloc( LYNX_BULK_IMPLICIT_KEYWORD ); /*4p*/ + BigViaHoleKeyword = namealloc( BIGVIA_HOLE_KEYWORD ); + BigViaMetalKeyword = namealloc( BIGVIA_METAL_KEYWORD ); + TurnViaKeyword = namealloc( TURNVIA_KEYWORD ); + + DrcRulesKeword = namealloc( DRC_RULES_KEYWORD ); + + KeywordDefined = 1; + } + + RDS_UNIT = -1; + + for ( Layer = 0; Layer < RDS_ALL_LAYER; Layer++ ) + { + RDS_DYNAMIC_LAYER[ Layer ] = RDS_LAYER_UNUSED; + + for ( Field = 0; Field < RDS_S2R_POST_TREAT_FIELD; Field++ ) + { + RDS_S2R_POST_TREAT_TABLE [ Layer ][ Field ] = RDS_S2R_POST_TREAT_EMPTY; + } + + for ( Field = 0; Field < RDS_GDS_LAYER_FIELD; Field++ ) + { + RDS_GDS_LAYER_TABLE [ Layer ][ Field ] = RDS_GDS_LAYER_EMPTY; + } + + for ( Field = 0; Field < RDS_CIF_LAYER_FIELD; Field++ ) + { + RDS_CIF_LAYER_TABLE [ Layer ][ Field ] = RDS_CIF_LAYER_EMPTY; + } + + for ( Field = 0; Field < RDS_S2R_OVERSIZE_FIELD; Field++ ) + { + RDS_S2R_OVERSIZE_TABLE [ Layer ][ Field ] = RDS_S2R_OVERSIZE_EMPTY; + } + + for ( Field = 0; Field < RDS_S2R_RING_WIDTH_FIELD; Field++ ) + { + RDS_S2R_RING_WIDTH_TABLE [ Layer ][ Field ] = RDS_S2R_RING_WIDTH_EMPTY; + } + + for ( Field = 0; Field < RDS_S2R_LAYER_WIDTH_FIELD; Field++ ) + { + RDS_S2R_LAYER_WIDTH_TABLE [ Layer ][ Field ] = RDS_S2R_LAYER_WIDTH_EMPTY; + } + + + for ( Field = 0; Field < RDS_LYNX_BULK_IMPLICIT_FIELD; Field++ ) /*4p*/ + { /* */ + RDS_LYNX_BULK_IMPLICIT_TABLE [ Layer ][ Field ] = /* */ + RDS_LYNX_BULK_IMPLICIT_EMPTY; /* */ + } /*4p*/ + + for ( Field = 0; Field < RDS_LYNX_GRAPH_FIELD; Field++ ) + { + RDS_LYNX_GRAPH_TABLE [ Layer ][ Field ] = RDS_LYNX_GRAPH_EMPTY; + } + + for ( Field = 0; Field < RDS_LYNX_DIFFUSION_FIELD; Field++ ) + { + RDS_LYNX_DIFFUSION_TABLE [ Layer ][ Field ] = RDS_LYNX_DIFFUSION_EMPTY; + } + + for ( Field = 0; Field < RDS_LYNX_CAPA_FIELD; Field++ ) + { + RDS_LYNX_CAPA_TABLE[ Layer ][ Field ] = RDS_LYNX_CAPA_EMPTY; + } + } + + for ( Layer = 0; Layer < MBK_MAX_LAYER; Layer++ ) + { + for ( Field = 0; Field < RDS_SEGMENT_FIELD; Field++ ) + { + RDS_SEGMENT_TABLE [ Layer ][ Field ] = RDS_SEGMENT_EMPTY; + } + + for ( Field = 0; Field < RDS_LYNX_TRANSISTOR_FIELD; Field++ ) + { + RDS_LYNX_TRANSISTOR_TABLE [ Layer ][ Field ] = RDS_LYNX_TRANSISTOR_EMPTY; + } + + for ( Field = 0; Field < RDS_CONNECTOR_FIELD; Field++ ) + { + RDS_CONNECTOR_TABLE [ Layer ][ Field ] = RDS_CONNECTOR_EMPTY; + } + } + + for ( Layer = 0; Layer < MBK_MAX_REFERENCE; Layer++ ) + { + for ( Field = 0; Field < RDS_REFERENCE_FIELD; Field++ ) + { + RDS_REFERENCE_TABLE [ Layer ][ Field ] = RDS_REFERENCE_EMPTY; + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_VIA_FIELD; Field++ ) + { + RDS_VIA_TABLE [ Layer ][ Field ] = RDS_VIA_EMPTY; + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_BIGVIA_HOLE_FIELD; Field++ ) + { + RDS_BIGVIA_HOLE_TABLE [ Layer ][ Field ] = RDS_BIGVIA_HOLE_EMPTY; + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_BIGVIA_METAL_FIELD; Field++ ) + { + RDS_BIGVIA_METAL_TABLE [ Layer ][ Field ] = RDS_BIGVIA_METAL_EMPTY; + } + } + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + for ( Field = 0; Field < RDS_TURNVIA_FIELD; Field++ ) + { + RDS_TURNVIA_TABLE [ Layer ][ Field ] = RDS_TURNVIA_EMPTY; + } + } + + if ( !( RprFile = fopen( RDS_TECHNO_NAME, "r"))) + + rprerror( RPR_OPEN_FILE, NULL, 0); + + RprReadParam(); + RprPostParam(); + + fclose( RprFile ); +} diff --git a/alliance/src/rds/src/rprparse.h b/alliance/src/rds/src/rprparse.h new file mode 100644 index 00000000..7efe1dd0 --- /dev/null +++ b/alliance/src/rds/src/rprparse.h @@ -0,0 +1,139 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rprparse.h | +| | +| Authors : Jacomme Ludovic | +| Picault Stephane *4p* | +| | +| Date : 27.06.95 | +| 15.07.98 *4p* | +| | +\------------------------------------------------------------*/ + +# ifndef RPR_PARSE_H +# define RPR_PARSE_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RPR_MAX_RDS_UNIT 100000L +# define RPR_EPSILON ((double)0.001) +# define RPR_MAX_BUFFER 512 +# define RPR_MAX_KEYWORD 149 + +# define RPR_SEPARATORS_STRING " \t\n" +# define RPR_COMMENT_CHAR '#' + +/*------------------------------------------------------------\ +| | +| Keyword Constants | +| | +\------------------------------------------------------------*/ + +# define DEFINE_KEYWORD "DEFINE" +# define TABLE_KEYWORD "TABLE" +# define END_TABLE_KEYWORD "END" +# define END_RECORD_KEYWORD NULL +# define LAMBDA_KEYWORD "LAMBDA" +# define PHYSICAL_GRID_KEYWORD "PHYSICAL_GRID" +# define SEGMENT_KEYWORD "MBK_TO_RDS_SEGMENT" +# define VIA_KEYWORD "MBK_TO_RDS_VIA" +# define BIGVIA_HOLE_KEYWORD "MBK_TO_RDS_BIGVIA_HOLE" +# define BIGVIA_METAL_KEYWORD "MBK_TO_RDS_BIGVIA_METAL" +# define TURNVIA_KEYWORD "MBK_TO_RDS_TURNVIA" +# define CONNECTOR_KEYWORD "MBK_TO_RDS_CONNECTOR" +# define REFERENCE_KEYWORD "MBK_TO_RDS_REFERENCE" +# define CIF_LAYER_KEYWORD "CIF_LAYER" +# define GDS_LAYER_KEYWORD "GDS_LAYER" +# define S2R_POST_TREAT_KEYWORD "S2R_POST_TREAT" +# define S2R_OVERSIZE_KEYWORD "S2R_OVERSIZE_DENOTCH" +# define S2R_RING_WIDTH_KEYWORD "S2R_BLOC_RING_WIDTH" +# define S2R_LAYER_WIDTH_KEYWORD "S2R_MINIMUM_LAYER_WIDTH" +# define LYNX_GRAPH_KEYWORD "LYNX_GRAPH" +# define LYNX_CAPA_KEYWORD "LYNX_CAPA" +# define LYNX_RESISTOR_KEYWORD "LYNX_RESISTOR" +# define LYNX_TRANSISTOR_KEYWORD "LYNX_TRANSISTOR" +# define LYNX_DIFFUSION_KEYWORD "LYNX_DIFFUSION" +# define LYNX_BULK_IMPLICIT_KEYWORD "LYNX_BULK_IMPLICIT" /*4p*/ + +# define DRC_RULES_KEYWORD "DRC_RULES" + + +/*------------------------------------------------------------\ +| | +| Mask | +| | +\------------------------------------------------------------*/ + +# define RPR_LAMBDA_MASK 0x000001 +# define RPR_PHYSICAL_GRID_MASK 0x000002 +# define RPR_SEGMENT_MASK 0x000004 +# define RPR_VIA_MASK 0x000008 +# define RPR_CONNECTOR_MASK 0x000010 +# define RPR_REFERENCE_MASK 0x000020 +# define RPR_CIF_LAYER_MASK 0x000040 +# define RPR_GDS_LAYER_MASK 0x000080 +# define RPR_S2R_POST_TREAT_MASK 0x000100 +# define RPR_S2R_OVERSIZE_MASK 0x000200 +# define RPR_S2R_RING_WIDTH_MASK 0x000400 +# define RPR_S2R_LAYER_WIDTH_MASK 0x000800 +# define RPR_LYNX_GRAPH_MASK 0x001000 +# define RPR_LYNX_CAPA_MASK 0x002000 +# define RPR_LYNX_TRANSISTOR_MASK 0x004000 +# define RPR_LYNX_RESISTOR_MASK 0x008000 +# define RPR_LYNX_DIFFUSION_MASK 0x010000 +# define RPR_LYNX_BULK_IMPLICIT_MASK 0x020000 +# define RPR_BIGVIA_HOLE_MASK 0x040000 +# define RPR_BIGVIA_METAL_MASK 0x080000 +# define RPR_TURNVIA_MASK 0x100000 + +# define RPR_ALL_DEFINED_MASK 0x1FFFFF + + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define RprEqual(a,b) \ + \ + ((((a)-RPR_EPSILON) <= (b)) && (((b)) <= (a)+RPR_EPSILON)) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ + + typedef struct keyword + { + char *NAME; + char VALUE; + + } keyword; + +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rprview.c b/alliance/src/rds/src/rprview.c new file mode 100644 index 00000000..b8c707d1 --- /dev/null +++ b/alliance/src/rds/src/rprview.c @@ -0,0 +1,432 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rprview.c | +| | +| Authors : Jacomme Ludovic | +| Picault Stephane *4p* | +| | +| Date : 27.06.95 | +| 15.07.98 *4p* | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rwi.h" +# include "rut.h" + +# include "rprerror.h" +# include "rprview.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds view Parameters | +| | +\------------------------------------------------------------*/ + +void viewrdsparam() + +{ + int Layer; + int Index; + + fprintf( stdout, "\n DEFINE PHYSICAL_GRID %ld", RDS_PHYSICAL_GRID ); + fprintf( stdout, "\n DEFINE LAMBDA %ld" , RDS_LAMBDA ); + fprintf( stdout, "\n# DEFINE RDS_UNIT %ld" , RDS_UNIT ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_SEGMENT\n" ); + + for ( Layer = 0; Layer < MBK_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", MBK_LAYER_NAME[ Layer ] ); + + Index = 0; + + while ( GET_SEGMENT_LAYER( Layer, Index ) != RDS_SEGMENT_EMPTY ) + { + fprintf( stdout, " %s %s %2ld %2ld %2ld %s", + RDS_LAYER_NAME[ GET_SEGMENT_LAYER( Layer, Index ) ], + RDS_TRANS_NAME[ GET_SEGMENT_TRANS( Layer, Index ) ], + GET_SEGMENT_DLR ( Layer, Index ), + GET_SEGMENT_DWR ( Layer, Index ), + GET_SEGMENT_OFFSET( Layer, Index ), + RDS_USE_NAME[ GET_SEGMENT_USE( Layer, Index ) ] ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_CONNECTOR\n" ); + + for ( Layer = 0; Layer < MBK_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", MBK_LAYER_NAME[ Layer ] ); + + if ( GET_CONNECTOR_LAYER( Layer ) != RDS_CONNECTOR_EMPTY ) + { + fprintf( stdout, " %s %2ld %2ld", + RDS_LAYER_NAME[ GET_CONNECTOR_LAYER( Layer ) ], + GET_CONNECTOR_DER( Layer ), + GET_CONNECTOR_DWR( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_REFERENCE\n" ); + + for ( Layer = 0; Layer < MBK_MAX_REFERENCE; Layer++ ) + { + if ( Layer == 0 ) fprintf( stdout, "\nREF_REF" ); + else fprintf( stdout, "\nREF_CON" ); + + Index = 0; + + while ( GET_REFERENCE_LAYER( Layer, Index ) != RDS_REFERENCE_EMPTY ) + { + fprintf( stdout, " %s %2ld", + RDS_LAYER_NAME[ GET_REFERENCE_LAYER( Layer, Index ) ], + GET_REFERENCE_SIZE( Layer, Index ) ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_VIA\n" ); + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + Index = 0; + + fprintf( stdout, "\n%s", MBK_VIA_NAME[ Layer ] ); + + while ( GET_VIA_LAYER( Layer, Index ) != RDS_VIA_EMPTY ) + { + fprintf( stdout, " %s %2ld %s", + RDS_LAYER_NAME[ GET_VIA_LAYER( Layer, Index ) ], + GET_VIA_SIZE( Layer, Index ), + RDS_USE_NAME[ GET_VIA_USE( Layer, Index ) ] ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_BIGVIA_HOLE\n" ); + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + Index = 0; + + fprintf( stdout, "\n%s", MBK_VIA_NAME[ Layer ] ); + + while ( GET_BIGVIA_HOLE_LAYER( Layer, Index ) != RDS_BIGVIA_HOLE_EMPTY ) + { + fprintf( stdout, " %s %2ld %2ld %s", + RDS_LAYER_NAME[ GET_BIGVIA_HOLE_LAYER( Layer, Index ) ], + GET_BIGVIA_HOLE_SIDE( Layer, Index ), + GET_BIGVIA_HOLE_STEP( Layer, Index ), + RDS_USE_NAME[ GET_BIGVIA_HOLE_USE( Layer, Index ) ] ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_BIGVIA_METAL\n" ); + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + Index = 0; + + fprintf( stdout, "\n%s", MBK_VIA_NAME[ Layer ] ); + + while ( GET_BIGVIA_METAL_LAYER( Layer, Index ) != RDS_BIGVIA_METAL_EMPTY ) + { + fprintf( stdout, " %s %2ld %2ld %s", + RDS_LAYER_NAME[ GET_BIGVIA_METAL_LAYER( Layer, Index ) ], + GET_BIGVIA_METAL_DWR( Layer, Index ), + GET_BIGVIA_METAL_OVERLAP( Layer, Index ), + RDS_USE_NAME[ GET_BIGVIA_METAL_USE( Layer, Index ) ] ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE MBK_TO_RDS_TURNVIA\n" ); + + for ( Layer = 0; Layer < MBK_MAX_VIA; Layer++ ) + { + Index = 0; + + fprintf( stdout, "\n%s", MBK_VIA_NAME[ Layer ] ); + + while ( GET_TURNVIA_LAYER( Layer, Index ) != RDS_TURNVIA_EMPTY ) + { + fprintf( stdout, " %s %2ld %s", + RDS_LAYER_NAME[ GET_TURNVIA_LAYER( Layer, Index ) ], + GET_TURNVIA_DWR( Layer, Index ), + RDS_USE_NAME[ GET_TURNVIA_USE( Layer, Index ) ] ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE CIF_LAYER\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_CIF_LAYER ( Layer ) != RDS_CIF_LAYER_EMPTY ) + { + fprintf( stdout, " %s", GET_CIF_LAYER ( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE GDS_LAYER\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_GDS_LAYER( Layer ) != RDS_GDS_LAYER_EMPTY ) + { + fprintf( stdout, " %d", GET_GDS_LAYER ( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE S2R_OVERSIZE_DENOTCH\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_S2R_OVERSIZE( Layer ) != RDS_S2R_OVERSIZE_EMPTY ) + { + fprintf( stdout, " %ld", GET_S2R_OVERSIZE ( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE S2R_BLOC_RING_WIDTH\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_S2R_RING_WIDTH( Layer ) != RDS_S2R_RING_WIDTH_EMPTY ) + { + fprintf( stdout, " %ld", GET_S2R_RING_WIDTH ( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE S2R_MINIMUM_LAYER_WIDTH\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_S2R_LAYER_WIDTH( Layer ) != RDS_S2R_LAYER_WIDTH_EMPTY ) + { + fprintf( stdout, " %ld", GET_S2R_LAYER_WIDTH ( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE S2R_POST_TREAT\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_S2R_POST_Y_OR_N( Layer ) != RDS_S2R_POST_TREAT_EMPTY ) + { + fprintf( stdout, " %d", GET_S2R_POST_Y_OR_N ( Layer ) ); + + if ( GET_S2R_POST_COMPLEMENTARY( Layer ) != RDS_S2R_POST_TREAT_EMPTY ) + { + fprintf( stdout, " %s", + RDS_LAYER_NAME[ GET_S2R_POST_COMPLEMENTARY( Layer ) ] ); + } + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE LYNX_GRAPH\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + Index = 0; + + while ( GET_LYNX_GRAPH_LAYER( Layer, Index ) != RDS_LYNX_GRAPH_EMPTY ) + { + fprintf( stdout, " %s ", + RDS_LAYER_NAME[ GET_LYNX_GRAPH_LAYER( Layer, Index ) ] ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE LYNX_DIFFUSION\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + Index = 0; + + while ( GET_LYNX_DIFFUSION_LAYER( Layer, Index ) != RDS_LYNX_DIFFUSION_EMPTY ) + { + fprintf( stdout, " %s ", + RDS_LAYER_NAME[ GET_LYNX_DIFFUSION_LAYER( Layer, Index ) ] ); + fprintf( stdout, " %d ", + GET_LYNX_DIFFUSION_Y_OR_N( Layer, Index ) ); + + Index = Index + 1; + } + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE LYNX_CAPA\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + fprintf( stdout, " %g ", GET_LYNX_SURFACE_CAPA_LAYER( Layer ) * RDS_UNIT2 ); + fprintf( stdout, " %g ", GET_LYNX_PERIMETER_CAPA_LAYER( Layer ) * RDS_UNIT ); + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE LYNX_RESISTOR\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + fprintf( stdout, " %g ", GET_LYNX_RESISTOR_LAYER( Layer ) ); + } + + fprintf( stdout, "\n\nEND" ); + + fprintf( stdout, "\n\nTABLE LYNX_TRANSISTOR\n" ); + + for ( Layer = 0; Layer < MBK_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", MBK_LAYER_NAME[ Layer ] ); + + if ( GET_LYNX_TRANSISTOR_TYPE( Layer ) != RDS_LYNX_TRANSISTOR_EMPTY ) + { + fprintf( stdout, " %s", + MBK_LAYER_NAME[ (int)GET_LYNX_TRANSISTOR_TYPE( Layer ) ] ); + fprintf( stdout, " %s", + MBK_VIA_NAME[ (int)GET_LYNX_TRANSISTOR_CX( Layer ) ] ); + fprintf( stdout, " %s", + RDS_LAYER_NAME[ (int)GET_LYNX_TRANSISTOR_GATE_LAYER( Layer ) ] ); + fprintf( stdout, " %s", + RDS_LAYER_NAME[ (int)GET_LYNX_TRANSISTOR_DIFF_LAYER( Layer ) ] ); + + if ( GET_LYNX_TRANSISTOR_ACTIV_LAYER( Layer ) != RDS_LYNX_TRANSISTOR_EMPTY ) + { + fprintf( stdout, " %s", + RDS_LAYER_NAME[ (int)GET_LYNX_TRANSISTOR_ACTIV_LAYER( Layer ) ] ); + } + else + { + fprintf( stdout, " NULL" ); + } +/*4p*=============================================================================*4p*/ + if ( GET_LYNX_TRANSISTOR_BULK_LAYER( Layer ) != RDS_LYNX_TRANSISTOR_EMPTY ) + { + fprintf( stdout, " %s", + RDS_LAYER_NAME[(int)GET_LYNX_TRANSISTOR_BULK_LAYER( Layer ) ] ); + } + else + { + fprintf( stdout, " NULL" ); + } +/*4p*=============================================================================*4p*/ + } + } + + fprintf( stdout, "\n\nEND\n\n" ); + +/*4p*=============================================================================*4p*/ + + fprintf( stdout, "\n\nTABLE LYNX_BULK_IMPLICIT\n" ); + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + fprintf( stdout, "\n%s", RDS_LAYER_NAME[ Layer ] ); + + if ( GET_LYNX_BULK_IMPLICIT ( Layer ) != RDS_LYNX_BULK_IMPLICIT_EMPTY ) + { + fprintf( stdout, " %d", GET_LYNX_BULK_IMPLICIT ( Layer ) ); + } + } + + fprintf( stdout, "\n\nEND" ); +/*4p*=============================================================================*4p*/ + +} diff --git a/alliance/src/rds/src/rprview.h b/alliance/src/rds/src/rprview.h new file mode 100644 index 00000000..bb31027f --- /dev/null +++ b/alliance/src/rds/src/rprview.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rprview.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RPR_VIEW_H +# define RPR_VIEW_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rtl.h b/alliance/src/rds/src/rtl.h new file mode 100644 index 00000000..f1ccc378 --- /dev/null +++ b/alliance/src/rds/src/rtl.h @@ -0,0 +1,52 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtl111.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RTL_111_H +# define RTL_111_H + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + extern char *RDS_IN; + extern char *RDS_OUT; + extern char *RDS_TECHNO_NAME; + extern long RDS_WINDOW_AREA; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rdsenv __P(()); + + extern rdsfig_list * getrdsfig __P((char *Name, char Mode, unsigned int Size)); + extern void loadrdsfig __P((rdsfig_list *Figure, char *Name, char Mode)); + extern void saverdsfig __P((rdsfig_list *Figure)); + +# endif diff --git a/alliance/src/rds/src/rtlacces.c b/alliance/src/rds/src/rtlacces.c new file mode 100644 index 00000000..aa1fc46c --- /dev/null +++ b/alliance/src/rds/src/rtlacces.c @@ -0,0 +1,149 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtlacces.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rwi.h" +# include "rut.h" + +# include "rtlacces.h" +# include "rtlenv.h" +# include "rtlerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| loadrdsfig | +| | +\------------------------------------------------------------*/ + +void loadrdsfig( Figure, Name, Mode ) + + rdsfig_list *Figure; + char *Name; + char Mode; +{ + if ( RDS_IN == RDS_GDS_FORMAT ) + { + gdsloadrdsfig( Figure, Name, Mode ); + } + else + if ( RDS_IN == RDS_CIF_FORMAT ) + { + cifloadrdsfig( Figure, Name, Mode ); + } + else + { + rtlerror( RTL_UNKNOWN_RDS_IN, RDS_IN ); + } +} + +/*------------------------------------------------------------\ +| | +| saverdsfig | +| | +\------------------------------------------------------------*/ + +void saverdsfig( Figure ) + + rdsfig_list *Figure; +{ + if ( RDS_OUT == RDS_GDS_FORMAT ) + { + gdssaverdsfig( Figure ); + } + else + if ( RDS_OUT == RDS_CIF_FORMAT ) + { + cifsaverdsfig( Figure ); + } + else + { + rtlerror( RTL_UNKNOWN_RDS_OUT, RDS_OUT ); + } +} + +/*------------------------------------------------------------\ +| | +| getrdsfig | +| | +\------------------------------------------------------------*/ + +rdsfig_list *getrdsfig( Name, Mode, Size ) + + char *Name; + char Mode; + unsigned int Size; +{ + rdsfig_list *Figure; + + Name = namealloc( Name ); + + for ( Figure = HEAD_RDSFIG; + Figure != (rdsfig_list *)NULL; + Figure = Figure->NEXT ) + { + if ( Figure->NAME == Name ) break; + } + + if ( ( Figure != (rdsfig_list *)NULL ) && + ( Mode != Figure->MODE ) ) + { + if ( Figure->MODE == 'P' ) + { + delrdsfig( Figure->NAME ); + Figure = (rdsfig_list *)NULL; + } + else + { + applyrdsmode( Figure, Mode ); + } + } + + if ( Figure == (rdsfig_list *)NULL ) + { + Figure = addrdsfig( Name, Size ); + + loadrdsfig( Figure, Name, Mode ); + } + + return( Figure ); +} diff --git a/alliance/src/rds/src/rtlacces.h b/alliance/src/rds/src/rtlacces.h new file mode 100644 index 00000000..38e14a21 --- /dev/null +++ b/alliance/src/rds/src/rtlacces.h @@ -0,0 +1,50 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtlacces.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RTL_ACCES_H +# define RTL_ACCES_H + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void cifloadrdsfig(); + extern void gdsloadrdsfig(); + extern void cifsaverdsfig(); + extern void gdssaverdsfig(); + +# endif diff --git a/alliance/src/rds/src/rtlenv.c b/alliance/src/rds/src/rtlenv.c new file mode 100644 index 00000000..7fa83368 --- /dev/null +++ b/alliance/src/rds/src/rtlenv.c @@ -0,0 +1,116 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtlenv.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rwi.h" +# include "rut.h" + +# include "rtlenv.h" +# include "rtlerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + char *RDS_IN; + char *RDS_OUT; + char *RDS_TECHNO_NAME; + + long RDS_WINDOW_AREA = 0; + + char *RDS_CIF_FORMAT = (char *)NULL; + char *RDS_GDS_FORMAT = (char *)NULL; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| rdsenv | +| | +\------------------------------------------------------------*/ + +void rdsenv() +{ + char *String; + char Buffer[ 512 ]; + + RDS_TECHNO_NAME = mbkgetenv( "RDS_TECHNO_NAME"); + + if ( RDS_TECHNO_NAME == (char *)NULL ) + { + String = mbkgetenv( "ALLIANCE_TOP" ); + if ( String == (char *)NULL ) String = ALLIANCE_TOP; + + sprintf( Buffer, "%s/%s", String, RTL_DEFAULT_TECHNO ); + RDS_TECHNO_NAME = mbkstrdup( Buffer ); + } + + RDS_IN = namealloc( mbkgetenv( "RDS_IN") ); + + if ( RDS_IN == (char *)NULL ) + { + RDS_IN = namealloc( RTL_DEFAULT_IN ); + } + + RDS_OUT = namealloc( mbkgetenv( "RDS_OUT") ); + + if ( RDS_OUT == (char *)NULL ) + { + RDS_OUT = namealloc( RTL_DEFAULT_OUT ); + } + + String = mbkgetenv( "RDS_WINDOW_AREA") ; + + if ( String != (char *)NULL ) + { + RDS_WINDOW_AREA = atol( String ); + } + + if ( RDS_WINDOW_AREA == 0 ) + { + RDS_WINDOW_AREA = RTL_DEFAULT_AREA; + } + + if( RDS_WINDOW_AREA < 0 ) + { + RDS_WINDOW_AREA = 0; + } + + RDS_GDS_FORMAT = namealloc( "gds" ); + RDS_CIF_FORMAT = namealloc( "cif" ); +} diff --git a/alliance/src/rds/src/rtlenv.h b/alliance/src/rds/src/rtlenv.h new file mode 100644 index 00000000..ec8a1217 --- /dev/null +++ b/alliance/src/rds/src/rtlenv.h @@ -0,0 +1,53 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtlenv.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RTL_ENV_H +# define RTL_ENV_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RTL_DEFAULT_IN "gds" +# define RTL_DEFAULT_OUT "gds" +# define RTL_DEFAULT_AREA 1000 + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + extern char *RDS_CIF_FORMAT; + extern char *RDS_GDS_FORMAT; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rtlerror.c b/alliance/src/rds/src/rtlerror.c new file mode 100644 index 00000000..9782486d --- /dev/null +++ b/alliance/src/rds/src/rtlerror.c @@ -0,0 +1,80 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtlerror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include + +# include "rtlerror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void rtl_error( Error, Text, File, Line ) + + char Error; + char *Text; + char *File; + long Line; +{ + char Name[ 128 ]; + + strcpy( Name, File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "rtl:%s%ld ", Name, Line ); + + switch( Error ) + { + case RTL_UNKNOWN_RDS_OUT : + + fprintf( stderr, "Unknown rds output format %s\n", Text ); + + break; + + case RTL_UNKNOWN_RDS_IN : + + fprintf( stderr, "Unknown rds input format %s\n", Text ); + + break; + + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + EXIT( 1 ); +} diff --git a/alliance/src/rds/src/rtlerror.h b/alliance/src/rds/src/rtlerror.h new file mode 100644 index 00000000..b327ba0c --- /dev/null +++ b/alliance/src/rds/src/rtlerror.h @@ -0,0 +1,58 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rtlerror.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RTL_ERROR +# define RTL_ERROR + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RTL_UNKNOWN_RDS_OUT 0 +# define RTL_UNKNOWN_RDS_IN 1 + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define rtlerror( E, V ) (rtl_error( (E), (V), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rtl_error __P((char Error, char *Text, char *File, long Line)); + +# endif diff --git a/alliance/src/rds/src/rut.h b/alliance/src/rds/src/rut.h new file mode 100644 index 00000000..e1d14370 --- /dev/null +++ b/alliance/src/rds/src/rut.h @@ -0,0 +1,245 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rut209.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RUT_209_H +# define RUT_209_H + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Equi Mode | +| | +\------------------------------------------------------------*/ + +# define RDS_EQUI_SIZE ( sizeof( rdsrecequi ) ) + +/*------------------------------------------------------------\ +| | +| Mask for Equi | +| | +\------------------------------------------------------------*/ + +# define RDS_EQUI_MASK (long)0x00020000 +# define RDS_END_EQUI_MASK (long)0x00040000 + +/*------------------------------------------------------------\ +| | +| Mask for Unify | +| | +\------------------------------------------------------------*/ + +# define RDS_DELETED_MASK (long)0x00080000 + +/*------------------------------------------------------------\ +| | +| Yes or No | +| | +\------------------------------------------------------------*/ + +# define RDS_YES 1 +# define RDS_NO 0 + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Grid Aligned | +| | +\------------------------------------------------------------*/ + +# define CheckPhysicalGridAligned(c) ((c) % RDS_PHYSICAL_GRID) + +/*------------------------------------------------------------\ +| | +| Macros for Equi | +| | +\------------------------------------------------------------*/ + +# define IsRdsEqui( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS & RDS_EQUI_MASK ) + +# define SetRdsEqui( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS |= RDS_EQUI_MASK ) + +# define ClearRdsEqui( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS &= ~RDS_EQUI_MASK ) + +/*------------------------------------------------------------\ +| | +| Macros for End Equi | +| | +\------------------------------------------------------------*/ + +# define IsRdsEndEqui( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS & RDS_END_EQUI_MASK ) + +# define SetRdsEndEqui( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS |= RDS_END_EQUI_MASK ) + +# define ClearRdsEndEqui( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS &= ~RDS_END_EQUI_MASK ) + +/*------------------------------------------------------------\ +| | +| Macros for Delete | +| | +\------------------------------------------------------------*/ + +# define IsRdsDeleted( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS & RDS_DELETED_MASK ) + +# define SetRdsDeleted( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS |= RDS_DELETED_MASK ) + +# define ClearRdsDeleted( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS &= ~RDS_DELETED_MASK ) + +/*------------------------------------------------------------\ +| | +| Equi Link | +| | +\------------------------------------------------------------*/ + +# define RDS_EQUI( R ) \ + \ + (((rdsrecequi *)((char *)(R) + sizeof(rdsrec_list)))->EQUI ) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Rectangle Equi | +| | +\------------------------------------------------------------*/ + + typedef struct rdsrecequi + { + rdsrec_list *EQUI; + + } rdsrecequi; + + +/*------------------------------------------------------------\ +| | +| Coordinates for polygons | +| | +\------------------------------------------------------------*/ + + typedef struct coord_t + { + long X; + long Y; + + } coord_t; + +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + extern char RDS_SYMMETRY_TABLE[ RDS_MAX_TRANSF ][ RDS_MAX_TRANSF ]; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Search Functions | +| | +\------------------------------------------------------------*/ + + extern rdsfig_list * searchrdsfig __P((char *Name)); + extern rdsins_list * searchrdsins __P((rdsfig_list *Figure, char *Name)); + +/*------------------------------------------------------------\ +| | +| Model Functions | +| | +\------------------------------------------------------------*/ + + extern ptype_list * getrdsmodellist __P((rdsfig_list *Figure)); + +/*------------------------------------------------------------\ +| | +| Apply Functions | +| | +\------------------------------------------------------------*/ + + extern void applyrdssym __P((long *X, long *Y, long *Dx, long *Dy, long Xins, long Yins, char Sym)); + extern void applyrdsmode __P((rdsfig_list *Figure, char Mode)); + +/*------------------------------------------------------------\ +| | +| Flatten Functions | +| | +\------------------------------------------------------------*/ + + extern void flattenrdsfig __P((rdsfig_list *Figure, char *InsName, char Concat)); + extern void rflattenrdsfig __P((rdsfig_list *Figure, char Concat, char Catal)); + +/*------------------------------------------------------------\ +| | +| Equi Functions | +| | +\------------------------------------------------------------*/ + + extern rdsrec_list * equirdsfig __P((rdsfig_list *FigureRds, rdswindow *Window)); + +/*------------------------------------------------------------\ +| | +| Unify Functions | +| | +\------------------------------------------------------------*/ + + extern rdsrec_list * unifyrdsfig __P((rdsfig_list *FigureRds, rdsrec_list *HeadEqui)); + +/*------------------------------------------------------------\ +| | +| Polygon Functions | +| | +\------------------------------------------------------------*/ + + extern void diag2rec __P((rdsfig_list *model, char layer, coord_t coord_tab[], unsigned coord_numb)); + extern void poly2diag __P((coord_t coord_tab[], unsigned coord_numb, double scale, coord_t **new_coord_tab, unsigned *new_coord_numb)); + extern int ispolyrec __P((coord_t coord_tab[], unsigned coord_numb)); + +# endif diff --git a/alliance/src/rds/src/rutacces.c b/alliance/src/rds/src/rutacces.c new file mode 100644 index 00000000..aca61679 --- /dev/null +++ b/alliance/src/rds/src/rutacces.c @@ -0,0 +1,555 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rutacces.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include + +# include +# include +# include "rds.h" +# include "rpr.h" +# include "rfm.h" +# include "rwi.h" +# include "rut.h" + +# include "rutacces.h" +# include "ruterror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Symmetry Table | +| | +\------------------------------------------------------------*/ + + char RDS_SYMMETRY_TABLE[ RDS_MAX_TRANSF ][ RDS_MAX_TRANSF ] = + + { + { RDS_NOSYM, RDS_ROT_P, RDS_SYMXY, RDS_ROT_M, RDS_SYM_X, RDS_SY_RM, RDS_SYM_Y, RDS_SY_RP }, + { RDS_ROT_P, RDS_SYMXY, RDS_ROT_M, RDS_NOSYM, RDS_SY_RP, RDS_SYM_X, RDS_SY_RM, RDS_SYM_Y }, + { RDS_SYMXY, RDS_ROT_M, RDS_NOSYM, RDS_ROT_P, RDS_SYM_Y, RDS_SY_RP, RDS_SYM_X, RDS_SY_RM }, + { RDS_ROT_M, RDS_NOSYM, RDS_ROT_P, RDS_SYMXY, RDS_SY_RM, RDS_SYM_Y, RDS_SY_RP, RDS_SYM_X }, + { RDS_SYM_X, RDS_SY_RM, RDS_SYM_Y, RDS_SY_RP, RDS_NOSYM, RDS_ROT_P, RDS_SYMXY, RDS_ROT_M }, + { RDS_SY_RM, RDS_SYM_Y, RDS_SY_RP, RDS_SYM_X, RDS_ROT_M, RDS_NOSYM, RDS_ROT_P, RDS_SYMXY }, + { RDS_SYM_Y, RDS_SY_RP, RDS_SYM_X, RDS_SY_RM, RDS_SYMXY, RDS_ROT_M, RDS_NOSYM, RDS_ROT_P }, + { RDS_SY_RP, RDS_SYM_X, RDS_SY_RM, RDS_SYM_Y, RDS_ROT_P, RDS_SYMXY, RDS_ROT_M, RDS_NOSYM } + }; + +/*------------------------------------------------------------\ +| | +| Privates variables | +| | +\------------------------------------------------------------*/ + + static ptype_list *HEAD_RDSMODEL = (ptype_list *)NULL; + static long RdsIndexModel = 0; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Search Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Search Rds Figure | +| | +\------------------------------------------------------------*/ + +rdsfig_list *searchrdsfig( Name ) + + char *Name; +{ + rdsfig_list *Figure; + + Name = namealloc( Name ); + + for ( Figure = HEAD_RDSFIG; + Figure != (rdsfig_list *)NULL; + Figure = Figure->NEXT ) + { + if ( Figure->NAME == Name ) break; + } + + return( Figure ); +} + +/*------------------------------------------------------------\ +| | +| Search Rds Instance | +| | +\------------------------------------------------------------*/ + +rdsins_list *searchrdsins( Figure, Name ) + + rdsfig_list *Figure; + char *Name; +{ + rdsins_list *Instance; + + Name = namealloc( Name ); + + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + if ( Instance->INSNAME == Name ) break; + } + + return( Instance ); +} + +/*------------------------------------------------------------\ +| | +| getrdsmodellist | +| | +\------------------------------------------------------------*/ + +ptype_list *getrdsmodellist( Figure ) + + rdsfig_list *Figure; +{ + ptype_list *Head; + ptype_list *Stop; + ptype_list *Scan; + ptype_list *Search; + rdsfig_list *Model; + rdsins_list *Instance; + + if ( HEAD_RDSMODEL != (ptype_list *)NULL ) + { + freeptype( HEAD_RDSMODEL ); + HEAD_RDSMODEL = (ptype_list *)NULL; + } + + HEAD_RDSMODEL = addptype( HEAD_RDSMODEL, ++RdsIndexModel, (char*)Figure ); + Stop = (ptype_list *)NULL; + + do + { + Head = HEAD_RDSMODEL; + + for ( Scan = Head; + Scan != Stop; + Scan = Scan->NEXT ) + { + for ( Instance = ((rdsfig_list *)(Scan->DATA))->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + for ( Search = HEAD_RDSMODEL; + Search != (ptype_list *)NULL; + Search = Search->NEXT ) + { + if (((rdsfig_list *)Search->DATA)->NAME == Instance->FIGNAME ) + { + break; + } + } + + if ( Search == (ptype_list *)NULL ) + { + Model = searchrdsfig( Instance->FIGNAME ); + + if ( Model == (rdsfig_list *)NULL ) + { + ruterror( RDS_MODEL_NOT_FOUND, Instance->FIGNAME ); + } + + HEAD_RDSMODEL = addptype( HEAD_RDSMODEL, ++RdsIndexModel, (char*)Model ); + } + } + } + + Stop = Head; + } + while ( Head != HEAD_RDSMODEL ); + + return( HEAD_RDSMODEL ); +} + +/*------------------------------------------------------------\ +| | +| Apply Rds Symmetry | +| | +\------------------------------------------------------------*/ + +void applyrdssym( X, Y, Dx, Dy, Xins, Yins, Sym ) + + long *X; + long *Y; + long *Dx; + long *Dy; + long Xins; + long Yins; + char Sym; +{ + long OldX; + long OldY; + long OldDx; + long OldDy; + + OldX = *X; + OldY = *Y; + OldDx = *Dx; + OldDy = *Dy; + + switch ( Sym ) + { + case RDS_NOSYM : *X += Xins; + *Y += Yins; + + break; + + case RDS_SYM_X : *X = Xins - OldX - OldDx; + *Y += Yins; + + break; + + case RDS_SYM_Y : *X += Xins ; + *Y = Yins - OldY - OldDy; + + break; + + case RDS_SYMXY : *X = Xins - OldX - OldDx; + *Y = Yins - OldY - OldDy; + + break; + + case RDS_ROT_P : *X = Xins - OldY - OldDy; + *Y = Yins + OldX; + *Dx = OldDy; + *Dy = OldDx; + + break; + + case RDS_ROT_M : *X = Xins + OldY; + *Y = Yins - OldX - OldDx; + *Dx = OldDy; + *Dy = OldDx; + + break; + + case RDS_SY_RP : *X = Xins + OldY; + *Y = Yins + OldX; + *Dx = OldDy; + *Dy = OldDx; + + break; + + case RDS_SY_RM : *X = Xins - OldY - OldDy; + *Y = Yins - OldX - OldDx; + *Dx = OldDy; + *Dy = OldDx; + + break; + } +} + +/*------------------------------------------------------------\ +| | +| applyrdsmode | +| | +\------------------------------------------------------------*/ + +void applyrdsmode( Figure, Mode ) + + rdsfig_list *Figure; + char Mode; +{ + int Layer; + rdsrec_list *Rectangle; + rdsrec_list *InsRec; + rdsrec_list **Previous; + rdsins_list *Instance; + rdsfig_list *Model; + + if ( Figure->MODE == Mode ) return; + + if ( Mode == 'P' ) + { + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + Rectangle = Figure->LAYERTAB[ Layer ]; + Previous = &Figure->LAYERTAB[ Layer ]; + + while ( Rectangle != (rdsrec_list *)NULL ) + { + if ( ( IsRdsConnector( Rectangle ) ) || + ( IsRdsConInter( Rectangle ) ) || + ( IsRdsConExter( Rectangle ) ) || + ( IsRdsFigure( Rectangle ) ) || + ( ( IsRdsSegment( Rectangle ) && + ( ( Layer == RDS_TPOLY ) || + ( Layer == RDS_TPOLY2 ) || + ( Layer == RDS_TALU1 ) || + ( Layer == RDS_TALU2 ) || + ( Layer == RDS_TALU3 ) || + ( Layer == RDS_TALU4 ) || + ( Layer == RDS_TALU5 ) || + ( Layer == RDS_TALU6 ) || + ( Layer == RDS_TALU7 ) || + ( Layer == RDS_TALU8 ) ) ) ) ) + { + Previous = &Rectangle->NEXT; + Rectangle = Rectangle->NEXT; + } + else + { + *Previous = Rectangle->NEXT; + freerdsrec( Rectangle, Figure->SIZE ); + Rectangle = *Previous; + } + } + } + + while ( Figure->INSTANCE != (rdsins_list *)NULL ) + { + delrdsins( Figure, Figure->INSTANCE->INSNAME ); + } + } + else + if ( Mode == 'V' ) + { + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + Model = searchrdsfig( Instance->FIGNAME ); + + if ( Model == (rdsfig_list *)NULL ) + { + ruterror( RDS_MODEL_NOT_FOUND, Instance->FIGNAME ); + } + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Model->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + if ( ( IsRdsConnector( Rectangle ) ) || + ( IsRdsConInter( Rectangle ) ) || + ( IsRdsConExter( Rectangle ) ) || + ( Layer == RDS_ABOX ) || + ( ( IsRdsSegment( Rectangle ) && + ( ( Layer == RDS_TPOLY ) || + ( Layer == RDS_TPOLY2 ) || + ( Layer == RDS_TALU1 ) || + ( Layer == RDS_TALU2 ) || + ( Layer == RDS_TALU3 ) || + ( Layer == RDS_TALU4 ) || + ( Layer == RDS_TALU5 ) || + ( Layer == RDS_TALU6 ) || + ( Layer == RDS_TALU7 ) || + ( Layer == RDS_TALU8 ) ) ) ) ) + { + InsRec = + + addrdsinsrec( Instance, + ( Layer == RDS_ABOX ) + ? Instance->INSNAME : Rectangle->NAME, + Layer, + Rectangle->X, Rectangle->Y, + Rectangle->DX, Rectangle->DY ); + + ClearRdsFigRec( InsRec ); + + if ( IsRdsConnector( Rectangle ) ) + { + SetRdsConnector( InsRec ); + SetRdsConInter( InsRec ); + } + else + if ( IsRdsSegment( Rectangle ) ) + { + SetRdsSegment( InsRec ); + if ( IsRdsConExter( Rectangle ) ) + { + SetRdsConInter( InsRec ); + } + } + else + { + SetRdsInstance( InsRec ); + } + + applyrdssym( &InsRec->X, &InsRec->Y, &InsRec->DX, &InsRec->DY, + Instance->X, Instance->Y, Instance->TRANSF ); + } + } + } + } + } + else + if ( Mode == 'A' ) + { + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + while ( Instance->LAYERTAB[ Layer ] != (rdsrec_list *)NULL ) + { + delrdsinsrec( Instance, Instance->LAYERTAB[ Layer ] ); + } + } + } + } + + Figure->MODE = Mode; +} + +/*------------------------------------------------------------\ +| | +| Flatten Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Flatten Rds Figure | +| | +\------------------------------------------------------------*/ + +void flattenrdsfig( Figure, InsName, Concat ) + + rdsfig_list *Figure; + char *InsName; + char Concat; +{ + rdsins_list *Instance; + rdsfig_list *Model; + rdsrec_list *NewRec; + rdsrec_list *ScanRec; + rdsins_list *ScanIns; + char *RecName; + int Layer; + long Xins; + long Yins; + long Dxins; + + Instance = searchrdsins( Figure, InsName ); + + if ( Instance == (rdsins_list *)NULL ) return; + + Model = searchrdsfig( Instance->FIGNAME ); + + if ( Model == (rdsfig_list *)NULL ) + { + ruterror( RDS_MODEL_NOT_FOUND, Instance->FIGNAME ); + } + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + if ( Layer == RDS_ABOX ) continue; + + for ( ScanRec = Model->LAYERTAB[ Layer ]; + ScanRec != (rdsrec_list *)NULL; + ScanRec = ScanRec->NEXT ) + { + RecName = ScanRec->NAME; + + if ( ( Concat == RDS_YES ) && + ( RecName != (char *)0 ) ) + { + RecName = concatname( InsName, RecName ); + } + + NewRec = addrdsfigrec( Figure, RecName, Layer, + ScanRec->X, ScanRec->Y, + ScanRec->DX, ScanRec->DY ); + + SetRdsMbkType( NewRec, GetRdsMbkType( ScanRec ) ); + + if ( IsRdsConnector( NewRec ) ) SetRdsSegment( NewRec ); + + applyrdssym( &NewRec->X, &NewRec->Y, &NewRec->DX, &NewRec->DY, + Instance->X, Instance->Y, Instance->TRANSF ); + } + } + + for ( ScanIns = Model->INSTANCE; + ScanIns != (rdsins_list *)NULL; + ScanIns = ScanIns->NEXT ) + { + Xins = ScanIns->X; + Yins = ScanIns->Y; + Dxins = 0; + + applyrdssym( &Xins, &Yins, &Dxins, &Dxins, + Instance->X, Instance->Y, Instance->TRANSF ); + + addrdsins( Figure, ScanIns->FIGNAME, + Concat == RDS_NO ? + ScanIns->INSNAME : concatname( InsName, ScanIns->INSNAME ), + RDS_SYMMETRY_TABLE[ (int)ScanIns->TRANSF ][ (int)Instance->TRANSF ], + Xins, Yins ); + } + + delrdsins( Figure, InsName ); +} + +/*------------------------------------------------------------\ +| | +| rflatten Rds Figure | +| | +\------------------------------------------------------------*/ + +void rflattenrdsfig( Figure, Concat, Catal ) + + rdsfig_list *Figure; + char Concat; + char Catal; +{ + rdsins_list *Instance; + + Instance = Figure->INSTANCE; + + while ( Instance != (rdsins_list *)NULL ) + { + if ( ( Catal == RDS_NO ) || + ( ! incatalog( Instance->FIGNAME ) ) || + ( incatalogdelete( Instance->FIGNAME ) ) ) + { + flattenrdsfig( Figure, Figure->INSTANCE->INSNAME, Concat ); + + Instance = Figure->INSTANCE; + } + else + { + Instance = Instance->NEXT; + } + } +} diff --git a/alliance/src/rds/src/rutacces.h b/alliance/src/rds/src/rutacces.h new file mode 100644 index 00000000..77db38e1 --- /dev/null +++ b/alliance/src/rds/src/rutacces.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rutacces.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RUT_ACCES_H +# define RUT_ACCES_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rutequi.c b/alliance/src/rds/src/rutequi.c new file mode 100644 index 00000000..b0a7e702 --- /dev/null +++ b/alliance/src/rds/src/rutequi.c @@ -0,0 +1,185 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rutequi.c | +| | +| Author : Jacomme Ludovic | +| | +| Date : 13.03.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include + +# include +# include "rds.h" +# include "rwi.h" +# include "rut.h" + +# include "rutequi.h" +# include "ruterror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| equirdsfig | +| | +\------------------------------------------------------------*/ + +rdsrec_list *equirdsfig( FigureRds, Window ) + + rdsfig_list *FigureRds; + rdswindow *Window; +{ + rdsrec_list *HeadEqui; + rdswin_list *Win; + rdswin_list *ScanWin; + rdswinrec_list *WinRec; + rdswinrec_list *ScanWinRec; + rdsrecwin_list *RecWin; + rdsrecwin_list *ScanRecWin; + rdsrecwin_list StaticRecWin; + + rdsrec_list **Previous; + rdsrec_list *Rec; + rdsrec_list *EquiRec; + rdsrec_list *ScanRec; + + long X1; + long Y1; + long X2; + long Y2; + + int RecIndex; + int ScanRecIndex; + long WinIndex; + + int Layer; + + rdsbegin(); + + if ( FigureRds->SIZE < RDS_EQUI_SIZE ) + { + ruterror( RDS_INVALID_FIGURE_SIZE, FigureRds->NAME ); + } + + HeadEqui = (rdsrec_list *)NULL; + Previous = &HeadEqui; + + StaticRecWin.NEXT = (rdsrecwin_list *)NULL; + + for ( WinIndex = 0; WinIndex < Window->SIZE; WinIndex++ ) + { + Win = Window->WINTAB + WinIndex; + + if ( Win->LAYERTAB == (rdswinrec_list **)NULL ) continue; + + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( WinRec = Win->LAYERTAB[ Layer ]; + WinRec != (rdswinrec_list *)NULL; + WinRec = WinRec->NEXT ) + { + for ( RecIndex = 0; RecIndex < RWI_MAX_REC; RecIndex++ ) + { + Rec = WinRec->RECTAB[ RecIndex ]; + + if ( ( Rec != (rdsrec_list *)NULL ) && + ( ! IsRdsEqui( Rec ) ) ) + { + SetRdsEqui( Rec ); + + *Previous = Rec; + Previous = &RDS_EQUI( Rec ); + + EquiRec = Rec; + + do + { + X1 = EquiRec->X; + Y1 = EquiRec->Y; + X2 = EquiRec->DX + X1; + Y2 = EquiRec->DY + Y1; + + if ( IsRdsOneWindow( EquiRec ) ) + { + StaticRecWin.WINDOW = (rdswin_list *)EquiRec->USER; + RecWin = &StaticRecWin; + } + else + { + RecWin = (rdsrecwin_list *)EquiRec->USER; + } + + for ( ScanRecWin = RecWin; + ScanRecWin != (rdsrecwin_list *) NULL; + ScanRecWin = ScanRecWin->NEXT ) + { + ScanWin = ScanRecWin->WINDOW; + + for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + ScanWinRec != (rdswinrec_list *)NULL; + ScanWinRec = ScanWinRec->NEXT ) + { + for ( ScanRecIndex = 0; + ScanRecIndex < RWI_MAX_REC; + ScanRecIndex++ ) + { + ScanRec = ScanWinRec->RECTAB[ ScanRecIndex ]; + + if ( ( ScanRec != (rdsrec_list *)NULL ) && + ( ! IsRdsEqui( ScanRec ) ) && + ( ( ScanRec->X ) <= X2 ) && + ( ( ScanRec->Y ) <= Y2 ) && + ( ( ScanRec->X + ScanRec->DX ) >= X1 ) && + ( ( ScanRec->Y + ScanRec->DY ) >= Y1 ) ) + { + SetRdsEqui( ScanRec ); + + *Previous = ScanRec; + Previous = &RDS_EQUI( ScanRec ); + } + } + } + } + + ScanRec = EquiRec; + EquiRec = RDS_EQUI( EquiRec ); + } + while ( EquiRec != (rdsrec_list *)NULL ); + + SetRdsEndEqui( ScanRec ); + } + } + } + } + } + + rdsend(); + return( HeadEqui ); +} diff --git a/alliance/src/rds/src/rutequi.h b/alliance/src/rds/src/rutequi.h new file mode 100644 index 00000000..b00b3b73 --- /dev/null +++ b/alliance/src/rds/src/rutequi.h @@ -0,0 +1,44 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RUT | +| | +| File : rutequi.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RUT_EQUI_H +# define RUT_EQUI_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/ruterror.c b/alliance/src/rds/src/ruterror.c new file mode 100644 index 00000000..5420858b --- /dev/null +++ b/alliance/src/rds/src/ruterror.c @@ -0,0 +1,86 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : ruterror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include + +# include "ruterror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void rut_error( Error, Text, File, Line ) + + char Error; + char *Text; + char *File; + long Line; +{ + char Name[ 128 ]; + + strcpy( Name, File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "rut:%s%ld ", Name, Line ); + + switch( Error ) + { + case RDS_MODEL_NOT_FOUND : + + fprintf( stderr, "Model %s not found in rds structure\n", Text ); + + break; + + case RDS_NOT_ENOUGH_MEMORY : + + fprintf( stderr, "Not enough memory while spliting polygons in %s\n", Text ); + + break; + + case RDS_INVALID_FIGURE_SIZE : + + fprintf( stderr, "Invalid figure size, can't extract equi in %s\n", Text ); + + break; + + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + EXIT( 1 ); +} diff --git a/alliance/src/rds/src/ruterror.h b/alliance/src/rds/src/ruterror.h new file mode 100644 index 00000000..95811e1d --- /dev/null +++ b/alliance/src/rds/src/ruterror.h @@ -0,0 +1,59 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : ruterror.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RUT_ERROR_H +# define RUT_ERROR_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RDS_MODEL_NOT_FOUND 0 +# define RDS_NOT_ENOUGH_MEMORY 1 +# define RDS_INVALID_FIGURE_SIZE 2 + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define ruterror( E, V ) (rut_error( (E), (V), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rut_error __P((char Error, char *Text, char *File, long Line)); + +# endif diff --git a/alliance/src/rds/src/rutpoly.c b/alliance/src/rds/src/rutpoly.c new file mode 100644 index 00000000..a3992ab3 --- /dev/null +++ b/alliance/src/rds/src/rutpoly.c @@ -0,0 +1,899 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rutpoly.c | +| | +| Authors : Pierre Vitet | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rfm.h" +# include "rwi.h" +# include "rut.h" + +# include "rutpoly.h" +# include "ruterror.h" + +/*------------------------------------------------------------\ +| | +| Tools | +| | +\------------------------------------------------------------*/ +/*********** +* +* QUICKSORT +* +* Cette procedure sert a trier un tableau d'entiers dans l'ordre croissant. +* +***/ +static void quicksort(tab, deb, fin) +long tab[]; +unsigned deb, fin; +{ +register long m, aux; +register unsigned i, j; + + i = deb; + j = fin; + m = tab[(deb+fin) >> 1]; /* on repere le milieu du tableau */ + do { + while (tab[i] < m) + i++; + while (tab[j] > m) + j--; + if ( i <= j ) { + aux = tab[i]; + tab[i] = tab[j]; + tab[j] = aux; + i++; + j--; + } + } while (i <= j); + if (deb < j) + quicksort(tab, deb, j); + if (i < fin) + quicksort(tab, i, fin); + + return; +} + + +/*********** +* +* SIMPLIFICATION +* +* Cette fonction est utilisee pour oter toutes les valeurs qui existent en +* double (ou en triple...) dans un tableau deja trie (ordre croissant). +* On va utiliser 2 index : un pour la lecture, l'autre pour l'ecriture. +* On stocke le premier element (ce qui revient a commencer a lire a +* partir du 2eme element. +* POUR tous les elements du tableau FAIRE +* Si l'element lu est different du dernier element a avoir ete stocke +* Alors le sauver +* FPOUR +* +* ENTREE : l'adresse du tableau +* la longueur de cette zone (i.e nombre d'elements du tableau) +* RETOUR : le nombre d'elements differents du tableau maintenant remanie. +* +***/ +static int simplification(tab, tab_lg) +long tab[]; +unsigned tab_lg; +{ +register int i, j; /* i indice de lecture, j celui d'ecriture */ + /* remarque : j indexe l'element qui vient d'etre sauve */ + j = 0; + for (i = 1; i < tab_lg; i++) /* on scanne toutes les valeurs */ + if (tab[i] != tab[j]) + tab[++j] = tab[i]; /* et on sauve si necessaire */ + return(j + 1); +} + +/*********** +* +* AJOUTE +* +* Cette fonction realise l'insertion d'une valeur dans un tableau d'entier. +* Elle ne travaille reellement que sur un segment de ce pseudo-tableau. Elle +* insere cette valeur parmi celles deja presentes dans la zone. Tri par ordre +* croissant. +* +* ENTREE : l'adresse du debut de la zone dans laquelle on insere la valeur. +* taille de la zone. +* la valeur a inserer. +* RETOUR : aucune +* +***/ + +static void ajoute(tab, tab_lg, val) +type_i tab[]; +type_l tab_lg; +type_i val; +{ +register int i, j; + + for (i = 0; i < tab_lg; i++) { + if (tab[i] == (type_i) - 1) { /* ici, la valeur est mise a la fin de la zone */ + tab[i] = val; + break; + } + if (tab[i] > val) { /* Ici, la valeur doit etre inseree */ + for (j = i + 1; j < tab_lg; j++) /* On cherche la 1ere valeur a -1 dans la zone. */ + if (tab[j] == (type_i) - 1) + break; + for ( ; j > i; j--) /* Des qu'on l'a, on peut commencer a redescendre */ + tab[j] = tab[j-1]; /* les valeurs pour ceder la place a la nouvelle. */ + tab[i] = val; + break; + } + } + return; +} + +/*********** +* +* OTE_DOUBLONS +* +* Cette fonction est utilisee pour oter toutes les valeurs qui existent +* en double dans un tableau trie par ordre croissant. En fait, on va se +* borner a remplacer les doublons par -1. On evitera simplement de les +* interpreter par la suite lorsqu'on construira les pseudo-rectangles. +* +* ENTREE : Adresse du debut de la zone dans laquelle on insere la valeur +* La taille de la zone +* RETOUR : Aucune +* +***/ + +static void ote_doublons(tab, tab_lg) +type_i tab[]; +type_l tab_lg; +{ + register int i; + + if (tab_lg == 2) + return; /* si il n'y a que 2 valeurs, il n'y a rien a faire */ + for (i = 1; i < tab_lg - 2; i++) + if (tab[i] == tab[i+1]) { /* Si les 2 valeurs sont identiques */ + tab[i] = (type_i) - 1; + tab[i+1] = (type_i) - 1; + } + return; +} + + +/*********** +* +* DO_V_RECTANGLE & DO_H_RECTANGLE +* +* Ces fonctions servent a former les rectangles avec leurs coordonnees +* non pas reelles mais exprimees en fonction de leur position relative +* par rapport aux autres. En clair, on recupere les cordonnees reelles +* dans les pseudo-tableaux xtab et ytab. +* +* ENTREE : Pseudo-tableau de reception des pseudo-coordonnees des rectangles +* Indice d'ecriture dans ce pseudo-tableau +* Indice dans xtab (ou ytab) de l'abcisse gauche (ou ordonnee basse) +* Pseudo-tableau des aretes horizontales (ou verticales) +* Indice de debut de lecture dans le precedent tableau +* Indice de fin de lecture dans le precedent tableau +* RETOUR : Nombre de rectangles deja inscrit dans le 1er tableau (c'est donc +* la valeur de l'indice en sortie). +* +***/ + +static type_l do_v_rectangle(rect_tab, idx, gauche, pos_tab, deb, fin) +rect_t rect_tab[]; +type_l idx; +type_i gauche; +type_i pos_tab[]; +type_l deb; +type_l fin; +{ + register int i, j; + + register type_i bas, haut; + register int deja_vu; + + i = deb; + do { + deja_vu = 0; + bas = pos_tab[i++]; + while (pos_tab[i] == (type_i) - 1) + i++; /* on passe les eventuels -1 */ + haut = pos_tab[i++]; + + /* on va verifier s'il n'existe pas deja un rectangle de meme hauteur qui soit */ + /* accole, a gauche, a celui qu'on cherche a former. Dans ce cas, on ne ferait */ + /* qu'un rectangle de ces 2 la -> unification. */ + for (j = 0; j < idx; j++) + if ( rect_tab[j].r_d == gauche && rect_tab[j].r_b == bas && rect_tab[j].r_h == haut ) { + rect_tab[j].r_d++; + deja_vu = 1; + break; + } + if (deja_vu) + continue; /* si on vient justement d'elargir un rectangle, on n'en */ + /* cree pas un nouveau, on passe aux aretes suivantes. */ + + rect_tab[idx].r_g = gauche; + rect_tab[idx].r_d = gauche + 1; + rect_tab[idx].r_b = bas; + rect_tab[idx].r_h = haut; + idx++; + } while (i < fin); + + return(idx); /* on renvoie l'indice du nouveau poste de libre. */ +} + + +static type_l do_h_rectangle(rect_tab, idx, bas, pos_tab, deb, fin) +rect_t rect_tab[]; +type_l idx; +type_i bas; +type_i pos_tab[]; +type_l deb; +type_l fin; +{ + register int i, j; + register type_i gauche, droite; + register int deja_vu; + + i = deb; + do { + deja_vu = 0; + gauche = pos_tab[i++]; + while (pos_tab[i] == (type_i) - 1) + i++; /* on passe les eventuels -1 */ + droite = pos_tab[i++]; + + /* on va verifier s'il n'existe pas deja un rectangle de meme largeur qui soit */ + /* accole en dessous de celui qu'on cherche a former. Dans ce cas, on ne ferait */ + /* qu'un rectangle de ces 2 la -> unification. */ + for (j = 0; j < idx; j++) + if ( rect_tab[j].r_h == bas && rect_tab[j].r_g == gauche && rect_tab[j].r_d == droite ) { + rect_tab[j].r_h++; + deja_vu = 1; + break; + } + if (deja_vu) + continue; /* si on vient justement de rehausser un rectangle, on n'en */ + /* cree pas un nouveau, on passe aux aretes suivantes. */ + + rect_tab[idx].r_g = gauche; + rect_tab[idx].r_d = droite; + rect_tab[idx].r_b = bas; + rect_tab[idx].r_h = bas + 1; + idx++; + } while (i < fin); + + return(idx); /* on renvoie l'indice du nouveau poste de libre. */ +} + + +/*********** +* +* D2RDS +* +* Cette fonction prend un tableau de structures qui decrivent des diagonales +* de rectangles et produit les rectangles correspondant dans la base RDS. +* Les deux 1eres paires decrivent la 1ere diagonale et ainsi de suite. +* +* ENTREE : Layer de la liste ou il faut inserer les nouveaux rectangles +* Tableau de structures contenant les coordonnees des diagonales +* Taille du tableau +* RETOUR : Liste des rdsrec_listtangles pointee par HeadFigureRds->layertab[layer] +* +***/ + +void diag2rec(model, layer, coord_tab, coord_numb) +rdsfig_list *model; +char layer; +coord_t coord_tab[]; +unsigned coord_numb; +{ + rdsrec_list *Rec; + register unsigned int i, j; + register long x, y, dx, dy; + + for (i = 0; i < coord_numb; i += 2) { + j = i + 1; + x = coord_tab[i].X; + y = coord_tab[i].Y; + dx = coord_tab[j].X - x; + dy = coord_tab[j].Y - y; + if (CheckPhysicalGridAligned(x) + || CheckPhysicalGridAligned(y) + || CheckPhysicalGridAligned(dx) + || CheckPhysicalGridAligned(dy)) { + fprintf(stderr, "*** rds warning ***\nPolygon with points not "); + fprintf(stderr, "aligned on the physical grid found in %s\n", model->NAME); + fprintf(stderr, "%ld %ld %ld %ld\n", x, y, dx, dy); + Rec = addrdsfigrec(model, (char *)NULL, layer, x, y, dx, dy ); + if ( layer == RDS_ABOX ) SetRdsFigure( Rec ); + roundrdsrec( Rec ); + } else + { + Rec = addrdsfigrec(model, (char *)NULL, layer, x, y, dx, dy ); + if ( layer == RDS_ABOX ) SetRdsFigure( Rec ); + roundrdsrec( Rec ); + } + } +} + + +/*********** +* +* DO_DIAGONALE +* +* Cette fonction prend un tableau de structures qui decrivent tous les rectangles +* necessaire a la reconstitution du polygone. Ces structures ne contiennent pas +* les coordonnees reelles des sommets. Elles ne font qu'indiquer ou on peut con- +* vertir les coordonnees fictives en coordonnees reelles. On va donc les chercher +* dans les pseudo-tableaux xtab et ytab. La fonction cree et remplit un tableau +* de structures coord_t dans lequel on trouve decrits les rectangles avec des co- +* ordonnees reelles : les deux 1eres entrees du tableau concernent la diagonale +* du 1er rectangle (le point en bas a gauche et celui en haut a droite) et ainsi +* de suite. +* +* ENTREE : Pseudo-tableau de structures contenant les coordonnees fictives des rectangles +* Taille du pseudo-tableau +* Table de conversion abcisse fictive >> abcisse reelle +* Table de conversion ordonnee fictive >> ordonnee reelle +* RETOUR : Tableau de structures coord_t +* +***/ + +static coord_t *do_diagonale(rect_tab, nb_rect, xtab, ytab) +rect_t rect_tab[]; +type_l nb_rect; +long xtab[], ytab[]; +{ + register int i, j; + register coord_t *tab; + + tab = (coord_t * )malloc(nb_rect * 2 * sizeof(coord_t)); + if (tab == (coord_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "do_diagonale"); + return((coord_t * )NULL); + } + + for (i = 0; i < nb_rect; i++) { + j = 2 * i; + tab[j].X = xtab[rect_tab[i].r_g]; + tab[j].Y = ytab[rect_tab[i].r_b]; + tab[j+1].X = xtab[rect_tab[i].r_d]; + tab[j+1].Y = ytab[rect_tab[i].r_h]; + } + return(tab); +} + + +/*********** +* +* P2D +* +* Cette fonction prend la description d'un polygone et transforme celui-ci +* en un ensemble de diagonales de rectangles equivalent. +* +* ENTREE: - coord_tab est un pointeur sur un tableau contenant les paires de +* coordonnees. +* - coord_numb est le nombre de coordonnees contenues dans ce pseudo- +* tableau. +* Permet de borner la zone utilisee pour stocker les coordonnees. +* - Facteur de grossissement : pour changer de systeme de coordon- +* neees. +* - Adresse d'un pointeur de coord_t +* - Pointeur sur un unsigned +* +* RETOUR: Un pointeur sur un tableau de paires de coordonnees destines a +* remplacer le polygone. Ce tableau ne contient que les coordonnees +* des diagonales de ces rectangles. +* NULL si manque d'espace memoire +* +* REMARQUES IMPORTANTES : +* 1- Le polygone decrit par le tableau de coordonnees coord_tab DOIT +* etre rectangle (il ne DOIT y avoir que des angles a 90' dans le +* dessin. +* 2- on va supposer que ce tableau contient n+1 couples de coordonnees +* si le polygone a n sommets. Le 1er et le dernier couple sont iden- +* tiques (ils ferment le polygone). +* 3- xtab et ytab contiennent les coordonnees reelles du polygone. Dans +* tout l'algorithme, on utilisera des coordonnees fictives qui seront +* en fait des index sur xtab et ytab, et permettront de retrouver les +* coordonnees reelles, a la fin, pour produire les rectangles finaux. +* 4- Pour economiser l'espace memoire, on va supposer qu'il n'y aura pas +* plus de 65535 abcisses ou ordonnees differentes ( 2^16 de chaque au +* maximum ). Ce qui permet de definir nb_x et nb_y comme type_i, donc +* comme unsigned short. +* - pos_h et pos_v sont 2 tableaux qui contiennent les positions verti- +* cales (resp. horiz.) des aretes horizontales (resp. vert.) dans +* chaque colonne (resp. ligne) du dessin. Ces positions sont des +* index dans ytab (resp. xtab) dont les valeurs sont obligatoirement +* comprises entre 0 et nb_y (resp. nb_x). On definit donc pos_h et +* pos_v comme des tableaux contenant des "type_i". +* - index_h et index_v sont 2 tableaux qui permettent d'indexer pos_h +* et pos_v. Ils montrent ou se trouve la 1ere arete de chacune des +* colonnes (resp. lignes). Une fois le polygone decoupe en morceaux +* elementaires (on utilise un maillage fait de toutes les abcisses et +* ordonnees differentes), on obtient generalement (toujours ?) plus +* d'aretes horizontales (resp. vert.) qu'il n'y a d'abcisses (resp. +* d'ordonnees) differentes : si le dessin a n+1 ordonnees differentes +* cela fait n lignes (comprendre intervalles), on a donc au minimum n +* aretes pour monter + n pour descendre (pour un dessin simple, du +* genre carre, pyramide maya, escalier...). On en conclut que si on a +* 65535 ordonnees differentes (=2^16), on aura au minimum 2 fois plus +* d'aretes verticales. Ce qui veut dire que pos_v aurait dans ce cas +* plus de 130 000 entrees. Donc il faut que index_h et index_v soient +* des tableaux d'entiers longs pour pouvoir indexer correctement dans +* ces cas la. On en fera des tableaux de type_l, ce type_l etant plus +* "grand" que le type_i (comprendre la : "permettant de composer des +* entiers plus grands"). Neanmoins, il parait raisonnable de definir +* type_l comme "unsigned short", la probabilite d'avoir plus de 65535 +* aretes horizontales (resp. vert) au total me paraissant faible. +* - col et lig sont 2 tableaux qui permettent de savoir combien d'are- +* tes horizontales (resp. vert) se trouvent dans chaque colonne (resp +* ligne) du dessin. Si on a n ordonnees differentes, on ne peut avoir +* plus de n aretes horizontales dans une colonne puisqu'au minimum si +* on a n aretes horizontales on a n ordonnees differentes. Le seul +* probleme qu'on peut avoir est quand une arete est parcourue dans +* les 2 sens. Cela arrive quand on a un trou dans le dessin, on cree +* un fil qu'on parcourt dans un sens pour aller parcourir le bord du +* trou, et dans l'autre pour rejoindre le parcours exterieur. Donc la +* on aurait 2 aretes pour une ordonnee unique dans la meme colonne. +* Mais en fait, le parcours interieur implique au moins une ordonnee +* pour laquelle il n'y a pas d'arete correspondante dans la preceden- +* te colonne. Comme il parait fortement improbable d'avoir plus de +* 65535 ordonnees (ou abcisses) differentes, on definit des tableaux +* de type_c ou type_c est du type unsigned short. +* - On remarque que type_c < type_i < type_l. Peut-etre faudrait-il +* prevoir des tests pour ne pas depasser la capacite d'accueil d'un +* de ces types (unsigned short actuellement) et demander une nouvelle +* compilation de ce module avec des nouvelles definitions? +* En tout cas, il est vraisemblable qu'il faudra d'abord agrandir le +* type "type_l" avant les autres. +* +***/ + +void poly2diag(coord_tab, coord_numb, scale, new_coord_tab, new_coord_numb) +coord_t coord_tab[]; +unsigned coord_numb; +double scale; +coord_t **new_coord_tab; +unsigned *new_coord_numb; +{ + register int i, h, v; /* compteurs a tout faire */ + + long x1, y1, x2, y2; /* auxiliaires (de coordonnees) en tout genre */ + + long *tab; /* pseudo-tableau auxiliaire */ + long *xtab, *ytab; /* pseudo-tableaux des differentes coordonnees*/ + type_i nb_x, nb_y; /* tailles des 2 tableaux et egalement nombres d'abcisses et d'ordonnees significatives. */ + type_c * col, *lig; /* pseudo-tableaux contenant respectivement les nombres d'aretes par ligne, par colonne. */ + type_l * index_h, *index_v; /* pseudo-tableaux permettant d'indexer les tableaux contenant les positions des aretes. */ + type_i * pos_h, *pos_v; /* pseudo-tableaux contenant les aretes classees par colonne (ligne) et dans l'ordre */ + /* croissant des ordonnees (abcisses). */ + rect_t * v_rect, *h_rect; /* pseudo-tableaux contenant les rectangles presque formes (coordonnees fictives). */ + coord_t * nct; /* tableau contenant les paires de coordonnees resultantes : celles qui forment les */ + /* diagonales. */ + coord_t * coordonnees; /* Si on doit faire une mise a l'echelle, ce tableau recevra les nouvelles coordonnees */ + /* et si ce n'est pas le cas il servira a pointer directement coord_tab. */ + short bool = 0; /* Indique si coordonnees pointe sur une autre zone que coord_tab (si on a alloue une */ + /* nouvelle zone pour y ranger les coordonnees mises a l'echelle. */ + + /* */ + /* On regarde d'abord si le polygone a decouper n'est pas deja un rectangle, auquel cas le probleme est vite resolu. */ + /* */ + if (coord_numb == 5) { + nct = (coord_t * )malloc(2 * sizeof(coord_t)); + *new_coord_tab = nct; + *new_coord_numb = 0; + if (nct == (coord_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(nct)"); + EXIT(1); + } + *new_coord_numb = 2; + if (scale == 1.0) { + nct[0].X = coord_tab[0].X; + nct[0].Y = coord_tab[0].Y; + nct[1].X = coord_tab[2].X; + nct[1].Y = coord_tab[2].Y; + } else { + nct[0].X = (long)floor(((double)coord_tab[0].X * scale) + .5); + nct[0].Y = (long)floor(((double)coord_tab[0].Y * scale) + .5); + nct[1].X = (long)floor(((double)coord_tab[2].X * scale) + .5); + nct[1].Y = (long)floor(((double)coord_tab[2].Y * scale) + .5); + } + } + + /* */ + /* On fait la mise a l'echelle ? Seulement si necessaire. */ + /* */ + if (scale == 1.0) + coordonnees = coord_tab; + else { + coordonnees = (coord_t * )malloc(coord_numb * sizeof(coord_t)); + if (coordonnees == (coord_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(coordonnees)"); + EXIT(1); + } + bool = 1; /* On vient d'allouer une nouvelle zone pour coordonnees*/ + for (i = 0; i < coord_numb; i++) { /* On recopie les valeurs du tableau passe en parametre */ + coordonnees[i].X = (long)floor(((double)coord_tab[i].X * scale) + .5); /* en les mettant a l'echelle de la base RDS. */ + coordonnees[i].Y = (long)floor(((double)coord_tab[i].Y * scale) + .5); + } + } + + /* */ + /* On extrait de la liste des coordonnees toutes les valeurs significatives */ + /* */ + tab = (long *)malloc(coord_numb * sizeof(long)); /* on alloue un tableau auxiliaire pour y stocker */ + if (tab == (long *)NULL) { /* temporairement les abcisses et les ordonnees. */ + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(tab)"); + if (bool) + free((char *)coordonnees); + EXIT(1); + } + + for (i = 0; i < coord_numb; i++) /* On commence par les abcisses */ + tab[i] = coordonnees[i].X; + + quicksort(tab, 0, coord_numb - 1); /* On les trie */ + nb_x = simplification(tab, coord_numb); /* On ne garde que les valeurs significatives */ + xtab = (long *)malloc(nb_x * sizeof(long)); /* On alloue un pseudo-tableau pour y ranger les valeurs definitives */ + if (xtab == (long *)NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(xtab)"); + if (bool) + free((char *)coordonnees); /* traine pas d'imprecision : si la techno employee n'est pas assez */ + free((char *)tab); /* precise (ex: 50 * 0.001 = 0 si caste en long) */ + EXIT(1); + } + /* On recopie ces valeurs definitives dans le nouveau tableau */ + (void)memcpy((char *)xtab, (char *)tab, (int)nb_x * sizeof(long)); + + + for (i = 0; i < coord_numb; i++) /* Puis on s'occupe des ordonnees de la meme facon */ + tab[i] = coordonnees[i].Y; + + quicksort(tab, 0, coord_numb - 1); + nb_y = simplification(tab, coord_numb); + ytab = (long *)malloc(nb_y * sizeof(long)); + if (ytab == (long *)NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(ytab)"); + if (bool) + free((char *)coordonnees); + free((char *)tab); + free((char *)xtab); + EXIT(1); + } + /* On recopie ces valeurs definitives dans le nouveau tableau */ + (void)memcpy((char *)ytab, (char *)tab, (int)nb_y * sizeof(long)); + + free((char * )tab); + + /* */ + /* Calcul du nombre d'aretes, formant le polygone, pour chaque ligne et */ + /* chaque colonne. */ + /* */ + col = (type_c * )calloc(nb_x - 1, sizeof(type_c)); /* on prepare le pseudo-tableau pour repertorier les aretes */ + if (col == (type_c * )NULL) { /* horizontales contenues dans chaque colonne du dessin. */ + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(col)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + EXIT(1); + } + lig = (type_c * )calloc(nb_y - 1, sizeof(type_c)); /* idem pour les aretes verticales contenues dans chaque ligne. */ + if (lig == (type_c * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(lig)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + EXIT(1); + } + x1 = coordonnees[0].X; /* initialisation des 1eres coordonnees */ + y1 = coordonnees[0].Y; /* (le point 1 = P1) */ + h = v = 0; + while (xtab[h] != x1) + h++; /* on positionne h et v pour demarrer a partir de la 1ere coordonnee du tableau coordonnees */ + while (ytab[v] != y1) + v++; + for ( i = 0; i < coord_numb - 1; i++) { + x2 = coordonnees[i+1].X; /* initialisation des coordonnees suivantes (le point 2 = P2) */ + y2 = coordonnees[i+1].Y; + if ( x1 < x2 ) /* ------ si P1 a gauche de P2 --------- */ + while ( xtab[h] < x2 ) + col[h++]++; + else if ( x1 > x2 ) /* ------ si P1 a droite de P2 --------- */ + while ( xtab[h] > x2 ) + col[--h]++; + else if ( y1 < y2 ) /* ------ si P1 au dessous de P2 ------- */ + while ( ytab[v] < y2 ) + lig[v++]++; + else if ( y1 > y2 ) /* ------ si P1 au dessus de P2 -------- */ + while ( ytab[v] > y2 ) + lig[--v]++; + x1 = x2; /* P2 devient P1 */ + y1 = y2; + } + + /* */ + /* Preparation de 2 tableaux qui vont servir a indexer 2 tableaux contenant */ + /* les aretes classees par colonnes et par lignes */ + /* */ + index_h = (type_l * )calloc(nb_x, sizeof(type_l)); /* reservation de la place en memoire */ + if (index_h == (type_l * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(index_h)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + EXIT(1); + } + index_v = (type_l * )calloc(nb_y, sizeof(type_l)); /* reservation de la place en memoire */ + if (index_v == (type_l * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(index_v)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + EXIT(1); + } + index_h[0] = index_v[0] = 0; + for (i = 1; i < nb_x; i++) /* ce tableau indexe le debut de chaque colonne. */ + index_h[i] = index_h[i-1] + col[i-1]; + for (i = 1; i < nb_y; i++) + index_v[i] = index_v[i-1] + lig[i-1]; /* celui-ci de chaque ligne dans pos_v */ + + /* */ + /* Mise en place des aretes horizontales et verticales dans les pseudo- */ + /* tableaux pos_h et pos_v. */ + /* Exemple : pos_h va contenir a la suite des couples d'indices de ytab */ + /* Chaque couple permet de positionner une arete (horizontale) verticalement */ + /* dans une certaine colonne du dessin. On determine de quelle colonne il */ + /* s'agit grace a index_h. Chaque entree de index_h indique (avec l'indice */ + /* qu'elle contient) a quel endroit de pos_h on change de colonne. */ + /* */ + pos_h = (type_i * )malloc(index_h[nb_x-1] * sizeof(type_i)); /* reservation de la place en memoire */ + if (pos_h == (type_i * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(pos_h)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + EXIT(1); + } + pos_v = (type_i * )malloc(index_v[nb_y-1] * sizeof(type_i)); /* reservation de la place en memoire */ + if (pos_v == (type_i * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(pos_v)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + free((char *)pos_h); + EXIT(1); + } + for (i = 0; i < index_h[nb_x-1]; i++) + pos_h[i] = (type_i) - 1; /* on initialise a -1 ces 2 tableaux */ + for (i = 0; i < index_v[nb_y-1]; i++) + pos_v[i] = (type_i) - 1; + x1 = coordonnees[0].X; /* initialisation des 1eres coordonnees (le point 1 = P1) */ + y1 = coordonnees[0].Y; + h = v = 0; + while (xtab[h] != x1) + h++; /* on positionne h et v pour demarrer a partir de la 1ere coordonnee du tableau coordonnees */ + while (ytab[v] != y1) + v++; + for ( i = 0; i < coord_numb - 1; i++) { + x2 = coordonnees[i+1].X; /* initialisation des coordonnees suivantes (le point 2 = P2) */ + y2 = coordonnees[i+1].Y; + if ( x1 < x2 ) /* ------ si P1 a gauche de P2 --------- */ + while ( xtab[h] < x2 ) { + ajoute(&pos_h[index_h[h]], index_h[h+1] - index_h[h], (type_i)v); + h++; + } + else if ( x1 > x2 ) /* ------ si P1 a droite de P2 --------- */ + while ( xtab[h] > x2 ) { + h--; + ajoute(&pos_h[index_h[h]], index_h[h+1] - index_h[h], (type_i)v); + } + else if ( y1 < y2 ) /* ------ si P1 au dessous de P2 ------- */ + while ( ytab[v] < y2 ) { + ajoute(&pos_v[index_v[v]], index_v[v+1] - index_v[v], (type_i)h); + v++; + } + else if ( y1 > y2 ) /* ------ si P1 au dessus de P2 -------- */ + while ( ytab[v] > y2 ) { + v--; + ajoute(&pos_v[index_v[v]], index_v[v+1] - index_v[v], (type_i)h); + } + x1 = x2; /* P2 devient P1 */ + y1 = y2; + } + + /* */ + /* Simplification des 2 pseudo-tableaux pos_h et pos_v. */ + /* Si une zone contient, par exemple, la sequence 1|2|2|3|5|6 dans le tableau */ + /* pos_h, cela signifie que dans la colonne, concernee par la zone, on a 3 */ + /* rectangles : entre les ordonnees 1 et 2, 2 et 3, 5 et 6. Cela arrive quand */ + /* on rencontre un polygone avec un trou au milieu; pour le former avec un */ + /* seul contour (continu) on est obliger de dessiner un trait invisible qui */ + /* le coupe pour rejoindre le contour interieur, et pour fermer ce contour on */ + /* est oblige de repasser dans l'autre sens sur ce trait. On va donc simpli- */ + /* fier les 2 rectangles qui se touchent pour obtenir la sequence 1|3|5|6. */ + /* */ + for (i = 0; i < nb_x - 1; i++) + ote_doublons(&pos_h[index_h[i]], index_h[i+1] - index_h[i]); + for (i = 0; i < nb_y - 1; i++) + ote_doublons(&pos_v[index_v[i]], index_v[i+1] - index_v[i]); + + /* */ + /* Calcul des rectangles en fonction des colonnes : rectangles verticaux */ + /* */ + v_rect = (rect_t * )malloc(index_h[nb_x-1] / 2 * sizeof(rect_t)); + if (v_rect == (rect_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(v_rect)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + free((char *)pos_h); + free((char *)pos_v); + EXIT(1); + } + v = 0; /* v sert a compter le nombre de rectangles verticaux */ + for (i = 0; i < nb_x - 1; i++) + v = do_v_rectangle(v_rect, (type_l)v, (type_i)i, pos_h, index_h[i], index_h[i+1]); + + /* */ + /* Calcul des rectangles en fonction des lignes : rectangles horizontaux */ + /* */ + h_rect = (rect_t * )malloc(index_v[nb_y-1] / 2 * sizeof(rect_t)); + if (h_rect == (rect_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(h_rect)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + free((char *)pos_h); + free((char *)pos_v); + free((char *)v_rect); + EXIT(1); + } + h = 0; /* h sert a compter le nombre de rectangles horizontaux */ + for (i = 0; i < nb_y - 1; i++) + h = do_h_rectangle(h_rect, (type_l)h, (type_i)i, pos_v, index_v[i], index_v[i+1]); + + /* */ + /* Choix du meilleur decoupage et production des rectangles finaux. */ + /* */ + if (h < v) { + free((char *)v_rect); + nct = do_diagonale(h_rect, (type_l)h, xtab, ytab); + *new_coord_tab = nct; + *new_coord_numb = 2 * h; + if (nct == (coord_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(nct)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + free((char *)pos_h); + free((char *)pos_v); + free((char *)h_rect); + EXIT(1); + } + free((char *)h_rect); + } else { + free((char *)h_rect); + nct = do_diagonale(v_rect, (type_l)v, xtab, ytab); + *new_coord_tab = nct; + *new_coord_numb = 2 * v; + if (nct == (coord_t * )NULL) { + ruterror( RDS_NOT_ENOUGH_MEMORY, "p2d(nct)"); + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + free((char *)pos_h); + free((char *)pos_v); + free((char *)v_rect); + EXIT(1); + } + free((char *)v_rect); + } + + /* */ + /* Liberation de la memoire */ + /* */ + if (bool) + free((char *)coordonnees); + free((char *)xtab); + free((char *)ytab); + free((char *)col); + free((char *)lig); + free((char *)index_h); + free((char *)index_v); + free((char *)pos_h); + free((char *)pos_v); +} + + +/*********** +* +* ISPOLREC +* +* Cette fonction prend la description d'un polygone et verifie si celui-ci est +* rectangle, c'est-a-dire si les seuls angles qui ce retrouvent sur le dessin +* sont des angles droits (pas de fils a 45' ou autre). Il suffit de verifier +* qu'il n'y a qu'une seule coordonnee qui change a la fois ( les seules direc- +* tions permises sont donc N, E, S, W). +* +* ENTREE : Tableau de structures contenant les coordonnees des points +* Taille du tableau +* RETOUR : 1 le polygone est rectangle +* 0 sinon +* +***/ +int ispolyrec(coord_tab, coord_numb) +coord_t coord_tab[]; +unsigned coord_numb; +{ +register int i; + + for (i = 0; i < coord_numb - 1; i++) + if (coord_tab[i].X != coord_tab[i+1].X && + coord_tab[i].Y != coord_tab[i+1].Y) + return 0; + + return 1; +} diff --git a/alliance/src/rds/src/rutpoly.h b/alliance/src/rds/src/rutpoly.h new file mode 100644 index 00000000..9eb1ad57 --- /dev/null +++ b/alliance/src/rds/src/rutpoly.h @@ -0,0 +1,62 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rutpoly.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RUT_POLY_H +# define RUT_POLY_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define type_i unsigned short +# define type_l unsigned short +# define type_c unsigned short + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ + + + typedef struct + { + type_c r_g, r_d, r_b, r_h; + + } rect_t; + +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rutunify.c b/alliance/src/rds/src/rutunify.c new file mode 100644 index 00000000..23bab394 --- /dev/null +++ b/alliance/src/rds/src/rutunify.c @@ -0,0 +1,417 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rutunify.c | +| | +| Author : Jacomme Ludovic | +| | +| Date : 29.03.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include + +# include +# include "rds.h" +# include "rwi.h" +# include "rut.h" + +# include "rutunify.h" +# include "ruterror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + static char RutUnifyTable[ 16 ][ 3 ] = + + { + /* R Right, L Left, U Up, B Bottom Mask Equal */ + + { RUT_UNIFY_DELETE , 0, 0 }, /* 0 */ + { RUT_UNIFY_STRETCH, 0, 10 }, /* 1 B L R */ + { RUT_UNIFY_STRETCH, 0, 5 }, /* 2 R U B */ + { RUT_UNIFY_CROSS , 0, 12 }, /* 3 RB L R */ + { RUT_UNIFY_STRETCH, 0, 10 }, /* 4 U L R */ + { RUT_UNIFY_NOTHING, 0, 10 }, /* 5 U B L R */ + { RUT_UNIFY_CROSS , 0, 9 }, /* 6 UR L B */ + { RUT_UNIFY_STRETCH, 1, 8 }, /* 7 URB L */ + { RUT_UNIFY_STRETCH, 0, 5 }, /* 8 L U B */ + { RUT_UNIFY_CROSS , 0, 6 }, /* 9 L B UR */ + { RUT_UNIFY_NOTHING, 0, 5 }, /* 10 L R U B */ + { RUT_UNIFY_STRETCH, 1, 4 }, /* 11 L RB U */ + { RUT_UNIFY_CROSS , 0, 3 }, /* 12 LU RB */ + { RUT_UNIFY_STRETCH, 1, 2 }, /* 13 LU B R */ + { RUT_UNIFY_STRETCH, 1, 1 }, /* 14 LUR B */ + { RUT_UNIFY_DELETE , 1, 0 }, /* 15 LURB */ + }; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| unifyrdsfig | +| | +\------------------------------------------------------------*/ + +rdsrec_list *unifyrdsfig( FigureRds, HeadEqui ) + + rdsfig_list *FigureRds; + rdsrec_list *HeadEqui; +{ + rdsrec_list **PrevBeginEqui; + rdsrec_list *BeginEqui; + rdsrec_list *ScanBeginEqui; + rdsrec_list *ScanEqui; + rdsrec_list *NewRec; + rdsrec_list *ScanRec; + rdsrec_list **PrevRec; + int Mask; + int MaskEqual; + int UnifyMask; + int Layer; + int Index; + int BeginModify; + int ScanModify; + int EndScanEqui; + int EndBeginEqui; + int ModeCreate; + long X1R; + long Y1R; + long X2R; + long Y2R; + long X1r; + long Y1r; + long X2r; + long Y2r; + long Xn [ 2 ]; + long Yn [ 2 ]; + long DXn[ 2 ]; + long DYn[ 2 ]; + + rdsbegin(); + + PrevBeginEqui = &HeadEqui; + BeginEqui = HeadEqui; + ModeCreate = 1; + + while ( BeginEqui != (rdsrec_list *)NULL ) + { + ScanBeginEqui = BeginEqui; + EndBeginEqui = 0; + + while ( ! EndBeginEqui ) + { + if ( ! IsRdsDeleted( ScanBeginEqui ) ) + { + Layer = GetRdsLayer( ScanBeginEqui ); + + X1R = ScanBeginEqui->X; + Y1R = ScanBeginEqui->Y; + X2R = X1R + ScanBeginEqui->DX; + Y2R = Y1R + ScanBeginEqui->DY; + + ScanEqui = BeginEqui; + EndScanEqui = 0; + BeginModify = 0; + + while ( ( ! EndScanEqui ) && + ( ! IsRdsDeleted( ScanBeginEqui ) ) ) + { + if ( ( ScanBeginEqui != ScanEqui ) && + ( ! IsRdsDeleted( ScanEqui ) ) ) + { + X1r = ScanEqui->X; + Y1r = ScanEqui->Y; + X2r = X1r + ScanEqui->DX; + Y2r = Y1r + ScanEqui->DY; + + if ( ( X1r <= X2R ) && + ( Y1r <= Y2R ) && + ( X2r >= X1R ) && + ( Y2r >= Y1R ) ) + { + ScanModify = 0; + + Mask = 0; + + if ( X1r < X1R ) Mask |= RUT_UNIFY_LEFT; + if ( Y1r < Y1R ) Mask |= RUT_UNIFY_BOTTOM; + if ( X2r > X2R ) Mask |= RUT_UNIFY_RIGHT; + if ( Y2r > Y2R ) Mask |= RUT_UNIFY_UP; + + MaskEqual = 0; + + if ( X1r == X1R ) MaskEqual |= RUT_UNIFY_LEFT; + if ( Y1r == Y1R ) MaskEqual |= RUT_UNIFY_BOTTOM; + if ( X2r == X2R ) MaskEqual |= RUT_UNIFY_RIGHT; + if ( Y2r == Y2R ) MaskEqual |= RUT_UNIFY_UP; + + UnifyMask = RutUnifyTable[ Mask ][ 2 ]; + + switch ( RutUnifyTable[ Mask ][ 0 ] ) + { + case RUT_UNIFY_STRETCH : + + if ( RutUnifyTable[ Mask ][ 1 ] ) + { + if ( ( UnifyMask & MaskEqual ) == UnifyMask ) + { + SetRdsDeleted( ScanBeginEqui ); + } + else + { + switch ( Mask ) + { + case 13 : X1R = X1r; + break; + + case 11 : Y1R = Y1r; + break; + + case 7 : X2R = X2r; + break; + + case 14 : Y2R = Y2r; + break; + } + + BeginModify = 1; + } + } + else + { + if ( ( UnifyMask & MaskEqual ) == UnifyMask ) + { + SetRdsDeleted( ScanBeginEqui ); + } + + switch ( Mask ) + { + case 2 : X1r = X1R; + break; + + case 4 : Y1r = Y1R; + break; + + case 8 : X2r = X2R; + break; + + case 1 : Y2r = Y2R; + break; + } + + ScanModify = 1; + } + + + break; + + case RUT_UNIFY_CROSS : + + if ( ( UnifyMask & MaskEqual ) == UnifyMask ) + { + SetRdsDeleted( ScanBeginEqui ); + } + else + { + if ( UnifyMask & MaskEqual ) + { + switch ( UnifyMask ^ MaskEqual ) + { + case 1 : Y2R = Y2r; + break; + + case 2 : X1R = X1r; + break; + + case 4 : Y1R = Y1r; + break; + + case 8 : X2R = X2r; + break; + } + + BeginModify = 1; + } + else + if ( ModeCreate ) + { + switch( Mask ) + { + case 3 : + case 12 : + + Xn [ 0 ] = X1r; + Yn [ 0 ] = Y1r; + DXn[ 0 ] = X2R - X1r; + DYn[ 0 ] = Y2R - Y1r; + + Xn [ 1 ] = X1R; + Yn [ 1 ] = Y1R; + DXn[ 1 ] = X2r - X1R; + DYn[ 1 ] = Y2r - Y1R; + + break; + + case 6 : + case 9 : + + Xn [ 0 ] = X1R; + Yn [ 0 ] = Y1r; + DXn[ 0 ] = X2r - X1R; + DYn[ 0 ] = Y2R - Y1r; + + Xn [ 1 ] = X1r; + Yn [ 1 ] = Y1R; + DXn[ 1 ] = X2R - X1r; + DYn[ 1 ] = Y2r - Y1R; + + break; + } + + for ( Index = 0; Index < 2; Index++ ) + { + if ( ( DXn[ Index ] > 0 ) && + ( DYn[ Index ] > 0 ) ) + { + NewRec = addrdsfigrec( FigureRds, + ScanEqui->NAME, + Layer, + Xn [ Index ], + Yn [ Index ], + DXn[ Index ], + DYn[ Index ] ); + + SetRdsEqui( NewRec ); + + RDS_EQUI( NewRec ) = *PrevBeginEqui; + *PrevBeginEqui = NewRec; + } + } + } + } + + break; + + case RUT_UNIFY_DELETE : + + if ( RutUnifyTable[ Mask ][ 1 ] ) + { + SetRdsDeleted( ScanBeginEqui ); + } + else + { + SetRdsDeleted( ScanEqui ); + } + + break; + + case RUT_UNIFY_NOTHING : + + if ( ( UnifyMask & MaskEqual ) == UnifyMask ) + { + SetRdsDeleted( ScanBeginEqui ); + } + + break; + } + + if ( ScanModify ) + { + ScanEqui->X = X1r; + ScanEqui->Y = Y1r; + ScanEqui->DX = X2r - X1r; + ScanEqui->DY = Y2r - Y1r; + } + } + } + + if ( ! IsRdsEndEqui( ScanEqui ) ) + { + ScanEqui = RDS_EQUI( ScanEqui ); + } + else + { + EndScanEqui = 1; + } + } + + if ( ( ! IsRdsDeleted( ScanBeginEqui ) ) && + ( BeginModify ) ) + { + ScanBeginEqui->X = X1R; + ScanBeginEqui->Y = Y1R; + ScanBeginEqui->DX = X2R - X1R; + ScanBeginEqui->DY = Y2R - Y1R; + } + } + + if ( ! IsRdsEndEqui( ScanBeginEqui ) ) + { + ScanBeginEqui = RDS_EQUI( ScanBeginEqui ); + } + else + { + EndBeginEqui = 1; + } + } + + if ( BeginEqui != *PrevBeginEqui ) + { + BeginEqui = *PrevBeginEqui; + ModeCreate = 0; + } + else + { + PrevBeginEqui = &RDS_EQUI( ScanBeginEqui ); + BeginEqui = RDS_EQUI( ScanBeginEqui ); + ModeCreate = 1; + } + } + + for ( Layer = 0; Layer < RDS_MAX_LAYER; Layer++ ) + { + ScanRec = FigureRds->LAYERTAB[ Layer ]; + PrevRec = &FigureRds->LAYERTAB[ Layer ]; + + while ( ScanRec != (rdsrec_list *)NULL ) + { + if ( IsRdsDeleted( ScanRec ) ) + { + *PrevRec = ScanRec->NEXT; + freerdsrec( ScanRec, FigureRds->SIZE ); + ScanRec = *PrevRec; + } + else + { + PrevRec = &ScanRec->NEXT; + ScanRec = ScanRec->NEXT; + } + } + } + + rdsend(); + return( HeadEqui ); +} diff --git a/alliance/src/rds/src/rutunify.h b/alliance/src/rds/src/rutunify.h new file mode 100644 index 00000000..9aef352e --- /dev/null +++ b/alliance/src/rds/src/rutunify.h @@ -0,0 +1,66 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RUT | +| | +| File : rutunify.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RUT_UNIFY_H +# define RUT_UNIFY_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Mask | +| | +\------------------------------------------------------------*/ + +# define RUT_UNIFY_LEFT 0x0008 +# define RUT_UNIFY_UP 0x0004 +# define RUT_UNIFY_RIGHT 0x0002 +# define RUT_UNIFY_BOTTOM 0x0001 + +/*------------------------------------------------------------\ +| | +| Unify Case | +| | +\------------------------------------------------------------*/ + +# define RUT_UNIFY_NOTHING 0 +# define RUT_UNIFY_DELETE 1 +# define RUT_UNIFY_STRETCH 2 +# define RUT_UNIFY_CROSS 3 + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwi.h b/alliance/src/rds/src/rwi.h new file mode 100644 index 00000000..f9522748 --- /dev/null +++ b/alliance/src/rds/src/rwi.h @@ -0,0 +1,181 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwi110.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_110_H +# define RWI_110_H + +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ + +# define RWI_MAX_REC 8 +# define RWI_MAX_LAYER RDS_ABOX + +/*------------------------------------------------------------\ +| | +| Flags for window | +| | +\------------------------------------------------------------*/ + +# define RDS_ONE_WINDOW (long)0x00010000 + +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define IsRdsOneWindow( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS & RDS_ONE_WINDOW ) + +# define SetRdsOneWindow( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS |= RDS_ONE_WINDOW ) + +# define ClearRdsOneWindow( Rectangle ) \ + \ + ( ( Rectangle )->FLAGS &= ~RDS_ONE_WINDOW ) + +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Rds Window, Rectangle List | +| | +\------------------------------------------------------------*/ + + typedef struct rdswinrec_list + + { + struct rdswinrec_list *NEXT; + rdsrec_list *RECTAB[ RWI_MAX_REC ]; + + } rdswinrec_list; + +/*------------------------------------------------------------\ +| | +| Rds Window list | +| | +\------------------------------------------------------------*/ + + typedef struct rdswin_list + + { + struct rdswinrec_list **LAYERTAB; + + } rdswin_list; + +/*------------------------------------------------------------\ +| | +| Rds rectangle, Window List | +| | +\------------------------------------------------------------*/ + + typedef struct rdsrecwin_list + + { + struct rdsrecwin_list *NEXT; + struct rdswin_list *WINDOW; + + } rdsrecwin_list; + +/*------------------------------------------------------------\ +| | +| Rds Window | +| | +\------------------------------------------------------------*/ + + typedef struct rdswindow + + { + long XMIN; + long YMIN; + long XMAX; + long YMAX; + long MASK; + long DX; + long DY; + long SIDE; + long SIZE; + rdswin_list *WINTAB; + + } rdswindow; + +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc functions | +| | +\------------------------------------------------------------*/ + + extern rdswinrec_list * allocrdswinrec __P(()); + extern rdsrecwin_list * allocrdsrecwin __P(()); + extern rdswin_list * allocrdswin __P((unsigned long Number)); + extern rdswin_list * allocrdswinlayer __P((rdswin_list *RdsWin)); + extern rdswindow * allocrdswindow __P(()); + +/*------------------------------------------------------------\ +| | +| Free functions | +| | +\------------------------------------------------------------*/ + + extern void freerdswinrec __P((rdswinrec_list *WinRec)); + extern void freerdsrecwin __P((rdsrecwin_list *RecWin)); + extern void freerdswin __P((rdswin_list *Win)); + extern void freerdswinlayer __P((rdswin_list *Win)); + extern void freerdswindow __P((rdswindow *RdsWindow)); + +/*------------------------------------------------------------\ +| | +| Get functions | +| | +\------------------------------------------------------------*/ + + extern chain_list * getrdswindow __P((long X, long Y, long Dx, long Dy, rdswindow *RdsWindow)); + +/*------------------------------------------------------------\ +| | +| Build & Destroy functions | +| | +\------------------------------------------------------------*/ + + extern void addrdsrecwindow __P((rdsrec_list *Rectangle, rdswindow *RdsWindow)); + extern void delrdsrecwindow __P((rdsrec_list *Rectangle, rdswindow *RdsWindow)); + extern rdswindow * buildrdswindow __P((rdsfig_list *Figure)); + extern void destroyrdswindow __P((rdsfig_list *Figure, rdswindow *RdsWindow)); + extern void viewrdswindow __P((rdswindow *RdsWindow)); + +# endif diff --git a/alliance/src/rds/src/rwiadd.c b/alliance/src/rds/src/rwiadd.c new file mode 100644 index 00000000..f6a55c67 --- /dev/null +++ b/alliance/src/rds/src/rwiadd.c @@ -0,0 +1,167 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwiadd.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rwi.h" +# include "rut.h" + +# include "rwiadd.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Add Rectangle In Window | +| | +\------------------------------------------------------------*/ + +void addrdsrecwindow( Rectangle, RdsWindow ) + + rdsrec_list *Rectangle; + rdswindow *RdsWindow; +{ + rdswin_list *LinkWinList; + rdswin_list *WinList; + rdsrecwin_list *RecWin; + rdswinrec_list *WinRec; + int Layer; + + long X1; + long X2; + long Y1; + long Y2; + long FirstX; + + long Counter; + + Y1 = ( Rectangle->Y - 1 - RdsWindow->YMIN ) / RdsWindow->SIDE; + Y2 = ( Rectangle->Y + Rectangle->DY - RdsWindow->YMIN ) / RdsWindow->SIDE; + X1 = ( Rectangle->X - 1 - RdsWindow->XMIN ) / RdsWindow->SIDE; + X2 = ( Rectangle->X + Rectangle->DX - RdsWindow->XMIN ) / RdsWindow->SIDE; + + if ( X1 < 0 ) X1 = 0; + if ( X2 < 0 ) X2 = 0; + if ( X1 >= RdsWindow->DX ) X1 = RdsWindow->DX - 1; + if ( X2 >= RdsWindow->DX ) X2 = RdsWindow->DX - 1; + + if ( Y1 < 0 ) Y1 = 0; + if ( Y2 < 0 ) Y2 = 0; + if ( Y1 >= RdsWindow->DY ) Y1 = RdsWindow->DY - 1; + if ( Y2 >= RdsWindow->DY ) Y2 = RdsWindow->DY - 1; + + FirstX = X1; + + /* End Modif 04/10/94 */ + + while ( Y1 <= Y2 ) + { + WinList = RdsWindow->WINTAB + ( Y1 * RdsWindow->DX ); + + X1 = FirstX; + + while ( X1 <= X2 ) + { + LinkWinList = WinList + X1; + + if ( LinkWinList->LAYERTAB == (rdswinrec_list **)NULL ) + { + allocrdswinlayer( LinkWinList ); + } + + if ( Rectangle->USER == (void *)NULL ) + { + Rectangle->USER = (void *)LinkWinList; + SetRdsOneWindow( Rectangle ); + } + else + { + if ( IsRdsOneWindow( Rectangle ) ) + { + ClearRdsOneWindow( Rectangle ); + + RecWin = allocrdsrecwin(); + RecWin->WINDOW = (rdswin_list *)Rectangle->USER; + Rectangle->USER = (void *)RecWin; + } + + RecWin = allocrdsrecwin(); + RecWin->WINDOW = LinkWinList; + RecWin->NEXT = (rdsrecwin_list *)Rectangle->USER; + Rectangle->USER = (void *)RecWin; + } + + Layer = GetRdsLayer( Rectangle ); + + WinRec = LinkWinList->LAYERTAB[ Layer ]; + + if ( WinRec == (rdswinrec_list *)NULL ) + { + WinRec = allocrdswinrec(); + LinkWinList->LAYERTAB[ Layer ] = WinRec; + WinRec->RECTAB[ 0 ] = Rectangle; + } + else + { + for ( Counter = 0; Counter < RWI_MAX_REC; Counter++ ) + { + if ( WinRec->RECTAB[ Counter ] == (rdsrec_list *)NULL ) break; + } + + if ( Counter == RWI_MAX_REC ) + { + WinRec = allocrdswinrec(); + WinRec->NEXT = LinkWinList->LAYERTAB[ Layer ]; + LinkWinList->LAYERTAB[ Layer ] = WinRec; + WinRec->RECTAB[ 0 ] = Rectangle; + } + else + { + WinRec->RECTAB[ Counter ] = Rectangle; + } + } + + X1 = X1 + 1; + } + + Y1 = Y1 + 1; + } +} + diff --git a/alliance/src/rds/src/rwiadd.h b/alliance/src/rds/src/rwiadd.h new file mode 100644 index 00000000..caa21f82 --- /dev/null +++ b/alliance/src/rds/src/rwiadd.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwiadd.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_ADD_H +# define RWI_ADD_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwialloc.c b/alliance/src/rds/src/rwialloc.c new file mode 100644 index 00000000..f8a1fc22 --- /dev/null +++ b/alliance/src/rds/src/rwialloc.c @@ -0,0 +1,120 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwialloc.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rwi.h" +# include "rut.h" + +# include "rwialloc.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Alloc Rds Win Rec | +| | +\------------------------------------------------------------*/ + +rdswinrec_list *allocrdswinrec() + +{ + return( (rdswinrec_list *)(rdsallocheap( sizeof(rdswinrec_list) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Alloc Rds Rec Win | +| | +\------------------------------------------------------------*/ + +rdsrecwin_list *allocrdsrecwin() + +{ + return((rdsrecwin_list *)(rdsallocheap( sizeof(rdsrecwin_list) ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Alloc Rds Window | +| | +\------------------------------------------------------------*/ + +rdswin_list *allocrdswin( Number ) + + unsigned long Number; +{ + return((rdswin_list *)(rdsallocblock( sizeof(rdswin_list) * Number ) ) ); +} + +/*------------------------------------------------------------\ +| | +| Alloc Rds Window | +| | +\------------------------------------------------------------*/ + +rdswin_list *allocrdswinlayer( RdsWin ) + + rdswin_list *RdsWin; +{ + if ( RdsWin->LAYERTAB == (rdswinrec_list **)NULL ) + { + RdsWin->LAYERTAB = (rdswinrec_list **)rdsallocblock( sizeof(rdswinrec_list *) * RWI_MAX_LAYER ); + } + + return( RdsWin ); +} + +/*------------------------------------------------------------\ +| | +| Alloc Rds Window | +| | +\------------------------------------------------------------*/ + +rdswindow *allocrdswindow() + +{ + return((rdswindow *)(rdsallocblock(sizeof(rdswindow) ) ) ); +} diff --git a/alliance/src/rds/src/rwialloc.h b/alliance/src/rds/src/rwialloc.h new file mode 100644 index 00000000..2fc8b201 --- /dev/null +++ b/alliance/src/rds/src/rwialloc.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwialloc.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_ALLOC_H +# define RWI_ALLOC_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwibuild.c b/alliance/src/rds/src/rwibuild.c new file mode 100644 index 00000000..e1178500 --- /dev/null +++ b/alliance/src/rds/src/rwibuild.c @@ -0,0 +1,221 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwibuild.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include +# include "rds.h" +# include "rtl.h" +# include "rpr.h" +# include "rwi.h" + +# include "rwibuild.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Build Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Build Rds Window | +| | +\------------------------------------------------------------*/ + +rdswindow *buildrdswindow( Figure ) + + rdsfig_list *Figure; +{ + rdswindow *RdsWindow; + rdsrec_list *Rectangle; + rdsins_list *Instance; + int Layer; + + long X1; + long Y1; + long X2; + long Y2; + + long Mask; + long Xmin; + long Ymin; + long Xmax; + long Ymax; + + RdsWindow = allocrdswindow(); + + Mask = 0; + + Xmin = Xmax = Ymin = Ymax = 0; + + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Figure->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + Rectangle->USER = (void *)NULL; + + ClearRdsOneWindow( Rectangle ); + + X1 = Rectangle->X; + X2 = X1 + Rectangle->DX; + Y1 = Rectangle->Y; + Y2 = Y1 + Rectangle->DY; + + if ( Mask == 0 ) + { + Xmax = X2; + Ymax = Y2; + Xmin = X1; + Ymin = Y1; + } + else + { + if ( Xmax < X2 ) Xmax = X2; + if ( Ymax < Y2 ) Ymax = Y2; + if ( Xmin > X1 ) Xmin = X1; + if ( Ymin > Y1 ) Ymin = Y1; + } + + Mask = Mask + 1; + } + } + + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Instance->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + Rectangle->USER = (void *)NULL; + + ClearRdsOneWindow( Rectangle ); + + X1 = Rectangle->X; + X2 = X1 + Rectangle->DX; + Y1 = Rectangle->Y; + Y2 = Y1 + Rectangle->DY; + + if ( Mask == 0 ) + { + Xmax = X2; + Ymax = Y2; + Xmin = X1; + Ymin = Y1; + } + else + { + if ( Xmax < X2 ) Xmax = X2; + if ( Ymax < Y2 ) Ymax = Y2; + if ( Xmin > X1 ) Xmin = X1; + if ( Ymin > Y1 ) Ymin = Y1; + } + + Mask = Mask + 1; + } + } + } + + RdsWindow->XMIN = Xmin; + RdsWindow->XMAX = Xmax; + RdsWindow->YMIN = Ymin; + RdsWindow->YMAX = Ymax; + RdsWindow->MASK = Mask; + + if ( Mask == 0 ) return( RdsWindow ); + + /* Begin modif May, 5 1994 */ + + if ( RDS_WINDOW_AREA == 0 ) + { + RdsWindow->SIDE = ( long )( sqrt( ( double )( Xmax - Xmin ) * + ( double )( Ymax - Ymin ) ) / + sqrt( sqrt( ( double )Mask ) ) ); + + RdsWindow->DX = 1 + ( Xmax - Xmin ) / RdsWindow->SIDE; + RdsWindow->DY = 1 + ( Ymax - Ymin ) / RdsWindow->SIDE; + RdsWindow->SIZE = RdsWindow->DX * RdsWindow->DY; + } + else + { + RdsWindow->SIDE = ( long )( sqrt( (double)RDS_WINDOW_AREA * + (double)RDS_LAMBDA2 ) ); + RdsWindow->DX = 1 + ( Xmax - Xmin ) / RdsWindow->SIDE; + RdsWindow->DY = 1 + ( Ymax - Ymin ) / RdsWindow->SIDE; + RdsWindow->SIZE = RdsWindow->DX * RdsWindow->DY; + } + + /* End modif May, 5 1994 */ + + RdsWindow->WINTAB = allocrdswin( RdsWindow->SIZE ); + + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Figure->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + addrdsrecwindow( Rectangle, RdsWindow ); + } + } + + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Instance->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + addrdsrecwindow( Rectangle, RdsWindow ); + } + } + } + + return( RdsWindow ); +} diff --git a/alliance/src/rds/src/rwibuild.h b/alliance/src/rds/src/rwibuild.h new file mode 100644 index 00000000..a1d663b2 --- /dev/null +++ b/alliance/src/rds/src/rwibuild.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwibuild.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_BUILD_H +# define RWI_BUILD_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwidel.c b/alliance/src/rds/src/rwidel.c new file mode 100644 index 00000000..f90b9381 --- /dev/null +++ b/alliance/src/rds/src/rwidel.c @@ -0,0 +1,151 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwidel.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rtl.h" +# include "rwi.h" + +# include "rwidel.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Del Rectangle In Window | +| | +\------------------------------------------------------------*/ + +void delrdsrecwindow( Rectangle, RdsWindow ) + + rdsrec_list *Rectangle; + rdswindow *RdsWindow; +{ + rdsrecwin_list StaticRecWin; + rdsrecwin_list *ScanRecWin; + rdsrecwin_list *DelRecWin; + rdswinrec_list *ScanWinRec; + rdswinrec_list *FirstWinRec; + rdswin_list *ScanWin; + + int Layer; + int Index; + int Found; + + Layer = GetRdsLayer( Rectangle ); + + if ( IsRdsOneWindow( Rectangle ) ) + { + StaticRecWin.NEXT = (rdsrecwin_list *)NULL; + StaticRecWin.WINDOW = (rdswin_list *)Rectangle->USER; + ScanRecWin = &StaticRecWin; + } + else + { + ScanRecWin = (rdsrecwin_list *)(Rectangle->USER); + } + + Rectangle->USER = (void *)NULL; + ClearRdsOneWindow( Rectangle ); + + while ( ScanRecWin != (rdsrecwin_list *)NULL ) + { + DelRecWin = ScanRecWin; + ScanRecWin = ScanRecWin->NEXT; + + ScanWin = DelRecWin->WINDOW; + Found = RWI_MAX_REC; + + if ( ScanWin->LAYERTAB == (rdswinrec_list **)NULL ) + { + allocrdswinlayer( ScanWin ); + } + + FirstWinRec = ScanWin->LAYERTAB[ Layer ]; + + for ( ScanWinRec = FirstWinRec; + ScanWinRec != (rdswinrec_list *)NULL; + ScanWinRec = ScanWinRec->NEXT ) + { + for ( Index = 0; Index < RWI_MAX_REC; Index++ ) + { + if ( ScanWinRec->RECTAB[ Index ] == Rectangle ) + { + Found = Index; break; + } + } + + if ( Found != RWI_MAX_REC ) break; + } + + if ( ScanWinRec == FirstWinRec ) + { + ScanWinRec->RECTAB[ Found ] = (rdsrec_list *)NULL; + } + else + { + for ( Index = 0; Index < RWI_MAX_REC; Index++ ) + { + if ( FirstWinRec->RECTAB[ Index ] != (rdsrec_list *)NULL ) break; + } + + ScanWinRec->RECTAB[ Found ] = FirstWinRec->RECTAB[ Index ]; + FirstWinRec->RECTAB[ Index ] = (rdsrec_list *)NULL; + } + + for ( Index = 0; Index < RWI_MAX_REC; Index++ ) + { + if ( FirstWinRec->RECTAB[ Index ] != (rdsrec_list *)NULL ) break; + } + + if ( Index == RWI_MAX_REC ) + { + ScanWin->LAYERTAB[ Layer ] = FirstWinRec->NEXT; + + freerdswinrec( FirstWinRec ); + } + + if ( DelRecWin != &StaticRecWin ) + { + freerdsrecwin( DelRecWin ); + } + } +} + diff --git a/alliance/src/rds/src/rwidel.h b/alliance/src/rds/src/rwidel.h new file mode 100644 index 00000000..8dc35a53 --- /dev/null +++ b/alliance/src/rds/src/rwidel.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwidel.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_DEL_H +# define RWI_DEL_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwidestroy.c b/alliance/src/rds/src/rwidestroy.c new file mode 100644 index 00000000..e4ab615c --- /dev/null +++ b/alliance/src/rds/src/rwidestroy.c @@ -0,0 +1,154 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwidestroy.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rtl.h" +# include "rwi.h" + +# include "rwidestroy.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Destroy Rds Window | +| | +\------------------------------------------------------------*/ + +void destroyrdswindow( Figure, RdsWindow ) + + rdsfig_list *Figure; + rdswindow *RdsWindow; +{ + rdsins_list *Instance; + rdsrec_list *Rectangle; + rdswin_list *WinList; + rdsrecwin_list *RecWin; + rdsrecwin_list *DelRecWin; + rdswinrec_list *WinRec; + rdswinrec_list *DelWinRec; + long Counter; + int Layer; + + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Figure->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + if ( ! IsRdsOneWindow( Rectangle ) ) + { + RecWin = (rdsrecwin_list *)Rectangle->USER; + + while ( RecWin != (rdsrecwin_list *)NULL ) + { + DelRecWin = RecWin; + RecWin = RecWin->NEXT; + + freerdsrecwin( DelRecWin ); + } + } + + Rectangle->USER = (void *)NULL; + + ClearRdsOneWindow( Rectangle ); + } + } + + for ( Instance = Figure->INSTANCE; + Instance != (rdsins_list *)NULL; + Instance = Instance->NEXT ) + { + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( Rectangle = Instance->LAYERTAB[ Layer ]; + Rectangle != (rdsrec_list *)NULL; + Rectangle = Rectangle->NEXT ) + { + if ( ! IsRdsOneWindow( Rectangle ) ) + { + RecWin = (rdsrecwin_list *)Rectangle->USER; + + while ( RecWin != (rdsrecwin_list *)NULL ) + { + DelRecWin = RecWin; + RecWin = RecWin->NEXT; + + freerdsrecwin( DelRecWin ); + } + } + + Rectangle->USER = (void *)NULL; + + ClearRdsOneWindow( Rectangle ); + } + } + } + + WinList = RdsWindow->WINTAB; + + for ( Counter = 0; Counter < RdsWindow->SIZE; Counter++ ) + { + if ( WinList->LAYERTAB != (rdswinrec_list **)NULL ) + { + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + WinRec = WinList->LAYERTAB[ Layer ]; + + while ( WinRec != (rdswinrec_list *)NULL ) + { + DelWinRec = WinRec; + WinRec = WinRec->NEXT; + + freerdswinrec( DelWinRec ); + } + } + + freerdswinlayer( WinList ); + } + + WinList = WinList + 1; + } + + freerdswin( RdsWindow->WINTAB ); + freerdswindow( RdsWindow ); +} + diff --git a/alliance/src/rds/src/rwidestroy.h b/alliance/src/rds/src/rwidestroy.h new file mode 100644 index 00000000..d87c28f4 --- /dev/null +++ b/alliance/src/rds/src/rwidestroy.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwidestroy.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_DESTROY_H +# define RWI_DESTROY_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwierror.c b/alliance/src/rds/src/rwierror.c new file mode 100644 index 00000000..795db862 --- /dev/null +++ b/alliance/src/rds/src/rwierror.c @@ -0,0 +1,70 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwierror.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include + +# include +# include "rds.h" +# include "rwi.h" + +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +void rwi_error( Error, Text, File, Line ) + + char Error; + char *Text; + char *File; + long Line; +{ + char Name[ 128 ]; + + strcpy( Name, File ); + Name[ strlen( File ) - 1 ] = '\0'; + + fprintf( stderr, "rwi:%s%ld ", Name, Line ); + + switch( Error ) + { + default : + + fprintf( stderr, "unknown internal error %d !\n", Error ); + } + + EXIT( 1 ); +} diff --git a/alliance/src/rds/src/rwierror.h b/alliance/src/rds/src/rwierror.h new file mode 100644 index 00000000..758018e4 --- /dev/null +++ b/alliance/src/rds/src/rwierror.h @@ -0,0 +1,54 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwierror.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_ERROR_H +# define RWI_ERROR_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macros | +| | +\------------------------------------------------------------*/ + +# define rwierror( E, V ) (rwi_error( (E), (V), __FILE__, __LINE__ )) + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + + extern void rwi_error __P((char Error, char *Text, char *File, long Line)); + +# endif diff --git a/alliance/src/rds/src/rwifree.c b/alliance/src/rds/src/rwifree.c new file mode 100644 index 00000000..690cc3d0 --- /dev/null +++ b/alliance/src/rds/src/rwifree.c @@ -0,0 +1,123 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwifree.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rtl.h" +# include "rwi.h" + +# include "rwifree.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Free Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Free Rds Rec Win | +| | +\------------------------------------------------------------*/ + +void freerdsrecwin( RecWin ) + + rdsrecwin_list *RecWin; +{ + rdsfreeheap( (char *)RecWin, sizeof(rdsrecwin_list) ); +} + +/*------------------------------------------------------------\ +| | +| Free Rds Win Rec | +| | +\------------------------------------------------------------*/ + +void freerdswinrec( WinRec ) + + rdswinrec_list *WinRec; +{ + rdsfreeheap( (char *)WinRec, sizeof(rdswinrec_list) ); +} + +/*------------------------------------------------------------\ +| | +| Free Rds Win | +| | +\------------------------------------------------------------*/ + +void freerdswin( Win ) + + rdswin_list *Win; +{ + rdsfreeblock( (char *)Win ); +} + +/*------------------------------------------------------------\ +| | +| Free Rds Win Layer | +| | +\------------------------------------------------------------*/ + +void freerdswinlayer( Win ) + + rdswin_list *Win; +{ + if ( Win->LAYERTAB != (rdswinrec_list **)NULL ) + { + rdsfreeblock( (char *)Win->LAYERTAB ); + Win->LAYERTAB = (rdswinrec_list **)NULL; + } +} + +/*------------------------------------------------------------\ +| | +| Free Rds Window | +| | +\------------------------------------------------------------*/ + +void freerdswindow( RdsWindow ) + + rdswindow *RdsWindow; +{ + rdsfreeblock( (char *)RdsWindow ); +} + diff --git a/alliance/src/rds/src/rwifree.h b/alliance/src/rds/src/rwifree.h new file mode 100644 index 00000000..48f86f46 --- /dev/null +++ b/alliance/src/rds/src/rwifree.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwifree.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_FREE_H +# define RWI_FREE_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwiget.c b/alliance/src/rds/src/rwiget.c new file mode 100644 index 00000000..6e16871d --- /dev/null +++ b/alliance/src/rds/src/rwiget.c @@ -0,0 +1,119 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwiget.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rtl.h" +# include "rwi.h" + +# include "rwiget.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ + + static chain_list *HEAD_RWICHAIN = (chain_list *)NULL; + +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| getrdswindow | +| | +\------------------------------------------------------------*/ + +chain_list *getrdswindow( X, Y, Dx, Dy, RdsWindow ) + + long X; + long Y; + long Dx; + long Dy; + rdswindow *RdsWindow; +{ + rdswin_list *WinList; + long X1; + long X2; + long Y1; + long Y2; + long FirstX; + + if ( HEAD_RWICHAIN != (chain_list *)NULL ) + { + freechain( HEAD_RWICHAIN ); + HEAD_RWICHAIN = (chain_list *)NULL; + } + + Y1 = ( Y - 1 - RdsWindow->YMIN ) / RdsWindow->SIDE; + Y2 = ( Y + Dy - RdsWindow->YMIN ) / RdsWindow->SIDE; + X1 = ( X - 1 - RdsWindow->XMIN ) / RdsWindow->SIDE; + X2 = ( X + Dx - RdsWindow->XMIN ) / RdsWindow->SIDE; + + if ( X1 < 0 ) X1 = 0; + if ( X2 < 0 ) X2 = 0; + if ( X1 >= RdsWindow->DX ) X1 = RdsWindow->DX - 1; + if ( X2 >= RdsWindow->DX ) X2 = RdsWindow->DX - 1; + + if ( Y1 < 0 ) Y1 = 0; + if ( Y2 < 0 ) Y2 = 0; + if ( Y1 >= RdsWindow->DY ) Y1 = RdsWindow->DY - 1; + if ( Y2 >= RdsWindow->DY ) Y2 = RdsWindow->DY - 1; + + FirstX = X1; + + /* End Modif 04/10/94 */ + + while ( Y1 <= Y2 ) + { + WinList = RdsWindow->WINTAB + ( Y1 * RdsWindow->DX ); + + X1 = FirstX; + + while ( X1 <= X2 ) + { + allocrdswinlayer( WinList + X1 ); + + HEAD_RWICHAIN = addchain( HEAD_RWICHAIN, + (void *)(WinList + X1) ); + X1 = X1 + 1; + } + + Y1 = Y1 + 1; + } + + return( HEAD_RWICHAIN ); +} + diff --git a/alliance/src/rds/src/rwiget.h b/alliance/src/rds/src/rwiget.h new file mode 100644 index 00000000..b1e6b7d8 --- /dev/null +++ b/alliance/src/rds/src/rwiget.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwiget.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_GET_H +# define RWI_GET_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif diff --git a/alliance/src/rds/src/rwiview.c b/alliance/src/rds/src/rwiview.c new file mode 100644 index 00000000..b5d1dca3 --- /dev/null +++ b/alliance/src/rds/src/rwiview.c @@ -0,0 +1,161 @@ +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwiview.c | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Include Files | +| | +\------------------------------------------------------------*/ + +# include +# include +# include + +# include +# include "rds.h" +# include "rtl.h" +# include "rwi.h" + +# include "rwiview.h" +# include "rwierror.h" + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| View Rds Window | +| | +\------------------------------------------------------------*/ + +void viewrdswindow( RdsWindow ) + + rdswindow *RdsWindow; +{ + rdswin_list *ScanWin; + rdswinrec_list *ScanWinRec; + rdsrec_list *Rectangle; + long X; + long Y; + long Xmin; + long Ymin; + long Xmax; + long Ymax; + long Counter; + long MaskCounter; + int Layer; + int ScanRec; + + fprintf( stdout, "\n\t--> Window\n" ); + fprintf( stdout, "\n\tXMIN : %ld" , RdsWindow->XMIN ); + fprintf( stdout, "\n\tXMAX : %ld" , RdsWindow->XMAX ); + fprintf( stdout, "\n\tYMIN : %ld" , RdsWindow->YMIN ); + fprintf( stdout, "\n\tYMAX : %ld" , RdsWindow->YMAX ); + fprintf( stdout, "\n\tMASK : %ld" , RdsWindow->MASK ); + fprintf( stdout, "\n\tDX : %ld" , RdsWindow->DX ); + fprintf( stdout, "\n\tDY : %ld" , RdsWindow->DY ); + fprintf( stdout, "\n\tSIDE : %ld" , RdsWindow->SIDE ); + fprintf( stdout, "\n\tSIZE : %ld\n", RdsWindow->SIZE ); + + fprintf( stdout, "\n\t--> Dump all windows\n" ); + + MaskCounter = 0; + + if ( RdsWindow->SIZE != 0 ) + { + Ymin = RdsWindow->YMIN; + Ymax = RdsWindow->SIDE + Ymin; + Y = 0; + + while ( Y < RdsWindow->DY ) + { + Xmin = RdsWindow->XMIN; + Xmax = RdsWindow->SIDE + Xmin; + X = 0; + + ScanWin = RdsWindow->WINTAB + ( Y * RdsWindow->DX ); + + while ( X < RdsWindow->DX ) + { + fprintf( stdout, "\n\t--> Window[ %ld, %ld ]\n", X, Y ); + + fprintf( stdout, "\n\tXMIN : %ld" , Xmin ); + fprintf( stdout, "\n\tYMIN : %ld" , Ymin ); + fprintf( stdout, "\n\tXMAX : %ld" , Xmax ); + fprintf( stdout, "\n\tYMAX : %ld\n", Ymax ); + + Counter = 0; + + if ( ScanWin->LAYERTAB != (rdswinrec_list **)NULL ) + { + for ( Layer = 0; Layer < RWI_MAX_LAYER; Layer++ ) + { + for ( ScanWinRec = ScanWin->LAYERTAB[ Layer ]; + ScanWinRec != (rdswinrec_list *)NULL; + ScanWinRec = ScanWinRec->NEXT ) + { + for ( ScanRec = 0; ScanRec < RWI_MAX_REC ; ScanRec++ ) + { + Rectangle = ScanWinRec->RECTAB[ ScanRec ]; + + if ( Rectangle != (rdsrec_list *)NULL ) + { + if ( ( Rectangle->X < Xmax ) && + ( Rectangle->Y < Ymax ) && + ( Rectangle->X + Rectangle->DX > Xmin ) && + ( Rectangle->Y + Rectangle->DY > Ymin ) ) + { + Counter = Counter + 1; + } + + viewrdsrec( Rectangle ); + } + } + } + } + } + + MaskCounter = MaskCounter + Counter; + + fprintf( stdout, "\n\t<-- Total rectangles %ld", Counter ); + + Xmin = Xmax; + Xmax = Xmax + RdsWindow->SIDE; + X = X + 1; + + ScanWin = ScanWin + 1; + } + + Ymin = Ymax; + Ymax = Ymax + RdsWindow->SIDE; + Y = Y + 1; + } + } + + fprintf( stdout, "\n<-- Total Rectangles %ld\n", MaskCounter ); +} diff --git a/alliance/src/rds/src/rwiview.h b/alliance/src/rds/src/rwiview.h new file mode 100644 index 00000000..f4359475 --- /dev/null +++ b/alliance/src/rds/src/rwiview.h @@ -0,0 +1,49 @@ +#ifndef __P +# if defined(__STDC__) || defined(__GNUC__) +# define __P(x) x +# else +# define __P(x) () +# endif +#endif +/*------------------------------------------------------------\ +| | +| Tool : RDS | +| | +| File : rwiview.h | +| | +| Authors : Jacomme Ludovic | +| | +| Date : 27.06.95 | +| | +\------------------------------------------------------------*/ + +# ifndef RWI_VIEW_H +# define RWI_VIEW_H + +/*------------------------------------------------------------\ +| | +| Constants | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Macro | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Types | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Variables | +| | +\------------------------------------------------------------*/ +/*------------------------------------------------------------\ +| | +| Functions | +| | +\------------------------------------------------------------*/ + +# endif