gatos-0.0.5/0042755002411700123110000000000007030251717011301 5ustar bayleasrgatos-0.0.5/Makefile.in0100644002411700123110000003360507030251710013341 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ AUTOMAKE_OPTIONS = 1.3 SUBDIRS = docs gfxdump intl m4 man po src tech-docs EXTRA_DIST = ABOUT-NLS BUGS BUGS.french COPYING ChangeLog FreeBSD-HOWTO NetBSD-HOWTO INSTALL INSTALL.french README README.french TODO autogen.sh gatos.spec.header gatos.spec.in SlackBuild.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = gatos.spec SlackBuild DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL Makefile.am Makefile.in NEWS SlackBuild.in TODO acconfig.h \ acinclude.m4 aclocal.m4 config.guess config.h.in config.sub configure \ configure.in gatos.spec.in install-sh ltconfig ltmain.sh missing \ mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in acinclude.m4 cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: gatos.spec: $(top_builddir)/config.status gatos.spec.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status SlackBuild: $(top_builddir)/config.status SlackBuild.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status # 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) config.h.in $(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)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$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 --with-included-gettext --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) @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 all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data-local 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 config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr 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: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ 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 all-recursive-am \ install-exec-am install-exec install-data-local 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 ### install-extra: cd gfxdump && $(MAKE) $@ merge: cd po && $(MAKE) $@ messages: cd src && $(MAKE) $@ spec: @echo "Create new gatos.spec.in."; \ cat gatos.spec.header > gatos.spec.in; \ echo "* `date +"%a %b %d %Y"` `id -un`" >> gatos.spec.in; \ cat ChangeLog >> gatos.spec.in configcheck: @if test -f $(DESTDIR)$(sysconfdir)/gatos.conf; then \ echo "-----------------------------------------------------------------------"; \ echo "NOTE: If you upgrade the GATOS package, check your config file."; \ echo "-----------------------------------------------------------------------"; \ else \ echo "-----------------------------------------------------------------------"; \ echo "WARNING: Can't find the GATOS configuration file !!!"; \ echo " Please read the INSTALL file."; \ echo "-----------------------------------------------------------------------"; \ fi install-data-local: configcheck mostlyclean-generic: -rm -f *~ \#* .*~ .\#* $(PACKAGE).tgz \ package_descriptions $(PACKAGE)-$(VERSION).tar.gz maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in dist-rpm: dist @echo "Preparing source tarball to build a rpm packages..."; \ mv -f @TAR_NAME@.tar.gz ../../SOURCES; \ rpm -bb gatos.spec; \ echo "done" dist-slack: all install @./SlackBuild ############################################################################### # 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: gatos-0.0.5/README0100644002411700123110000001165307027267104012165 0ustar bayleasrGATOS version 0.0.5 HOMEPAGE The GATOS homepage is located at: http://www.core.binghamton.edu/~insomnia/gatos/ Updates, news, additional documentation and the FAQ can be found there. MAINTAINER Insomnia (Stea Greene) send bug reports and code patches to this address See file "CREDITS" for author info. REQUIREMENTS -GNU/Linux, FreeBSD or NetBSD (only tested on x86). -ATI All-In-Wonder, All-In-Wonder Pro, or Rage II/Pro with ATI-TV tuner card. Limited support for the All-In-Wonder 128 and Rage128 with ATI-TV tuner card. -XFree86 recommended, but not required. INSTALLATION/SETUP See file "INSTALL" for installation and setup info. FILE FORMATS Note, motion capture in xatitv and atitv uses a special ".yuv" file format unique to gatos. Snapshots on the other hand save to ".ppm" files, which are viewable (and convertible) by most graphics programs. There is no automatic intelligence in xatitv to select this file's extension, so to make sure other programs don't get confused, always take snapshots to a ".ppm" file, and capture video to ".yuv" files. This should be fixed in the next version. USAGE There are many programs packaged with GATOS: -===== gatos-conf: GUI GATOS configuration app =====- This is a new configuration program for GATOS written by Daniel Caujolle-Bert. Just run it, and chose the correct settings and hit "save & quit". A few notes: -Even if you chose "Gatos will Probe RAM", you still need to select the correct amount of ram. -I2C mode selection should be left on "Gatos autodetection" unless gatos fails to startup. -Television type is optional, it can be setup within xatitv. -===== xatitv: GUI TV-in-a-window app =====- This is the main program shipped with GATOS. It allows GUI access to all GATOS functionality, save tv-out. The GUI is pretty self-explanatory, but here are the basics: *When first run, hit setup and configure format and options, than do a channel scan. *Use the three buttons labeled "TV", "CV" and "SV" to select video input from TV tuner, Composite video and SVHS respectively. *The "Adv.", "Capture" and "Edit Channel" buttons toggle other sections of the GUI. *Volume, Brightness, Contrast, Hue and Saturation can be modified by clicking the mouse at any location along their respective sliders. *The "Edit Channel" GUI can be used to set channel- specific video and audio settings (if a channel is too bright/dark, too loud/quiet, etc) and to remove bogus channels. It can also be used to name a channel so you can later select that channel by name. *There are many other feature, look around and tinker with them. *Most features have keyboard shortcuts: -Esc: Quit. -Tab/Right-Click: Hide/Show GUI. -F1-F8: Favorite channels (CTRL+Key to set). -F9-F12: Output debug info. -Numbers: Change channel by number. -Letters/space: Change channel by name. -Enter/Return: Finish entering item (channel name/number). -Up/Down: Scroll through settings. -Left/Right: Change current setting. -Keypad +/-: Change channel. -Backspace: switches to the previous channel that you spent more than 5 seconds at. -Keypad /: Toggle mute. -Keypad *: Toggle Fullscreen Mode. -` or ~: Toggle closed captioning (CC). -> and <: Increase/Decrease size of window by a factor of 2. Pause: Freeze capture on current frame. PrintScreen: Capture single frame (Snapshot). -===== atitv: Simple text-mode program =====- This program is still under development. It gives basic functionality needed to record video and take snapshots. *Run "atitv --help" for usage details. -= atitoppm: YUV conversion program =- This converts the ".yuv" file created by gatos to a series of ".ppm" files. Use as follows: atitoppm < gatos.yuv -===== atitogif: YUV conversion program =====- This converts the ".yuv" file created by gatos to a series of ".gif" files. Use as follows: atitogif < gatos.yuv Note, unlike atitoppm, this application requires various utilities to be present (such as ppmtogif, etc...). If they are not, this program will fail. -===== atitojpg: YUV conversion program =====- This converts the ".yuv" file created by gatos to a series of ".jpg" files. Use as follows: atitojpg < gatos.yuv Note, unlike atitoppm, this application requires various utilities to be present (such as ppmtojpg, etc...). If they are not, this program will fail. -===== yuvsum: YUV conversion program =====- This averages all images in gatos.yuv (must all be same size) into one ppm format image. Use as follows: yuvsum < gatos.yuv -===== atisplit: YUV conversion program =====- This converts the ".yuv" file created by gatos to the separate ".yuv" frames. See file README.atisplit for details. BUGS For bug list and bug submittal instructions, see file "BUGS". PATCHES For instructions on how to use patches, see file "PATCHES". gatos-0.0.5/stamp-h.in0100644002411700123110000000001207030250621013157 0ustar bayleasrtimestamp gatos-0.0.5/ABOUT-NLS0100644002411700123110000002134706765053731012544 0ustar bayleasrNotes on the GNU Translation Project ************************************ GNU is going international! The GNU Translation Project is a way to get maintainers, translators and users all together, so GNU will gradually become able to speak many native languages. A few packages already provide native language translation for their messages. If you found this `ABOUT-NLS' file inside a GNU distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do not need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. One advise in advance ===================== If you want to exploit the full power of the GNU `gettext' package you should configure it using --with-gnu-gettext. No existing implementation at this point provides so many useful features (such as locale alias or message inheritance). It is also not possible to provide this additional functionality on top of a catgets implementation. Future versions of GNU `gettext' will very likely provide even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. INSTALL Matters =============== Some GNU packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system provides usable `catgets' or `gettext' functions. If neither is available, the GNU `gettext' own library will be used. However, installers may use special options at configuration time for changing this behaviour. The commands: ./configure --with-gnu-gettext ./configure --disable-nls will respectively bypass system `catgets' or `gettext' to use GNU `gettext', or else, totally disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, configure will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-gnu-gettext to prevent auto-detection. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations are disabled, all those available are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate ISO 639 `LL' two-letter code prior to using the programs in the package. For example, let's suppose that you speak German. At the shell prompt, merely execute `setenv LANG de' (in `csh') or `export LANG; LANG=de' (in `sh'). This can be done from your `.login' or `.profile' file, once and for all. Packages which are not internationalized will merely ignore the setting of this variable. Translating Teams ================= The GNU `gettext' tool set contains *everything* maintainers need for internationalizing their packages for messages. It also contains quite useful tools for helping translators at localizing messages to their native language, once a package has already been internationalized. To achieve the GNU Translation Project, we need many interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translating team has its own mailing list, courtesy of Linux International. You may reach your translating team at the address `LL@li.org', replacing LL by the two-letter ISO 639 code for your language. Language codes are *not* the same as country codes given in ISO 3166. The following translating teams exist, as of November 1995: Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en', Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German `de', Greek `el', Italian `it', Japanese `ja', Indonesian `in', Norwegian `no', Persian `fa', Polish `pl', Portuguese `pt', Russian `ru', Spanish `es', Swedish `sv', Telugu `te' and Turkish `tr'. For example, you may reach the Chinese translating team by writing to `zh@li.org'. If you'd like to volunteer to *work* at translating messages, you should become a member of the translating team for your own language. The subscribing address is *not* the same as the list itself, it has `-request' appended. For example, Swedish people can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members should be interested in *working* at translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, please write to `gnu-translation@prep.ai.mit.edu'; you will then reach the GNU coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology used in GNU. Proven linguistic skill are praised more than programming skill, here. For the time being, please avoid subscribing to the English team unless explicitely invited to do so. Available Packages ================== Languages are not equally supported in all GNU packages. The following matrix shows the current state of GNU internationalization, as of November 1995. Listed are: internationalized packages, and languages for which work is in progress, or about to start. See note cs de en fr it ja nl no pt sv \ .-------------------------------. chess (1) | X / X | clisp | X X X | diffutils (2) | / . | fileutils | . / | flex (3) | / . | m4 | - / - - . - | gettext | X / X X X | ptx | - / - - | recode | - / - - - | sh-utils | . / . | sharutils | X / X X X X X | tar | X / X - X X | textutils | . / . | wdiff | - - / - - | `-------------------------------' cs de en fr it ja nl no pt sv The interpretation legend and notes are: `/' There is no PO file, this package merely defaults to this language. `.' The effort of localizing this package has been undertaken by someone, or by a translating team, and work is, or should be in progress. `-' A PO file for this package and this language is completed and is currently available in a pretest release, or is all ready for inclusion in the next release of this package. `X' The localization of this package to this particular language is fully completed, and now distributed through an official release. (1) This package is translated to specific languages by methods predating GNU `gettext'. Translations are all kept on disk files, and sources contain numbers where one normally expects strings. (2) This package is planned to switch to GNU `gettext'. For the time being, it uses temporary means for internationalization. (3) This package has its translatable strings marked, but does not use GNU `gettext'. A convenience patch may be available separately. If November 1995 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. gatos-0.0.5/AUTHORS0100644002411700123110000000002106765053731012347 0ustar bayleasrSee docs/CREDITS gatos-0.0.5/COPYING0100644002411700123110000004307606765053731012353 0ustar bayleasr GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gatos-0.0.5/ChangeLog0100644002411700123110000001456207027767314013071 0ustar bayleasrGATOS-0.0.5 released: -Many bugfixes. -Added double-click full-screen toggle. -Moved default gatos.conf location to /etc. -Correctly ignore many inputs in DGA fullscreen mode. -Added -s (capture size) option to atitv. -Snapshots from atitv and xatitv are now directly to ppm files. -Automatically run gatos-conf in xatitv if gatos.conf is not found. -Added gatos-conf GUI configuration utility. -Corrected TV/FM Audio Mixup BUG. -Added standard channel frequency support. -Added ipc playback synchronization (DISABLED). -Added shared memory detection of multiple instances (DISABLED). -Set a sanity minimum zoom limit of 16x10 pixels. -Corrected Rage PRO MPP/ImpacTV I2C driver init bug. -Corrected interpretation of Rage128 BIOS data, new tuner types added. -TDA9850 register dump corrected (regs cannot be read, so cheat :-). -Autodetection of Video RAM, value in gatos.conf ignored. -Rage128 support (not prefected yet, but getting there ...). -Fixed doublescan mode error and some cropping/panning problems. -Framework for Rage128 support. -Modified mpp_wait to work with tvout. -Split gatos_init and ati_init in 2 blocks to allow partial initialization (skip capture/tuner related init). -Fixed "spilled AX" error with gcc 2.95 and newer. -Added nls support. Currently only English and French. -Added GNU autoconf support to enable FreeBSD support, bug circumventing, intl support, etc.... -Added delay to atitv's "snap" command to fix frame tearing. -Back up .gatosrc to .gatosrc.old when overwriting. -Set permissions in atito[gif|jpg] to 644 when saving. -Fixed "double verticle size with only have visible" BUG. -Made "always on top" wars less intense. -Added fixed-aspect-ratio support to cropping/panning/zooming. -Added cropping/panning/zooming support. Should do something about it in DGA mode in xatitv... GATOS-0.0.4 released: -Fixed ibtk + RedHat-6.0 conflict (renamed itk to ibtk). -Removed unneeded curses requirement. -Fixed MPP failure BUG. -Fixed Rage-Pro sound BUG. -Picture Carrier frequency changed from 58.75 to 45.75 MHz for NTSC-Japan. Anyone using NTSC-Japan will have to increase the channel list frequencies in .gatosrc by 13 MHz (to the correct value). -Unified all 5 I2C Bus Drivers, files i2csw.* and i2cmpp.* are all gone, and code is in i2c.* -vdelay value changed in bt829.c for SECAM. Also changed in PAL for PAL+SECAM combo tuner. -New program atitojpg. -Report gatos.bugfix_mppread value if non-zero. -Fixed ImpacTV I2C bus driver (?). -Added tvout.h and tvout.c (first attempt at ImpacTV driver). Contains only register dumper and routines needed for the ImpacTV I2C Bus Driver (i2cmpp.c). -New i2cmpp.h and i2cmpp.c ImpacTV I2C Bus Driver, uses new ImpacTV interface. Old driver is in i2cmpp.h.old and i2cmpp.c.old. -Start using the OVERLAY_EXCLUSIVE registers (exclusive video region that doesn't check the colorkey). -Add volatile to the casted pointers in atiregs.h. -Better message for EEPROMs w/checksum error, program TDA9850 chip anyway even if EEPROM has checksum error. -Change Overlay Scaler clock limit to 125 MHz for Rage PRO's. GATOS-0.0.3 released: -"Internal Audio" gone. Now can pick any mixer in setup. -Added "Always on Top" feature. May have "Fight for Top" problems. -Fixed channel change static. -Monitor dotclock limit issue fixed. Included option to "Overclock" and attempt to exceed this limit before reducing the overlay clock. -Brought back atitv app. -Channel wrapping in xatitv. -Many GUI enhancements and user features in xatitv. -Check amount of video ram reported in MEM_CNTL register against value from gatos.conf. -Always report address of registers (separate or framebuffer+0x007FF800). -Can now toggle GUI by pressing any mouse button except the left on any area not occupied by an IBTK control. -Better error messages for hardware detection. -Added debugging test inputs to setup for development purposes. -Now maps ATI chip registers in framebuffer if no separate register aperture is detected. -Fixed libc5 compilation (sys/perm.h errors). -Lowlevel changes to support souncardless operation with sound. -PLL clock registers added to ati_dumpregs(). -Tuner type taken from BIOS data if not present in boardinfo. -New functions in board.c: board_set{mux,vol,mute,stereo,sap} and board_has{vol,stereo,sap}. -Logic in bt829_init() changed. -i2c.[ch]: MAXI2CDRIVER is number of I2C driver interfaces. -Set biosaddress to 0x000C0000 if no PCI BIOS ROM. -Interface to external state variables improved. -Detailed ATI device ID for improved I2C driver selection. -I2C driver chosen from above info if not set in gatos.conf. -Copied Alps tuner 18->12. ATI sample code says it's 0x12 (not 12), but that could be wrong, so will keep both for now. -Added "-pci addr" option to xatitv to enable override of pciaddr in gatos.conf. -Added more ATI device IDs, including four Rage 128s. -Desktop mode. Activate in setup and it'll be used when window is iconified. -Full-screen mode finished, DGA mode optional (in Setup). Use Keypad "*" to toggle full-screen. -Mute button moved to primary GUI. -GPIO/MPP fixed. Should now work on (almost) all cards. -Removes incorrect error message if ~/.gatosrc is not present. -Fixes soundcardless operation. -Fixes soundcardless operation with direct speakers. -Capture buffer width limited by ATI chip Overlay Scaler capability. -Completed (I hope) support for more than one ATI card. Card can be selected by setting "pciaddr" in gatos.conf. -Improved Capture Board detection and control. board.c (new) handles capture boards and audio chips, and sound.c now only handles audio ioctl's. -ATI Rage PRO (i2cpro.c) and GP_IO based (i2cgpio.c) I2C drivers unified to i2csw.c (new), and two more I2C drivers implemented. I2C modes renumbered to follow ATI sample code: old 0 is now 3, old 1 is now 2, old 3 is now 5. -I2C driver initalization improved, now polls for tuner(s) instead of Bt829's (which can be disabled). -Tuner type autodetected from Capture Board info or ATI card BIOS. -Tuner bandselect byte setting logic changed. -Bt829 VPOLE setting logic changed. -Fixed main return value in atito*. -Minor changes (mostly cosmetic) here and there. GATOS-0.0.2: Version number 0.0.2 skipped to avoid confusion GATOS 0.0.1 released: -First release. gatos-0.0.5/INSTALL0100644002411700123110000000664507030216325012334 0ustar bayleasrINSTALLATION -First download and install IBTK (should be available from the same place as GATOS was). -Unpack the gatos archive: tar xzvf gatos-0.0.5.tar.gz -or- gzip -dc gatos-0.0.5.tar.gz | tar xvf - -Change into the source directory cd gatos-0.0.5 -Execute the configure script (./configure --help for more details). ./configure -Compile source: make -Install programs (must be root): make install SETUP -Running xatitv for the first time should try to run gatos-conf automatically if the config file is not present. You should be able to setup gatos with this GUI rather easilly. If you'd like to do it manually (or would like more information about what you are doing with the GUI), read the rest of this section. Otherwise, skip to the last part ("Run xatitv and configure..."). Note, to use gatos-conf as a user other than the one you logged in as (eg: as root, which xatitv will try to do), you'll need to have X setup to allow other connections from the local machine, by typing this: xhost +localhost Many machines are already setup like this, but if you get a "connection refused by server" error when trying to run gatos-conf, you need to do this first. IMPORTANT: when using gatos-conf, even if you select gatos will probe RAM, you STILL NEED TO SPECIFY THE CORRECT AMOUNT OF RAM! This is because gatos isn't the only thing that needs to know, X does as well, and if this is not set correclty problems with you X server could result. -Determine buffer size (best is 864 for PAL, 600 for NTSC). Smaller values can be used, but at a loss of quality. To determine another value, use: ((HorizontalMax*VerticalMax)/512) Kilobytes The above values (864 and 600) are set for maximum buffer size for that video format (768x576 and 640x480 for PAL and NTSC respectively). -Use the "gatos-conf" application or manually setup the XF86Config and gatos.conf files: -Setup XF86Config (usually /etc/X11/XF86Config or /etc/XF86Config): -gatos-conf can do this automatically. -or- -Specify videoram in XF86config. You must specify your card's RAM in Kilobytes, minus appropriate space for capture buffer. See XF86Config.sample for details, it is an axample fragment of what you need to add to your existing XF86Config, NOT a complete configfile. -Setup gatos.conf (assuming it's located in /etc): -gatos-conf can do this automatically. -or- cp gatos.conf.sample /etc/gatos.conf -edit /etc/gatos.conf and enter the correct values for video memory, buffer reserved memory and video format. -Run xatitv and configure everything in the "setup" dialog. -Television Type: Chose the correct standard for your area. -CC Mode: If you want to use closed-captioning, select the mode you wish to use. -Options: Customize these settings to taste. -Mixer: Select the mixer that corresponds to the audio input that your ATI tuner is connected to on your soundcard. Generally this is "CD" for internal connectors or "Line" for external, but if these don't work, try the others. Make sure the volume is set high when testing these so you can hear when you've selected the correct one. -Rescan channels: Use this to clear the current channel settings and scan for channels. -Convert to standard: Hit this button to switch existing channel configurations when you select a new standard. -Done: Hit this to exit setup. gatos-0.0.5/Makefile.am0100644002411700123110000000355107030240375013332 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## AUTOMAKE_OPTIONS = 1.3 SUBDIRS = docs gfxdump intl m4 man po src tech-docs EXTRA_DIST = ABOUT-NLS BUGS BUGS.french COPYING ChangeLog FreeBSD-HOWTO \ NetBSD-HOWTO INSTALL INSTALL.french README README.french \ TODO autogen.sh gatos.spec.header gatos.spec.in SlackBuild.in ### install-extra: cd gfxdump && $(MAKE) $@ merge: cd po && $(MAKE) $@ messages: cd src && $(MAKE) $@ spec: @echo "Create new gatos.spec.in."; \ cat gatos.spec.header > gatos.spec.in; \ echo "* `date +"%a %b %d %Y"` `id -un`" >> gatos.spec.in; \ cat ChangeLog >> gatos.spec.in configcheck: @if test -f $(DESTDIR)$(sysconfdir)/gatos.conf; then \ echo "-----------------------------------------------------------------------"; \ echo "NOTE: If you upgrade the GATOS package, check your config file."; \ echo "-----------------------------------------------------------------------"; \ else \ echo "-----------------------------------------------------------------------"; \ echo "WARNING: Can't find the GATOS configuration file !!!"; \ echo " Please read the INSTALL file."; \ echo "-----------------------------------------------------------------------"; \ fi install-data-local: configcheck mostlyclean-generic: -rm -f *~ \#* .*~ .\#* $(PACKAGE).tgz \ package_descriptions $(PACKAGE)-$(VERSION).tar.gz maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in dist-rpm: dist @echo "Preparing source tarball to build a rpm packages..."; \ mv -f @TAR_NAME@.tar.gz ../../SOURCES; \ rpm -bb gatos.spec; \ echo "done" dist-slack: all install @./SlackBuild ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/NEWS0100644002411700123110000000001606765053731012002 0ustar bayleasrSee ChangeLog gatos-0.0.5/SlackBuild.in0100644002411700123110000000744007027741521013651 0ustar bayleasr#!/bin/sh ## ## This script generate a valid Slackware package ## ## ## Some variables. ## CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PACKAGE=@PACKAGE@.tgz PKG=$TMP/package-gatos PREFIX=@prefix@ DOINSTDIR=/install BINDIR=$PREFIX/bin LIBDIR=$PREFIX/lib INCDIR=$PREFIX/include/gatos MANDIR=$PREFIX/man MAN1DIR=$PREFIX/man/man1 MAN1FRDIR=$PREFIX/man/fr/man1 DOCDIR=/usr/doc/@PACKAGE@-@SPEC_VERSION@ DOCLIBDIR=/usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions MESSAGESFRDIR=$PREFIX/share/locale/fr/LC_MESSAGES ## ## Do a little check before doing something. ## if [ ! -f $BINDIR/atisplit ]; then echo "Oops, seems gatos not installed. Please make installation before." exit; fi ## ## File lists. ## BINS='atisplit atitogif atitojpg atitoppm atitv gatos-conf scanpci xatitv yuvsum' LIBS='libgatos.a libgatos.la' INCLUDES='*.h' MANS='atisplit.1 atitojpg.1 atitv.1 gatos.conf.1 xatitv.1 atitogif.1 atitoppm.1 gatos.1 scanpci.1 yuvsum.1' MANSFR='atisplit.1 atitojpg.1 atitv.1 gatos.conf.1 xatitv.1 atitogif.1 atitoppm.1 gatos.1 scanpci.1 yuvsum.1' MESSAGESFR='atisplit.mo atitogif.mo atitojpg.mo atitoppm.mo gatos.mo yuvsum.mo' DOCS='CREDITS README.atisplit gatos.conf.sample CREDITS.french README.atisplit.french gatos.conf.sample.french PATCHES XF86Config.sample PATCHES.french XF86Config.sample.french' DOCSLIB='doc.ati doc.bt829 doc.extra doc.fi12xx doc.gatos doc.i2c' ## ## Clean temporary directory. ## echo "Cleaning temporary directory." rm -rf $PACKAGE package_descriptions $PKG ## ## Create temporary tree. ## echo "Create temporary tree." if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi mkdir -p $PKG/$PREFIX mkdir -p $PKG/$DOINSTDIR mkdir -p $PKG/$BINDIR mkdir -p $PKG/$LIBDIR mkdir -p $PKG/$INCDIR mkdir -p $PKG/$MAN1DIR mkdir -p $PKG/$MAN1FRDIR mkdir -p $PKG/$DOCDIR mkdir -p $PKG/$DOCLIBDIR mkdir -p $PKG/$MESSAGESFRDIR ## ## Copy all requiered files. ## echo "Copying binaries." for bin in $BINS; do cp $BINDIR/$bin $PKG$BINDIR done echo "Copying library." for lib in $LIBS; do cp $LIBDIR/$lib $PKG$LIBDIR done echo "Copying header files." for inc in $INCDIR/$INCLUDES; do cp $inc $PKG$INCDIR done echo "Copying documentation." for doc in $DOCS; do cp $DOCDIR/$doc $PKG$DOCDIR done echo "Copying library documentation." for doclib in $DOCSLIB; do cp $DOCLIBDIR/$doclib $PKG$DOCLIBDIR done echo "Copying man pages." for man in $MANS; do cp $MAN1DIR/$man $PKG$MAN1DIR done echo "Copying french man pages." for manfr in $MANSFR; do cp $MAN1FRDIR/$manfr $PKG$MAN1FRDIR done echo "Copying french translations files." for messagesfr in $MESSAGESFR; do cp $MESSAGESFRDIR/$messagesfr $PKG$MESSAGESFRDIR done ## ## Create doinst.sh script. ## echo "Create doinst.sh script." cat > $PKG/$DOINSTDIR/doinst.sh << EOF ldconfig EOF ## ## Now build the package ## echo "Building Slackware package $PACKAGE." cd $PKG echo "n" | makepkg $PACKAGE > /dev/null mv $PACKAGE $CWD cd $CWD ## ## Clean temporary directory. ## echo "Cleaning temporary directory." rm -rf $PKG ## ## Create package description for pkgtool. ## echo "Create package_descriptions file." cat > package_descriptions << EOF @PACKAGE@: gatos @SPEC_VERSION@. @PACKAGE@: @PACKAGE@: GATOS (the General ATI TV and Overlay Software) is an effort to @PACKAGE@: create standard drivers for all currently unsupported features @PACKAGE@: of ATI video cards, specifically TV features. @PACKAGE@: @PACKAGE@: Included with this package are: @PACKAGE@: xatitv, atitv, yuvsum, atitoppm, atitogif, atitojpg, @PACKAGE@: atisplit and gatos-conf. EOF ## ## Warn about requiered files distribution. ## cat << EOF *** NOTE *** you must distribute $PACKAGE and package_descriptions files. ---- EOF ## ## End of SlackBuild ## ######################################################################## gatos-0.0.5/TODO0100644002411700123110000001033506765556715012012 0ustar bayleasr--- PO files: Many po files are incomplete This is the full ISO 639 standard two character codes ;-)) : 'aa' Afar. `ab' Abkhazian. `af' Afrikaans. `am' Amharic. `ar' Arabic. `as' Assamese. `ay' Aymara. `az' Azerbaijani. `ba' Bashkir. `be' Byelorussian. `bg' Bulgarian. `bh' Bihari. `bi' Bislama. `bn' Bengali; Bangla. `bo' Tibetan. `br' Breton. `ca' Catalan. `co' Corsican. `cs' Czech. `cy' Welsh. `da' Danish. `de' German. `dz' Bhutani. `el' Greek. `en' English. [ __err__. Really necessary ??!! ] `eo' Esperanto. `es' Spanish. `et' Estonian. `eu' Basque. `fa' Persian. `fi' Finnish. `fj' Fiji. `fo' Faroese. `fr' French. [ __done__. I maintain them. DCB ] `fy' Frisian. `ga' Irish. `gd' Scots Gaelic. `gl' Galician. `gn' Guarani. `gu' Gujarati. `ha' Hausa. `he' Hebrew (formerly iw). `hi' Hindi. `hr' Croatian. `hu' Hungarian. `hy' Armenian. `ia' Interlingua. `id' Indonesian (formerly in). `ie' Interlingue. `ik' Inupiak. `is' Icelandic. `it' Italian. `iu' Inuktitut. `ja' Japanese. `jw' Javanese. `ka' Georgian. `kk' Kazakh. `kl' Greenlandic. `km' Cambodian. `kn' Kannada. `ko' Korean. `ks' Kashmiri. `ku' Kurdish. `ky' Kirghiz. `la' Latin. `ln' Lingala. `lo' Laothian. `lt' Lithuanian. `lv' Latvian, Lettish. `mg' Malagasy. `mi' Maori. `mk' Macedonian. `ml' Malayalam. `mn' Mongolian. `mo' Moldavian. `mr' Marathi. `ms' Malay. `mt' Maltese. `my' Burmese. `na' Nauru. `ne' Nepali. `nl' Dutch. `no' Norwegian. `oc' Occitan. `om' (Afan) Oromo. `or' Oriya. `pa' Punjabi. `pl' Polish. `ps' Pashto, Pushto. `pt' Portuguese. `qu' Quechua. `rm' Rhaeto-Romance. `rn' Kirundi. `ro' Romanian. `ru' Russian. `rw' Kinyarwanda. `sa' Sanskrit. `sd' Sindhi. `sg' Sangro. `sh' Serbo-Croatian. `si' Sinhalese. `sk' Slovak. `sl' Slovenian. `sm' Samoan. `sn' Shona. `so' Somali. `sq' Albanian. `sr' Serbian. `ss' Siswati. `st' Sesotho. `su' Sundanese. `sv' Swedish. `sw' Swahili. `ta' Tamil. `te' Telugu. `tg' Tajik. `th' Thai. `ti' Tigrinya. `tk' Turkmen. `tl' Tagalog. `tn' Setswana. `to' Tonga. `tr' Turkish. `ts' Tsonga. `tt' Tatar. `tw' Twi. `ug' Uighur. `uk' Ukrainian. `ur' Urdu. `uz' Uzbek. `vi' Vietnamese. `vo' Volapuk. 'wo' Wolof. `xh' Xhosa. `yi' Yiddish (formerly ji). `yo' Yoruba. `za' Zhuang. `zh' Chinese. `zu' Zulu. *** THE BIG QUESTION: Is anybody want to translate them ??. If you want to do this. ----------------------- You must: - making a copy of to , - editing the and changing the to the desired language, - editing the and adding the new language to LANG_SUBDIRS, - and finally add at the bottom of in the AC_OUTPUT section. After this: - execute the autogen.sh script (you *must* have these package installed: autoconf, automake and gettext), and at last, execute the configure script for recreate Makefiles - you can also update new messages from source files: In the directory, do this: make messages ; make merge This will get new messages strings from source files, and *merge* them with old po files. --- MAN Pages: Only english and french versions are available. -For other languages, create a new sub-directory in man directory, -Put new man pages in it, -Make a Makefile.am (take a look in "man/fr" subdir, but *not* "man/en" subdir) -Change the follow (in man/(new_lang)/Makefile.am): mandir = ${prefix}/man/fr by mandir = ${prefix}/man/(new_lang) -Then edit man/Makefile.am and append the new language to "SUBDIRS =" -And finally, run autogen.sh and configure. --- gatos-0.0.5/acconfig.h0100644002411700123110000000155707007674650013237 0ustar bayleasr#undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef PACKAGE /* Define if you want to use delay from Linux kernel sources */ #undef WITH_KERNEL_DELAY /* Use the OSS sound emulation in NetBSD */ #undef WITH_OSSEMU /* ==== */ #undef VERSION /* CURSES STUFF */ #undef HAS_CURSES /* Use SunOS SysV curses? */ #undef USE_SUNOS_CURSES /* Use old BSD curses - not used right now */ #undef USE_BSD_CURSES /* Use SystemV curses? */ #undef USE_SYSV_CURSES /* Use Ncurses? */ #undef USE_NCURSES /* If you Curses does not have color define this one */ #undef NO_COLOR_CURSES /* Define if you want to turn on SCO-specific code */ #undef SCO_FLAVOR /* Set to reflect version of ncurses * * 0 = version 1.* * 1 = version 1.9.9g * 2 = version 4.0/4.1 */ #undef NCURSES_970530 /* END OF CURSES STUFF */ gatos-0.0.5/acinclude.m40100644002411700123110000013233207020525141013463 0ustar bayleasr###################################################################### # progtest.m4 from gettext 0.32 ###################################################################### # Search path for a program which passes the given test. # Ulrich Drepper , 1996. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN(AM_PATH_PROG_WITH_TEST, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test -n "[$]$1"; then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) ###################################################################### # lcmessage.m4 from gettext 0.32 ###################################################################### # Check whether LC_MESSAGES is available in . # Ulrich Drepper , 1995. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 AC_DEFUN(AM_LC_MESSAGES, [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES) fi fi]) ###################################################################### # gettext.m4 from gettext 0.32 ###################################################################### # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 3 AC_DEFUN(AM_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) USE_INCLUDED_LIBINTL=no dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then AC_DEFINE(ENABLE_NLS) AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. dnl catgets is only used if permitted by option --with-catgets. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, [AC_TRY_LINK([#include ], [return (int) gettext ("")], gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) if test "$gt_cv_func_gettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CACHE_CHECK([for gettext in libintl], gt_cv_func_gettext_libintl, [AC_TRY_LINK([], [return (int) gettext ("")], gt_cv_func_gettext_libintl=yes, gt_cv_func_gettext_libintl=no)])]) fi if test "$gt_cv_func_gettext_libc" = "yes" \ || test "$gt_cv_func_gettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) INSTOBJEXT=.mo fi fi ]) if test "$CATOBJEXT" = "NONE"; then AC_MSG_CHECKING([whether catgets can be used]) AC_ARG_WITH(catgets, [ --with-catgets use catgets functions if available], nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) AC_MSG_RESULT($nls_cv_use_catgets) if test "$nls_cv_use_catgets" = "yes"; then dnl No gettext in C library. Try catgets next. AC_CHECK_LIB(i, main) AC_CHECK_FUNC(catgets, [AC_DEFINE(HAVE_CATGETS) INTLOBJS="\$(CATOBJS)" AC_PATH_PROG(GENCAT, gencat, no)dnl if test "$GENCAT" != "no"; then AC_PATH_PROG(GMSGFMT, gmsgfmt, no) if test "$GMSGFMT" = "no"; then AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) fi AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.cat INSTOBJEXT=.cat DATADIRNAME=lib INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi]) fi fi if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_SUBST(MSGFMT) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo INSTOBJEXT=.mo DATADIRNAME=share INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext programs is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi # If this is used in GNU gettext we have to set USE_NLS to `yes' # because some of the sources are only built for this goal. if test "$PACKAGE" = gettext; then USE_NLS=yes USE_INCLUDED_LIBINTL=yes fi dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(AM_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h sys/param.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ __argz_count __argz_stringify __argz_next]) if test "${ac_cv_func_stpcpy+set}" != "set"; then AC_CHECK_FUNCS(stpcpy) fi if test "${ac_cv_func_stpcpy}" = "yes"; then AC_DEFINE(HAVE_STPCPY) fi AM_LC_MESSAGES AM_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl The reference to in the installed file dnl must be resolved because we cannot expect the users of this dnl to define HAVE_LOCALE_H. if test $ac_cv_header_locale_h = yes; then INCLUDE_LOCALE_H="#include " else INCLUDE_LOCALE_H="\ /* The system does not provide the header . Take care yourself. */" fi AC_SUBST(INCLUDE_LOCALE_H) dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux libc-5 and the normal X/Open format test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi dnl po2tbl.sed is always needed. sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed dnl In the intl/Makefile.in we have a special dependency which makes dnl only sense for gettext. We comment this out for non-gettext dnl packages. if test "$PACKAGE" = "gettext"; then GT_NO="#NO#" GT_YES= else GT_NO= GT_YES="#YES#" fi AC_SUBST(GT_NO) AC_SUBST(GT_YES) dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl *** For now the libtool support in intl/Makefile is not for real. l= AC_SUBST(l) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) dnl Curses detection: Munged from Midnight Commander's configure.in dnl dnl What it does: dnl ============= dnl dnl - Determine which version of curses is installed on your system dnl and set the -I/-L/-l compiler entries and add a few preprocessor dnl symbols dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in dnl Makefile.in's dnl - Modify the following configure variables (these are the only dnl curses.m4 variables you can access from within configure.in) dnl CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if dnl an ncurses.h that's been renamed to curses.h dnl is found. dnl CURSES_LIBS - sets -L and -l's appropriately dnl CFLAGS - if --with-sco, add -D_SVID3 dnl has_curses - exports result of tests to rest of configure dnl dnl Usage: dnl ====== dnl 1) Add lines indicated below to acconfig.h dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in dnl 3) Instead of #include you should use the following to dnl properly locate ncurses or curses header file dnl dnl #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) dnl #include dnl #else dnl #include dnl #endif dnl dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS dnl dnl Notes with automake: dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from dnl configure.in dnl - your Makefile.am can look something like this dnl ----------------------------------------------- dnl INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) dnl if HAS_CURSES dnl CURSES_TARGETS=name_of_curses_prog dnl endif dnl bin_PROGRAMS = other_programs $(CURSES_TARGETS) dnl other_programs_SOURCES = blah blah blah dnl name_of_curses_prog_SOURCES = blah blah blah dnl other_programs_LDADD = blah dnl name_of_curses_prog_LDADD = blah $(CURSES_LIBS) dnl ----------------------------------------------- dnl dnl dnl The following lines should be added to acconfig.h: dnl ================================================== dnl dnl /*=== Curses version detection defines ===*/ dnl /* Found some version of curses that we're going to use */ dnl #undef HAS_CURSES dnl dnl /* Use SunOS SysV curses? */ dnl #undef USE_SUNOS_CURSES dnl dnl /* Use old BSD curses - not used right now */ dnl #undef USE_BSD_CURSES dnl dnl /* Use SystemV curses? */ dnl #undef USE_SYSV_CURSES dnl dnl /* Use Ncurses? */ dnl #undef USE_NCURSES dnl dnl /* If you Curses does not have color define this one */ dnl #undef NO_COLOR_CURSES dnl dnl /* Define if you want to turn on SCO-specific code */ dnl #undef SCO_FLAVOR dnl dnl /* Set to reflect version of ncurses * dnl * 0 = version 1.* dnl * 1 = version 1.9.9g dnl * 2 = version 4.0/4.1 */ dnl #undef NCURSES_970530 dnl dnl /*=== End new stuff for acconfig.h ===*/ dnl AC_DEFUN(AC_CHECK_CURSES,[ search_ncurses=true screen_manager="" has_curses=false CFLAGS=${CFLAGS--O} AC_SUBST(CURSES_LIBS) AC_SUBST(CURSES_INCLUDEDIR) AC_ARG_WITH(sco, [ --with-sco Use this to turn on SCO-specific code],[ if test x$withval = xyes; then AC_DEFINE(SCO_FLAVOR) CFLAGS="$CFLAGS -D_SVID3" fi ]) AC_ARG_WITH(sunos-curses, [ --with-sunos-curses Used to force SunOS 4.x curses],[ if test x$withval = xyes; then AC_USE_SUNOS_CURSES fi ]) AC_ARG_WITH(osf1-curses, [ --with-osf1-curses Used to force OSF/1 curses],[ if test x$withval = xyes; then AC_USE_OSF1_CURSES fi ]) AC_ARG_WITH(vcurses, [ --with-vcurses[=incdir] Used to force SysV curses], if test x$withval != xyes; then CURSES_INCLUDEDIR="-I$withval" fi AC_USE_SYSV_CURSES ) AC_ARG_WITH(ncurses, [ --with-ncurses[=dir] Compile with ncurses/locate base dir], if test x$withval = xno ; then search_ncurses=false elif test x$withval != xyes ; then CURSES_LIBS="$LIBS -L$withval/lib -lncurses" CURSES_INCLUDEDIR="-I$withval/include" search_ncurses=false screen_manager="ncurses" AC_DEFINE(USE_NCURSES) AC_DEFINE(HAS_CURSES) has_curses=true fi ) if $search_ncurses then AC_SEARCH_NCURSES() fi ]) AC_DEFUN(AC_USE_SUNOS_CURSES, [ search_ncurses=false screen_manager="SunOS 4.x /usr/5include curses" AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) AC_DEFINE(USE_SUNOS_CURSES) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_INCLUDEDIR="-I/usr/5include" CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" AC_MSG_RESULT(Please note that some screen refreshs may fail) ]) AC_DEFUN(AC_USE_OSF1_CURSES, [ AC_MSG_RESULT(Using OSF1 curses) search_ncurses=false screen_manager="OSF1 curses" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_LIBS="-lcurses" ]) AC_DEFUN(AC_USE_SYSV_CURSES, [ AC_MSG_RESULT(Using SysV curses) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_SYSV_CURSES) search_ncurses=false screen_manager="SysV/curses" CURSES_LIBS="-lcurses" ]) dnl AC_ARG_WITH(bsd-curses, dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], dnl search_ncurses=false dnl screen_manager="Ultrix/cursesX" dnl if test $system = ULTRIX dnl then dnl THIS_CURSES=cursesX dnl else dnl THIS_CURSES=curses dnl fi dnl dnl CURSES_LIBS="-l$THIS_CURSES -ltermcap" dnl AC_DEFINE(HAS_CURSES) dnl has_curses=true dnl AC_DEFINE(USE_BSD_CURSES) dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) dnl AC_WARN(Use of the bsdcurses extension has some) dnl AC_WARN(display/input problems.) dnl AC_WARN(Reconsider using xcurses) dnl) dnl dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename dnl AC_DEFUN(AC_NCURSES, [ if $search_ncurses then if test -f $1/$2 then AC_MSG_RESULT(Found ncurses on $1/$2) CURSES_LIBS="$3" CURSES_INCLUDEDIR="$4" search_ncurses=false screen_manager=$5 AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) fi fi ]) AC_DEFUN(AC_SEARCH_NCURSES, [ AC_CHECKING("location of ncurses.h file") AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local") AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") dnl dnl We couldn't find ncurses, try SysV curses dnl if $search_ncurses then AC_EGREP_HEADER(init_color, /usr/include/curses.h, AC_USE_SYSV_CURSES) AC_EGREP_CPP(USE_NCURSES,[ #include #ifdef __NCURSES_H #undef USE_NCURSES USE_NCURSES #endif ],[ CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) search_ncurses=false screen_manager="ncurses installed as curses" ]) fi dnl dnl Try SunOS 4.x /usr/5{lib,include} ncurses dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES dnl should be replaced by a more fine grained selection routine dnl if $search_ncurses then if test -f /usr/5include/curses.h then AC_USE_SUNOS_CURSES fi else # check for ncurses version, to properly ifdef mouse-fix AC_MSG_CHECKING(for ncurses version) ncurses_version=unknown cat > conftest.$ac_ext < #else #include #endif #undef VERSION VERSION:NCURSES_VERSION EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | egrep "VERSION:" >conftest.out 2>&1; then changequote(,)dnl ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` changequote([,])dnl fi rm -rf conftest* AC_MSG_RESULT($ncurses_version) case "$ncurses_version" in changequote(,)dnl 4.[01]) changequote([,])dnl AC_DEFINE(NCURSES_970530,2) ;; 1.9.9g) AC_DEFINE(NCURSES_970530,1) ;; 1*) AC_DEFINE(NCURSES_970530,0) ;; esac fi ]) ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ## Copyright (C) 1996-1999 Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## ## As a special exception to the GNU General Public License, if you ## distribute this file as part of a program that contains a ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. # serial 39 AC_PROG_LIBTOOL AC_DEFUN(AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # Save cache, so that ltconfig can load it AC_CACHE_SAVE # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig AC_CACHE_LOAD # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log ]) AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], [libtool_flags="$libtool_flags --enable-dlopen"]) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [libtool_flags="$libtool_flags --enable-win32-dll"]) AC_ARG_ENABLE(libtool-lock, [ --disable-libtool-lock avoid locking (might break parallel builds)]) test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac ]) # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_SHARED, [dnl define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_STATIC, [dnl define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. changequote(,)dnl [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' changequote([,])dnl # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_SUBST(LD) AC_PROG_LD_GNU ]) AC_DEFUN(AC_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case "$host" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library, adds --enable-ltdl-convenience to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library, and adds --enable-ltdl-install to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" fi ]) dnl old names AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl dnl This is just to quiet aclocal about the macro not being used if(a,b,[AC_DISABLE_FAST_INSTALL])dnl ############################################################ ## gatos.m4 ### 0.2 ### 26 Aug 1999 ### ############################################################ ## usage: ## IBTK_CHECK: enable/disable checking ibtk header files/lib. ## check by default. ## AC_TRY_CPP_MOD: modified version of autoconf part ## (needed by AC_CHECK_HEADER_MOD) ## AC_CHECK_HEADER_MOD: modified version of autoconf part ## needed by FreeBSD. ## AM_INCLUDES_IBTK: check IBTK header files (platform dependent). ## AM_LIB_IBTK: check IBTK library. ## GATOS_DGA_VMODE: check header files and lib of ## libXxf86dga and libXxf86vmode ## GATOS_HASH_CHARS: check enabling of hashing chars feature ## GATOS_RAW_CC_EDS: check enabling of raw cc and raw eds feature ## GATOS_I2C_DELAY: check for i2c timer source ## GATOS_SOUND_OSSEMU: check enabling of oss sound emulation ## under NetBSD ## GATOS_SHM: enable/disable IPC shared memory. ## GATOS_IPC: enable/disable IPC messages. ############################################################ AC_DEFUN(IBTK_CHECK,[ AC_ARG_ENABLE(ibtk-ckeck, [GATOS Features: --enable-ibtk-check Enable IBTK header files/lib checking (default)],,) if test "$enable_ibtk_check" = "yes"; then ibtk_check=yes elif test "$enable_ibtk_check" = "no"; then ibtk_check=no else ibtk_check=yes fi ]) dnl ################################################ AC_DEFUN(AC_TRY_CPP_MOD, [AC_REQUIRE_CPP()dnl cat > conftest.$ac_ext <&AC_FD_CC echo "configure: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$3], , , [ rm -rf conftest* $3 ])dnl fi rm -f conftest*]) dnl ################################################ AC_DEFUN(AC_CHECK_HEADER_MOD, [dnl Do the transliteration at runtime so arg 1 can be a shell variable. ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_header_$ac_safe, [AC_TRY_CPP_MOD([#include <$1>], eval "ac_cv_header_$ac_safe=yes", eval "ac_cv_header_$ac_safe=no")])dnl if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) ifelse([$3], , , [$3 ])dnl fi ]) dnl ################################################ AC_DEFUN(AM_INCLUDES_IBTK,[ IBTK_HEADER_FILES="ibox.h ibutton.h idialogs.h idodad.h igbox.h \ iintbox.h ilistbox.h irealbox.h isbutton.h islider.h \ istatbar.h itextbox.h iwindow.h pclaim.h version.h" case "$ArchRunning" in x86Linux) hdir="ibtk" ;; x86FreeBSD) hdir="/usr/local/include/ibtk" ;; x86NetBSD) hdir="/usr/local/include/ibtk" ;; *) AC_MSG_ERROR(Unknown Arch) ;; esac for ibtkh in $IBTK_HEADER_FILES; do AC_CHECK_HEADER_MOD($hdir/$ibtkh, have_ibtk_headers=yes, \ AC_MSG_ERROR(some IBTK headers missing... please check.)) done ]) dnl ################################################ AC_DEFUN(AM_LIB_IBTK,[ AC_CHECK_LIB(ibtk, main, have_ibtk_lib=yes, AC_MSG_ERROR(libibtk not present. Xatitv will cannot compile.), -L$x_libraries -L/usr/lib -L/usr/local/lib) ]) dnl ################################################ AC_DEFUN(GATOS_DGA_VMODE,[ XEXTLIBS="" XEXTFLAGS="" AC_MSG_CHECKING(using DGA and VMODE extensions support) AC_ARG_WITH(dga-vmode, [ --with-dga-vmode Use DGA and VMODE extensions support (default)], [case "$withval" in no) AC_MSG_RESULT(no) dga_vmode=no ;; *) AC_MSG_RESULT(yes) dga_vmode=yes ;; esac],[ dga_vmode=yes AC_MSG_RESULT(yes) ]) dnl forced to no, set to yes if everything going all right use_dga_vmode=no if test "$dga_vmode" = "yes"; then AC_CHECK_HEADER_MOD(X11/extensions/xf86dga.h, have_dga_header=yes, have_dga_header=no) AC_CHECK_HEADER_MOD(X11/extensions/xf86vmode.h, have_vmode_header=yes, have_vmode_header=no) AC_CHECK_LIB(Xxf86dga, main, [have_dga_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86dga"; XEXTFLAGS="$XEXTFLAGS -DUSE_DGA"], have_dga_lib=no, -L$x_libraries) AC_CHECK_LIB(Xxf86vm, main, [have_vmode_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86vm"; XEXTFLAGS="$XEXTFLAGS -DUSE_VMODE"], have_vmode_lib=no, -L$x_libraries) if test "$have_dga_header" = "yes"; then if test "$have_dga_lib" = "yes" ; then if test "$have_vmode_header" = "yes" ; then if test "$have_vmode_lib" = "yes" ; then use_dga_vmode=yes XEXTLIBS="$XEXTLIBS -lXext" fi fi fi fi fi AC_SUBST(XEXTLIBS) AC_SUBST(XEXTFLAGS) ]) dnl ################################################ AC_DEFUN(GATOS_HASH_CHARS,[ HASH_CHARS="" AC_MSG_CHECKING(enable CHAR HASHING) AC_ARG_ENABLE(hash-chars, [ --enable-hash-chars Enable char hashing (default) consumes more memory in favor of speed], [case "$enableval" in yes) hash_chars=yes AC_MSG_RESULT(yes) ;; no) hash_chars=no AC_MSG_RESULT(no) ;; *) AC_MSG_ERROR(bad value ${enableval} for hash-chars option) ;; esac],[ AC_MSG_RESULT(yes) hash_chars=yes]) if test "$hash_chars" = "yes"; then HASH_CHARS="-DHASH_CHARS" fi AC_SUBST(HASH_CHARS) ]) dnl ################################################ AC_DEFUN(GATOS_RAW_CC_EDS,[ RAW_OUTPUT="" AC_MSG_CHECKING(output RAW CC) AC_ARG_ENABLE(raw-cc, [ --enable-raw-cc Output the raw cc (expect 0)], [case "$enableval" in yes) raw_cc=yes AC_MSG_RESULT(yes) ;; no) raw_cc=no AC_MSG_RESULT(no) ;; *) AC_MSG_ERROR(bad value ${enableval} for raw-cc option) ;; esac],[ AC_MSG_RESULT(no) raw_cc=no]) if test "$raw_cc" = "yes"; then RAW_OUTPUT="-DCCTEST" fi AC_MSG_CHECKING(output RAW EDS) AC_ARG_ENABLE(raw-eds, [ --enable-raw-eds Output the raw eds (expect 0)], [case "$enableval" in yes) raw_eds=yes AC_MSG_RESULT(yes) ;; no) AC_MSG_RESULT(no) raw_eds=no ;; *) AC_MSG_ERROR(bad value ${enableval} for raw-eds option) ;; esac],[ AC_MSG_RESULT(no) raw_eds=no]) if test "$raw_eds" = "yes"; then RAW_OUTPUT="-DCCTEST -DEDSTEST" fi dnl Check if CC and EDS aren't enabled as same time if test "$raw_cc" = "yes"; then if test "$raw_eds" = "yes"; then AC_MSG_ERROR(raw cc or raw eds can't be enabled as same time !) fi fi AC_SUBST(RAW_OUTPUT) ]) dnl ################################################ AC_DEFUN(GATOS_I2C_DELAY,[ AC_MSG_CHECKING(using DELAY from the Linux/(Free/Net)BSD kernel sources) AC_ARG_WITH(kernel-delay, [ --with-kernel-delay Use delay from Linux/(Free/Net)BSD kernel sources (default) --without-kernel-delay Use i2c delay in i2c.c], [case "$withval" in no) AC_MSG_RESULT(no) kernel_delay=false ;; *) AC_MSG_RESULT(yes) AC_DEFINE(WITH_KERNEL_DELAY) kernel_delay=true ;; esac],[ AC_MSG_RESULT(yes) AC_DEFINE(WITH_KERNEL_DELAY) kernel_delay=true]) AM_CONDITIONAL(WITH_KERNEL_DELAY, test "$kernel_delay" = "true") ]) dnl ################################################ AC_DEFUN(GATOS_SOUND_OSSEMU,[ AC_MSG_CHECKING(using the OSS sound emulation in NetBSD) AC_ARG_WITH(ossemu, [ --with-ossemu Use the OSS sound emulation in NetBSD (default=no)], [case "$withval" in yes) if test "$ArchRunning" != "x86NetBSD"; then AC_MSG_ERROR(Only available in NetBSD!) else AC_MSG_RESULT(yes) AC_DEFINE(WITH_OSSEMU) netbsd_ossemu=yes fi ;; *) AC_MSG_RESULT(no) netbsd_ossemu=no ;; esac],[ AC_MSG_RESULT(no) netbsd_ossemu=no]) AM_CONDITIONAL(WITH_OSSEMU, test "$netbsd_ossemu" = "yes") ]) dnl ################################################ AC_DEFUN(GATOS_SHM,[ AC_MSG_CHECKING(using IPC shared memory) AC_ARG_WITH(shm, [ --with-shm Use IPC shared memory support (default=no)], [case "$withval" in no) AC_MSG_RESULT(no) shm=no ;; *) AC_MSG_RESULT(yes) shm=yes ;; esac],[ shm=no AC_MSG_RESULT(no) ]) if test "$shm" = "yes"; then USE_SHM="-DUSE_SHM" fi AC_SUBST(USE_SHM) ]) dnl ################################################ AC_DEFUN(GATOS_IPC,[ AC_MSG_CHECKING(using IPC messages) AC_ARG_WITH(ipc, [ --with-ipc Use IPC messages support (default=no)], [case "$withval" in no) AC_MSG_RESULT(no) ipcmsg=no ;; *) AC_MSG_RESULT(yes) ipcmsg=yes ;; esac],[ ipcmsg=no AC_MSG_RESULT(no) ]) if test "$ipcmsg" = "yes"; then USE_IPC="-DUSE_IPC" fi AC_SUBST(USE_IPC) ]) dnl ################################################ gatos-0.0.5/aclocal.m40100644002411700123110000013627307030250605013143 0ustar bayleasrdnl aclocal.m4 generated automatically by aclocal 1.4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # progtest.m4 from gettext 0.32 # Search path for a program which passes the given test. # Ulrich Drepper , 1996. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN(AM_PATH_PROG_WITH_TEST, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test -n "[$]$1"; then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # lcmessage.m4 from gettext 0.32 # Check whether LC_MESSAGES is available in . # Ulrich Drepper , 1995. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 AC_DEFUN(AM_LC_MESSAGES, [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES) fi fi]) # gettext.m4 from gettext 0.32 # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 3 AC_DEFUN(AM_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) USE_INCLUDED_LIBINTL=no dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then AC_DEFINE(ENABLE_NLS) AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. dnl catgets is only used if permitted by option --with-catgets. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, [AC_TRY_LINK([#include ], [return (int) gettext ("")], gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) if test "$gt_cv_func_gettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CACHE_CHECK([for gettext in libintl], gt_cv_func_gettext_libintl, [AC_TRY_LINK([], [return (int) gettext ("")], gt_cv_func_gettext_libintl=yes, gt_cv_func_gettext_libintl=no)])]) fi if test "$gt_cv_func_gettext_libc" = "yes" \ || test "$gt_cv_func_gettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) INSTOBJEXT=.mo fi fi ]) if test "$CATOBJEXT" = "NONE"; then AC_MSG_CHECKING([whether catgets can be used]) AC_ARG_WITH(catgets, [ --with-catgets use catgets functions if available], nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) AC_MSG_RESULT($nls_cv_use_catgets) if test "$nls_cv_use_catgets" = "yes"; then dnl No gettext in C library. Try catgets next. AC_CHECK_LIB(i, main) AC_CHECK_FUNC(catgets, [AC_DEFINE(HAVE_CATGETS) INTLOBJS="\$(CATOBJS)" AC_PATH_PROG(GENCAT, gencat, no)dnl if test "$GENCAT" != "no"; then AC_PATH_PROG(GMSGFMT, gmsgfmt, no) if test "$GMSGFMT" = "no"; then AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) fi AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.cat INSTOBJEXT=.cat DATADIRNAME=lib INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi]) fi fi if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_SUBST(MSGFMT) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo INSTOBJEXT=.mo DATADIRNAME=share INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext programs is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi # If this is used in GNU gettext we have to set USE_NLS to `yes' # because some of the sources are only built for this goal. if test "$PACKAGE" = gettext; then USE_NLS=yes USE_INCLUDED_LIBINTL=yes fi dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(AM_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h sys/param.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ __argz_count __argz_stringify __argz_next]) if test "${ac_cv_func_stpcpy+set}" != "set"; then AC_CHECK_FUNCS(stpcpy) fi if test "${ac_cv_func_stpcpy}" = "yes"; then AC_DEFINE(HAVE_STPCPY) fi AM_LC_MESSAGES AM_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl The reference to in the installed file dnl must be resolved because we cannot expect the users of this dnl to define HAVE_LOCALE_H. if test $ac_cv_header_locale_h = yes; then INCLUDE_LOCALE_H="#include " else INCLUDE_LOCALE_H="\ /* The system does not provide the header . Take care yourself. */" fi AC_SUBST(INCLUDE_LOCALE_H) dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux libc-5 and the normal X/Open format test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi dnl po2tbl.sed is always needed. sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed dnl In the intl/Makefile.in we have a special dependency which makes dnl only sense for gettext. We comment this out for non-gettext dnl packages. if test "$PACKAGE" = "gettext"; then GT_NO="#NO#" GT_YES= else GT_NO= GT_YES="#YES#" fi AC_SUBST(GT_NO) AC_SUBST(GT_YES) dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl *** For now the libtool support in intl/Makefile is not for real. l= AC_SUBST(l) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) dnl Curses detection: Munged from Midnight Commander's configure.in dnl dnl What it does: dnl ============= dnl dnl - Determine which version of curses is installed on your system dnl and set the -I/-L/-l compiler entries and add a few preprocessor dnl symbols dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in dnl Makefile.in's dnl - Modify the following configure variables (these are the only dnl curses.m4 variables you can access from within configure.in) dnl CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if dnl an ncurses.h that's been renamed to curses.h dnl is found. dnl CURSES_LIBS - sets -L and -l's appropriately dnl CFLAGS - if --with-sco, add -D_SVID3 dnl has_curses - exports result of tests to rest of configure dnl dnl Usage: dnl ====== dnl 1) Add lines indicated below to acconfig.h dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in dnl 3) Instead of #include you should use the following to dnl properly locate ncurses or curses header file dnl dnl #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) dnl #include dnl #else dnl #include dnl #endif dnl dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS dnl dnl Notes with automake: dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from dnl configure.in dnl - your Makefile.am can look something like this dnl ----------------------------------------------- dnl INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) dnl if HAS_CURSES dnl CURSES_TARGETS=name_of_curses_prog dnl endif dnl bin_PROGRAMS = other_programs $(CURSES_TARGETS) dnl other_programs_SOURCES = blah blah blah dnl name_of_curses_prog_SOURCES = blah blah blah dnl other_programs_LDADD = blah dnl name_of_curses_prog_LDADD = blah $(CURSES_LIBS) dnl ----------------------------------------------- dnl dnl dnl The following lines should be added to acconfig.h: dnl ================================================== dnl dnl /*=== Curses version detection defines ===*/ dnl /* Found some version of curses that we're going to use */ dnl #undef HAS_CURSES dnl dnl /* Use SunOS SysV curses? */ dnl #undef USE_SUNOS_CURSES dnl dnl /* Use old BSD curses - not used right now */ dnl #undef USE_BSD_CURSES dnl dnl /* Use SystemV curses? */ dnl #undef USE_SYSV_CURSES dnl dnl /* Use Ncurses? */ dnl #undef USE_NCURSES dnl dnl /* If you Curses does not have color define this one */ dnl #undef NO_COLOR_CURSES dnl dnl /* Define if you want to turn on SCO-specific code */ dnl #undef SCO_FLAVOR dnl dnl /* Set to reflect version of ncurses * dnl * 0 = version 1.* dnl * 1 = version 1.9.9g dnl * 2 = version 4.0/4.1 */ dnl #undef NCURSES_970530 dnl dnl /*=== End new stuff for acconfig.h ===*/ dnl AC_DEFUN(AC_CHECK_CURSES,[ search_ncurses=true screen_manager="" has_curses=false CFLAGS=${CFLAGS--O} AC_SUBST(CURSES_LIBS) AC_SUBST(CURSES_INCLUDEDIR) AC_ARG_WITH(sco, [ --with-sco Use this to turn on SCO-specific code],[ if test x$withval = xyes; then AC_DEFINE(SCO_FLAVOR) CFLAGS="$CFLAGS -D_SVID3" fi ]) AC_ARG_WITH(sunos-curses, [ --with-sunos-curses Used to force SunOS 4.x curses],[ if test x$withval = xyes; then AC_USE_SUNOS_CURSES fi ]) AC_ARG_WITH(osf1-curses, [ --with-osf1-curses Used to force OSF/1 curses],[ if test x$withval = xyes; then AC_USE_OSF1_CURSES fi ]) AC_ARG_WITH(vcurses, [ --with-vcurses[=incdir] Used to force SysV curses], if test x$withval != xyes; then CURSES_INCLUDEDIR="-I$withval" fi AC_USE_SYSV_CURSES ) AC_ARG_WITH(ncurses, [ --with-ncurses[=dir] Compile with ncurses/locate base dir], if test x$withval = xno ; then search_ncurses=false elif test x$withval != xyes ; then CURSES_LIBS="$LIBS -L$withval/lib -lncurses" CURSES_INCLUDEDIR="-I$withval/include" search_ncurses=false screen_manager="ncurses" AC_DEFINE(USE_NCURSES) AC_DEFINE(HAS_CURSES) has_curses=true fi ) if $search_ncurses then AC_SEARCH_NCURSES() fi ]) AC_DEFUN(AC_USE_SUNOS_CURSES, [ search_ncurses=false screen_manager="SunOS 4.x /usr/5include curses" AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) AC_DEFINE(USE_SUNOS_CURSES) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_INCLUDEDIR="-I/usr/5include" CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" AC_MSG_RESULT(Please note that some screen refreshs may fail) ]) AC_DEFUN(AC_USE_OSF1_CURSES, [ AC_MSG_RESULT(Using OSF1 curses) search_ncurses=false screen_manager="OSF1 curses" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_LIBS="-lcurses" ]) AC_DEFUN(AC_USE_SYSV_CURSES, [ AC_MSG_RESULT(Using SysV curses) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_SYSV_CURSES) search_ncurses=false screen_manager="SysV/curses" CURSES_LIBS="-lcurses" ]) dnl AC_ARG_WITH(bsd-curses, dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], dnl search_ncurses=false dnl screen_manager="Ultrix/cursesX" dnl if test $system = ULTRIX dnl then dnl THIS_CURSES=cursesX dnl else dnl THIS_CURSES=curses dnl fi dnl dnl CURSES_LIBS="-l$THIS_CURSES -ltermcap" dnl AC_DEFINE(HAS_CURSES) dnl has_curses=true dnl AC_DEFINE(USE_BSD_CURSES) dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) dnl AC_WARN(Use of the bsdcurses extension has some) dnl AC_WARN(display/input problems.) dnl AC_WARN(Reconsider using xcurses) dnl) dnl dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename dnl AC_DEFUN(AC_NCURSES, [ if $search_ncurses then if test -f $1/$2 then AC_MSG_RESULT(Found ncurses on $1/$2) CURSES_LIBS="$3" CURSES_INCLUDEDIR="$4" search_ncurses=false screen_manager=$5 AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) fi fi ]) AC_DEFUN(AC_SEARCH_NCURSES, [ AC_CHECKING("location of ncurses.h file") AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local") AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") dnl dnl We couldn't find ncurses, try SysV curses dnl if $search_ncurses then AC_EGREP_HEADER(init_color, /usr/include/curses.h, AC_USE_SYSV_CURSES) AC_EGREP_CPP(USE_NCURSES,[ #include #ifdef __NCURSES_H #undef USE_NCURSES USE_NCURSES #endif ],[ CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) search_ncurses=false screen_manager="ncurses installed as curses" ]) fi dnl dnl Try SunOS 4.x /usr/5{lib,include} ncurses dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES dnl should be replaced by a more fine grained selection routine dnl if $search_ncurses then if test -f /usr/5include/curses.h then AC_USE_SUNOS_CURSES fi else # check for ncurses version, to properly ifdef mouse-fix AC_MSG_CHECKING(for ncurses version) ncurses_version=unknown cat > conftest.$ac_ext < #else #include #endif #undef VERSION VERSION:NCURSES_VERSION EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | egrep "VERSION:" >conftest.out 2>&1; then changequote(,)dnl ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` changequote([,])dnl fi rm -rf conftest* AC_MSG_RESULT($ncurses_version) case "$ncurses_version" in changequote(,)dnl 4.[01]) changequote([,])dnl AC_DEFINE(NCURSES_970530,2) ;; 1.9.9g) AC_DEFINE(NCURSES_970530,1) ;; 1*) AC_DEFINE(NCURSES_970530,0) ;; esac fi ]) # serial 39 AC_PROG_LIBTOOL AC_DEFUN(AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # Save cache, so that ltconfig can load it AC_CACHE_SAVE # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig AC_CACHE_LOAD # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log ]) AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], [libtool_flags="$libtool_flags --enable-dlopen"]) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [libtool_flags="$libtool_flags --enable-win32-dll"]) AC_ARG_ENABLE(libtool-lock, [ --disable-libtool-lock avoid locking (might break parallel builds)]) test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac ]) # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_SHARED, [dnl define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_STATIC, [dnl define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. changequote(,)dnl [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' changequote([,])dnl # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_SUBST(LD) AC_PROG_LD_GNU ]) AC_DEFUN(AC_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case "$host" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library, adds --enable-ltdl-convenience to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library, and adds --enable-ltdl-install to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" fi ]) dnl old names AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl dnl This is just to quiet aclocal about the macro not being used if(a,b,[AC_DISABLE_FAST_INSTALL])dnl AC_DEFUN(IBTK_CHECK,[ AC_ARG_ENABLE(ibtk-ckeck, [GATOS Features: --enable-ibtk-check Enable IBTK header files/lib checking (default)],,) if test "$enable_ibtk_check" = "yes"; then ibtk_check=yes elif test "$enable_ibtk_check" = "no"; then ibtk_check=no else ibtk_check=yes fi ]) dnl ################################################ AC_DEFUN(AC_TRY_CPP_MOD, [AC_REQUIRE_CPP()dnl cat > conftest.$ac_ext <&AC_FD_CC echo "configure: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$3], , , [ rm -rf conftest* $3 ])dnl fi rm -f conftest*]) dnl ################################################ AC_DEFUN(AC_CHECK_HEADER_MOD, [dnl Do the transliteration at runtime so arg 1 can be a shell variable. ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_header_$ac_safe, [AC_TRY_CPP_MOD([#include <$1>], eval "ac_cv_header_$ac_safe=yes", eval "ac_cv_header_$ac_safe=no")])dnl if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) ifelse([$3], , , [$3 ])dnl fi ]) dnl ################################################ AC_DEFUN(AM_INCLUDES_IBTK,[ IBTK_HEADER_FILES="ibox.h ibutton.h idialogs.h idodad.h igbox.h \ iintbox.h ilistbox.h irealbox.h isbutton.h islider.h \ istatbar.h itextbox.h iwindow.h pclaim.h version.h" case "$ArchRunning" in x86Linux) hdir="ibtk" ;; x86FreeBSD) hdir="/usr/local/include/ibtk" ;; x86NetBSD) hdir="/usr/local/include/ibtk" ;; *) AC_MSG_ERROR(Unknown Arch) ;; esac for ibtkh in $IBTK_HEADER_FILES; do AC_CHECK_HEADER_MOD($hdir/$ibtkh, have_ibtk_headers=yes, \ AC_MSG_ERROR(some IBTK headers missing... please check.)) done ]) dnl ################################################ AC_DEFUN(AM_LIB_IBTK,[ AC_CHECK_LIB(ibtk, main, have_ibtk_lib=yes, AC_MSG_ERROR(libibtk not present. Xatitv will cannot compile.), -L$x_libraries -L/usr/lib -L/usr/local/lib) ]) dnl ################################################ AC_DEFUN(GATOS_DGA_VMODE,[ XEXTLIBS="" XEXTFLAGS="" AC_MSG_CHECKING(using DGA and VMODE extensions support) AC_ARG_WITH(dga-vmode, [ --with-dga-vmode Use DGA and VMODE extensions support (default)], [case "$withval" in no) AC_MSG_RESULT(no) dga_vmode=no ;; *) AC_MSG_RESULT(yes) dga_vmode=yes ;; esac],[ dga_vmode=yes AC_MSG_RESULT(yes) ]) dnl forced to no, set to yes if everything going all right use_dga_vmode=no if test "$dga_vmode" = "yes"; then AC_CHECK_HEADER_MOD(X11/extensions/xf86dga.h, have_dga_header=yes, have_dga_header=no) AC_CHECK_HEADER_MOD(X11/extensions/xf86vmode.h, have_vmode_header=yes, have_vmode_header=no) AC_CHECK_LIB(Xxf86dga, main, [have_dga_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86dga"; XEXTFLAGS="$XEXTFLAGS -DUSE_DGA"], have_dga_lib=no, -L$x_libraries) AC_CHECK_LIB(Xxf86vm, main, [have_vmode_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86vm"; XEXTFLAGS="$XEXTFLAGS -DUSE_VMODE"], have_vmode_lib=no, -L$x_libraries) if test "$have_dga_header" = "yes"; then if test "$have_dga_lib" = "yes" ; then if test "$have_vmode_header" = "yes" ; then if test "$have_vmode_lib" = "yes" ; then use_dga_vmode=yes XEXTLIBS="$XEXTLIBS -lXext" fi fi fi fi fi AC_SUBST(XEXTLIBS) AC_SUBST(XEXTFLAGS) ]) dnl ################################################ AC_DEFUN(GATOS_HASH_CHARS,[ HASH_CHARS="" AC_MSG_CHECKING(enable CHAR HASHING) AC_ARG_ENABLE(hash-chars, [ --enable-hash-chars Enable char hashing (default) consumes more memory in favor of speed], [case "$enableval" in yes) hash_chars=yes AC_MSG_RESULT(yes) ;; no) hash_chars=no AC_MSG_RESULT(no) ;; *) AC_MSG_ERROR(bad value ${enableval} for hash-chars option) ;; esac],[ AC_MSG_RESULT(yes) hash_chars=yes]) if test "$hash_chars" = "yes"; then HASH_CHARS="-DHASH_CHARS" fi AC_SUBST(HASH_CHARS) ]) dnl ################################################ AC_DEFUN(GATOS_RAW_CC_EDS,[ RAW_OUTPUT="" AC_MSG_CHECKING(output RAW CC) AC_ARG_ENABLE(raw-cc, [ --enable-raw-cc Output the raw cc (expect 0)], [case "$enableval" in yes) raw_cc=yes AC_MSG_RESULT(yes) ;; no) raw_cc=no AC_MSG_RESULT(no) ;; *) AC_MSG_ERROR(bad value ${enableval} for raw-cc option) ;; esac],[ AC_MSG_RESULT(no) raw_cc=no]) if test "$raw_cc" = "yes"; then RAW_OUTPUT="-DCCTEST" fi AC_MSG_CHECKING(output RAW EDS) AC_ARG_ENABLE(raw-eds, [ --enable-raw-eds Output the raw eds (expect 0)], [case "$enableval" in yes) raw_eds=yes AC_MSG_RESULT(yes) ;; no) AC_MSG_RESULT(no) raw_eds=no ;; *) AC_MSG_ERROR(bad value ${enableval} for raw-eds option) ;; esac],[ AC_MSG_RESULT(no) raw_eds=no]) if test "$raw_eds" = "yes"; then RAW_OUTPUT="-DCCTEST -DEDSTEST" fi dnl Check if CC and EDS aren't enabled as same time if test "$raw_cc" = "yes"; then if test "$raw_eds" = "yes"; then AC_MSG_ERROR(raw cc or raw eds can't be enabled as same time !) fi fi AC_SUBST(RAW_OUTPUT) ]) dnl ################################################ AC_DEFUN(GATOS_I2C_DELAY,[ AC_MSG_CHECKING(using DELAY from the Linux/(Free/Net)BSD kernel sources) AC_ARG_WITH(kernel-delay, [ --with-kernel-delay Use delay from Linux/(Free/Net)BSD kernel sources (default) --without-kernel-delay Use i2c delay in i2c.c], [case "$withval" in no) AC_MSG_RESULT(no) kernel_delay=false ;; *) AC_MSG_RESULT(yes) AC_DEFINE(WITH_KERNEL_DELAY) kernel_delay=true ;; esac],[ AC_MSG_RESULT(yes) AC_DEFINE(WITH_KERNEL_DELAY) kernel_delay=true]) AM_CONDITIONAL(WITH_KERNEL_DELAY, test "$kernel_delay" = "true") ]) dnl ################################################ AC_DEFUN(GATOS_SOUND_OSSEMU,[ AC_MSG_CHECKING(using the OSS sound emulation in NetBSD) AC_ARG_WITH(ossemu, [ --with-ossemu Use the OSS sound emulation in NetBSD (default=no)], [case "$withval" in yes) if test "$ArchRunning" != "x86NetBSD"; then AC_MSG_ERROR(Only available in NetBSD!) else AC_MSG_RESULT(yes) AC_DEFINE(WITH_OSSEMU) netbsd_ossemu=yes fi ;; *) AC_MSG_RESULT(no) netbsd_ossemu=no ;; esac],[ AC_MSG_RESULT(no) netbsd_ossemu=no]) AM_CONDITIONAL(WITH_OSSEMU, test "$netbsd_ossemu" = "yes") ]) dnl ################################################ AC_DEFUN(GATOS_SHM,[ AC_MSG_CHECKING(using IPC shared memory) AC_ARG_WITH(shm, [ --with-shm Use IPC shared memory support (default=no)], [case "$withval" in no) AC_MSG_RESULT(no) shm=no ;; *) AC_MSG_RESULT(yes) shm=yes ;; esac],[ shm=no AC_MSG_RESULT(no) ]) if test "$shm" = "yes"; then USE_SHM="-DUSE_SHM" fi AC_SUBST(USE_SHM) ]) dnl ################################################ AC_DEFUN(GATOS_IPC,[ AC_MSG_CHECKING(using IPC messages) AC_ARG_WITH(ipc, [ --with-ipc Use IPC messages support (default=no)], [case "$withval" in no) AC_MSG_RESULT(no) ipcmsg=no ;; *) AC_MSG_RESULT(yes) ipcmsg=yes ;; esac],[ ipcmsg=no AC_MSG_RESULT(no) ]) if test "$ipcmsg" = "yes"; then USE_IPC="-DUSE_IPC" fi AC_SUBST(USE_IPC) ]) dnl ################################################ # Define a conditional. AC_DEFUN(AM_CONDITIONAL, [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi]) # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # 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". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # 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 ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # From Ulrich Drepper. # serial 1 AC_DEFUN(AM_TYPE_PTRDIFF_T, [AC_CACHE_CHECK([for ptrdiff_t], am_cv_type_ptrdiff_t, [AC_TRY_COMPILE([#include ], [ptrdiff_t p], am_cv_type_ptrdiff_t=yes, am_cv_type_ptrdiff_t=no)]) if test $am_cv_type_ptrdiff_t = yes; then AC_DEFINE(HAVE_PTRDIFF_T,1,[Define if system has ptrdiff_t type]) fi ]) gatos-0.0.5/config.guess0100755002411700123110000006532006765053731013634 0ustar bayleasr#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF ${CC-cc} $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; arm32:NetBSD:*:*) echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; macppc:NetBSD:*:*) echo powerpc-apple-netbsd${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c int main (argc, argv) int argc; char **argv; { #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF ${CC-cc} $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 ) sed 's/^ //' << EOF >$dummy.c #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (${CC-cc} $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*T3E:*:*:*) echo t3e-cray-unicosmk${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | i?86:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # uname on the ARM produces all sorts of strangeness, and we need to # filter it out. case "$UNAME_MACHINE" in arm* | sa110*) UNAME_MACHINE="arm" ;; esac # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then sed 's/^ //' <$dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF LIBC="" ${CC-cc} $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < main(argc, argv) int argc; char *argv[]; { #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i?86:UnixWare:*:*) if /bin/uname -X 2>/dev/null >/dev/null ; then (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 fi echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} exit 0 ;; pc:*:*:*) # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 gatos-0.0.5/config.h.in0100644002411700123110000001002406777603031013323 0ustar bayleasr/* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if using alloca.c. */ #undef C_ALLOCA /* Define to empty if the keyword does not work. */ #undef const /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ #undef CRAY_STACKSEG_END /* Define if you have alloca, as a function or macro. */ #undef HAVE_ALLOCA /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define to `long' if doesn't define. */ #undef off_t /* Define if you need to in order for stat and other things to work. */ #undef _POSIX_SOURCE /* Define to `unsigned' if doesn't define. */ #undef size_t /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING #undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef PACKAGE /* Define if you want to use delay from Linux kernel sources */ #undef WITH_KERNEL_DELAY /* Use the OSS sound emulation in NetBSD */ #undef WITH_OSSEMU /* ==== */ #undef VERSION /* CURSES STUFF */ #undef HAS_CURSES /* Use SunOS SysV curses? */ #undef USE_SUNOS_CURSES /* Use SystemV curses? */ #undef USE_SYSV_CURSES /* Use Ncurses? */ #undef USE_NCURSES /* If you Curses does not have color define this one */ #undef NO_COLOR_CURSES /* Define if you want to turn on SCO-specific code */ #undef SCO_FLAVOR /* Set to reflect version of ncurses * * 0 = version 1.* * 1 = version 1.9.9g * 2 = version 4.0/4.1 */ #undef NCURSES_970530 /* END OF CURSES STUFF */ /* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT /* Define if you have the __argz_next function. */ #undef HAVE___ARGZ_NEXT /* Define if you have the __argz_stringify function. */ #undef HAVE___ARGZ_STRINGIFY /* Define if you have the dcgettext function. */ #undef HAVE_DCGETTEXT /* Define if you have the getcwd function. */ #undef HAVE_GETCWD /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE /* Define if you have the munmap function. */ #undef HAVE_MUNMAP /* Define if you have the putenv function. */ #undef HAVE_PUTENV /* Define if you have the setenv function. */ #undef HAVE_SETENV /* Define if you have the setlocale function. */ #undef HAVE_SETLOCALE /* Define if you have the stpcpy function. */ #undef HAVE_STPCPY /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP /* Define if you have the strchr function. */ #undef HAVE_STRCHR /* Define if you have the header file. */ #undef HAVE_ARGZ_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_NL_TYPES_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the header file. */ #undef HAVE_VALUES_H /* Define if you have the i library (-li). */ #undef HAVE_LIBI /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION /* Define if system has ptrdiff_t type */ #undef HAVE_PTRDIFF_T gatos-0.0.5/config.sub0100755002411700123110000004661106765053731013301 0ustar bayleasr#! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ | mipstx39 | mipstx39el \ | sparc | sparclet | sparclite | sparc64 | v850) basic_machine=$basic_machine-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i[34567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mipstx39-* | mipstx39el-* \ | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigaos | amigados) basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; np1) basic_machine=np1-gould ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | nexen) basic_machine=i586-pc ;; pentiumpro | p6 | k6 | 6x86) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | k6-* | 6x86-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; symmetry) basic_machine=i386-sequent os=-dynix ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ | -openstep*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -xenix) os=-xenix ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f301-fujitsu) os=-uxpv ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -hpux*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os gatos-0.0.5/configure0100755002411700123110000056116507030250607013216 0ustar bayleasr#! /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: ac_help="$ac_help --enable-shared[=PKGS] build shared libraries [default=no]" ac_help="$ac_help --enable-static[=PKGS] build static libraries [default=yes]" ac_help="$ac_help --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" ac_help="$ac_help --with-catgets use catgets functions if available" ac_help="$ac_help --with-ncurses[=base-dir] compile with ncurses/locate base dir" ac_help="$ac_help --with-sco Use this to turn on SCO-specific code" ac_help="$ac_help --with-sunos-curses Used to force SunOS 4.x curses" ac_help="$ac_help --with-osf1-curses Used to force OSF/1 curses" ac_help="$ac_help --with-vcurses[=incdir] Used to force SysV curses" ac_help="$ac_help --with-ncurses[=dir] Compile with ncurses/locate base dir" ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help GATOS Features: --enable-ibtk-check Enable IBTK header files/lib checking (default)" ac_help="$ac_help --with-dga-vmode Use DGA and VMODE extensions support (default)" ac_help="$ac_help --with-shm Use IPC shared memory support (default=no)" ac_help="$ac_help --with-ipc Use IPC messages support (default=no)" ac_help="$ac_help --enable-hash-chars Enable char hashing (default) consumes more memory in favor of speed" ac_help="$ac_help --enable-raw-cc Output the raw cc (expect 0)" ac_help="$ac_help --enable-raw-eds Output the raw eds (expect 0)" ac_help="$ac_help --with-kernel-delay Use delay from Linux/(Free/Net)BSD kernel sources (default) --without-kernel-delay Use i2c delay in i2c.c" ac_help="$ac_help --with-ossemu Use the OSS sound emulation in NetBSD (default=no)" # 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/xatitv.cpp # 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 if test $sysconfdir = $\{prefix\}/etc; then sysconfdir=/etc fi GATOS_MAJOR_VERSION=0 GATOS_MINOR_VERSION=0 GATOS_SUB_VERSION=5 CVS_VERSION=false IBTK_REQUIRED_VERSION="00001400" if test "$CVS_VERSION" = "true"; then GATOS_CVS_VERSION="-CVS-`cat CVSVERSION`" SPEC_CVS_VERSION="CVS.`cat CVSVERSION`" else SPEC_CVS_VERSION="Release" fi GATOS_VERSION=$GATOS_MAJOR_VERSION.$GATOS_MINOR_VERSION.$GATOS_SUB_VERSION$GATOS_CVS_VERSION SPEC_VERSION=$GATOS_MAJOR_VERSION.$GATOS_MINOR_VERSION.$GATOS_SUB_VERSION TAR_NAME="gatos-"$GATOS_VERSION VERSION=$GATOS_VERSION PACKAGE=gatos cat >> confdefs.h <> confdefs.h <&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:655: 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:708: 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:765: 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=$PACKAGE VERSION=$VERSION 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:811: 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:824: 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:837: 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:850: 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:863: 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 # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:888: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 case "$host" in i386-*-linux*) { echo "configure: error: --- Argll !!" 1>&2; exit 1; } ;; i486-*-linux*|i586-*-linux*|i686-*-linux*) echo "$ac_t""--- Running Linux !!" 1>&6 ArchRunning="x86Linux" ;; i386-*-freebsd*|i486-*-freebsd*|i586-*-freebsd*|i686-*-freebsd*) echo "$ac_t""--- Running FreeBSD" 1>&6 ArchRunning="x86FreeBSD" ;; i386-*-netbsd*|i486-*-netbsd*|i586-*-netbsd*|i686-*-netbsd*) echo "$ac_t""--- Running NetBSD" 1>&6 ArchRunning="x86NetBSD" ;; *) { echo "configure: error: --- Wow" 1>&2; exit 1; } esac # 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:931: 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:961: 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:1012: 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:1044: 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 1055 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:1060: \"$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:1086: 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:1091: 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:1119: 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 for POSIXized ISC""... $ac_c" 1>&6 echo "configure:1151: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then echo "$ac_t""yes" 1>&6 ISC=yes # If later tests want to check for ISC. cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF if test "$GCC" = yes; then CC="$CC -posix" else CC="$CC -Xp" fi else echo "$ac_t""no" 1>&6 ISC= fi # 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:1174: 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:1204: 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:1255: 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:1287: 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 1298 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:1303: \"$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:1329: 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:1334: 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:1362: 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 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1398: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi CXX="$ac_cv_prog_CXX" if test -n "$CXX"; then echo "$ac_t""$CXX" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:1430: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF #line 1441 "configure" #include "confdefs.h" int main(){return(0);} EOF if { (eval echo configure:1446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_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_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_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_cxx_works" 1>&6 if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:1472: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 echo "configure:1477: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+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_gxx=yes else ac_cv_prog_gxx=no fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 echo "configure:1505: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1537: 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:1558: \"$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:1575: \"$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:1592: \"$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:1617: 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:1630: \"$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:1697: \"$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 whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:1721: 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 # 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:1759: 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 "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:1814: 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 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:1842: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata ac_cv_prog_LN_S="ln -s" else ac_cv_prog_LN_S=ln fi fi LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac else enable_shared=no fi # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac else enable_fast_install=yes fi echo $ac_n "checking build system type""... $ac_c" 1>&6 echo "configure:1934: checking build system type" >&5 build_alias=$build case "$build_alias" in NONE) case $nonopt in NONE) build_alias=$host_alias ;; *) build_alias=$nonopt ;; esac ;; esac build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$build" 1>&6 # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 echo "configure:1963: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 echo "configure:1987: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "configure:1990: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$ac_cv_path_LD" if test -n "$LD"; then echo "$ac_t""$LD" 1>&6 else echo "$ac_t""no" 1>&6 fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 echo "configure:2026: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi fi echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 echo "configure:2042: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi fi NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" libtool_flags="$libtool_flags --enable-dlopen" # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" : fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '#line 2102 "configure"' > conftest.$ac_ext if { (eval echo configure:2103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 echo "configure:2124: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* lt_cv_cc_needs_belf=no fi rm -f conftest* fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac # Save cache, so that ltconfig can load it 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 # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then STATIC="-static" else STATIC= fi ALL_LINGUAS="" echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:2248: 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:2302: \"$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 echo $ac_n "checking for inline""... $ac_c" 1>&6 echo "configure:2323: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* done fi echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) ;; no) cat >> confdefs.h <<\EOF #define inline EOF ;; *) cat >> confdefs.h <&6 echo "configure:2363: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else rm -rf conftest* ac_cv_type_off_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_off_t" 1>&6 if test $ac_cv_type_off_t = no; then cat >> confdefs.h <<\EOF #define off_t long EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo "configure:2396: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF #define size_t unsigned EOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 echo "configure:2431: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_alloca_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 if test $ac_cv_header_alloca_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA_H 1 EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 echo "configure:2464: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < # define alloca _alloca # else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main() { char *p = (char *) alloca(1); ; return 0; } EOF if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_func_alloca_works=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 if test $ac_cv_func_alloca_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA 1 EOF fi if test $ac_cv_func_alloca_works = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.${ac_objext} cat >> confdefs.h <<\EOF #define C_ALLOCA 1 EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 echo "configure:2529: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5 | egrep "webecray" >/dev/null 2>&1; then rm -rf conftest* ac_cv_os_cray=yes else rm -rf conftest* ac_cv_os_cray=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2559: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <&6 fi done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 echo "configure:2614: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < addr) ? 1 : -1; } main () { exit (find_stack_direction() < 0); } EOF if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_c_stack_direction=-1 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&6 echo "configure:2666: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2676: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2705: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo "configure:2758: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef HAVE_UNISTD_H # include # endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ #ifdef __cplusplus extern "C" { void *malloc(unsigned); } #else char *malloc(); #endif int main() { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize(); /* * First, make a file with some known garbage in it. */ data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) *(data + i) = rand(); umask(0); fd = creat("conftestmmap", 0600); if (fd < 0) exit(1); if (write(fd, data, pagesize) != pagesize) exit(1); close(fd); /* * Next, try to mmap the file at a fixed address which * already has something else allocated at it. If we can, * also make sure that we see the same garbage. */ fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit(1); /* * Finally, make sure that changes to the mapped area * do not percolate back to the file as seen by read(). * (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit(1); close(fd); unlink("conftestmmap"); exit(0); } EOF if { (eval echo configure:2906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_mmap_fixed_mapped=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF #define HAVE_MMAP 1 EOF fi for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2934: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2944: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2974: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done if test "${ac_cv_func_stpcpy+set}" != "set"; then for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3031: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done fi if test "${ac_cv_func_stpcpy}" = "yes"; then cat >> confdefs.h <<\EOF #define HAVE_STPCPY 1 EOF fi if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 echo "configure:3093: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* am_cv_val_LC_MESSAGES=no fi rm -f conftest* fi echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >> confdefs.h <<\EOF #define HAVE_LC_MESSAGES 1 EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 echo "configure:3126: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" USE_NLS=$enableval else USE_NLS=yes fi echo "$ac_t""$USE_NLS" 1>&6 USE_INCLUDED_LIBINTL=no if test "$USE_NLS" = "yes"; then cat >> confdefs.h <<\EOF #define ENABLE_NLS 1 EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 echo "configure:3146: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" nls_cv_force_use_gnu_gettext=$withval else nls_cv_force_use_gnu_gettext=no fi echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 echo "configure:3165: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3175: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 echo "configure:3192: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* gt_cv_func_gettext_libc=no fi rm -f conftest* fi echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 echo "configure:3220: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 echo "configure:3255: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* gt_cv_func_gettext_libintl=no fi rm -f conftest* fi echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 else echo "$ac_t""no" 1>&6 fi fi if test "$gt_cv_func_gettext_libc" = "yes" \ || test "$gt_cv_func_gettext_libintl" = "yes"; then cat >> confdefs.h <<\EOF #define HAVE_GETTEXT 1 EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3295: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test -n "$MSGFMT"; then echo "$ac_t""$MSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi if test "$MSGFMT" != "no"; then for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3329: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3384: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. ;; *) 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_path_GMSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3420: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test -n "$XGETTEXT"; then echo "$ac_t""$XGETTEXT" 1>&6 else echo "$ac_t""no" 1>&6 fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CATOBJEXT=.mo DATADIRNAME=lib fi rm -f conftest* INSTOBJEXT=.mo fi fi else echo "$ac_t""no" 1>&6 fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 echo "configure:3483: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then withval="$with_catgets" nls_cv_use_catgets=$withval else nls_cv_use_catgets=no fi echo "$ac_t""$nls_cv_use_catgets" 1>&6 if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 echo "configure:3496: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 echo "configure:3539: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char catgets(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_catgets) || defined (__stub___catgets) choke me #else catgets(); #endif ; return 0; } EOF if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_catgets=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_CATGETS 1 EOF INTLOBJS="\$(CATOBJS)" # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3589: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GENCAT" in /*) ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. ;; *) 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_path_GENCAT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" ;; esac fi GENCAT="$ac_cv_path_GENCAT" if test -n "$GENCAT"; then echo "$ac_t""$GENCAT" 1>&6 else echo "$ac_t""no" 1>&6 fi if test "$GENCAT" != "no"; then # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3625: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. ;; *) 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_path_GMSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi if test "$GMSGFMT" = "no"; then # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3662: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3697: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test -n "$XGETTEXT"; then echo "$ac_t""$XGETTEXT" 1>&6 else echo "$ac_t""no" 1>&6 fi USE_INCLUDED_LIBINTL=yes CATOBJEXT=.cat INSTOBJEXT=.cat DATADIRNAME=lib INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi else echo "$ac_t""no" 1>&6 fi fi fi if test "$CATOBJEXT" = "NONE"; then nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then INTLOBJS="\$(GETTOBJS)" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3755: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test -n "$MSGFMT"; then echo "$ac_t""$MSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3789: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. ;; *) 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_path_GMSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:3825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test -n "$XGETTEXT"; then echo "$ac_t""$XGETTEXT" 1>&6 else echo "$ac_t""no" 1>&6 fi USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo INSTOBJEXT=.mo DATADIRNAME=share INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi # If this is used in GNU gettext we have to set USE_NLS to `yes' # because some of the sources are only built for this goal. if test "$PACKAGE" = gettext; then USE_NLS=yes USE_INCLUDED_LIBINTL=yes fi for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 echo "configure:3915: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS echo "$ac_t""$LINGUAS" 1>&6 fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi if test $ac_cv_header_locale_h = yes; then INCLUDE_LOCALE_H="#include " else INCLUDE_LOCALE_H="\ /* The system does not provide the header . Take care yourself. */" fi test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 echo "configure:3943: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3953: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 msgformat=linux else echo "$ac_t""no" 1>&6 msgformat=xopen fi sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed if test "$PACKAGE" = "gettext"; then GT_NO="#NO#" GT_YES= else GT_NO= GT_YES="#YES#" fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi l= test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES if test "$USE_INCLUDED_LIBINTL" = "yes"; then INTLDIR="-I../intl" fi LANG_SUBDIRS="fr" echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:4028: 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:4082: \"$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 echo $ac_n "checking for inline""... $ac_c" 1>&6 echo "configure:4103: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* done fi echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) ;; no) cat >> confdefs.h <<\EOF #define inline EOF ;; *) cat >> confdefs.h <&6 echo "configure:4143: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else rm -rf conftest* ac_cv_type_off_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_off_t" 1>&6 if test $ac_cv_type_off_t = no; then cat >> confdefs.h <<\EOF #define off_t long EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo "configure:4176: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF #define size_t unsigned EOF fi echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6 echo "configure:4209: checking for ptrdiff_t" >&5 if eval "test \"`echo '$''{'am_cv_type_ptrdiff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { ptrdiff_t p ; return 0; } EOF if { (eval echo configure:4221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_type_ptrdiff_t=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* am_cv_type_ptrdiff_t=no fi rm -f conftest* fi echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6 if test $am_cv_type_ptrdiff_t = yes; then cat >> confdefs.h <<\EOF #define HAVE_PTRDIFF_T 1 EOF fi search_ncurses=false has_curses=false # Check whether --with-ncurses or --without-ncurses was given. if test "${with_ncurses+set}" = set; then withval="$with_ncurses" if test "x$withval" = "xyes" then search_ncurses=true has_curses=true else LIBS="$LIBS -L$withval/lib -lncurses" CPPFLAGS="$CPPFLAGS -I$withval/include" search_ncurses=false has_curses=false cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then search_ncurses=true screen_manager="" has_curses=false CFLAGS=${CFLAGS--O} # Check whether --with-sco or --without-sco was given. if test "${with_sco+set}" = set; then withval="$with_sco" if test x$withval = xyes; then cat >> confdefs.h <<\EOF #define SCO_FLAVOR 1 EOF CFLAGS="$CFLAGS -D_SVID3" fi fi # Check whether --with-sunos-curses or --without-sunos-curses was given. if test "${with_sunos_curses+set}" = set; then withval="$with_sunos_curses" if test x$withval = xyes; then search_ncurses=false screen_manager="SunOS 4.x /usr/5include curses" echo "$ac_t""Using SunOS 4.x /usr/5include curses" 1>&6 cat >> confdefs.h <<\EOF #define USE_SUNOS_CURSES 1 EOF cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define NO_COLOR_CURSES 1 EOF cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF CURSES_INCLUDEDIR="-I/usr/5include" CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" echo "$ac_t""Please note that some screen refreshs may fail" 1>&6 fi fi # Check whether --with-osf1-curses or --without-osf1-curses was given. if test "${with_osf1_curses+set}" = set; then withval="$with_osf1_curses" if test x$withval = xyes; then echo "$ac_t""Using OSF1 curses" 1>&6 search_ncurses=false screen_manager="OSF1 curses" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define NO_COLOR_CURSES 1 EOF cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF CURSES_LIBS="-lcurses" fi fi # Check whether --with-vcurses or --without-vcurses was given. if test "${with_vcurses+set}" = set; then withval="$with_vcurses" if test x$withval != xyes; then CURSES_INCLUDEDIR="-I$withval" fi echo "$ac_t""Using SysV curses" 1>&6 cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF search_ncurses=false screen_manager="SysV/curses" CURSES_LIBS="-lcurses" fi # Check whether --with-ncurses or --without-ncurses was given. if test "${with_ncurses+set}" = set; then withval="$with_ncurses" if test x$withval = xno ; then search_ncurses=false elif test x$withval != xyes ; then CURSES_LIBS="$LIBS -L$withval/lib -lncurses" CURSES_INCLUDEDIR="-I$withval/include" search_ncurses=false screen_manager="ncurses" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true fi fi if $search_ncurses then echo "checking "location of ncurses.h file"" 1>&6 echo "configure:4409: checking "location of ncurses.h file"" >&5 if $search_ncurses then if test -f /usr/include/ncurses.h then echo "$ac_t""Found ncurses on /usr/include/ncurses.h" 1>&6 CURSES_LIBS="-lncurses" CURSES_INCLUDEDIR="" search_ncurses=false screen_manager="ncurses on /usr/include" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then if test -f /usr/include/ncurses/ncurses.h then echo "$ac_t""Found ncurses on /usr/include/ncurses/ncurses.h" 1>&6 CURSES_LIBS="-lncurses" CURSES_INCLUDEDIR="-I/usr/include/ncurses" search_ncurses=false screen_manager="ncurses on /usr/include/ncurses" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then if test -f /usr/local/include/ncurses.h then echo "$ac_t""Found ncurses on /usr/local/include/ncurses.h" 1>&6 CURSES_LIBS="-L/usr/local/lib -lncurses" CURSES_INCLUDEDIR="-I/usr/local/include" search_ncurses=false screen_manager="ncurses on /usr/local" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then if test -f /usr/local/include/ncurses/ncurses.h then echo "$ac_t""Found ncurses on /usr/local/include/ncurses/ncurses.h" 1>&6 CURSES_LIBS="-L/usr/local/lib -L/usr/local/lib/ncurses -lncurses" CURSES_INCLUDEDIR="-I/usr/local/include/ncurses" search_ncurses=false screen_manager="ncurses on /usr/local/include/ncurses" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then if test -f /usr/local/include/ncurses/curses.h then echo "$ac_t""Found ncurses on /usr/local/include/ncurses/curses.h" 1>&6 CURSES_LIBS="-L/usr/local/lib -lncurses" CURSES_INCLUDEDIR="-I/usr/local/include/ncurses -DRENAMED_NCURSES" search_ncurses=false screen_manager="renamed ncurses on /usr/local/.../ncurses" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then if test -f /usr/include/ncurses/curses.h then echo "$ac_t""Found ncurses on /usr/include/ncurses/curses.h" 1>&6 CURSES_LIBS="-lncurses" CURSES_INCLUDEDIR="-I/usr/include/ncurses -DRENAMED_NCURSES" search_ncurses=false screen_manager="renamed ncurses on /usr/include/ncurses" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if $search_ncurses then cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "init_color" >/dev/null 2>&1; then rm -rf conftest* echo "$ac_t""Using SysV curses" 1>&6 cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF search_ncurses=false screen_manager="SysV/curses" CURSES_LIBS="-lcurses" fi rm -f conftest* cat > conftest.$ac_ext < #ifdef __NCURSES_H #undef USE_NCURSES USE_NCURSES #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "USE_NCURSES" >/dev/null 2>&1; then rm -rf conftest* CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF search_ncurses=false screen_manager="ncurses installed as curses" fi rm -f conftest* fi if $search_ncurses then if test -f /usr/5include/curses.h then search_ncurses=false screen_manager="SunOS 4.x /usr/5include curses" echo "$ac_t""Using SunOS 4.x /usr/5include curses" 1>&6 cat >> confdefs.h <<\EOF #define USE_SUNOS_CURSES 1 EOF cat >> confdefs.h <<\EOF #define HAS_CURSES 1 EOF has_curses=true cat >> confdefs.h <<\EOF #define NO_COLOR_CURSES 1 EOF cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF CURSES_INCLUDEDIR="-I/usr/5include" CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" echo "$ac_t""Please note that some screen refreshs may fail" 1>&6 fi else # check for ncurses version, to properly ifdef mouse-fix echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 echo "configure:4640: checking for ncurses version" >&5 ncurses_version=unknown cat > conftest.$ac_ext < #else #include #endif #undef VERSION VERSION:NCURSES_VERSION EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "VERSION:" >conftest.out 2>&1; then ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` fi rm -rf conftest* echo "$ac_t""$ncurses_version" 1>&6 case "$ncurses_version" in 4.[01]) cat >> confdefs.h <<\EOF #define NCURSES_970530 2 EOF ;; 1.9.9g) cat >> confdefs.h <<\EOF #define NCURSES_970530 1 EOF ;; 1*) cat >> confdefs.h <<\EOF #define NCURSES_970530 0 EOF ;; esac fi fi fi if test "$has_curses" = "true"; then HAS_CURSES_TRUE= HAS_CURSES_FALSE='#' else HAS_CURSES_TRUE='#' HAS_CURSES_FALSE= fi # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 echo "configure:4704: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" : fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=NO ac_x_libraries=NO rm -fr conftestdir if mkdir conftestdir; then cd conftestdir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat > Imakefile <<'EOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; esac case "$ac_im_usrlibdir" in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; esac fi cd .. rm -fr conftestdir fi if test "$ac_x_includes" = NO; then # Guess where to find include files, by looking for this one X11 .h file. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:4771: \"$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* # We can compile using X headers with no special include directory. ac_x_includes= else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* # Look for the header file in a standard set of common directories. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ /usr/X386/include \ /usr/x386/include \ /usr/XFree86/include/X11 \ \ /usr/include \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ /usr/openwin/include \ /usr/openwin/share/include \ ; \ do if test -r "$ac_dir/$x_direct_test_include"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest* fi # $ac_x_includes = NO if test "$ac_x_libraries" = NO; then # Check for the libraries. test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. ac_x_libraries= else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ /usr/X386/lib \ /usr/x386/lib \ /usr/XFree86/lib/X11 \ \ /usr/lib \ /usr/local/lib \ /usr/unsupported/lib \ /usr/athena/lib \ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ /lib/usr/lib/X11 \ \ /usr/openwin/lib \ /usr/openwin/share/lib \ ; \ do for ac_extension in a so sl; do if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest* fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$ac_t""$have_x" 1>&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >> confdefs.h <<\EOF #define X_DISPLAY_MISSING 1 EOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo "configure:4953: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_nospace=no fi rm -f conftest* if test $ac_R_nospace = yes; then echo "$ac_t""no" 1>&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_space=no fi rm -f conftest* if test $ac_R_space = yes; then echo "$ac_t""yes" 1>&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$ac_t""neither works" 1>&6 fi fi LIBS="$ac_xsave_LIBS" esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo "configure:5018: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" else echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo "configure:5059: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else echo "$ac_t""no" 1>&6 fi fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo "configure:5107: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else gethostbyname(); #endif ; return 0; } EOF if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo "configure:5156: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else echo "$ac_t""no" 1>&6 fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:5205: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:5233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:5254: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" else echo "$ac_t""no" 1>&6 fi fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 echo "configure:5297: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else remove(); #endif ; return 0; } EOF if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_remove=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo "configure:5346: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" else echo "$ac_t""no" 1>&6 fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo "configure:5389: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else shmat(); #endif ; return 0; } EOF if { (eval echo configure:5417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shmat=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo "configure:5438: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" else echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS="$LDFLAGS" test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo "configure:5490: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else echo "$ac_t""no" 1>&6 fi LDFLAGS="$ac_save_LDFLAGS" fi if test "x$x_includes" = "x"; then x_includes="/usr/include" fi if test "x$no_x" = "xyes"; then { echo "configure: error: *** X libraries or include files not found. Check 'config.log' for *** more details." 1>&2; exit 1; } fi echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6 echo "configure:5543: checking for main in -lX11" >&5 ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lX11 -L$x_libraries $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 have_x11_lib=yes else echo "$ac_t""no" 1>&6 have_x11_lib=no fi if test "$have_x11_lib" = "yes"; then X_X11_LIB="-lX11" else X_X11_LIB="" fi X_X11_INC=$x_includes # Check whether --enable-ibtk-ckeck or --disable-ibtk-ckeck was given. if test "${enable_ibtk_ckeck+set}" = set; then enableval="$enable_ibtk_ckeck" : fi if test "$enable_ibtk_check" = "yes"; then ibtk_check=yes elif test "$enable_ibtk_check" = "no"; then ibtk_check=no else ibtk_check=yes fi if test "$ibtk_check" = "yes"; then IBTK_HEADER_FILES="ibox.h ibutton.h idialogs.h idodad.h igbox.h \ iintbox.h ilistbox.h irealbox.h isbutton.h islider.h \ istatbar.h itextbox.h iwindow.h pclaim.h version.h" case "$ArchRunning" in x86Linux) hdir="ibtk" ;; x86FreeBSD) hdir="/usr/local/include/ibtk" ;; x86NetBSD) hdir="/usr/local/include/ibtk" ;; *) { echo "configure: error: Unknown Arch" 1>&2; exit 1; } ;; esac for ibtkh in $IBTK_HEADER_FILES; do ac_safe=`echo "$hdir/$ibtkh" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $hdir/$ibtkh""... $ac_c" 1>&6 echo "configure:5633: checking for $hdir/$ibtkh" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext -I/usr/X11R6/include \ >/dev/null 2>conftest.out" { (eval echo configure:5644: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 have_ibtk_headers=yes else echo "$ac_t""no" 1>&6 \ { echo "configure: error: some IBTK headers missing... please check." 1>&2; exit 1; } fi done echo $ac_n "checking for main in -libtk""... $ac_c" 1>&6 echo "configure:5670: checking for main in -libtk" >&5 ac_lib_var=`echo ibtk'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-libtk -L$x_libraries -L/usr/lib -L/usr/local/lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 have_ibtk_lib=yes else echo "$ac_t""no" 1>&6 { echo "configure: error: libibtk not present. Xatitv will cannot compile." 1>&2; exit 1; } fi else echo $ac_n "checking disable IBTK header files/lib checking""... $ac_c" 1>&6 echo "configure:5708: checking disable IBTK header files/lib checking" >&5 have_ibtk_headers="not checked" have_ibtk_lib="not checked" echo "$ac_t""yes" 1>&6 fi XEXTLIBS="" XEXTFLAGS="" echo $ac_n "checking using DGA and VMODE extensions support""... $ac_c" 1>&6 echo "configure:5719: checking using DGA and VMODE extensions support" >&5 # Check whether --with-dga-vmode or --without-dga-vmode was given. if test "${with_dga_vmode+set}" = set; then withval="$with_dga_vmode" case "$withval" in no) echo "$ac_t""no" 1>&6 dga_vmode=no ;; *) echo "$ac_t""yes" 1>&6 dga_vmode=yes ;; esac else dga_vmode=yes echo "$ac_t""yes" 1>&6 fi use_dga_vmode=no if test "$dga_vmode" = "yes"; then ac_safe=`echo "X11/extensions/xf86dga.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/xf86dga.h""... $ac_c" 1>&6 echo "configure:5746: checking for X11/extensions/xf86dga.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext -I/usr/X11R6/include \ >/dev/null 2>conftest.out" { (eval echo configure:5757: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 have_dga_header=yes else echo "$ac_t""no" 1>&6 have_dga_header=no fi ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6 echo "configure:5782: checking for X11/extensions/xf86vmode.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext -I/usr/X11R6/include \ >/dev/null 2>conftest.out" { (eval echo configure:5793: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 have_vmode_header=yes else echo "$ac_t""no" 1>&6 have_vmode_header=no fi echo $ac_n "checking for main in -lXxf86dga""... $ac_c" 1>&6 echo "configure:5817: checking for main in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXxf86dga -L$x_libraries $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 have_dga_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86dga"; XEXTFLAGS="$XEXTFLAGS -DUSE_DGA" else echo "$ac_t""no" 1>&6 have_dga_lib=no fi echo $ac_n "checking for main in -lXxf86vm""... $ac_c" 1>&6 echo "configure:5856: checking for main in -lXxf86vm" >&5 ac_lib_var=`echo Xxf86vm'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXxf86vm -L$x_libraries $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 have_vmode_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86vm"; XEXTFLAGS="$XEXTFLAGS -DUSE_VMODE" else echo "$ac_t""no" 1>&6 have_vmode_lib=no fi if test "$have_dga_header" = "yes"; then if test "$have_dga_lib" = "yes" ; then if test "$have_vmode_header" = "yes" ; then if test "$have_vmode_lib" = "yes" ; then use_dga_vmode=yes XEXTLIBS="$XEXTLIBS -lXext" fi fi fi fi fi echo $ac_n "checking using IPC shared memory""... $ac_c" 1>&6 echo "configure:5911: checking using IPC shared memory" >&5 # Check whether --with-shm or --without-shm was given. if test "${with_shm+set}" = set; then withval="$with_shm" case "$withval" in no) echo "$ac_t""no" 1>&6 shm=no ;; *) echo "$ac_t""yes" 1>&6 shm=yes ;; esac else shm=no echo "$ac_t""no" 1>&6 fi if test "$shm" = "yes"; then USE_SHM="-DUSE_SHM" fi echo $ac_n "checking using IPC messages""... $ac_c" 1>&6 echo "configure:5941: checking using IPC messages" >&5 # Check whether --with-ipc or --without-ipc was given. if test "${with_ipc+set}" = set; then withval="$with_ipc" case "$withval" in no) echo "$ac_t""no" 1>&6 ipcmsg=no ;; *) echo "$ac_t""yes" 1>&6 ipcmsg=yes ;; esac else ipcmsg=no echo "$ac_t""no" 1>&6 fi if test "$ipcmsg" = "yes"; then USE_IPC="-DUSE_IPC" fi HASH_CHARS="" echo $ac_n "checking enable CHAR HASHING""... $ac_c" 1>&6 echo "configure:5972: checking enable CHAR HASHING" >&5 # Check whether --enable-hash-chars or --disable-hash-chars was given. if test "${enable_hash_chars+set}" = set; then enableval="$enable_hash_chars" case "$enableval" in yes) hash_chars=yes echo "$ac_t""yes" 1>&6 ;; no) hash_chars=no echo "$ac_t""no" 1>&6 ;; *) { echo "configure: error: bad value ${enableval} for hash-chars option" 1>&2; exit 1; } ;; esac else echo "$ac_t""yes" 1>&6 hash_chars=yes fi if test "$hash_chars" = "yes"; then HASH_CHARS="-DHASH_CHARS" fi RAW_OUTPUT="" echo $ac_n "checking output RAW CC""... $ac_c" 1>&6 echo "configure:6003: checking output RAW CC" >&5 # Check whether --enable-raw-cc or --disable-raw-cc was given. if test "${enable_raw_cc+set}" = set; then enableval="$enable_raw_cc" case "$enableval" in yes) raw_cc=yes echo "$ac_t""yes" 1>&6 ;; no) raw_cc=no echo "$ac_t""no" 1>&6 ;; *) { echo "configure: error: bad value ${enableval} for raw-cc option" 1>&2; exit 1; } ;; esac else echo "$ac_t""no" 1>&6 raw_cc=no fi if test "$raw_cc" = "yes"; then RAW_OUTPUT="-DCCTEST" fi echo $ac_n "checking output RAW EDS""... $ac_c" 1>&6 echo "configure:6029: checking output RAW EDS" >&5 # Check whether --enable-raw-eds or --disable-raw-eds was given. if test "${enable_raw_eds+set}" = set; then enableval="$enable_raw_eds" case "$enableval" in yes) raw_eds=yes echo "$ac_t""yes" 1>&6 ;; no) echo "$ac_t""no" 1>&6 raw_eds=no ;; *) { echo "configure: error: bad value ${enableval} for raw-eds option" 1>&2; exit 1; } ;; esac else echo "$ac_t""no" 1>&6 raw_eds=no fi if test "$raw_eds" = "yes"; then RAW_OUTPUT="-DCCTEST -DEDSTEST" fi if test "$raw_cc" = "yes"; then if test "$raw_eds" = "yes"; then { echo "configure: error: raw cc or raw eds can't be enabled as same time !" 1>&2; exit 1; } fi fi echo $ac_n "checking using DELAY from the Linux/(Free/Net)BSD kernel sources""... $ac_c" 1>&6 echo "configure:6065: checking using DELAY from the Linux/(Free/Net)BSD kernel sources" >&5 # Check whether --with-kernel-delay or --without-kernel-delay was given. if test "${with_kernel_delay+set}" = set; then withval="$with_kernel_delay" case "$withval" in no) echo "$ac_t""no" 1>&6 kernel_delay=false ;; *) echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define WITH_KERNEL_DELAY 1 EOF kernel_delay=true ;; esac else echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define WITH_KERNEL_DELAY 1 EOF kernel_delay=true fi if test "$kernel_delay" = "true"; then WITH_KERNEL_DELAY_TRUE= WITH_KERNEL_DELAY_FALSE='#' else WITH_KERNEL_DELAY_TRUE='#' WITH_KERNEL_DELAY_FALSE= fi echo $ac_n "checking using the OSS sound emulation in NetBSD""... $ac_c" 1>&6 echo "configure:6106: checking using the OSS sound emulation in NetBSD" >&5 # Check whether --with-ossemu or --without-ossemu was given. if test "${with_ossemu+set}" = set; then withval="$with_ossemu" case "$withval" in yes) if test "$ArchRunning" != "x86NetBSD"; then { echo "configure: error: Only available in NetBSD!" 1>&2; exit 1; } else echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define WITH_OSSEMU 1 EOF netbsd_ossemu=yes fi ;; *) echo "$ac_t""no" 1>&6 netbsd_ossemu=no ;; esac else echo "$ac_t""no" 1>&6 netbsd_ossemu=no fi if test "$netbsd_ossemu" = "yes"; then WITH_OSSEMU_TRUE= WITH_OSSEMU_FALSE='#' else WITH_OSSEMU_TRUE='#' WITH_OSSEMU_FALSE= fi case "$ArchRunning" in x86Linux|x86FreeBSD) NOPADS="-N" ;; x86NetBSD) echo "$ac_t""running NetBSD: add special shared-library system" 1>&6 NETBSD_EXTRA="-Wl,-R/usr/X11R6/lib" NOPADS="" ;; esac 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 DEFS=-DHAVE_CONFIG_H # 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 " gatos.spec Makefile SlackBuild docs/Makefile gfxdump/Makefile intl/Makefile m4/Makefile man/Makefile man/en/Makefile man/fr/Makefile po/Makefile po/fr/Makefile po/model/Makefile src/Makefile src/version.h tech-docs/Makefile config.h" | 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%@GATOS_MAJOR_VERSION@%$GATOS_MAJOR_VERSION%g s%@GATOS_MINOR_VERSION@%$GATOS_MINOR_VERSION%g s%@GATOS_SUB_VERSION@%$GATOS_SUB_VERSION%g s%@GATOS_VERSION@%$GATOS_VERSION%g s%@SPEC_VERSION@%$SPEC_VERSION%g s%@SPEC_CVS_VERSION@%$SPEC_CVS_VERSION%g s%@IBTK_REQUIRED_VERSION@%$IBTK_REQUIRED_VERSION%g s%@TAR_NAME@%$TAR_NAME%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%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%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@CPP@%$CPP%g s%@RANLIB@%$RANLIB%g s%@LN_S@%$LN_S%g s%@build@%$build%g s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@LD@%$LD%g s%@NM@%$NM%g s%@LIBTOOL@%$LIBTOOL%g s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g s%@STATIC@%$STATIC%g s%@ALLOCA@%$ALLOCA%g s%@USE_NLS@%$USE_NLS%g s%@MSGFMT@%$MSGFMT%g s%@GMSGFMT@%$GMSGFMT%g s%@XGETTEXT@%$XGETTEXT%g s%@GENCAT@%$GENCAT%g s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g s%@CATALOGS@%$CATALOGS%g s%@CATOBJEXT@%$CATOBJEXT%g s%@DATADIRNAME@%$DATADIRNAME%g s%@GMOFILES@%$GMOFILES%g s%@INSTOBJEXT@%$INSTOBJEXT%g s%@INTLDEPS@%$INTLDEPS%g s%@INTLLIBS@%$INTLLIBS%g s%@INTLOBJS@%$INTLOBJS%g s%@POFILES@%$POFILES%g s%@POSUB@%$POSUB%g s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g s%@GT_NO@%$GT_NO%g s%@GT_YES@%$GT_YES%g s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g s%@l@%$l%g s%@INTLDIR@%$INTLDIR%g s%@LANG_SUBDIRS@%$LANG_SUBDIRS%g s%@CURSES_LIBS@%$CURSES_LIBS%g s%@CURSES_INCLUDEDIR@%$CURSES_INCLUDEDIR%g s%@HAS_CURSES_TRUE@%$HAS_CURSES_TRUE%g s%@HAS_CURSES_FALSE@%$HAS_CURSES_FALSE%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@X_X11_LIB@%$X_X11_LIB%g s%@X_X11_INC@%$X_X11_INC%g s%@XEXTLIBS@%$XEXTLIBS%g s%@XEXTFLAGS@%$XEXTFLAGS%g s%@USE_SHM@%$USE_SHM%g s%@USE_IPC@%$USE_IPC%g s%@HASH_CHARS@%$HASH_CHARS%g s%@RAW_OUTPUT@%$RAW_OUTPUT%g s%@WITH_KERNEL_DELAY_TRUE@%$WITH_KERNEL_DELAY_TRUE%g s%@WITH_KERNEL_DELAY_FALSE@%$WITH_KERNEL_DELAY_FALSE%g s%@WITH_OSSEMU_TRUE@%$WITH_OSSEMU_TRUE%g s%@WITH_OSSEMU_FALSE@%$WITH_OSSEMU_FALSE%g s%@NETBSD_EXTRA@%$NETBSD_EXTRA%g s%@NOPADS@%$NOPADS%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* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; 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 echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # 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" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF srcdir=$ac_given_srcdir while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* echo "linking $srcdir/$ac_source to $ac_dest" if test ! -r $srcdir/$ac_source; then { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } fi rm -f $ac_dest # Make relative symlinks. # Remove last slash and all that follows it. Not all systems have dirname. ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then # The dest file is in a subdirectory. test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dest_dir_suffix. ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dest_dir_suffix= ac_dots= fi case "$srcdir" in [/$]*) ac_rel_source="$srcdir/$ac_source" ;; *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; esac # Make a symlink if possible; otherwise try a hard link. if ln -s $ac_rel_source $ac_dest 2>/dev/null || ln $srcdir/$ac_source $ac_dest; then : else { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } fi done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h 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 chmod +x ./SlackBuild rm -f man/en/atitv.1 man/en/gatos.conf.1 man/en/xatitv.1 rm -f man/fr/atitv.1 man/fr/gatos.conf.1 man/fr/xatitv.1 echo " GATOS Configuration: " echo " -Build version: ${GATOS_VERSION} -Use included INTL lib: ${USE_INCLUDED_LIBINTL}" if test "$has_curses" = "true"; then echo " -Use NCURSES lib: yes" else echo " -Use NCURSES lib: no" fi echo " -IBTK headers present: ${have_ibtk_headers} -IBTK lib present: ${have_ibtk_lib} -DGA & VMODE enable: ${use_dga_vmode} -IPC shared memory: ${shm} -IPC messages: ${ipcmsg} -Hash Chars enable: ${hash_chars} -RAW CC enable: ${raw_cc} -RAW EDS enable: ${raw_eds}" if test "$kernel_delay" = "true"; then echo " -Delay from: kernel sources" else echo " -Delay from: i2c.c file" fi echo " -NetBSD OSS emulation: ${netbsd_ossemu}" echo "" gatos-0.0.5/configure.in0100644002411700123110000002353307030240376013612 0ustar bayleasrdnl dnl Configure.in for Gatos package dnl dnl ########################################################################### dnl Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, dnl Vladimir Dergachev and Christian Lupien. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a configuration dnl script generated by Autoconf, you may include it under the same dnl distribution terms that you use for the rest of that program. dnl ########################################################################### dnl # Additional notes. dnl ########################################################################### dnl # IMPORTANT: dnl # libgatos is builded as static by default for now. See AM_DISABLE_SHARED dnl # NOTE: building shared lib not functionnaly yet, i've got some problems dnl # with delay.S (__do_delay) dnl ########################################################################### dnl # 04-10-99: Some changes for FreeBSD/NetBSD support. DCB dnl # -ibtk header files checks as changed, see m4/gatos.m4. dnl # -Add for NetBSD some extra parameters for GCC/G++/LD dnl # NETBSD_OSS and NETBSD_EXTRA dnl # 07-10-99: Add --with-ossemu (only in NetBSD), remove the the old dnl # behavior of NETBSD_OSS. I do this for *futur* native dnl # sound support of NetBSD. dnl # dnl ########################################################################### dnl # next ? dnl ########################################################################### dnl dnl AC_INIT(src/xatitv.cpp) dnl dnl Required Autoconf Version 2.13 dnl AC_PREREQ(2.13) dnl dnl Force sysconfdir=/etc if no --sysconfdir=xxx passed dnl if test $sysconfdir = $\{prefix\}/etc; then sysconfdir=/etc fi dnl dnl Define GATOS version(s) and requirement dnl GATOS_MAJOR_VERSION=0 GATOS_MINOR_VERSION=0 GATOS_SUB_VERSION=5 dnl dnl Is this a CVS source tree ? dnl (must be set to true/false *downcase only*) dnl CVS_VERSION=false dnl dnl Define minimal ibtk version requirement (*magic* eight digits key). dnl - define like this: dnl if required version is 0.0.4-pre5, put "00000405", dnl if required is 1.2.3 no pre-version, put "01020300". dnl (major, minor, sub and pre version *must* dnl be set with two digits, add 0 before single dnl digit, if not this doesn't work). dnl IBTK_REQUIRED_VERSION="00001400" if test "$CVS_VERSION" = "true"; then GATOS_CVS_VERSION="-CVS-`cat CVSVERSION`" SPEC_CVS_VERSION="CVS.`cat CVSVERSION`" else SPEC_CVS_VERSION="Release" fi GATOS_VERSION=$GATOS_MAJOR_VERSION.$GATOS_MINOR_VERSION.$GATOS_SUB_VERSION$GATOS_CVS_VERSION SPEC_VERSION=$GATOS_MAJOR_VERSION.$GATOS_MINOR_VERSION.$GATOS_SUB_VERSION TAR_NAME="gatos-"$GATOS_VERSION VERSION=$GATOS_VERSION PACKAGE=gatos AC_SUBST(GATOS_MAJOR_VERSION) AC_SUBST(GATOS_MINOR_VERSION) AC_SUBST(GATOS_SUB_VERSION) AC_SUBST(GATOS_VERSION) AC_SUBST(SPEC_VERSION) AC_SUBST(SPEC_CVS_VERSION) AC_SUBST(IBTK_REQUIRED_VERSION) AC_SUBST(TAR_NAME) AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) AC_SUBST(VERSION) AM_INIT_AUTOMAKE($PACKAGE,$VERSION) dnl AM_MAINTAINER_MODE dnl comment this for release version AM_CONFIG_HEADER(config.h) dnl dnl Tests for host|system dnl AC_CANONICAL_HOST case "$host" in i386-*-linux*) AC_MSG_ERROR(--- Argll !!) ;; i486-*-linux*|i586-*-linux*|i686-*-linux*) AC_MSG_RESULT(--- Running Linux !!) ArchRunning="x86Linux" ;; i386-*-freebsd*|i486-*-freebsd*|i586-*-freebsd*|i686-*-freebsd*) AC_MSG_RESULT(--- Running FreeBSD) ArchRunning="x86FreeBSD" ;; i386-*-netbsd*|i486-*-netbsd*|i586-*-netbsd*|i686-*-netbsd*) AC_MSG_RESULT(--- Running NetBSD) ArchRunning="x86NetBSD" ;; *) AC_MSG_ERROR(--- Wow, it's only work under Linux, FreeBSD and NetBSD !!) esac dnl dnl Checks for programs. dnl AC_ISC_POSIX AC_PROG_CC AC_PROG_CXX AC_STDC_HEADERS AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LN_S dnl dnl Libtool dnl AC_LIBTOOL_DLOPEN AM_DISABLE_SHARED dnl Comment this for build shared *not yet functionnal* AM_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then STATIC="-static" else STATIC= fi AC_SUBST(STATIC) dnl dnl Set of available languages. dnl ALL_LINGUAS="" AM_GNU_GETTEXT AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) if test "$USE_INCLUDED_LIBINTL" = "yes"; then INTLDIR="-I../intl" fi dnl dnl po files must be translate: dnl see TODO file dnl LANG_SUBDIRS="fr" AC_SUBST(INTLDIR) AC_SUBST(LANG_SUBDIRS) dnl dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_C_CONST AC_C_INLINE AC_TYPE_OFF_T AC_TYPE_SIZE_T AM_TYPE_PTRDIFF_T dnl dnl Check for using ncurses lib dnl search_ncurses=false has_curses=false AC_ARG_WITH(ncurses, [ --with-ncurses[=base-dir] compile with ncurses/locate base dir], if test "x$withval" = "xyes" then search_ncurses=true has_curses=true else LIBS="$LIBS -L$withval/lib -lncurses" CPPFLAGS="$CPPFLAGS -I$withval/include" search_ncurses=false has_curses=false AC_DEFINE(USE_NCURSES) fi ) if $search_ncurses then AC_CHECK_CURSES fi AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = "true") AC_SUBST(CURSES_INCLUDEDIR) AC_SUBST(CURSES_LIBS) dnl dnl Checks for X stuff dnl AC_PATH_X AC_PATH_XTRA if test "x$x_includes" = "x"; then x_includes="/usr/include" fi if test "x$no_x" = "xyes"; then AC_MSG_ERROR([ *** X libraries or include files not found. Check 'config.log' for *** more details.]) fi dnl Check for X11 lib AC_CHECK_LIB(X11, main, have_x11_lib=yes, have_x11_lib=no, -L$x_libraries) if test "$have_x11_lib" = "yes"; then X_X11_LIB="-lX11" else X_X11_LIB="" fi X_X11_INC=$x_includes AC_SUBST(X_X11_LIB) AC_SUBST(X_X11_INC) dnl dnl ################################################## dnl ############### GATOS STUFF ################## dnl ################################################## dnl dnl dnl Checks for IBTK headers and lib dnl IBTK_CHECK dnl see in m4/gatos.m4 if test "$ibtk_check" = "yes"; then AM_INCLUDES_IBTK dnl see in m4/gatos.m4 AM_LIB_IBTK dnl see in m4/gatos.m4 else AC_MSG_CHECKING(disable IBTK header files/lib checking) have_ibtk_headers="not checked" have_ibtk_lib="not checked" AC_MSG_RESULT(yes) fi dnl dnl Checking for X86DGA and X86VMODE headers and libs dnl GATOS_DGA_VMODE dnl see in m4/gatos.m4 dnl dnl Checking for IPC shared memory dnl GATOS_SHM dnl see in m4/gatos.m4 dnl dnl Checking for IPC messages dnl GATOS_IPC dnl see in m4/gatos.m4 dnl dnl Enabling char hashing dnl GATOS_HASH_CHARS dnl see in m4/gatos.m4 dnl dnl Enabling RAW CC and EDS mode dnl GATOS_RAW_CC_EDS dnl see in m4/gatos.m4 dnl dnl Settings for delay dnl GATOS_I2C_DELAY dnl see in m4/gatos.m4 dnl dnl Settings for NetBSD OSS sound emulation dnl GATOS_SOUND_OSSEMU dnl see in m4/gatos.m4 dnl dnl Extra Libs (for xatitv and atitv) dnl Extra LD flag (NOPADS) dnl -N for Linux/FreeBSD. On NetBSD, the no dnl page-align the data segment by ld crash. dnl case "$ArchRunning" in x86Linux|x86FreeBSD) NOPADS="-N" ;; x86NetBSD) AC_MSG_RESULT(running NetBSD: add special shared-library system) NETBSD_EXTRA="-Wl,-R/usr/X11R6/lib" NOPADS="" ;; esac AC_SUBST(NETBSD_EXTRA) AC_SUBST(NOPADS) dnl dnl Output configuration files dnl AC_OUTPUT([ gatos.spec Makefile SlackBuild docs/Makefile gfxdump/Makefile intl/Makefile m4/Makefile man/Makefile man/en/Makefile man/fr/Makefile po/Makefile po/fr/Makefile po/model/Makefile src/Makefile src/version.h tech-docs/Makefile ]) dnl dnl Change attribute. dnl chmod +x ./SlackBuild dnl dnl Delete some man pages (will be created dynamically dnl rm -f man/en/atitv.1 man/en/gatos.conf.1 man/en/xatitv.1 rm -f man/fr/atitv.1 man/fr/gatos.conf.1 man/fr/xatitv.1 dnl dnl Display some summary infos dnl echo " GATOS Configuration: " dnl if test $gatos_shared = true; then dnl echo " -Build libgatos as shared." dnl else dnl echo " -Build libgatos as static." dnl fi echo " -Build version: ${GATOS_VERSION} -Use included INTL lib: ${USE_INCLUDED_LIBINTL}" if test "$has_curses" = "true"; then echo " -Use NCURSES lib: yes" else echo " -Use NCURSES lib: no" fi echo " -IBTK headers present: ${have_ibtk_headers} -IBTK lib present: ${have_ibtk_lib} -DGA & VMODE enable: ${use_dga_vmode} -IPC shared memory: ${shm} -IPC messages: ${ipcmsg} -Hash Chars enable: ${hash_chars} -RAW CC enable: ${raw_cc} -RAW EDS enable: ${raw_eds}" if test "$kernel_delay" = "true"; then echo " -Delay from: kernel sources" else echo " -Delay from: i2c.c file" fi echo " -NetBSD OSS emulation: ${netbsd_ossemu}" echo "" gatos-0.0.5/gatos.spec.in0100644002411700123110000002324407027767314013712 0ustar bayleasr# Note that this is NOT a relocatable package %define ver @SPEC_VERSION@ %define rel @SPEC_CVS_VERSION@ %define prefix @prefix@ Name: gatos Summary: General ATI TV and Overlay Software Version: %ver Release: %rel Copyright: GPL Requires: ibtk Group: Applications/Graphics Source0: http://www.core.binghamton.edu/~insomnia/gatos/ Source1: @TAR_NAME@.tar.gz URL: http://www.core.binghamton.edu/~insomnia/gatos/ %description GATOS (the General ATI TV and Overlay Software) is an effort to create standard drivers for all currently unsupported features of ATI video cards, specifically TV features. Included with this package are: xatitv, atitv, yuvsum, atitoppm, atitogif, atitojpg, atisplit and gatos-conf. %setup -b 1 -T %build cd ../SOURCES tar xzvf @TAR_NAME@.tar.gz cd @TAR_NAME@ ./configure make %install cd @TAR_NAME@ make install %clean cd ../SOURCES rm -rf @TAR_NAME@ %post echo "******************************************" echo "* Please check you configuration file... *" echo "* See gatos.conf man page *" echo "******************************************" %files %{prefix}/bin/atisplit %{prefix}/bin/atitogif %{prefix}/bin/atitojpg %{prefix}/bin/atitoppm %{prefix}/bin/atitv %{prefix}/bin/gatos-conf %{prefix}/bin/scanpci %{prefix}/bin/xatitv %{prefix}/bin/yuvsum ## %{prefix}/lib/gatos.config.sample %{prefix}/lib/libgatos.a %{prefix}/lib/libgatos.la ## %{prefix}/lib/libgatos.so.@GATOS_MAJOR_VERSION@.@GATOS_MINOR_VERSION@.@GATOS_SUB_VERSION@ %{prefix}/include/gatos/*.h %{prefix}/man/man1/atisplit.1 %{prefix}/man/man1/atitojpg.1 %{prefix}/man/man1/atitv.1 %{prefix}/man/man1/gatos.conf.1 %{prefix}/man/man1/xatitv.1 %{prefix}/man/man1/atitogif.1 %{prefix}/man/man1/atitoppm.1 %{prefix}/man/man1/gatos.1 %{prefix}/man/man1/scanpci.1 %{prefix}/man/man1/yuvsum.1 %{prefix}/man/fr/man1/atisplit.1 %{prefix}/man/fr/man1/atitojpg.1 %{prefix}/man/fr/man1/atitv.1 %{prefix}/man/fr/man1/gatos.conf.1 %{prefix}/man/fr/man1/xatitv.1 %{prefix}/man/fr/man1/atitogif.1 %{prefix}/man/fr/man1/atitoppm.1 %{prefix}/man/fr/man1/gatos.1 %{prefix}/man/fr/man1/scanpci.1 %{prefix}/man/fr/man1/yuvsum.1 %{prefix}/share/locale/fr/LC_MESSAGES/atisplit.mo %{prefix}/share/locale/fr/LC_MESSAGES/atitogif.mo %{prefix}/share/locale/fr/LC_MESSAGES/atitojpg.mo %{prefix}/share/locale/fr/LC_MESSAGES/atitoppm.mo %{prefix}/share/locale/fr/LC_MESSAGES/gatos.mo %{prefix}/share/locale/fr/LC_MESSAGES/yuvsum.mo %doc /usr/doc/@PACKAGE@-@SPEC_VERSION@/CREDITS /usr/doc/@PACKAGE@-@SPEC_VERSION@/README.atisplit /usr/doc/@PACKAGE@-@SPEC_VERSION@/gatos.conf.sample /usr/doc/@PACKAGE@-@SPEC_VERSION@/CREDITS.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/README.atisplit.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/gatos.conf.sample.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/PATCHES /usr/doc/@PACKAGE@-@SPEC_VERSION@/XF86Config.sample /usr/doc/@PACKAGE@-@SPEC_VERSION@/PATCHES.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/XF86Config.sample.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.ati /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.bt829 /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.extra /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.fi12xx /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.gatos /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.i2c %changelog * Tue Dec 21 1999 daniel GATOS-0.0.5 released: -Many bugfixes. -Added double-click full-screen toggle. -Moved default gatos.conf location to /etc. -Correctly ignore many inputs in DGA fullscreen mode. -Added -s (capture size) option to atitv. -Snapshots from atitv and xatitv are now directly to ppm files. -Automatically run gatos-conf in xatitv if gatos.conf is not found. -Added gatos-conf GUI configuration utility. -Corrected TV/FM Audio Mixup BUG. -Added standard channel frequency support. -Added ipc playback synchronization (DISABLED). -Added shared memory detection of multiple instances (DISABLED). -Set a sanity minimum zoom limit of 16x10 pixels. -Corrected Rage PRO MPP/ImpacTV I2C driver init bug. -Corrected interpretation of Rage128 BIOS data, new tuner types added. -TDA9850 register dump corrected (regs cannot be read, so cheat :-). -Autodetection of Video RAM, value in gatos.conf ignored. -Rage128 support (not prefected yet, but getting there ...). -Fixed doublescan mode error and some cropping/panning problems. -Framework for Rage128 support. -Modified mpp_wait to work with tvout. -Split gatos_init and ati_init in 2 blocks to allow partial initialization (skip capture/tuner related init). -Fixed "spilled AX" error with gcc 2.95 and newer. -Added nls support. Currently only English and French. -Added GNU autoconf support to enable FreeBSD support, bug circumventing, intl support, etc.... -Added delay to atitv's "snap" command to fix frame tearing. -Back up .gatosrc to .gatosrc.old when overwriting. -Set permissions in atito[gif|jpg] to 644 when saving. -Fixed "double verticle size with only have visible" BUG. -Made "always on top" wars less intense. -Added fixed-aspect-ratio support to cropping/panning/zooming. -Added cropping/panning/zooming support. Should do something about it in DGA mode in xatitv... GATOS-0.0.4 released: -Fixed ibtk + RedHat-6.0 conflict (renamed itk to ibtk). -Removed unneeded curses requirement. -Fixed MPP failure BUG. -Fixed Rage-Pro sound BUG. -Picture Carrier frequency changed from 58.75 to 45.75 MHz for NTSC-Japan. Anyone using NTSC-Japan will have to increase the channel list frequencies in .gatosrc by 13 MHz (to the correct value). -Unified all 5 I2C Bus Drivers, files i2csw.* and i2cmpp.* are all gone, and code is in i2c.* -vdelay value changed in bt829.c for SECAM. Also changed in PAL for PAL+SECAM combo tuner. -New program atitojpg. -Report gatos.bugfix_mppread value if non-zero. -Fixed ImpacTV I2C bus driver (?). -Added tvout.h and tvout.c (first attempt at ImpacTV driver). Contains only register dumper and routines needed for the ImpacTV I2C Bus Driver (i2cmpp.c). -New i2cmpp.h and i2cmpp.c ImpacTV I2C Bus Driver, uses new ImpacTV interface. Old driver is in i2cmpp.h.old and i2cmpp.c.old. -Start using the OVERLAY_EXCLUSIVE registers (exclusive video region that doesn't check the colorkey). -Add volatile to the casted pointers in atiregs.h. -Better message for EEPROMs w/checksum error, program TDA9850 chip anyway even if EEPROM has checksum error. -Change Overlay Scaler clock limit to 125 MHz for Rage PRO's. GATOS-0.0.3 released: -"Internal Audio" gone. Now can pick any mixer in setup. -Added "Always on Top" feature. May have "Fight for Top" problems. -Fixed channel change static. -Monitor dotclock limit issue fixed. Included option to "Overclock" and attempt to exceed this limit before reducing the overlay clock. -Brought back atitv app. -Channel wrapping in xatitv. -Many GUI enhancements and user features in xatitv. -Check amount of video ram reported in MEM_CNTL register against value from gatos.conf. -Always report address of registers (separate or framebuffer+0x007FF800). -Can now toggle GUI by pressing any mouse button except the left on any area not occupied by an IBTK control. -Better error messages for hardware detection. -Added debugging test inputs to setup for development purposes. -Now maps ATI chip registers in framebuffer if no separate register aperture is detected. -Fixed libc5 compilation (sys/perm.h errors). -Lowlevel changes to support souncardless operation with sound. -PLL clock registers added to ati_dumpregs(). -Tuner type taken from BIOS data if not present in boardinfo. -New functions in board.c: board_set{mux,vol,mute,stereo,sap} and board_has{vol,stereo,sap}. -Logic in bt829_init() changed. -i2c.[ch]: MAXI2CDRIVER is number of I2C driver interfaces. -Set biosaddress to 0x000C0000 if no PCI BIOS ROM. -Interface to external state variables improved. -Detailed ATI device ID for improved I2C driver selection. -I2C driver chosen from above info if not set in gatos.conf. -Copied Alps tuner 18->12. ATI sample code says it's 0x12 (not 12), but that could be wrong, so will keep both for now. -Added "-pci addr" option to xatitv to enable override of pciaddr in gatos.conf. -Added more ATI device IDs, including four Rage 128s. -Desktop mode. Activate in setup and it'll be used when window is iconified. -Full-screen mode finished, DGA mode optional (in Setup). Use Keypad "*" to toggle full-screen. -Mute button moved to primary GUI. -GPIO/MPP fixed. Should now work on (almost) all cards. -Removes incorrect error message if ~/.gatosrc is not present. -Fixes soundcardless operation. -Fixes soundcardless operation with direct speakers. -Capture buffer width limited by ATI chip Overlay Scaler capability. -Completed (I hope) support for more than one ATI card. Card can be selected by setting "pciaddr" in gatos.conf. -Improved Capture Board detection and control. board.c (new) handles capture boards and audio chips, and sound.c now only handles audio ioctl's. -ATI Rage PRO (i2cpro.c) and GP_IO based (i2cgpio.c) I2C drivers unified to i2csw.c (new), and two more I2C drivers implemented. I2C modes renumbered to follow ATI sample code: old 0 is now 3, old 1 is now 2, old 3 is now 5. -I2C driver initalization improved, now polls for tuner(s) instead of Bt829's (which can be disabled). -Tuner type autodetected from Capture Board info or ATI card BIOS. -Tuner bandselect byte setting logic changed. -Bt829 VPOLE setting logic changed. -Fixed main return value in atito*. -Minor changes (mostly cosmetic) here and there. GATOS-0.0.2: Version number 0.0.2 skipped to avoid confusion GATOS 0.0.1 released: -First release. gatos-0.0.5/install-sh0100755002411700123110000001273606765053731013323 0ustar bayleasr#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 gatos-0.0.5/ltconfig0100755002411700123110000026120607011544303013031 0ustar bayleasr#! /bin/sh # ltconfig - Create a system-specific libtool. # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A lot of this script is taken from autoconf-2.10. # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} echo=echo if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec "$SHELL" "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null`} case X$UNAME in *-DOS) PATH_SEPARATOR=';' ;; *) PATH_SEPARATOR=':' ;; esac fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi if test "X${echo_test_string+set}" != "Xset"; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then break fi done fi if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running ltconfig again with it. ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf "%s\n"' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # Cool, printf works : elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # The name of this program. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool VERSION=1.3 TIMESTAMP=" (1.385.2.117 1999/04/29 13:07:13)" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." # Global variables: default_ofile=libtool can_build_shared=yes enable_shared=yes # All known linkers require a `.a' archive for static linking. enable_static=yes enable_fast_install=yes enable_dlopen=unknown enable_win32_dll=no ltmain= silent= srcdir= ac_config_guess= ac_config_sub= host= nonopt= ofile="$default_ofile" verify_host=yes with_gcc=no with_gnu_ld=no need_locks=yes ac_ext=c objext=o libext=a cache_file= old_AR="$AR" old_CC="$CC" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" old_LD="$LD" old_LN_S="$LN_S" old_LIBS="$LIBS" old_NM="$NM" old_RANLIB="$RANLIB" old_DLLTOOL="$DLLTOOL" old_OBJDUMP="$OBJDUMP" old_AS="$AS" # Parse the command line options. args= prev= for option do case "$option" in -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then eval "$prev=\$option" prev= continue fi case "$option" in --help) cat <&2 echo "$help" 1>&2 exit 1 ;; *) if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi host="$option" else echo "$progname: too many arguments" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac done if test -z "$ltmain"; then echo "$progname: you must specify a LTMAIN file" 1>&2 echo "$help" 1>&2 exit 1 fi if test ! -f "$ltmain"; then echo "$progname: \`$ltmain' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi # Quote any args containing shell metacharacters. ltconfig_args= for arg do case "$arg" in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ltconfig_args="$ltconfig_args '$arg'" ;; *) ltconfig_args="$ltconfig_args $arg" ;; esac done # A relevant subset of AC_INIT. # 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 # 5 compiler messages saved in config.log # 6 checking for... messages and results if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>>./config.log # NLS nuisances. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" . $cache_file fi 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 if test -z "$srcdir"; then # Assume the source directory is the same one as the path to LTMAIN. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi trap "$rm conftest*; exit 1" 1 2 15 if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/config.guess; then ac_aux_dir=$ac_dir break fi done if test -z "$ac_aux_dir"; then echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 echo "$help" 1>&2 exit 1 fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub # Make sure we can run config.sub. if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : else echo "$progname: cannot run $ac_config_sub" 1>&2 echo "$help" 1>&2 exit 1 fi echo $ac_n "checking host system type""... $ac_c" 1>&6 host_alias=$host case "$host_alias" in "") if host_alias=`$SHELL $ac_config_guess`; then : else echo "$progname: cannot guess host type; you must specify one" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac host=`$SHELL $ac_config_sub $host_alias` echo "$ac_t$host" 1>&6 # Make sure the host verified. test -z "$host" && exit 1 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 echo "$help" 1>&2 exit 1 else host_alias=$host fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case "$host_os" in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` case "$host_os" in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "${COLLECT_NAMES+set}" != set; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= # Set a sane default for `AR'. test -z "$AR" && AR=ar # Set a sane default for `OBJDUMP'. test -z "$OBJDUMP" && OBJDUMP=objdump # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then result=no echo $ac_n "checking for ranlib... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then RANLIB="ranlib" result="ranlib" break fi done IFS="$save_ifs" echo "$ac_t$result" 1>&6 fi if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$AS" && AS=as # Check to see if we are using GCC. if test "$with_gcc" != yes || test -z "$CC"; then # If CC is not set, then try to find GCC or a usable CC. if test -z "$CC"; then echo $ac_n "checking for gcc... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then CC="gcc" break fi done IFS="$save_ifs" if test -n "$CC"; then echo "$ac_t$CC" 1>&6 else echo "$ac_t"no 1>&6 fi fi # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". if test -z "$CC"; then echo $ac_n "checking for cc... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" cc_rejected=no for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/cc || test -f $dir/cc$ac_exeext; then if test "$dir/cc" = "/usr/ucb/cc"; then cc_rejected=yes continue fi CC="cc" break fi done IFS="$save_ifs" if test $cc_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same name, so the bogon will be chosen # first if we set CC to just the name; use the full file name. shift set dummy "$dir/cc" "$@" shift CC="$@" fi fi if test -n "$CC"; then echo "$ac_t$CC" 1>&6 else echo "$ac_t"no 1>&6 fi if test -z "$CC"; then echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 exit 1 fi fi # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 echo "$progname:579: checking whether we are using GNU C" >&5 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c echo "$ac_t$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" echo $ac_n "checking for object suffix... $ac_c" 1>&6 $rm conftest* echo 'int i = 1;' > conftest.c echo "$progname:601: checking for object suffix" >& 5 if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then # Append any warnings to the config.log. cat conftest.err 1>&5 for ac_file in conftest.*; do case $ac_file in *.c) ;; *) objext=`echo $ac_file | sed -e s/conftest.//` ;; esac done else cat conftest.err 1>&5 echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* echo "$ac_t$objext" 1>&6 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= wl= link_static_flag= no_builtin_flag= if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' case "$host_os" in beos* | irix5* | irix6* | osf3* | osf4*) # PIC is the default for these OSes. ;; aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. link_static_flag="$link_static_flag ${wl}-lC" ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. pic_flag='-m68020 -resident32 -malways-restore-a4' ;; *) pic_flag='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) # All AIX code is PIC. link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; hpux9* | hpux10* | hpux11*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' link_static_flag="${wl}-a ${wl}archive" pic_flag='+Z' ;; irix5* | irix6*) wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; osf3* | osf4*) # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' ;; sco3.2v5*) pic_flag='-Kpic' link_static_flag='-dn' special_shlib_compile_flags='-belf' ;; solaris*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' ;; sunos4*) pic_flag='-PIC' link_static_flag='-Bstatic' wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' ;; uts4*) pic_flag='-pic' link_static_flag='-Bstatic' ;; *) can_build_shared=no ;; esac fi if test -n "$pic_flag"; then echo "$ac_t$pic_flag" 1>&6 # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" echo "$progname:732: checking if $compiler PIC flag $pic_flag works" >&5 if { (eval echo $progname:733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 case "$host_os" in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then they # create non-PIC objects. So, if there were any warnings, we assume that # PIC is not supported. if test -s conftest.err; then echo "$ac_t"no 1>&6 can_build_shared=no pic_flag= else echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" fi ;; *) echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" ;; esac else # Append any errors to the config.log. cat conftest.err 1>&5 can_build_shared=no pic_flag= echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* else echo "$ac_t"none 1>&6 fi # Check to see if options -o and -c are simultaneously supported by compiler echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 $rm -r conftest 2>/dev/null mkdir conftest cd conftest $rm conftest* echo "int some_variable = 0;" > conftest.c mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.o" echo "$progname:785: checking if $compiler supports -c -o file.o" >&5 if { (eval echo $progname:786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then echo "$ac_t"no 1>&6 compiler_c_o=no else echo "$ac_t"yes 1>&6 compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&5 compiler_c_o=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" echo "$progname:818: checking if $compiler supports -c -o file.lo" >&5 if { (eval echo $progname:819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then echo "$ac_t"no 1>&6 compiler_o_lo=no else echo "$ac_t"yes 1>&6 compiler_o_lo=yes fi else # Append any errors to the config.log. cat conftest.err 1>&5 compiler_o_lo=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$ac_t$hard_links" 1>&6 $rm conftest* if test "$hard_links" = no; then echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 need_locks=warn fi else need_locks=no fi if test "$with_gcc" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" echo "$progname:870: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 if { (eval echo $progname:871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then echo "$ac_t"no 1>&6 compiler_rtti_exceptions=no else echo "$ac_t"yes 1>&6 compiler_rtti_exceptions=yes fi else # Append any errors to the config.log. cat conftest.err 1>&5 compiler_rtti_exceptions=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # Check for any special shared library compilation flags. if test -n "$special_shlib_compile_flags"; then echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : else echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 can_build_shared=no fi fi echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 $rm conftest* echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $link_static_flag" echo "$progname:914: checking if $compiler static flag $link_static_flag works" >&5 if { (eval echo $progname:915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then echo "$ac_t$link_static_flag" 1>&6 else echo "$ac_t"none 1>&6 link_static_flag= fi LDFLAGS="$save_LDFLAGS" $rm conftest* if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 $rm conftest.dat if ln -s X conftest.dat 2>/dev/null; then $rm conftest.dat LN_S="ln -s" else LN_S=ln fi if test "$LN_S" = "ln -s"; then echo "$ac_t"yes 1>&6 else echo "$ac_t"no 1>&6 fi fi # Make sure LD is an absolute path. if test -z "$LD"; then ac_prog=ld if test "$with_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 echo "$progname:947: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we are not using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld... $ac_c" 1>&6 echo "$progname:971: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "$progname:974: checking for non-GNU ld" >&5 fi if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" fi if test -n "$LD"; then echo "$ac_t$LD" 1>&6 else echo "$ac_t"no 1>&6 fi if test -z "$LD"; then echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 exit 1 fi fi # Check to see if it really is or is not GNU ld. echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then with_gnu_ld=yes else with_gnu_ld=no fi echo "$ac_t$with_gnu_ld" 1>&6 # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= always_export_symbols=no export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an egrep regular expression of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. case "$host_os" in cygwin* | mingw*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$with_gcc" != yes; then with_gnu_ld=no fi ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case "$host_os" in aix3* | aix4*) # On AIX, the GNU linker is very broken ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~ sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ (cd $objdir && $CC -c $soname-ltdll.c)~ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols' archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ _lt_hint=1; for symbol in `cat $export_symbols`; do echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def; _lt_hint=`expr 1 + \$_lt_hint`; done~ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' ;; netbsd*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' # can we support soname and/or expsyms with a.out? -oliva fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi else # PORTME fill in a description of your system's linker (not GNU ld) case "$host_os" in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$with_gcc" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4*) hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' hardcode_libdir_separator=':' if test "$with_gcc" = yes; then collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi shared_flag='-shared' else shared_flag='${wl}-bM:SRE' hardcode_direct=yes fi allow_undefined_flag=' ${wl}-berok' archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' case "$host_os" in aix4.[01]|aix4.[01].*) # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on always_export_symbols=yes ;; esac ;; amigaos*) archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs' fix_srcfile_path='`cygpath -w $srcfile`' ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case "$host_os" in hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$with_gcc" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF fi hardcode_libdir_flag_spec='${wl}-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; openbsd*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; osf3* | osf4*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case "$host_os" in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$ac_t$ld_shlibs" 1>&6 test "$ld_shlibs" = no && can_build_shared=no if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -p" break else NM=${NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$NM" && NM=nm ;; esac echo "$ac_t$NM" 1>&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Define system-specific variables. case "$host_os" in aix*) symcode='[BCDT]' ;; cygwin* | mingw*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; irix*) symcode='[BCDEGRST]' ;; solaris*) symcode='[BDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[ABCDGISTW]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no $rm conftest* cat > conftest.c <&5 if { (eval echo $progname:1508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm if { echo "$progname:1511: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' cat <> conftest.c #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c cat <<\EOF >> conftest.c {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$objext conftstm.$objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo $progname:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi LIBS="$save_LIBS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else global_symbol_pipe= fi done if test "$pipe_works" = yes; then echo "${ac_t}ok" 1>&6 else echo "${ac_t}failed" 1>&6 fi if test -z "$global_symbol_pipe"; then global_symbol_to_cdecl= fi # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$hardcode_shlibpath_var" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$ac_t$hardcode_action" 1>&6 reload_flag= reload_cmds='$LD$reload_flag -o $output$reload_objs' echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6 # PORTME Some linkers may need a different reload flag. reload_flag='-r' echo "$ac_t$reload_flag" 1>&6 test -n "$reload_flag" && reload_flag=" $reload_flag" # PORTME Fill in your ld.so characteristics library_names_spec= libname_spec='lib$name' soname_spec= postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" file_magic_cmd= file_magic_test_file= deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [regex]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 case "$host_os" in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4*) version_type=linux # AIX has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. # We preserve .a as extension for shared libraries though AIX4.2 # and later linker supports .so library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' shlibpath_var=LIBPATH deplibs_check_method=pass_all ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; bsdi4*) version_type=linux library_names_spec='${libname}.so$major ${libname}.so' soname_spec='${libname}.so' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF 32-bit LSB shared object' file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw*) version_type=windows if test "$with_gcc" = yes; then library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' else library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' fi dynamic_linker='Win32 ld.exe' deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' file_magic_cmd='${OBJDUMP} -f' need_lib_prefix=no # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case "$version_type" in freebsd-elf*) deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) deplibs_check_method=unknown library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; gnu*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}.so' shlibpath_var=LD_LIBRARY_PATH ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) version_type=irix need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so.$major' library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' case "$host_os" in irix5*) libsuff= shlibsuff= # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case "$LD" in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib${libsuff}/libc.so*` deplibs_check_method='pass_all' ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` if test -f /lib/ld.so.1; then dynamic_linker='GNU ld.so' else # Only the GNU ld.so supports shared libraries on MkLinux. case "$host_cpu" in powerpc*) dynamic_linker=no ;; *) dynamic_linker='Linux ld.so' ;; esac fi ;; netbsd*) version_type=sunos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH ;; openbsd*) version_type=sunos if test "$with_gnu_ld" = yes; then need_lib_prefix=no need_version=no fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4*) version_type=osf need_version=no soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method='file_magic COFF format alpha shared library' file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so deplibs_check_method='pass_all' sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" file_magic_cmd=/usr/bin/file file_magic_test_file=/lib/libc.so ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case "$host_vendor" in ncr) deplibs_check_method='pass_all' ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$ac_t$dynamic_linker" 1>&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in # configure.in, otherwise build static only libraries. case "$host_os" in cygwin* | mingw* | os2*) if test x$can_build_shared = xyes; then test x$enable_win32_dll = xno && can_build_shared=no echo "checking if package supports dlls... $can_build_shared" 1>&6 fi ;; esac if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | egrep "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$ac_t$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi echo $ac_n "checking for objdir... $ac_c" 1>&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen""... $ac_c" 1>&6 echo "$progname:2063: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else dlopen(); #endif ; return 0; } EOF if { (eval echo $progname:2090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_dlopen=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo "$progname:2108: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 echo "$progname:2145: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 echo "$progname:2182: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else shl_load(); #endif ; return 0; } EOF if { (eval echo $progname:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shl_load=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 echo "$progname:2227: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else echo "$ac_t""no" 1>&6 fi fi fi fi fi fi if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes fi case "$lt_cv_dlopen" in dlopen) for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "$progname:2289: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int fnord = 0; EOF ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo $progname:2299: \"$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* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi done if test "x$ac_cv_header_dlfcn_h" = xyes; then CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" fi eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 echo "$progname:2327: checking whether a program can dlopen itself" >&5 if test "${lt_cv_dlopen_self+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then lt_cv_dlopen_self=cross else cat > conftest.c < #endif #include #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 0 # endif #endif /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LTDL_LAZY_OR_NOW # ifdef RTLD_LAZY # define LTDL_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LTDL_LAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LTDL_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LTDL_LAZY_OR_NOW DL_NOW # else # define LTDL_LAZY_OR_NOW 0 # endif # endif # endif # endif #endif fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(ptr1 || ptr2) exit(0); } exit(1); } EOF if { (eval echo $progname:2381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* lt_cv_dlopen_self=no fi rm -fr conftest* fi fi echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 echo "$progname:2400: checking whether a statically linked program can dlopen itself" >&5 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then lt_cv_dlopen_self_static=cross else cat > conftest.c < #endif #include #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 0 # endif #endif /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LTDL_LAZY_OR_NOW # ifdef RTLD_LAZY # define LTDL_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LTDL_LAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LTDL_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LTDL_LAZY_OR_NOW DL_NOW # else # define LTDL_LAZY_OR_NOW 0 # endif # endif # endif # endif #endif fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(ptr1 || ptr2) exit(0); } exit(1); } EOF if { (eval echo $progname:2454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* lt_cv_dlopen_self_static=no fi rm -fr conftest* fi fi echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 fi ;; esac case "$lt_cv_dlopen_self" in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case "$lt_cv_dlopen_self_static" in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Copy echo and quote the copy, instead of the original, because it is # used later. ltecho="$echo" if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then ltecho="$CONFIG_SHELL \$0 --fallback-echo" fi LTSHELL="$SHELL" LTCONFIG_VERSION="$VERSION" # Only quote variables if we're using ltmain.sh. case "$ltmain" in *.sh) # Now quote all the things that may contain metacharacters. for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ old_LD old_LDFLAGS old_LIBS \ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case "$var" in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case "$ltecho" in *'\$0 --fallback-echo"') ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac trap "$rm \"$ofile\"; exit 1" 1 2 15 echo "creating $ofile" $rm "$ofile" cat < "$ofile" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi ### BEGIN LIBTOOL CONFIG EOF cfgfile="$ofile" ;; *) # Double-quote the variables that need it (for aesthetics). for var in old_CC old_CFLAGS old_CPPFLAGS \ old_LD old_LDFLAGS old_LIBS \ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do eval "$var=\\\"\$var\\\"" done # Just create a config file. cfgfile="$ofile.cfg" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 echo "creating $cfgfile" $rm "$cfgfile" cat < "$cfgfile" # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) EOF ;; esac cat <> "$cfgfile" # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ # $0$ltconfig_args # # Compiler and other test output produced by $progname, useful for # debugging $progname, is in ./config.log if it exists. # The version of $progname that generated this script. LTCONFIG_VERSION=$LTCONFIG_VERSION # Shell to use when invoking shell scripts. SHELL=$LTSHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$ltecho # The archiver. AR=$AR # The default C compiler. CC=$CC # The linker used to build libraries. LD=$LD # Whether we need hard or soft links. LN_S=$LN_S # A BSD-compatible nm program. NM=$NM # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$reload_flag reload_cmds=$reload_cmds # How to pass a linker flag through the compiler. wl=$wl # Object file suffix (normally "o"). objext="$objext" # Old archive suffix (normally "a"). libext="$libext" # Additional compiler flags for building library objects. pic_flag=$pic_flag # Does compiler simultaneously support -c and -o options? compiler_c_o=$compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$compiler_o_lo # Must we lock files when doing compilation ? need_locks=$need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$library_names_spec # The coded name of the library, if different from the real name. soname_spec=$soname_spec # Commands used to build and install an old-style archive. RANLIB=$RANLIB old_archive_cmds=$old_archive_cmds old_postinstall_cmds=$old_postinstall_cmds old_postuninstall_cmds=$old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$old_archive_from_new_cmds # Commands used to build and install a shared archive. archive_cmds=$archive_cmds archive_expsym_cmds=$archive_expsym_cmds postinstall_cmds=$postinstall_cmds postuninstall_cmds=$postuninstall_cmds # Method to check whether dependent libraries are shared objects. deplibs_check_method=$deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$global_symbol_to_cdecl # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Compile-time system search path for libraries sys_lib_search_path_spec=$sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$exclude_expsyms # Symbols that must always be exported. include_expsyms=$include_expsyms EOF case "$ltmain" in *.sh) echo '### END LIBTOOL CONFIG' >> "$ofile" echo >> "$ofile" case "$host_os" in aix3*) cat <<\EOF >> "$ofile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "${COLLECT_NAMES+set}" != set; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # Append the ltmain.sh script. cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) chmod +x "$ofile" ;; *) # Compile the libtool program. echo "FIXME: would compile $ltmain" ;; esac test -n "$cache_file" || exit 0 # AC_CACHE_SAVE 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 exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: gatos-0.0.5/ltmain.sh0100644002411700123110000032137606765053731013142 0ustar bayleasr# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun ltconfig. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then echo "$modename: not configured to build any kind of library" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" # Parse our command line options once, thoroughly. while test $# -gt 0 do arg="$1" shift case "$arg" in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case "$prev" in execute_dlfiles) eval "$prev=\"\$$prev \$arg\"" ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case "$arg" in --help) show_help=yes ;; --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" exit 0 ;; --config) sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; --debug) echo "$progname: enabling shell trace mode" set -x ;; --dry-run | -n) run=: ;; --features) echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --quiet | --silent) show=: ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then case "$nonopt" in *cc | *++ | gcc* | *-gcc*) mode=link for arg do case "$arg" in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case "$mode" in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= lastarg= srcfile="$nonopt" suppress_output= user_target=no for arg do # Accept any command-line options. case "$arg" in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi user_target=next ;; -static) build_old_libs=yes continue ;; esac case "$user_target" in next) # The next one is the -o target name user_target=yes continue ;; yes) # We got the output file user_target=set libobj="$arg" continue ;; esac # Accept the current argument as the source file. lastarg="$srcfile" srcfile="$arg" # Aesthetically quote the previous argument. # Backslashify any backslashes, double quotes, and dollar signs. # These are the only characters that are still specially # interpreted inside of double-quoted scrings. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly in scan # sets, so we specify it separately. case "$lastarg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) lastarg="\"$lastarg\"" ;; esac # Add the previous argument to base_compile. if test -z "$base_compile"; then base_compile="$lastarg" else base_compile="$base_compile $lastarg" fi done case "$user_target" in set) ;; no) # Get the name of the library object. libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; *) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' case "$libobj" in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case "$libobj" in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $libobj" else removelist="$libobj" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile # All platforms use -DPIC, to notify preprocessed assembler code. command="$base_compile $pic_flag -DPIC $srcfile" if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$libobj"; then dir="$objdir" else dir="$dir/$objdir" fi libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` if test -d "$dir"; then $show "$rm $libobj" $run $rm $libobj else $show "$mkdir $dir" $run $mkdir $dir status=$? if test $status -ne 0 && test ! -d $dir; then exit $status fi fi fi if test "$compiler_o_lo" = yes; then output_obj="$libobj" command="$command -o $output_obj" elif test "$compiler_c_o" = yes; then output_obj="$obj" command="$command -o $output_obj" fi $show "$command" if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist exit 1 fi if test "$need_locks" = warn && test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test x"$output_obj" != x"$libobj"; then $show "$mv $output_obj $libobj" if $run $mv $output_obj $libobj; then : else error=$? $run $rm $removelist exit $error fi fi # If we have no pic_flag, then copy the object into place and finish. if test -z "$pic_flag" && test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj $run $rm $obj fi $show "$mv $libobj $obj" if $run $mv $libobj $obj; then : else error=$? $run $rm $removelist exit $error fi # Now arrange that obj and lo_libobj become the same file $show "$LN_S $obj $lo_libobj" if $run $LN_S $obj $lo_libobj; then exit 0 else error=$? $run $rm $removelist exit $error fi fi # Allow error messages only from the first compilation. suppress_output=' >/dev/null 2>&1' fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then command="$base_compile $srcfile" if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" $show "$command" if $run eval "$command"; then : else $run $rm $removelist exit 1 fi if test "$need_locks" = warn && test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed if test x"$output_obj" != x"$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Create an invalid libtool object if no PIC, so that we do not # accidentally link it into a program. if test "$build_libtool_libs" != yes; then $show "echo timestamp > $libobj" $run eval "echo timestamp > \$libobj" || exit $? else # Move the .lo from within objdir $show "$mv $libobj $lo_libobj" if $run $mv $libobj $lo_libobj; then : else error=$? $run $rm $removelist exit $error fi fi fi # Unlock the critical section if it was locked if test "$need_locks" != no; then $rm "$lockfile" fi exit 0 ;; # libtool link mode link) modename="$modename: link" C_compiler="$CC" # save it, to compile generated C sources CC="$nonopt" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invokation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes # This is a source program that is used to create dlls on Windows # Don't remove nor modify the starting and closing comments # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #include # DECLARE_CYGWIN_DLL( DllMain ); # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ # This is a source program that is used to create import libraries # on Windows for dlls which lack them. Don't remove nor modify the # starting and closing comments # /* impgen.c starts here */ # /* Copyright (C) 1999 Free Software Foundation, Inc. # # This file is part of GNU libtool. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # */ # # #include /* for printf() */ # #include /* for open(), lseek(), read() */ # #include /* for O_RDONLY, O_BINARY */ # #include /* for strdup() */ # # static unsigned int # pe_get16 (fd, offset) # int fd; # int offset; # { # unsigned char b[2]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 2); # return b[0] + (b[1]<<8); # } # # static unsigned int # pe_get32 (fd, offset) # int fd; # int offset; # { # unsigned char b[4]; # lseek (fd, offset, SEEK_SET); # read (fd, b, 4); # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # static unsigned int # pe_as32 (ptr) # void *ptr; # { # unsigned char *b = ptr; # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); # } # # int # main (argc, argv) # int argc; # char *argv[]; # { # int dll; # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; # unsigned long export_rva, export_size, nsections, secptr, expptr; # unsigned long name_rvas, nexp; # unsigned char *expdata, *erva; # char *filename, *dll_name; # # filename = argv[1]; # # dll = open(filename, O_RDONLY|O_BINARY); # if (!dll) # return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') # dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ # return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + # pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { # char sname[8]; # unsigned long secptr1 = secptr + 40 * i; # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); # unsigned long vsize = pe_get32 (dll, secptr1 + 16); # unsigned long fptr = pe_get32 (dll, secptr1 + 20); # lseek(dll, secptr1, SEEK_SET); # read(dll, sname, 8); # if (vaddr <= export_rva && vaddr+vsize > export_rva) # { # expptr = fptr + (export_rva - vaddr); # if (export_rva + export_size > vaddr + vsize) # export_size = vsize - (export_rva - vaddr); # break; # } # } # # expdata = (unsigned char*)malloc(export_size); # lseek (dll, expptr, SEEK_SET); # read (dll, expdata, export_size); # erva = expdata - export_rva; # # nexp = pe_as32 (expdata+24); # name_rvas = pe_as32 (expdata+32); # # printf ("EXPORTS\n"); # for (i = 0; i&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test $# -gt 0; do arg="$1" shift # If the previous option needs an argument, assign it. if test -n "$prev"; then case "$prev" in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case "$prev" in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case "$arg" in *.la | *.lo) ;; # We handle these cases below. self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case "$arg" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi prevarg="$arg" case "$arg" in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: not more than one -exported-symbols argument allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi dir="$absdir" ;; esac case " $deplibs " in *" $arg "*) ;; *) deplibs="$deplibs $arg";; esac case " $lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir";; esac case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) dllsearchdir=`cd "$dir" && pwd || echo "$dir"` case ":$dllsearchpath:" in ::) dllsearchpath="$dllsearchdir";; *":$dllsearchdir:"*) ;; *) dllsearchpath="$dllsearchpath:$dllsearchdir";; esac ;; esac ;; -l*) if test "$arg" = "-lc"; then case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) # These systems don't actually have c library (as such) continue ;; esac elif test "$arg" = "-lm"; then case "$host" in *-*-cygwin* | *-*-beos*) # These systems don't actually have math library (as such) continue ;; esac fi deplibs="$deplibs $arg" ;; -module) module=yes continue ;; -no-undefined) allow_undefined=no continue ;; -o) prev=output ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # If we have no pic_flag, then this is the same as -all-static. if test -z "$pic_flag" && test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac ;; *.o | *.obj | *.a | *.lib) # A standard object. objs="$objs $arg" ;; *.lo) # A library object. if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= fi libobjs="$libobjs $arg" ;; *.la) # A libtool-controlled library. dlname= libdir= library_names= old_library= # Check to see that this really is a libtool archive. if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 exit 1 fi # If the library was installed with an old release of libtool, # it will not redefine variable installed. installed=yes # Read the .la file # If there is no directory component, then add one. case "$arg" in */* | *\\*) . $arg ;; *) . ./$arg ;; esac # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 exit 1 fi # Find the relevant object directory and library name. name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` if test "X$installed" = Xyes; then dir="$libdir" else dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$arg"; then dir="$objdir" else dir="$dir/$objdir" fi fi if test -n "$dependency_libs"; then # Extract -R from dependency_libs temp_deplibs= for deplib in $dependency_libs; do case "$deplib" in -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` case " $rpath $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; -L*) case "$compile_command $temp_deplibs " in *" $deplib "*) ;; *) temp_deplibs="$temp_deplibs $deplib";; esac;; *) temp_deplibs="$temp_deplibs $deplib";; esac done dependency_libs="$temp_deplibs" fi if test -z "$libdir"; then # It is a libtool convenience library, so add in its objects. convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$deplibs$dependency_libs" compile_command="$compile_command $dir/$old_library$dependency_libs" finalize_command="$finalize_command $dir/$old_library$dependency_libs" continue fi # This library was specified with -dlopen. if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking statically, # we need to preload. prev=dlprefiles else # We should not create a dependency on this library, but we # may need any libraries it requires. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" prev= continue fi fi # The library was specified with -dlpreopen. if test "$prev" = dlprefiles; then # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then dlprefiles="$dlprefiles $dir/$old_library" else dlprefiles="$dlprefiles $dir/$linklib" fi prev= fi if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then link_against_libtool_libs="$link_against_libtool_libs $arg" if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # We need an absolute path. case "$dir" in [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi ;; esac # This is the magic to use -rpath. # Skip directories that are in the system default run-time # search path, unless they have been requested with -R. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac lib_linked=yes case "$hardcode_action" in immediate | unsupported) if test "$hardcode_direct" = no; then compile_command="$compile_command $dir/$linklib" deplibs="$deplibs $dir/$linklib" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2*) dllsearchdir=`cd "$dir" && pwd || echo "$dir"` if test -n "$dllsearchpath"; then dllsearchpath="$dllsearchpath:$dllsearchdir" else dllsearchpath="$dllsearchdir" fi ;; esac elif test "$hardcode_minus_L" = no; then case "$host" in *-*-sunos*) compile_shlibpath="$compile_shlibpath$dir:" ;; esac case "$compile_command " in *" -L$dir "*) ;; *) compile_command="$compile_command -L$dir";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -L$dir -l$name" elif test "$hardcode_shlibpath_var" = no; then case ":$compile_shlibpath:" in *":$dir:"*) ;; *) compile_shlibpath="$compile_shlibpath$dir:";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then compile_command="$compile_command $absdir/$linklib" deplibs="$deplibs $absdir/$linklib" elif test "$hardcode_minus_L" = yes; then case "$compile_command " in *" -L$absdir "*) ;; *) compile_command="$compile_command -L$absdir";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -L$absdir -l$name" elif test "$hardcode_shlibpath_var" = yes; then case ":$compile_shlibpath:" in *":$absdir:"*) ;; *) compile_shlibpath="$compile_shlibpath$absdir:";; esac compile_command="$compile_command -l$name" deplibs="$deplibs -l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit 1 fi # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then finalize_command="$finalize_command $libdir/$linklib" elif test "$hardcode_minus_L" = yes; then case "$finalize_command " in *" -L$libdir "*) ;; *) finalize_command="$finalize_command -L$libdir";; esac finalize_command="$finalize_command -l$name" elif test "$hardcode_shlibpath_var" = yes; then case ":$finalize_shlibpath:" in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:";; esac finalize_command="$finalize_command -l$name" else # We cannot seem to hardcode it, guess we'll fake it. case "$finalize_command " in *" -L$dir "*) ;; *) finalize_command="$finalize_command -L$libdir";; esac finalize_command="$finalize_command -l$name" fi else # Transform directly to old archives if we don't build new libraries. if test -n "$pic_flag" && test -z "$old_library"; then $echo "$modename: cannot find static library for \`$arg'" 1>&2 exit 1 fi # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_command="$compile_command $dir/$linklib" finalize_command="$finalize_command $dir/$linklib" else case "$compile_command " in *" -L$dir "*) ;; *) compile_command="$compile_command -L$dir";; esac compile_command="$compile_command -l$name" case "$finalize_command " in *" -L$dir "*) ;; *) finalize_command="$finalize_command -L$dir";; esac finalize_command="$finalize_command -l$name" fi fi # Add in any libraries that this one depends upon. compile_command="$compile_command$dependency_libs" finalize_command="$finalize_command$dependency_libs" continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac ;; esac # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" case "$output" in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.a | *.lib) if test -n "$link_against_libtool_libs"; then $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 exit 1 fi if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" ;; *.la) # Make sure we only generate libraries of the form `libNAME.la'. case "$outputname" in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi if test -n "$objs"; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 exit 1 fi # How the heck are we supposed to write a wrapper for a shared library? if test -n "$link_against_libtool_libs"; then $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 exit 1 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test $# -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. libext=al oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi dependency_libs="$deplibs" if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi current="$2" revision="$3" age="$4" # Check that each of the things are valid numbers. case "$current" in 0 | [1-9] | [1-9][0-9]*) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case "$revision" in 0 | [1-9] | [1-9][0-9]*) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case "$age" in 0 | [1-9] | [1-9][0-9]*) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test $age -gt $current; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 fi # Calculate the version variables. major= versuffix= verstring= case "$version_type" in none) ;; irix) major=`expr $current - $age + 1` versuffix="$major.$revision" verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test $loop != 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="sgi$major.$iface:$verstring" done ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test $loop != 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; windows) # Like Linux, but with '-' rather than '.', since we only # want one extension on Windows 95. major=`expr $current - $age` versuffix="-$major-$age-$revision" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= verstring="0.0" if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi dependency_libs="$deplibs" case "$host" in *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *) # Add libc to deplibs on all other systems. deplibs="$deplibs -lc" ;; esac fi # Create the output directory, or remove our outputs if we need to. if test -d $output_objdir; then $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* else $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi if test "$build_libtool_libs" = yes; then # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case "$deplibs_check_method" in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behaviour. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potlib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | sed 's/.* -> //'` case "$potliblink" in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | sed 10q \ | egrep "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done if test -n "$a_deplib" ; then droppeddeps=yes echo echo "*** Warning: This library needs some functionality provided by $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | grep . >/dev/null; then echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" echo "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Ensure that we have .o objects for linkers which dislike .lo # (e.g. aix) incase we are running --disable-static for obj in $libobjs; do oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"` if test ! -f $oldobj; then $show "${LN_S} $obj $oldobj" $run ${LN_S} $obj $oldobj || exit $? fi done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` if test -n "$whole_archive_flag_spec"; then if test -n "$convenience"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linkopts="$linkopts $flag" fi # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi # Do each of the archive commands. if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval cmds=\"$archive_expsym_cmds\" else eval cmds=\"$archive_cmds\" fi IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; *.lo | *.o | *.obj) if test -n "$link_against_libtool_libs"; then $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 exit 1 fi if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case "$output" in *.lo) if test -n "$objs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Create the old-style object. reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` output="$obj" eval cmds=\"$reload_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. test -z "$libobj" && exit 0 if test "$build_libtool_libs" != yes; then # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. $show "echo timestamp > $libobj" $run eval "echo timestamp > $libobj" || exit $? exit 0 fi if test -n "$pic_flag"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs" output="$libobj" eval cmds=\"$reload_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" else # Just create a symlink. $show $rm $libobj $run $rm $libobj $show "$LN_S $obj $libobj" $run $LN_S $obj $libobj || exit $? fi exit 0 ;; # Anything else should be a program. *) if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$compile_rpath " in *" $libdir "*) ;; *) compile_rpath="$compile_rpath $libdir" ;; esac case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the binary in the object directory, then wrap it. if test ! -d $output_objdir; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test $status -ne 0 && test ! -d $output_objdir; then exit $status fi fi if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case "$dlsyms" in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`echo "$arg" | sed -e 's%^.*/%%'` $run eval 'echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = {\ " sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr_t) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case "$host" in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case "$dir" in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case "$0" in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: link_against_libtool_libs='$link_against_libtool_libs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then echo >> $output "\ program=lt-'$outputname' progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if (cd \"\$thisdir\" && eval \$relink_command); then : else $rm \"\$progdir/\$file\" exit 1 fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in *-*-cygwin* | *-*-mingw | *-*-os2*) # win32 systems need to use the prog path for dll # lookup to work $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ # Export the path to the program. PATH=\"\$progdir:\$PATH\" export PATH exec \$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "mkdir $gentop" $run mkdir "$gentop" status=$? if test $status -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case "$xlib" in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "mkdir $xdir" $run mkdir "$xdir" status=$? if test $status -ne 0 && test ! -d "$xdir"; then exit $status fi $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then eval cmds=\"$old_archive_from_new_cmds\" else # Ensure that we have .o objects in place incase we decided # not to build a shared library, and have fallen back to building # static libs even though --disable-static was passed! for oldobj in $oldobjs; do if test ! -f $oldobj; then obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"` $show "${LN_S} $obj $oldobj" $run ${LN_S} $obj $oldobj || exit $? fi done eval cmds=\"$old_archive_cmds\" fi IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case "$output" in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" if test -n "$xrpath"; then temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" done dependency_libs="$temp_xrpath $dependency_libs" fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i fi $rm $output $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$dlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Directory that this library needs to be installed in: libdir='$install_libdir'\ " done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case "$arg" in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case "$arg" in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test $# -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case "$destdir" in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case "$file" in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case "$file" in *.a | *.lib) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" test "X$dir" = "X$file/" && dir= dir="$dir$objdir" # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift # Install the shared library and build the symlinks. $show "$install_prog $dir/$realname $destdir/$realname" $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? test "X$dlname" = "X$realname" && dlname= if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do test "X$dlname" = "X$linkname" && dlname= if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi if test -n "$dlname"; then # Install the dynamically-loadable library. $show "$install_prog $dir/$dlname $destdir/$dlname" $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $? fi # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case "$destfile" in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.o | *.obj) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then link_against_libtool_libs= relink_command= # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. if test -z "$link_against_libtool_libs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes for lib in $link_against_libtool_libs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case "$lib" in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec $SHELL $0 --finish$current_libdirs exit 1 fi exit 0 ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit 0 echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do echo " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" echo "more information, such as the ld(1) and ld.so(8) manual pages." echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case "$file" in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case "$file" in -*) ;; *) # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case "$file" in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then # Export the shlibpath_var. eval "export $shlibpath_var" # Restore saved enviroment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now actually exec the command. eval "exec \$cmd$args" $echo "$modename: cannot exec \$cmd$args" exit 1 else # Display what would be done. eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" $echo "$cmd$args" exit 0 fi ;; # libtool uninstall mode uninstall) modename="$modename: uninstall" rm="$nonopt" files= for arg do case "$arg" in -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` rmfiles="$file" case "$name" in *.la) # Possibly a libtool archive, so verify it. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $dir/$n" test "X$n" = "X$dlname" && dlname= done test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname" test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" $show "$rm $rmfiles" $run $rm $rmfiles if test -n "$library_names"; then # Do each command in the postuninstall commands. eval cmds=\"$postuninstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. eval cmds=\"$old_postuninstall_cmds\" IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi ;; *.lo) if test "$build_old_libs" = yes; then oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi $show "$rm $rmfiles" $run $rm $rmfiles ;; *) $show "$rm $rmfiles" $run $rm $rmfiles ;; esac done exit 0 ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi # test -z "$show_help" # We need to display help for each of the modes. case "$mode" in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --version print version information MODE must be one of the following: compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE." exit 0 ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: gatos-0.0.5/missing0100755002411700123110000001421306765053731012706 0ustar bayleasr#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 gatos-0.0.5/mkinstalldirs0100755002411700123110000000133206765053731014113 0ustar bayleasr#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 1999/09/07 00:10:01 insomnia Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here gatos-0.0.5/BUGS0100644002411700123110000000430507030217061011753 0ustar bayleasrBUGS This is a list of known bugs. Please do not send bug reports regarding these issues, but patches to fix them would still be appreciated even though we are already working on all of these problems: -TV-Out is not yet stable. -Playback requires you to hit "Stop" even after it is done playing. -Channel scan is not sensitive enough. Many channels are not detected. -Sound capture is not implemented. -Capture and playback are not synchronised. -There is no teletext support yet. -Still need /etc/gatos.conf for a few things. -S-Video input is only Black and White. -CC (Closed Captioning) toggle is not saved on exit. -Multi-headed setups probrably won't work. -Doesn't work on cards that don't have a tuner. -SAP doesn't work. -Fixed-aspect ratio doesn't allow for other aspect ratios. -Hardware delays are not handled, GUI interaction should be buffered. -No support for field selection (only interlaced mode implemented). -Rage128 picture is poor and unstable (may be a hardware problem). -Rage128 enable capture doesn't work right (atitv snap won't work). -Rage128 picture often has large distorted border, even when zoomed in. -Rage128 audio can't be muted on program exit. -Rage128 Closed-captioning does not work. -Rage128 + ATI-TV ISA card audio doesn't work. -No xatitv filename logic to put correct extension on ppm/yuv files. -Closed captioning can cause xatitv to crash. -Rare incorrect channel configurations can cause xatitv to crash. -Iconified video doesn't look right on some machines. BUG REPORTS To submit a bug report, send an e-mail to: Insomnia (Stea Greene) with a subject line of: GATOS BUG: Then in the main body of the message: -describe the bug in detail, including how to repeat the misbehavior. -Specify what version of GATOS and what version of IBTK you are using. -Then include a dump of "xatitv -v" (either as a MIME attachment or right in the message). -Include a patch of any changes you made to the code that may fix the problem. See file PATCHES for details. When a bug is fixed or if the bug report is not understood, you will get a reply, so make sure your message is properly reply-able. gatos-0.0.5/BUGS.french0100644002411700123110000000524407030240375013226 0ustar bayleasrBUGS Ceci est la liste des bugs connus. S'il vous plait, n'envoyez pas de rapports à propos de ceux-ci, mais des patches les corrigeants seront appreciés car nous travaillons sur tout ces problèmes: -TV-Out n'est pas encore stable. -Playback nécessite que vous cliquiez sur "Stop" après la fin de la lecture. -La recherche des canaux n'est pas assez sensible. Beaucoup de canaux ne sont pas détectés. -La capture du son n'est pas implementée. -La capture et la relecture ne sont pas synchronisées. -Il n'y a pas encore de support pour le télétexte. -Toujours besoin de /etc/gatos.conf pour quelques infos. -L'entrée S-Vidéo est seulement en Noir et Blanc. -La bascule CC (Closed Captioning) n'est pas sauvée en fin d'exécution. -Les configurations multi-headed ne fonctionnent probablement pas. -Ne fonctionne pas avec les cartes ne possédant pas de tuner. -SAP ne fontionne pas. -L'aspect de ratio fixe n'autorise pas d'autre ratios d'aspect. -Les délais matériels ne sont pas gérés, l'interaction en mode graphique doit être "buffurisé". -Pas de support pour la sélection du champ (seul le mode entelacé est implémenté. -L'image avec une Rage128 est mauvaise et instable (peut être un problème matériel). -Enclencher la capture avec une Rage128 ne fonctionne pas correctement (les clichés avec atitv peuvent ne pas fonctionner). -Le bord des images avec une Rage128 sont largement distordus, même en zoom. -Le son avec une Rage128 ne peut pas être stoppé à la sortie du programme. -Le Closed-captioning avec une Rage128 ne fonctionne pas. -Une Rage128 + une carte ATI-TV ISA ne fonctionne pas. -Pas de logique pour la définition des extensions de fichiers ppm/yuv avec xatitv. -Le Closed-captioning fait "planter" xatitv. -De rares mauvaises configurations des canaux peuvent faire planter xatitv. -La qualité de la vidéo iconifiée peut être mauvaise sur certaines machines RAPPORTS DE BUG Pour soumettre un rapport de bug, envoyez un e-mail à: Insomnia (Stea Greene) Avec dans le sujet: GATOS BUG: Et dans le corps du message: -description du bug en détail, en incluant comment reproduire le disfonctionnement. -Specifiez quelle version de GATOS et d'IBTK vous utilisez. -Incluez aussi un dump de "xatitv -v" (dans un attachement MIME ou dans le message lui meme). -Incluez un patch de tout changement que vous avez fait au code pour résoudre le problème. Consultez le fichier PATCHES pour plus de détails. Quand un bug est corrigé ou si un rapport de bug n'est pas bien compris, vous aurez une reponse au message, donc assurez vous de la validité de l'adresse de retour. gatos-0.0.5/FreeBSD-HOWTO0100644002411700123110000000120607012403437013324 0ustar bayleasrTested under FreeBSD 3.2 Release: -Install ibtk package (see FreeBSD-HOWTO in ibtk package), *** Symlink /usr/local/include/ibtk->/usr/include/ibtk no more needed *** Normally you must have do this for correctly gatos compile: -Remove g++ and c++ (original c++ seems to be very susceptible or buggy!!??) -Install egcs-1.1.2 (from /cdrom/packages/All) Make sure that gcc --version and g++ --version works fine. -Install gmake-3.77 (from /cdrom/packages/All) You *must* use gmake instead make (its not support as well makefiles created by configure script). Now you can run ./configure script and run gmake. gatos-0.0.5/NetBSD-HOWTO0100644002411700123110000000063307012403440013166 0ustar bayleasrTested under NetBSD-1.4.1: -Install ibtk package (see NetBSD-HOWTO in ibtk main directory), Normally you must have do this for correctly gatos compile: -Install gmake-3.77. You *must* use gmake instead make (its not support as well makefiles created by configure script). -you *must* have the libossaudio library (check your /usr/lib/). Now you can run ./configure script and run gmake. gatos-0.0.5/INSTALL.french0100644002411700123110000001015607030240375013572 0ustar bayleasrINSTALLATION -Tout d'abord téléchargez et installez IBTK (qui doit être disponible au même endroit que GATOS). -Décompactez l'archive de gatos: tar xzvf gatos-0.0.5.tar.gz -ou- gzip -dc gatos-0.0.5.tar.gz | tar xvf - -Placez vous dans le répertoire des sources cd gatos-0.0.5 -Executez le script configure (configure --help pour plus de details). ./configure -Compilez les sources: make -Installez les programmes (vous devez être root): make install CONFIGURATION -Executer xatitv pour la première fois à pour effet d'essayer gatos-conf automatiquement si le fichier de configuration est absent. Vous serez alors en mesure de configurer gatos avec une interface agréable. Si vous préférez le faire manuellement (ou avoir plus d'informations à propos de ce que vous allez faire avec le programme graphique), lisez le reste de cette section. Autrement, sautez directement à la dernière partie ("Executer xatitv et configurer..."). Note, pour utiliser gatos-conf en tand qu'utilisateur autre que celui sous qui vous vous êtes loggué (ex: comme root, chose qu'xatitv essayera de faire), vous devez avoir configuré X afin d'autoriser les autres connections à partir de la machine locale, en tapant ceci: xhost +localhost Beaucoup de machines sont configurées comme ceci, mais si vous avez une erreur "connection refusée par le serveur" quand vous lancez gatos-conf, vous devez effectuer cette opération. IMPORTANT: quand vous utilisez gatos-conf, même si vous sélectionnez que gatos trouve la RAM, vous DEVEZ SPECIFIER CORRECTEMENT LA QUANTITE DE MEMOIRE! Car gatos n'est pas le seul a devoir connaitre cette information, X le doit aussi, et si celle ci n'est pas correctement selectionnée, des problèmes avec X peuvent en resulter. -Determinez la taille du buffer (le meilleur est 864 pour le PAL, 600 pour le NTSC). De plus petites valeurs peuvent êtres utilisées, mais il y aura une perte de qualité. Pour déterminer une autre valeur, utilisez: ((HorizontalMax*VerticalMax)/512) Kilo-octets Les valeurs précédentes (864 et 600) sont définies pour une taille de buffer maximale pour ces formats vidéo (respectivement 768x576 et 640x480 pour le PAL et le NTSC). -Utilisez l'application "gatos-conf" ou définissez manuellement les paramêtres des fichiers XF86Config et gatos.conf: -Configuration de XF86Config (habituellement /etc/X11/XF86Config ou /etc/XF86Config): -gatos-conf peut le faire automatiquement -ou- -Specifiez la Ram Vidéo dans le fichier XF86Config. Vous devez specifier la Ram Vidéo de votre carte en kilo-octets, moins l'espace attribué pour le buffer de capture. Référez vous au fichier XF86Config.sample pour plus de détails, c'est un fragment d'exemple de ce que vous devez ajouter à votre XF86Config existant, ce n'est PAS un fichier de configuration complet. -Configuration de gatos.conf: -gatos-conf peut le faire automatiquement. -ou- cp gatos.conf.sample /etc/gatos.conf -Editez le fichier /etc/gatos.conf et saisissez les valeurs correctes concernant la mémoire vidéo, la mémoire buffer réservée et le format vidéo. -Executez xatitv et configurez tout dans la fenêtre "Config". -Type Télévisuel: Choisissez le standard utilisé dans votre région. -CC Mode: Si vous désirez utiliser le closed-captioning, sélectionner le mode désiré. -Options: Personnalisez ces paramétres à votre gout. -Mixer: Sélectionner le mixer correspondant à l'entrée audio de votre carte son où est connecté votre tuner ATI. Généralement "CD" pour le connecteur interne ou bien "Line" pour l'externe, mais si celà ne fontionne pas, essayer les autres. Vérifiez que le volume soit suffisant quand vous effectuez les tests afin d'entendre quelque chose quand vous aurez sélectionné la bonne source. -Rescrutez les canaux: Utilisez ceci afin d'effacer les canaux courants et de rechercher les nouveaux. -Convertir au standard: Clickez ce bouton afin de convertir les canaux courants au standard nouvellement sélectionné. -Fin: Clickez ce bouton pour sortir de la configuration. gatos-0.0.5/README.french0100644002411700123110000001376307027317357013443 0ustar bayleasrGATOS version 0.0.5 HOMEPAGE La homepage de GATOS est localisée à: http://www.core.binghamton.edu/~insomnia/gatos/ Mises à jour, nouveautées, documentation additionnelle et la FAQ sont disponibles sur ce site. MAINTAINEUR Insomnia (Stea Greene) envoyez les rapports de bug et les codes correctifs à cette adresse. Consultez le fichier "CREDITS" pour les infos sur les auteurs. CONDITIONS -GNU/Linux, FreeBSD et NetBSD (testé uniquement sur x86). -ATI All-In-Wonder, All-In-Wonder Pro, ou Rage II/Pro avec la carte tuner ATI-TV. Support limité pour les cartes All-In-Wonder 128 et Rage128 avec le tuner ATI-TV. -XFree86 recommandé, mais non requis. INSTALLATION/CONFIGURATION Consultez le fichier "INSTALL" pour les informations sur l'installation et la configuration. FORMAT DE FICHIERS Note, les captures animées faites avec xatitv et atitv utilisent un format de fichier spécial ".yuv" unique a gatos. Les prises de clichés sont sauvés au format ".ppm", qui sont visibles (et convertibles) par la plupart des programmes de manipulations graphique. Il n'y a pas d'intelligence automatique dans xatitv pour sélectionner l'extension de ces fichiers, donc pour être sûr de ne pas mettre en defaut d'autres programmes, prenez toujours les clichés dans un fichier ".ppm", et des captures vidéo dans un fichier ".yuv". Ceci seras corrigé dans la prochaine version. UTILISATION Il y a quelques programmes fournis dans le package GATOS : -===== gatos-conf: Application graphique de =====- -===== configuration pour GATOS =====- C'est un nouveau programme de configuration pour GATOS ecrit par Daniel Caujolle-Bert. Lancez le simplement, et choisissez les valeurs correctes puis cliquez sur "Sauve & Quitte". Quelques remarques: -Même si vous choisissez "Gatos trouveras la RAM", vous devez tout de même sélectionner la quantité de mémoire Vidéo. -La sélection du mode I2C doit être laissée sur "Autodétection par Gatos", sinon gatos peut échouer au démarrage. -Le type Télévisuel est optionnel, il peut être réglé à partir d'xatitv. -===== xatitv: application GUI TV-dans-une-fenêtre =====- C'est le programme principal fourni avec GATOS. Il permet un accès graphique à toutes les fonctionnalitées de GATOS, à l'exception de la sortie TV. L'interface utilisateur parle d'elle même, mais voici les fonctions basique: *Au premier lancement, cliquez sur setup et configurez le format et les options, et lancez une recherche des canaux. *Utilisez les trois boutons nommés "TV", "CV" et "SV" pour selectionner la source vidéo à partir de, respectivement, Tuner TV, Vidéo Composite et SVHS. *Les boutons "Adv.", "Capture" et "Edit Channel" selectionnent les autres sections de l'interface utilisateur. *Volume, Brightness, Contrast, Hue et Saturation peuvent êtres modifiés en cliquant avec la souris à n'importe quel endroit de leurs ascenseurs respectifs. *La partie "Edit Channel" peut être utilisée pour définir les caractéristiques specifiques pour la vidéo et l'audio (si un canal et trop brillant/sombre, trop bruyant/silencieux, etc) et pour supprimer de mauvais canaux. *Il y a beaucoup d'autres fonctionnalitées, regardez et essayez les. *Beaucoup de fonctionnalitées ont des raccourcis clavier: -Echap: Quitte. -Tab/Click-Droit: Cache/Affiche l'interface utilisateur. -F1-F8: Canaux favoris (Définis avec CTRL+Key). -F9-F12: Affiche les infos de débugage. -Numéros: Change de canal par numéro. -Lettres/espace: Change de canal par nom. -Entrée/Retour: Termine la saisie (nom/numéro du canal). -Haut/Bas: Fait defiler les réglages. -Gauche/Droite: Change le réglage courant. -Pavé Num +/-: Change de canal. -Backspace: Reviens sur le canal précédent quitté il y a plus de 5 secondes. -Pavé Num /: Bascule du mode muet. -Pavé Num *: Bascule du mode Plein Ecran. -` ou ~: Bascule du mode Closed Captioning (CC). -> et <: Augmente/Réduit la taille de la fenêtre par un facteur de 2. Pause: Gèle la capture sur la trame courante. Imp Ecran: Capture une seule trame (prends un cliché). -===== atitv: Programme simple en mode texte =====- Ce programme est toujours en cours de développement. Il offre des fonctionnalitées basiques pour enregistrer de la vidéo et prendre des clichés. *Lancez "atitv --help" pour les détails de son utilisation. -= atitoppm: programme de conversion YUV =- Il convertis les fichiers ".yuv" crées par gatos en une série de fichiers ".ppm". Utilisez comme décrit ci-dessous: atitoppm < gatos.yuv -===== atitogif: programme de conversion YUV =====- Il convertis les fichiers ".yuv" crées par gatos en une série de fichiers ".gif". Utilisez comme décrit ci-dessous: atitogif < gatos.yuv Note, à la différence d'atitoppm, cette application requière la présence de quelques utilitaires (comme ppmtogif, etc...). Si ils ne sont pas présents, ce programme ne fonctionneras pas. -===== atitojpg: programme de conversion YUV =====- Il convertis les fichiers ".yuv" crées par gatos en une série de fichiers ".jpg". Utilisez comme décrit ci-dessous: atitojpg < gatos.yuv Note, à la différence d'atitoppm, cette application requière la présence de quelques utilitaires (comme ppmtojpg, etc...). Si ils ne sont présents, ce programme ne fonctionneras pas. -===== yuvsum: programme de conversion YUV =====- Il fait la moyenne des images du ficher gatos.yuv (elles doivent être de même taille) en un fichier au format ppm. Utilisez comme décrit ci-dessous: yuvsum < gatos.yuv -===== atisplit: programme de conversion YUV =====- Il convertis les fichiers ".yuv" crées par gatos en trames séparées dans des fichiers ".yuv". Consultez le fichier README.atisplit pour plus de détails. BUGS Pour la liste de bugs et pour les instructions de signalement de ceux-ci, consultez le fichier "BUGS". PATCHES Pour les instructions sur l'utilisation des patches, consultez le fichier "PATCHES". gatos-0.0.5/autogen.sh0100755002411700123110000000246606765053731013317 0ustar bayleasr#!/bin/sh # ############################################################## # This will generate automatically configure and Makefile.in # ############################################################## # ####### M4FILES="gettext.m4 curses.m4 libtool.m4 gatos.m4" ####### # Put here args for *auto*programs ####### ACLOCAL_ARGS="" AUTOHEADER_ARGS="" AUTOCONF_ARGS="" AUTOMAKE_ARGS="" ####### # ####### echo -n "Check if m4 directory available:" if test -d m4; then echo " yes" echo -n "Erase old acinclude.m4:" rm -f acinclude.m4 echo " done" echo "Concatenate files:" for m4_file in $M4FILES; do echo " m4/$m4_file" cat m4/$m4_file >> acinclude.m4 done echo " to acinclude.m4." else echo " no" echo "m4 directory not found, skipping generation of acinclude.m4" exit fi ####### # ####### echo -n "Start aclocal with args ($ACLOCAL_ARGS):" aclocal $ACLOCAL_ARGS echo " done" echo -n "Start autoheader with args ($AUTOHEADER_ARGS):" autoheader $AUTOHEADER_ARGS echo " done" echo -n "Start autoconf with args ($AUTOCONF_ARGS):" autoconf $AUTOCONF_ARGS echo " done" echo -n "Start automake with args ($AUTOMAKE_ARGS):" automake $AUTOMAKE_ARGS echo " done" ####### # ####### echo -n "Delete config.cache:" rm -f config.cache echo " done" ####### # ## # End of autogen.sh #### gatos-0.0.5/gatos.spec.header0100644002411700123110000000643107027741522014524 0ustar bayleasr# Note that this is NOT a relocatable package %define ver @SPEC_VERSION@ %define rel @SPEC_CVS_VERSION@ %define prefix @prefix@ Name: gatos Summary: General ATI TV and Overlay Software Version: %ver Release: %rel Copyright: GPL Requires: ibtk Group: Applications/Graphics Source0: http://www.core.binghamton.edu/~insomnia/gatos/ Source1: @TAR_NAME@.tar.gz URL: http://www.core.binghamton.edu/~insomnia/gatos/ %description GATOS (the General ATI TV and Overlay Software) is an effort to create standard drivers for all currently unsupported features of ATI video cards, specifically TV features. Included with this package are: xatitv, atitv, yuvsum, atitoppm, atitogif, atitojpg, atisplit and gatos-conf. %setup -b 1 -T %build cd ../SOURCES tar xzvf @TAR_NAME@.tar.gz cd @TAR_NAME@ ./configure make %install cd @TAR_NAME@ make install %clean cd ../SOURCES rm -rf @TAR_NAME@ %post echo "******************************************" echo "* Please check you configuration file... *" echo "* See gatos.conf man page *" echo "******************************************" %files %{prefix}/bin/atisplit %{prefix}/bin/atitogif %{prefix}/bin/atitojpg %{prefix}/bin/atitoppm %{prefix}/bin/atitv %{prefix}/bin/gatos-conf %{prefix}/bin/scanpci %{prefix}/bin/xatitv %{prefix}/bin/yuvsum ## %{prefix}/lib/gatos.config.sample %{prefix}/lib/libgatos.a %{prefix}/lib/libgatos.la ## %{prefix}/lib/libgatos.so.@GATOS_MAJOR_VERSION@.@GATOS_MINOR_VERSION@.@GATOS_SUB_VERSION@ %{prefix}/include/gatos/*.h %{prefix}/man/man1/atisplit.1 %{prefix}/man/man1/atitojpg.1 %{prefix}/man/man1/atitv.1 %{prefix}/man/man1/gatos.conf.1 %{prefix}/man/man1/xatitv.1 %{prefix}/man/man1/atitogif.1 %{prefix}/man/man1/atitoppm.1 %{prefix}/man/man1/gatos.1 %{prefix}/man/man1/scanpci.1 %{prefix}/man/man1/yuvsum.1 %{prefix}/man/fr/man1/atisplit.1 %{prefix}/man/fr/man1/atitojpg.1 %{prefix}/man/fr/man1/atitv.1 %{prefix}/man/fr/man1/gatos.conf.1 %{prefix}/man/fr/man1/xatitv.1 %{prefix}/man/fr/man1/atitogif.1 %{prefix}/man/fr/man1/atitoppm.1 %{prefix}/man/fr/man1/gatos.1 %{prefix}/man/fr/man1/scanpci.1 %{prefix}/man/fr/man1/yuvsum.1 %{prefix}/share/locale/fr/LC_MESSAGES/atisplit.mo %{prefix}/share/locale/fr/LC_MESSAGES/atitogif.mo %{prefix}/share/locale/fr/LC_MESSAGES/atitojpg.mo %{prefix}/share/locale/fr/LC_MESSAGES/atitoppm.mo %{prefix}/share/locale/fr/LC_MESSAGES/gatos.mo %{prefix}/share/locale/fr/LC_MESSAGES/yuvsum.mo %doc /usr/doc/@PACKAGE@-@SPEC_VERSION@/CREDITS /usr/doc/@PACKAGE@-@SPEC_VERSION@/README.atisplit /usr/doc/@PACKAGE@-@SPEC_VERSION@/gatos.conf.sample /usr/doc/@PACKAGE@-@SPEC_VERSION@/CREDITS.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/README.atisplit.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/gatos.conf.sample.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/PATCHES /usr/doc/@PACKAGE@-@SPEC_VERSION@/XF86Config.sample /usr/doc/@PACKAGE@-@SPEC_VERSION@/PATCHES.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/XF86Config.sample.french /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.ati /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.bt829 /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.extra /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.fi12xx /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.gatos /usr/doc/@PACKAGE@-@SPEC_VERSION@/library-functions/doc.i2c %changelog gatos-0.0.5/docs/0042755002411700123110000000000007030251710012222 5ustar bayleasrgatos-0.0.5/docs/Makefile.in0100644002411700123110000001464107030251710014270 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ docdir = /usr/doc/@PACKAGE@-@SPEC_VERSION@ EXTRA_DIST = CREDITS CREDITS.french PATCHES PATCHES.french README.atisplit README.atisplit.french XF86Config.sample XF86Config.sample.french gatos.conf.sample gatos.conf.sample.french docs_DOCS = $(EXTRA_DIST) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps docs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = docs distdir: $(DISTFILES) @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-data-local install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-local uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-local install-data-am install-data install-am install \ uninstall-local uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean install-data-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$doc $$dir/$$name; \ echo "installing $$doc as $$dir/$$name"; \ done uninstall-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir; \ rm -f $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/docs/Makefile.am0100644002411700123110000000217707016250772014273 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## docdir = /usr/doc/@PACKAGE@-@SPEC_VERSION@ EXTRA_DIST = CREDITS CREDITS.french PATCHES PATCHES.french README.atisplit \ README.atisplit.french XF86Config.sample \ XF86Config.sample.french gatos.conf.sample \ gatos.conf.sample.french docs_DOCS = $(EXTRA_DIST) install-data-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$doc $$dir/$$name; \ echo "installing $$doc as $$dir/$$name"; \ done uninstall-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir; \ rm -f $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/docs/CREDITS0100644002411700123110000000274007027252211013243 0ustar bayleasrGATOS version 0.0.5 Maintained by: Insomnia (Stea Greene) send bug reports and code patches to this address Primary Authors: Øyvind Aabling Daniel Caujolle-Bert Vladimir Dergachev Insomnia (Stea Greene) Christian Lupien Octavian PURDILA Based on: -aiwtv-0.22 by Øyvind Aabling -aiwtv-0.20uX by Øyvind Aabling, Christian Lupien, Vladimir Dergachev, and Bruce Forsberg -atitv-0.21#X by Øyvind Aabling, Insomnia (Stea Greene), and Bruce Forsberg -Limited documentation and some support from ATI Technologies Inc. Other Contributors: Bob Bell Bruce Forsberg Chris Hardy Victor Bogado da Silva Lins Ken Dresser Jan ONDREJ techt hook Rodrigo Ventura Files not covered by the main GATOS license (GNU Public License): delay.S, delay.h and linkage.h are from the Linux 2.0.36 kernel sources (slightly modified) and are Copyright (C) 1993 by Linus Torvalds. scanpci.c is from XFree86 3.3.3 and is Copyright (C) 1995 by Robin Cutshaw. pci.c is modified from scanpci.c and is Copyright (C) 1995+1999 by Robin Cutshaw and Øyvind Aabling. gatos-0.0.5/docs/CREDITS.french0100644002411700123110000000300707027305307014511 0ustar bayleasrGATOS version 0.0.5 Maintenu par: Insomnia (Stea Greene) envoyez les rapports de bug et les correctifs à cette adresse. Auteurs Principaux: Øyvind Aabling Daniel Caujolle-Bert Vladimir Dergachev Insomnia (Stea Greene) Christian Lupien Octavian PURDILA Basé sur: -aiwtv-0.22 par Øyvind Aabling -aiwtv-0.20uX par Øyvind Aabling, Christian Lupien, Vladimir Dergachev, et Bruce Forsberg -atitv-0.21#X par Øyvind Aabling, Insomnia (Stea Greene), et Bruce Forsberg -Documentation limitée et un peu de support d'ATI Technologies Inc. Autres Contributeurs: Bob Bell Bruce Forsberg Chris Hardy Victor Bogado da Silva Lins Ken Dresser Jan ONDREJ techt hook Rodrigo Ventura Fichiers non couverts par la licence principale de GATOS (License Public GNU) delay.S, delay.h et linkage.h proviennent des sources du noyau Linux 2.0.36 (légèrement modifiés) sous Copyright (C) 1993 de Linus Torvalds. scanpci.c viens de XFree86 3.3.3 sous Copyright (C) 1995 de Robin Cutshaw. pci.c est une version modifiée de scanpci.c sous Copyright (C) 1995+1999 de Robin Cutshaw et Øyvind Aabling. gatos-0.0.5/docs/PATCHES0100644002411700123110000000337706765550011013253 0ustar bayleasrAPPLYING PATCHES To apply a package, first make sure you have the original source that the patch was intended for. Change into that directory, than use the following command: gunzip -c {full_path_of_patch} | patch -p1 -or- gzip -dc {full_path_of_patch} | patch -p1 Note: if the patch does NOT have a ".gz" suffix, use this instead: patch -p1 < {full_path_of_patch} It should create NO *.rej files. If it does, then something didn't work right. If applying to a different base than the patch was intended for, patch may create *.orig files. These are usually OK, just make sure no *.rej files were created. SUBMITTING PATCHES All patches should be sent to me: Insomnia (Stea Greene) Make sure to send a full, detailed description of what your patch does, what it changes and what it fixes. To create a patch, first make sure you have a full tree of both the original and the modified trees (herin called "gatos-orig" and "gatos-new" respectively). Make sure each tree is clean by using: make distclean in EACH directory. Then change to the directory immediately above these two directories and use the following command. diff -ur gatos-orig gatos-new > gatos-new-patch Look at gatos-new-patch (with a text editor or viewer) and make sure nothing is changed that you didn't intend to be. You can submit this patch to me either included in an e-mail, or as a MIME attachment, or you can compress it and send it as a MIME attachment, as follows: Compress it with: gzip -9 gatos-new-patch Then send gatos-new-patch.gz to me as a MIME attachment. If there is a problem with the patch, or I have a question or the patch/description is not understood, you will get a reply, so make sure your message is properly reply-able. gatos-0.0.5/docs/PATCHES.french0100644002411700123110000000420006765053731014510 0ustar bayleasrAPPLICATION DE PATCHES Pour appliquer un patch, premièrement vous devez vous assurer que vous avez les sources originaux auquels le patch est destiné. Entrez dans le repertoire, et utilisez les commandes suivantes: gunzip -c {chemin_complet_du_patch} | patch -p1 -ou- gzip -dc {chemin_complet_du_patch} | patch -p1 Note: si le patch n'as pas le suffixe ".gz", utilisez plutôt ceci: patch -p1 < {chemin_complet_du_patch} Cette opération NE doit pas créer de fichiers *.rej. Si cela arrive, c'est que quelque chose ne s'est pas correctement deroulé. Si l'application de ce patch s'est faite sur une base différente que celle destinée originellement, patch créera des fichiers *.orig. Normalement tout doit bien se passer, verifiez simplement qu'aucuns fichiers *.rej n'ont été crées. SOUMETTRE DES PATCHES Tout patch doit m'être envoyé: Insomnia (Stea Greene) Verifiez que votre envoi est complet, avec une description détaillée de l'action de votre patch, ce qu'il change et ce qu'il corrige. Pour créer un patch, premièrement vérifiez que vous avez l'arborescence des deux répertoires, l'original et la version modifiée (nommées respectivement "gatos-orig" et "gatos-new"). Assurez vous que chaque répertoire est propre en utilisant: make realclean dans CHAQUE répertoire. Ceci fait, changer de répertoire pour celui juste au dessus de ceux-ci et utilisez la commande suivante: diff -ur gatos-orig gatos-new > gatos-new-patch Regardez dans le fichier gatos-new-patch (avec un éditeur de texte ou un visualiseur) et verifiez que les changements soient ceux que vous avez effectués. Vous pouvez alors me soumettre ce patch en l'incluant dans un e-mail, ou par un attachement MIME, ou encore vous pouvez le compresser et l'envoyer dans un attachement MIME, comme il suit: Compressez le avec: gzip -9 gatos-new-patch Vous pourrez alors m'envoyer le patch gatos-new-patch.gz dans un attachement MIME. Si il y a un problème avec le patch, si j'ai une question ou si la description du patch est mal comprise, vous aurez une réponse au message, donc assurez vous de la validité de l'adresse de retour. gatos-0.0.5/docs/README.atisplit0100644002411700123110000000267706765053731014762 0ustar bayleasratisplit atisplit is a small utility to convert gatos capture file (gatos.yuv) into a series of yuv frames good for input to mpeg_encode program. mpeg_encode (version 1.3 on my computer) can be obtained on metalab ( http://www.metalab.unc.edu/ ). note that since mpeg_encode uses yuv files with only quarter of cb and cr fields the output files have less information than the input one. in particular the total size of the output files should be just below 3/4 of the size of the input file. usage: ./xatitv & /* capture whatever you want */ atisplit /* atisplit furiously prints out frames */ /* edit file default.lparam */ mpeg_encode default.lparam /* you now have file output.mpg */ You can find a sample default.lparam file below: # ----------------------------------------------- # parameter file with good default values # # use this as a guideline for any parameters you don't really understand # or don't care about # PATTERN IBBPBBPBBPBBPBB OUTPUT output.mpg BASE_FILE_FORMAT YUV GOP_SIZE 10 SLICES_PER_FRAME 1 PIXEL HALF RANGE 10 PSEARCH_ALG LOGARITHMIC BSEARCH_ALG CROSS2 IQSCALE 8 PQSCALE 10 BQSCALE 25 REFERENCE_FRAME ORIGINAL # # you really need to understand the following # YUV_SIZE 320x240 INPUT_CONVERT * INPUT_DIR ./ INPUT tv*.yuv [000001-000100] END_INPUT gatos-0.0.5/docs/README.atisplit.french0100644002411700123110000000307506765053731016217 0ustar bayleasratisplit atisplit est un petit utilitaire qui converti les fichiers de capture gatos (gatos.yuv) en une série de trames yuv correcte pour l'entrée du programme mpeg_encode. mpeg_encode (version 1.3 sur mon ordinateur) peut être obtenu sur le site de metalab ( http://www.metalab.unc.edu/ ). notez que depuis que mpeg_encode utilise des fichiers yuv avec un quart des champs cb et cr, les fichiers de sortie ont moins d'informations que les fichiers d'entrée. En particulier la taille totale du fichier de sortie sera juste les 3/4 de celle du fichier d'entrée. utilisation: ./xatitv & /* capturez ce que vous désirez */ atisplit /* atisplit affiche furieusement les trames de sortie */ /* éditez le fichier default.lparam */ mpeg_encode default.lparam /* vous avez maintenant le fichier output.mpg */ Vous trouverez ci-dessous le fichier default.lparam: # ----------------------------------------------- # fichier de paramètrage avec de bonnes valeurs par défaut # # utilisez ceci à des fins de guide pour les paramètres que vous ne # comprenez par réellement ou auquels vous n'attachez aucune importance. # PATTERN IBBPBBPBBPBBPBB OUTPUT output.mpg BASE_FILE_FORMAT YUV GOP_SIZE 10 SLICES_PER_FRAME 1 PIXEL HALF RANGE 10 PSEARCH_ALG LOGARITHMIC BSEARCH_ALG CROSS2 IQSCALE 8 PQSCALE 10 BQSCALE 25 REFERENCE_FRAME ORIGINAL # # vous devez réellement comprendre ce qui suit # YUV_SIZE 320x240 INPUT_CONVERT * INPUT_DIR ./ INPUT tv*.yuv [000001-000100] END_INPUT gatos-0.0.5/docs/XF86Config.sample0100644002411700123110000000656106765053731015272 0ustar bayleasr# This file describes what you need to change in # the active "Device" section of your XF86Config. # If you use another (non-XFree86) X server, make similar # changes to your equivalent X windows config file. # Also see gatos.conf.sample. Section "Device" Identifier "ATI graphics card" VendorName "ATI" BoardName "ATI graphics card" # First determine size of video capture buffers: # Best size is 864kb for PAL/SECAM or 600kb for NTSC, # which gives full TV quality capture and display. # Smaller values can be used, but at a loss of quality. # The video capture buffers are an essential link in the video # processing chain, and they can *only* reside in video memory. # The TV/video X window can be any size, and is # independant of the capture buffer size, but smaller # buffers will result in poorer display quality. # To select a buffersize, choose from the table below: # FULL is full TV quality (and max memory usage), # XCIF is 3/4 size (non-standard size, uses 40% less memory), # CIF is 1/2 size (1/4 memory), # QCIF is 1/4 size (1/16 memory), # ICON is 1/8 size (1/64 memory). # # CIF is a bit blurry, and QCIF and below # will give a *very* poor quality display. # PAL | size: FULL XCIF CIF QCIF ICON # and | geometry: 768x576 576x432 384x288 192x144 96x72 # SECAM | memory: 864kb 486kb 216kb 54kb 14kb # NTSC | size: FULL XCIF CIF QCIF ICON # and | geometry: 640x480 480x360 320x240 160x120 80x60 # PAL-M | memory: 600kb 338kb 150kb 38kb 10kb # If you specify a buffer memory size not listed above, # xatitv/GATOS will automatically choose the largest among the # ones listed above that will fit in the given buffer space. # For the curious, the formula is: # ( HorizontalMax * VerticalMax ) / 512 ) kilobytes, # rounded up to nearest kilobyte, # where HorizontalMax * VerticalMax is the # maximum geometry of the video capture buffers. # Xatitv/GATOS uses the top of video memory for the # buffers (the size of which you've chosen above). # You must ensure that the X server doesn't use # this memory as well, or you'll get pixmap and font # corruption, or the X server may crash or hang. # This can be avoided like this: # Don't let the X server autodetect the amount of videoram, # but give it: (amount of videoram in kb) - kb. # This avoids *all* problems with the capture buffers # corrupting X server structures in offscreen video memory. # Drawback: The X server will have kb less # video memory available to the framebuffer and offscreen # structures, even when xatitv/GATOS is not running. # This may decrease your maximum possible screen or desktop size. # The line uncommented below as an example is for maximum quality # with a PAL or SECAM tuner and a card with 8MB of video memory. #VideoRam 8192 # 8Mb of video RAM on card, PAL/SECAM tuner. VideoRam 7328 # 8Mb - 864kb for buffers. -Uncomment this line #VideoRam 8192 # 8Mb of video RAM on card, NTSC/PAL-M tuner. #VideoRam 7592 # 8Mb - 600kb for buffers. -Uncomment this line #VideoRam 4096 # 4Mb of video RAM on card, PAL/SECAM tuner. #VideoRam 3232 # 4Mb - 864kb for buffers. -Uncomment this line #VideoRam 4096 # 4Mb of video RAM on card, NTSC/PAL-M tuner. #VideoRam 3496 # 4Mb - 600kb for buffers. -Uncomment this line EndSection gatos-0.0.5/docs/XF86Config.sample.french0100644002411700123110000001020006765053731016517 0ustar bayleasr# Ce fichier décris ce que vous devez changer dans # la partie "Device" de votre fichier XF86Config # Si vous utilisez un autre serveur X (non-XFree86), faites # des changements similaires à votre fichier de configuration du # serveur X # Consultez aussi le fichier gatos.conf.sample Section "Device" Identifier "Carte graphique ATI" VendorName "ATI" BoardName "Carte graphique ATI" # Premièrement déterminez la taille des buffers de capture vidéo: # La meilleure taille est 864ko pour le PAL/SECAM ou 600ko # pour le NTSC, ce qui vous donneras la meilleure qualité de # capture et d'affichage de la TV. # Des valeurs inférieures peuvent être utilisées, mais une # perte de la qualité s'ensuivra. # Les buffers de capture vidéo sont les maillons essentiels dans # la chaîne du processus vidéo, et ils résident *uniquement* # dans la mémoire vidéo. # La fenêtre X TV/vidéo peut avoir n'importe quelle taille, et # est indépendante de la taille du buffer de capture, mais des # buffers plus petits auront pour résultat une qualité # d'affichage assez pauvre. # Pour choisir une taille de buffer, choisissez une valeur # dans le tableau ci-dessous: # FULL pour une qualité optimale (et un maximum d'utilisation # de la mémoire vidéo), # XCIF pour les 3/4 de la taille (taille non standard, utilise # 40% de mémoire en moins), # CIF pour 1/2 taille (1/4 de mémoire), # QCIF pour 1/4 de la taille (1/16 de mémoire), # ICON pour 1/8 de la taille (1/64 de mémoire). # # CIF est d'une qualité moyenne, et QCIF et les suivants # donneront une qualité *très* pauvre à l'affichage. # PAL | taille: FULL XCIF CIF QCIF ICON # et | géometrie: 768x576 576x432 384x288 192x144 96x72 # SECAM | mémoire: 864kb 486kb 216kb 54kb 14kb # NTSC | taille: FULL XCIF CIF QCIF ICON # et | géometrie: 640x480 480x360 320x240 160x120 80x60 # PAL-M | mémoire: 600kb 338kb 150kb 38kb 10kb # Si vous spécifiez une taille de buffer mémoire non listée # dans le tableau précédent, xatitv/GATOS choisira # automatiquement une valeur plus importante juste au dessus # listée ci-dessus, qui permettra de créer l'espace du buffer. # Pour les curieux, la formule est: # ( HorizontalMax * VerticalMax ) / 512 ) kilo-octets, # arrondie au kilo-octet le plus proche, # où HorizontalMax * VerticalMax est la géometrie # maximum des buffers de capture vidéo. # Xatitv/GATOS utilise le haut de la mémoire vidéo pour les # buffers (la taille que vous avez précédement choisie). # Vous devez vous assurer que le serveur X n'utilise pas cette # mémoire, ou vous serez confronté à des problème d'affichage # des pixmaps et des fontes, ou bien le serveur X plantera ou # figera. # Vous pouvez éviter ces problèmes en procédant comme ci-dessous: # Ne laissez pas le serveur X faire une détection automatique # de la quantité de ram vidéo, mais donnez la lui plutôt: # (taille de la mémoire en ko) - ko. # Ceci évite *tous* les problèmes avec les buffers de capture # corrompant les structures du serveur X sortant de la mémoire # vidéo. # Conséquence: Le serveur X aura donc ko # en moins disponible pour la partie affichage, même si # Xatitv/GATOS n'est pas en cours d'exécution. # Ceci réduit la taille maximum possible des écrans et bureaux. # La ligne décommentée qui suit est un exemple pour une # qualité maximale avec un tuner PAL ou SECAM et une carte avec # 8Mo de mémoire vidéo. #VideoRam 8192 # 8Mo de mémoire vidéo sur la carte, # tuner PAL/SECAM. VideoRam 7328 # 8Mo - 864ko pour les # buffers. -Décommentez cette ligne #VideoRam 8192 # 8Mo de mémoire vidéo sur la carte, # tuner NTSC/PAL-M. #VideoRam 7592 # 8Mo - 600ko pour les # buffers. -Décommentez cette ligne #VideoRam 4096 # 4Mo de mémoire vidéo sur la carte, # tuner PAL/SECAM. #VideoRam 3232 # 4Mo - 864ko pour les # buffers. -Décommentez cette ligne #VideoRam 4096 # 4Mo de mémoire vidéo sur la carte, # tuner NTSC/PAL-M. #VideoRam 3496 # 4Mo - 600ko pour les # buffers. -Décommentez cette ligne EndSection gatos-0.0.5/docs/gatos.conf.sample0100644002411700123110000000216707027252211015472 0ustar bayleasr# Sample config file, install as /usr/local/lib/gatos.conf # and edit/check buffermem. # videoram and format are optional and should be left commented out. # Change to (full) amount of video RAM on your card ! #videoram 8192 # Total size of video memory in kilobytes. # Change to amount of video RAM you've reserved for GATOS ! # See XF86Config.sample for details. buffermem 864 # Size of reserved video memory in kilobytes. # TV signal format. Country # # 1 NTSC-M US and many others # 2 NTSC-Japan Japan # 3 PAL-B Many (Europe) # 3 PAL-D China # 3 PAL-G Many (Europe) # 3 PAL-H Belgium # 3 PAL-I Great Britain and others # 4 PAL-M Brazil (NTSC-like PAL format) # 5 PAL-N Paraguay, Uruguay # 6 SECAM East Europe, France, Middle East # 7 PAL-Ncomb Argentina # #format ? # Change to the format used in your area ! # Uncomment and change if automatic I2C mode detection fails: # 1: Register type A: DAC_CNTL+GEN_TEST_CNTL Registers # 2: Register type B: GP_IO Register # 3: Rage PRO interface (I2C_CNTL_{0,1} registers) # 4: Register type LG: GP_IO Register # 5: MPP/ImpacTV interface #i2c_mode ? gatos-0.0.5/docs/gatos.conf.sample.french0100644002411700123110000000242007027305307016733 0ustar bayleasr# Fichier de configuration simple, à installer dans /usr/local/lib/gatos.conf, # éditez/vérifiez la valeur pour la mémoire pour le buffer. # videoram et format sont optionnels et peuvent rester commentés. # Changez pour la totalité de mémoire vidéo disponible sur votre # carte ! #videoram 8192 # Taille totale de la mémoire vidéo en # kilo-octets # Changez pour la quantité de RAM Vidéo que vous réserverez pour GATOS ! # Consultez XF86Config.sample pour les détails. buffermem 864 # Taille de la mémoire réservée en kilo-octets. # Format du signal TV Pays # # 1 NTSC-M US et plusieurs autres # 2 NTSC-Japan Japon # 3 PAL-B Plusieurs (Europe) # 3 PAL-D Chine # 3 PAL-G Plusieurs (Europe) # 3 PAL-H Belgique # 3 PAL-I Grande Bretagne et autres # 4 PAL-M Bresil (comme du NTSC format PAL) # 5 PAL-N Paraguay, Uruguay # 6 SECAM Europe de l'Est, France, Middle East # 7 PAL-Ncomb Argentine # #format ? # Changez pour le format utilisé dans votre pays ! # Décommentez et changez si la détection du mode I2C échoue: # 1: Registre de type A: Registres DAC_CNTL+GEN_TEST_CNTL # 2: Registre de type B: Registre GP_IO # 3: Interface Rage PRO: (registres I2C_CNTL_{0,1}) # 4: Registre de type LG: Registre GP_IO # 5: Interface MPP/ImpacTV #i2c_mode ? gatos-0.0.5/gfxdump/0042755002411700123110000000000007030251711012745 5ustar bayleasrgatos-0.0.5/gfxdump/README0100644002411700123110000001132107030240376013623 0ustar bayleasrgfxdump version 0.0.1: Program for dumping graphics chips registers on Linux and Windows 9X. Copyright (C) 1999 by Øyvind Aabling, Oyvind.Aabling@uni-c.dk. At this point, only the graphics chips/cards listed below are supported, but the program has been prepared for expansion to dump registers of any graphics cards known to XFree86: * Tseng Labs: ET6000, * ATI Technologies: Mach 64 (including Rage, Rage II and Rage PRO variants), * ATI Technologies: Rage 128. Compilation on Linux: gcc -O2 -o gfxdump gfxdump.c Compilation on Windows 9X: gcc -O2 -o gfxdump.exe gfxdump.c The included gfxdump.exe has been compiled with gcc 2.8.1 in the MingW32 environment on Windows 98. To run this program, the following files *must* be present in the current working directory: Linux: The compiled program (gfxdump) and the .reg files. Win9X: The executable (gfxdump.exe), the .reg files and mapdev.vxd. On Linux, gfxdump must be called as root, on Win9X, call gfxdump.exe from a DOS box. Usage for GATOS (the short story): * Call "gfxdump" to list all graphics cards (PCI and AGP). * Call "gfxdump -a -b -e +dac " to dump the registers for the PCI/AGP card at to . * Send the to the GATOS team. Examples: (two ATI graphics cards present here): # ./gfxdump 0:15:0 : 1002:4756 (ATI Technologies) 1:0:0 : 1002:4742 (ATI Technologies) (dump registers of the first card to dump1.dat): # ./gfxdump -a -b -e +dac 0:15:0 dump1.dat Usage (the long story): First call "gfxdump" (without arguments) to list all graphics cards (PCI and AGP), or call "gfxdump -v" to list all PCI/AGP cards in the system, then call "gfxdump [flags] []" to dump selected registers for a particular graphics card. gfxdump prints the PCI address, VendorID:DeviceID and vendor name of all graphics cards in the system. gfxdump -v same, except that PCI address and VendorID:DeviceID are printed also for all non-graphics cards present in the system. gfxdump [-a] [-e] [(+|-)] [outfile] dump selected register groups for the specified PCI or AGP card. General program flags: -e Print everything about each register. Default is to print only the register address and value. Register selection flags: -a Dump all registers. - Include registers in . + Exclude registers in . A PCI or AGP card address is of the form bus:card:func, often "1:0:0" for an AGP card, and "0:#:0" for a PCI card in slot #. Note, that calling "gfxdump ", i.e. without any '-a' or '-' options causes gfxdump to dump no registers. Also note, that the sequence in which '-a' and '[+-]' options are specified *does* matter. The defined register groups for a chip can be seen in VGA.reg (for the VGA registers) and in the relevant .reg file for the chip specific registers. Examples: List all graphics cards (ATI AGP card present @ 1:0:0): # ./gfxdump 1:0:0 : 0x1002:0x5246 (ATI Technologies) Also list non-graphics cards: # ./gfxdump -v 0:0:0 : 0x8086:0x7180 0:1:0 : 0x8086:0x7181 0:7:0 : 0x8086:0x7110 0:7:1 : 0x8086:0x7111 0:7:2 : 0x8086:0x7112 0:7:3 : 0x8086:0x7113 0:14:0 : 0x104B:0x8130 1:0:0 : 0x1002:0x5246 (ATI Technologies) Dump all registers except the DAC registers: # ./gfxdump -a -e +dac 1:0:0 IO_03C0 = 20 138 GEN ATCIDX IO_03C2 = 00 131 GEN InputStatus0 IO_03C4 = 00 167 GEN TSIDX ... MMR_1CA0 = 00000000 8-10 3D MISC_3D_STATE_CNTL_REG MMR_1D34 = 00000000 8-13 2D CONSTANT_COLOR_C MMR_1D44 = FFFFFFFF 8-13 3D PLANE_3D_MASK_C Dump capture and overlay registers only: # ./gfxdump -e -cap -ov 1:0:0 MMR_0400 = 0019025D M-3 OV OV0_Y_X_START MMR_0404 = 020D04F8 M-3 OV OV0_Y_X_END MMR_0408 = 00000000 M-3 OV OV0_EXCLUSIVE_HORZ ... MMR_09E0 = 00000042 M-50 CAP CAP1_BUF_STATUS MMR_09E8 = 10001000 M-51 CAP CAP1_DWNSC_XRATIO MMR_09EC = 00000000 M-51 CAP CAP1_XSHARPNESS regaddr regvalue docref group registername Output columns: regaddr Register access method and address. regvalue Register value. docref Page reference to relevant register docs. These are not 100% accurate, and the page refs for the VGA registers are for the Tseng ET6000 databook. group Register group, exclude registers in group GROUP with option +group, include with -group (or "-a" to get everything ;-). registername Name of the register. Special Copyrights: AsmMacros.h and pci.c are from XFree86 3.3.*, and are under the XFree86 copyright. The Windows9X memory mapping VxD, mapdev.vxd and it's header file mapdev.h are Copyright (c) 1996 Vireo Software, Inc., and are reused with permission from Karen Hazzah , see mapdev.copyright. Øyvind Aabling, gatos-0.0.5/gfxdump/COPYING0100644002411700123110000004307607030240376014012 0ustar bayleasr GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gatos-0.0.5/gfxdump/Makefile.am0100644002411700123110000000352207030240376015003 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## ## ## Options for automake ## AUTOMAKE_OPTIONS = no-dependencies foreign ## ## C and C++ flags ## CFLAGS = -O2 ## ## C and C ++ compiler ## CC = @CC@ INCLUDES = -I/usr/local/include -I$(X_X11_INC) ## ## These files MUST be present in the distribution ## EXTRA_DIST = AsmMacros.h Mach64.reg README VGA.reg gfxdump.exe \ mapdev.vxd COPYING Rage128.reg mapdev.copyright \ ET6000.reg RagePRO.reg mapdev.h pci.c SPECIAL_PRGS = gfxdump ## ## Binary program that will NOT be install ## noinst_PROGRAMS = gfxdump ############################################################################### ## ## Gfxdump program ## gfxdump_SOURCES = \ gfxdump.c \ gfx.h ## ############################################################################### ## install-extra: $(SPECIAL_PRGS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(SPECIAL_PRGS)'; \ for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ fi; \ done uninstall-local: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS) $(SPECIAL_PRGS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/gfxdump/Makefile.in0100644002411700123110000002331107030240376015012 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ AUTOMAKE_OPTIONS = no-dependencies foreign CFLAGS = -O2 CC = @CC@ INCLUDES = -I/usr/local/include -I$(X_X11_INC) EXTRA_DIST = AsmMacros.h Mach64.reg README VGA.reg gfxdump.exe mapdev.vxd COPYING Rage128.reg mapdev.copyright ET6000.reg RagePRO.reg mapdev.h pci.c SPECIAL_PRGS = gfxdump noinst_PROGRAMS = gfxdump ############################################################################### gfxdump_SOURCES = gfxdump.c gfx.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ gfxdump_OBJECTS = gfxdump.o gfxdump_LDADD = $(LDADD) gfxdump_DEPENDENCIES = gfxdump_LDFLAGS = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = README COPYING Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(gfxdump_SOURCES) OBJECTS = $(gfxdump_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign gfxdump/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< .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: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: gfxdump: $(gfxdump_OBJECTS) $(gfxdump_DEPENDENCIES) @rm -f gfxdump $(LINK) $(gfxdump_LDFLAGS) $(gfxdump_OBJECTS) $(gfxdump_LDADD) $(LIBS) 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 = gfxdump distdir: $(DISTFILES) @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-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-local uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-noinstPROGRAMS distclean-compile \ distclean-libtool distclean-tags distclean-generic \ clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ 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-am .PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags 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-local uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean ############################################################################### install-extra: $(SPECIAL_PRGS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(SPECIAL_PRGS)'; \ for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ fi; \ done uninstall-local: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS) $(SPECIAL_PRGS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/gfxdump/gfxdump.c0100644002411700123110000007234107030240376014572 0ustar bayleasr/**************************************************************************\ gfxdump (Program for dumping graphics chip registers) Copyright (C) 1999 Øyvind Aabling. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include "gfx.h" #include "pci.c" #ifdef __unix__ #define MODE "a" #else #define MODE ((binopt)?"ab":"a") #endif #define MAXREGLEN 32 #define MAXACCLEN 7 #define MAXPAGELEN 7 #define MAXGROUPLEN 5 #define MAXGROUPS 32 #define MAXREGS 2048 /* ------------------------------------------------------------------------ */ /* --- Structs --- -------------------------------------------------------- */ /* ------------------------------------------------------------------------ */ /* Register Entry */ typedef struct { char name[MAXREGLEN+1] ; /* Register Name */ u32 offset ; /* For Access Method */ int acc ; /* Access Method Index */ int grp ; /* Group Index */ char page[MAXPAGELEN+1] ; /* Page # in Chip Docs */ int size ; /* Register Bytesize */ int incl ; /* Include Register in output */ int valid ; /* Register Value Valid */ u32 value ; /* Register Value */ u32 mask ; /* Register Value Mask */ } REG ; /* Register Access Method Entry */ typedef struct { char *name ; /* Register Access Method Name */ char *prtname ; /* Register Access Method Name (Output) */ u32 (*acc)(REG*) ; /* Register Access Function */ int (*prt)(REG*) ; /* Register Address Printing Function */ } accessmethod ; /* Register Group Entry */ typedef struct { char name1[MAXGROUPLEN+1] ; /* Register Group Name */ char name2[MAXGROUPLEN+1] ; /* Register Group Name */ char opti1[MAXGROUPLEN+2] ; /* Register Group -Option String */ char optx1[MAXGROUPLEN+2] ; /* Register Group +Option String */ char opti2[MAXGROUPLEN+2] ; /* Register Group -Option String */ char optx2[MAXGROUPLEN+2] ; /* Register Group +Option String */ int incl ; /* Include Register Group in output */ } GRP ; /* ------------------------------------------------------------------------ */ /* --- Function Predeclarations --- --------------------------------------- */ /* ------------------------------------------------------------------------ */ static void dommap(void) ; static int prt_acc_idx(REG*) ; static int prt_acc_4(REG*) ; static int prt_acc_2(REG*) ; static int prt_m64_mem(REG*) ; /* ------------------------------------------------------------------------ */ /* --- Global variables --- ----------------------------------------------- */ /* ------------------------------------------------------------------------ */ /* Chip ID and Memory Mapping */ static int mem=-1, verbose=0, binopt=0, dangeropt=0, repopt=1 ; static int allopt=0, everyopt=0, groupopt=0, nameopt=0, pageopt=0, xopt=0 ; static u16 vendor=0, device=0 ; static u32 base0=0, base1=0, base2=0, baserom=0 ; static u32 size0=0, size1=0, size2=0 ; static volatile u8 *ptr0=NULL, *ptr1=NULL, *ptr2=NULL ; /* Registers and Groups */ static REG *reg ; int nregs=0 ; static GRP *grp ; int ngrps=0 ; /* ------------------------------------------------------------------------ */ /* --- Register Access Methods --- ---------------------------------------- */ /* ------------------------------------------------------------------------ */ /* --- I/O Mapped Registers --- */ static u32 acc_io(REG *r) { switch (r->size) { case 1: return inb(r->offset) ; case 2: return inw(r->offset) ; case 4: return inl(r->offset) ; } return 0xDEADBEEF ; } static u32 acc_io1(REG *r) { switch (r->size) { case 1: return inb(base1+r->offset) ; case 2: return inw(base1+r->offset) ; case 4: return inl(base1+r->offset) ; } return 0xDEADBEEF ; } /* --- base[012] Memory Mapped Registers --- */ static u32 acc_mem0(REG *r) { switch (r->size) { case 1: return GETREG( u8,ptr0,r->offset) ; case 2: return GETREG(u16,ptr0,r->offset) ; case 4: return GETREG(u32,ptr0,r->offset) ; } return 0xDEADBEEF ; } static u32 acc_mem1(REG *r) { switch (r->size) { case 1: return GETREG( u8,ptr1,r->offset) ; case 2: return GETREG(u16,ptr1,r->offset) ; case 4: return GETREG(u32,ptr1,r->offset) ; } return 0xDEADBEEF ; } static u32 acc_mem2(REG *r) { switch (r->size) { case 1: return GETREG( u8,ptr2,r->offset) ; case 2: return GETREG(u16,ptr2,r->offset) ; case 4: return GETREG(u32,ptr2,r->offset) ; } return 0xDEADBEEF ; } /* --- Indexed VGA Registers --- */ static u32 acc_vga_atc(REG *r) { u8 idx, val=0xFF ; inb(0x3DA) ; idx = inb(0x3C0) ; outb(0x3C0,r->offset) ; switch (r->size) { case 1: val = inb(0x3C1) ; break ; } inb(0x3DA) ; outb(0x3C0,idx) ; return val ; } static u32 acc_vga_crt(REG *r) { u8 idx, val=0xFF ; idx = inb(0x3D4) ; outb(0x3D4,r->offset) ; switch (r->size) { case 1: val = inb(0x3D5) ; break ; } outb(0x3D4,idx) ; return val ; } static u32 acc_vga_gra(REG *r) { u8 idx, val=0xFF ; idx = inb(0x3CE) ; outb(0x3CE,r->offset) ; switch (r->size) { case 1: val = inb(0x3CF) ; break ; } outb(0x3CE,idx) ; return val ; } static u32 acc_vga_seq(REG *r) { u8 idx, val=0xFF ; idx = inb(0x3C4) ; outb(0x3C4,r->offset) ; switch (r->size) { case 1: val = inb(0x3C5) ; break ; } outb(0x3C4,idx) ; return val ; } static u32 acc_vga_dac(REG *r) { u8 idx, tmp ; u32 val ; idx = inb(0x3C7) ; outb(0x3C7,r->offset) ; tmp = inb(0x3C9) ; val = tmp<<16 ; tmp = inb(0x3C9) ; val += tmp<<8 ; tmp = inb(0x3C9) ; val += tmp ; outb(0x3C7,idx) ; return val ; } /* --- Vendor Specific --- ------------------------------------------------ */ /* --- Vendor 0x1002: ATI Technologies --- */ static u32 acc_r128_pll(REG *r) { /* MMR_0008, byte 0 and MMR_000C */ #define R128_CLOCK_CNTL_INDEX0 GETREG( u8,ptr2,0x0008) #define R128_CLOCK_CNTL_INDEX0_SET SETREG( u8,ptr2,0x0008) #define R128_CLOCK_CNTL_DATA GETREG(u32,ptr2,0x000C) u8 idx=R128_CLOCK_CNTL_INDEX0 ; u32 val ; R128_CLOCK_CNTL_INDEX0_SET = r->offset ; val = R128_CLOCK_CNTL_DATA ; R128_CLOCK_CNTL_INDEX0_SET = idx ; return val ; } static u32 acc_m64_pll(REG *r) { /* MEM_0_24, byte 1 and 2 */ #define M64_CLOCK_CNTL1 GETREG(u8,ptr2,0x491) #define M64_CLOCK_CNTL1_SET SETREG(u8,ptr2,0x491) #define M64_CLOCK_CNTL2 GETREG(u8,ptr2,0x492) u8 idx=M64_CLOCK_CNTL1, val ; M64_CLOCK_CNTL1_SET = r->offset << 2 ; val = M64_CLOCK_CNTL2 ; M64_CLOCK_CNTL1_SET = idx ; return val ; } static u32 acc_m64_mem(REG *r) { switch (r->size) { case 1: return GETREG( u8,ptr2,((r->offset^0x100)<<2)) ; case 2: return GETREG(u16,ptr2,((r->offset^0x100)<<2)) ; case 4: return GETREG(u32,ptr2,((r->offset^0x100)<<2)) ; } return 0xDEADBEEF ; } /* --- Vendor 0x100C: Tseng Labs --- */ static u32 acc_et6k_pll(REG *r) { u8 idx ; u16 val=0xFFFF ; idx = inb(base1+0x67) ; outb(base1+0x67,r->offset) ; switch (r->size) { case 1: val = inb(base1+0x69) ; break ; case 2: val = inb(base1+0x69) ; val += inb(base1+0x69)<<8 ; break ; } outb(base1+0x67,idx) ; return val ; } /* ------------------------------------------------------------------------ */ /* --- Access Method List --- --------------------------------------------- */ /* ------------------------------------------------------------------------ */ static accessmethod acc[] = { /* --- I/O Mapped Registers --- */ { "I/O", "IO", &acc_io, &prt_acc_4 }, { "I/O1", "IO", &acc_io1, &prt_acc_2 }, /* --- base[012] Memory Mapped Registers --- */ { "MEM0", "MEM", &acc_mem0, &prt_acc_4 }, { "MEM1", "MEM", &acc_mem1, &prt_acc_4 }, { "MEM2", "MEM", &acc_mem2, &prt_acc_4 }, /* --- Indexed VGA Registers --- */ { "ATC", "ATC", &acc_vga_atc, &prt_acc_idx }, { "CRT", "CRT", &acc_vga_crt, &prt_acc_idx }, { "GRA", "GRA", &acc_vga_gra, &prt_acc_idx }, { "SEQ", "SEQ", &acc_vga_seq, &prt_acc_idx }, { "DAC", "DAC", &acc_vga_dac, &prt_acc_idx }, /* --- Vendor 0x1002: ATI Technologies --- */ { "R128MMR", "MMR", &acc_mem2, &prt_acc_4 }, { "R128PLL", "PLL", &acc_r128_pll, &prt_acc_idx }, { "M64MEM", "MEM", &acc_m64_mem, &prt_m64_mem }, { "M64PLL", "PLL", &acc_m64_pll, &prt_acc_idx }, /* --- Vendor 0x100C: Tseng Labs --- */ { "ET6KPLL", "PLL", &acc_et6k_pll, &prt_acc_idx }, /* --- End Marker --- */ { NULL, NULL, NULL, NULL } } ; /* --- Shared Print Routines --- */ static int prt_acc_idx(REG *r) { return printf("%s[%02X]",acc[r->acc].prtname,r->offset) ; } static int prt_acc_4(REG *r) { return printf("%s_%04X",acc[r->acc].prtname,r->offset) ; } static int prt_acc_2(REG *r) { return printf("%s_%02X",acc[r->acc].prtname,r->offset) ; } /* --- ATI Technologies Inc. --- */ static int prt_m64_mem(REG *r) { return printf("MEM_%d_%02X",(int)r->offset>>8,(int)r->offset&0xFF) ; } /* ------------------------------------------------------------------------ */ /* --- Vendor Specific Chip Type Detection --- ---------------------------- */ /* ------------------------------------------------------------------------ */ /* Set size[012]>0 to request memory mapping of * region, and modify base[012] if necessary. * Return name of .reg file listing Chip Registers, * or NULL if Chip ID not recognized. */ /* Vendor 0x1002: ATI Technologies */ /* ATI Technologies */ static char *ati(void) { switch (device) { /* Mach 64 */ case 0x4358: case 0x4354: case 0x4554: case 0x4C54: /* CX, CT, ET, LT */ case 0x5654: case 0x5655: case 0x4754: case 0x4755: /* VT/GT (Rage 1) */ case 0x4756: case 0x4757: case 0x4758: case 0x4759: /* Rage II */ case 0x475A: case 0x5656: case 0x5657: /* Rage II */ case 0x4C47: /* Rage LT */ case 0x4C44: case 0x4C49: case 0x4C50: /* Rage LT Pro */ case 0x4C51: case 0x4C42: /* Rage LT Pro */ case 0x4C4D: case 0x4C52: /* Rage Mobility */ case 0x474D: case 0x474E: case 0x474F: /* Rage XL/XC */ case 0x4752: case 0x4753: /* Rage XL/XC */ size2 = 4096 ; dommap() ; return "Mach64.reg" ; /* Rage PRO */ case 0x4742: case 0x4744: case 0x4749: /* Rage PRO */ case 0x4750: case 0x4751: /* Rage PRO */ size2 = 4096 ; dommap() ; return "RagePRO.reg" ; /* Rage 128 */ case 0x5245: case 0x5246: case 0x524B: case 0x524C: /* Rage 128 */ size2 = 8192 ; dommap() ; return "Rage128.reg" ; default: return NULL ; } } /* Vendor 0x100C: Tseng Labs */ /* Tseng Labs */ static char *tseng(void) { switch (device) { case 0x3202: case 0x3205: case 0x3206: case 0x3207: /* ET4000w32p [ABDC] */ dommap() ; return "ET4000w32p.reg" ; case 0x3208: /* ET6000/6100 */ base0 += 0x3FFF00L ; size0 = 4096 ; dommap() ; return "ET6000.reg" ; case 0x4702: /* ET6300 */ dommap() ; return "ET6300.reg" ; default: return NULL ; } } /* Vendor 0x100E: Weitek */ /* Weitek */ static char *weitek(void) { switch (device) { case 0x9001: /* P9000 */ dommap() ; return "P9000.reg" ; case 0x9100: /* P9100 */ dommap() ; return "P9100.reg" ; default: return NULL ; } } /* Vendor 0x1013: Cirrus Logic */ /* Cirrus Logic */ static char *cirrus(void) { switch (device) { case 0x0038: /* GD 7548 */ dommap() ; return "GD7548.reg" ; case 0x00A0: /* GD 5430 */ dommap() ; return "GD5430.reg" ; case 0x00A4: /* GD 5434-4 */ dommap() ; return "GD5434-4.reg" ; case 0x00A8: /* GD 5434-8 */ dommap() ; return "GD5434-8.reg" ; case 0x00AC: /* GD 5436 */ dommap() ; return "GD5436.reg" ; case 0x00B8: /* GD 5446 */ dommap() ; return "GD5446.reg" ; case 0x00BC: /* GD 5480 */ dommap() ; return "GD5480.reg" ; case 0x00D0: /* GD 5462 */ dommap() ; return "GD5462.reg" ; case 0x00D4: /* GD 5464 */ dommap() ; return "GD5464.reg" ; case 0x00D6: /* GD 5465 */ dommap() ; return "GD5465.reg" ; case 0x1100: /* CL 6729 */ dommap() ; return "CL6729.reg" ; case 0x1110: /* CL 6832 */ dommap() ; return "CL6832.reg" ; case 0x1200: /* GD 7542 */ dommap() ; return "GD7542.reg" ; case 0x1202: /* GD 7543 */ dommap() ; return "GD7543.reg" ; case 0x1204: /* GD 7541 */ dommap() ; return "GD7541.reg" ; default: return NULL ; } } /* Vendor 0x1023: Trident */ /* Trident */ static char *trident(void) { switch (device) { case 0x9320: /* TGUI 9320 */ dommap() ; return "TGUI9320.reg" ; case 0x9420: /* TGUI 9420 */ dommap() ; return "TGUI9420.reg" ; case 0x9440: /* TGUI 9440 */ dommap() ; return "TGUI9440.reg" ; case 0x9660: /* TGUI 9660/9680/9682 */ dommap() ; return "TGUI9660.reg" ; case 0x9388: /* TGUI 9388 */ dommap() ; return "TGUI9388.reg" ; case 0x9397: /* TGUI 9397 */ dommap() ; return "TGUI9397.reg" ; case 0x9750: /* TGUI 9750 */ dommap() ; return "TGUI9750.reg" ; case 0x9850: /* TGUI 9850 */ dommap() ; return "TGUI9850.reg" ; default: return NULL ; } } /* Vendor 0x102B: Matrox */ /* Matrox */ static char *matrox(void) { switch (device) { case 0x0518: /* MGA-2 Atlas PX2085 */ dommap() ; return "Atlas.reg" ; case 0x0519: /* MGA Millennium */ dommap() ; return "Mill.reg" ; case 0x051A: /* MGA Mystique */ dommap() ; return "Mystique.reg" ; case 0x051B: /* MGA Millennium II */ case 0x051F: /* MGA Millennium II AGP */ dommap() ; return "MillII.reg" ; case 0x0520: /* MGA Millennium G200 PCI */ case 0x0521: /* MGA Millennium G200 AGP */ dommap() ; return "MillG200.reg" ; case 0x0D10: /* MGA Impression */ dommap() ; return "Impression.reg" ; case 0x1000: /* MGA Productiva G100 PCI */ case 0x1001: /* MGA Productiva G100 AGP */ dommap() ; return "ProdG100.reg" ; default: return NULL ; } } /* Vendor 0x1039: SIS */ /* SIS */ static char *sis(void) { switch (device) { case 0x0001: /* 86C201 */ dommap() ; return "SIS86C201.reg" ; case 0x0002: /* 86C202 */ dommap() ; return "SIS86C202.reg" ; case 0x0008: /* 85C503 */ dommap() ; return "SIS85C503.reg" ; case 0x0205: /* 86C205 */ dommap() ; return "SIS86C205.reg" ; case 0x0406: /* 85C501 */ dommap() ; return "SIS85C501.reg" ; case 0x0496: /* 85C496 */ dommap() ; return "SIS85C496.reg" ; case 0x0601: /* 85C601 */ dommap() ; return "SIS85C601.reg" ; case 0x5107: /* 5107 */ dommap() ; return "SIS5107.reg" ; case 0x5511: /* 85C5511 */ dommap() ; return "SIS85C5511.reg" ; case 0x5513: /* 85C5513 */ dommap() ; return "SIS85C5513.reg" ; case 0x5571: /* 5571 */ dommap() ; return "SIS5571.reg" ; case 0x5597: /* 5597 */ dommap() ; return "SIS5597.reg" ; case 0x7001: /* 7001 */ dommap() ; return "SIS7001.reg" ; default: return NULL ; } } /* Vendor 0x105D: Number Nine */ /* Number Nine */ static char *number9(void) { switch (device) { case 0x2309: /* Imagine-128 */ dommap() ; return "Imagine128.reg" ; case 0x2339: /* Imagine-128-II */ dommap() ; return "Imagine128II.reg" ; case 0x493D: /* Imagine-128-T2R */ dommap() ; return "Imagine128T2R.reg" ; default: return NULL ; } } /* Vendor 0x10C8: Neomagic */ /* Neomagic */ static char *neomagic(void) { switch (device) { case 0x0001: /* Magicgraph NM2070 */ dommap() ; return "MagicNM2070.reg" ; case 0x0002: /* Magicgraph 128V */ dommap() ; return "Magic128V.reg" ; case 0x0003: /* Magicgraph 128ZV */ dommap() ; return "Magic128ZV.reg" ; case 0x0004: /* Magicgraph NM2160 */ dommap() ; return "MagicNM2160.reg" ; default: return NULL ; } } /* Vendor 0x1163: Rendition */ /* Rendition */ static char *rendition(void) { switch (device) { case 0x0001: /* V1000 */ dommap() ; return "V1000.reg" ; case 0x2000: /* V2100 */ dommap() ; return "V2100.reg" ; default: return NULL ; } } /* 0x3D3D: 3Dlabs */ /* 3Dlabs */ static char *labs3d(void) { switch (device) { case 0x0001: /* GLINT 300SX */ dommap() ; return "GLINT300SX.reg" ; case 0x0002: /* GLINT 500TX */ dommap() ; return "GLINT500TX.reg" ; case 0x0003: /* GLINT Delta */ dommap() ; return "GLINTDelta.reg" ; case 0x0004: /* GLINT Permedia */ dommap() ; return "GLINTPermedia.reg" ; case 0x0006: /* GLINT MX */ dommap() ; return "GLINTMX.reg" ; case 0x0007: /* GLINT Permedia 2 */ dommap() ; return "GLINTPermedia 2.reg" ; default: return NULL ; } } /* 0x5333: S3 */ /* S3 */ static char *s3(void) { switch (device) { case 0x0551: /* Plato/PX */ dommap() ; return "Plato.reg" ; case 0x5631: /* ViRGE */ dommap() ; return "ViRGE.reg" ; case 0x8811: /* Trio32/64 */ dommap() ; return "Trio32+64.reg" ; case 0x8812: /* Aurora64V+ */ dommap() ; return "Aurora64V.reg" ; case 0x8814: /* Trio64UV+ */ dommap() ; return "Trio64UV.reg" ; case 0x883D: /* ViRGE/VX */ dommap() ; return "ViRGEVX.reg" ; case 0x8880: /* 868 */ dommap() ; return "868.reg" ; case 0x88B0: /* 928 */ dommap() ; return "928.reg" ; case 0x88C0: /* 864-0 */ dommap() ; return "864-0.reg" ; case 0x88C1: /* 864-1 */ dommap() ; return "864-1.reg" ; case 0x88D0: /* 964-0 */ dommap() ; return "964-0.reg" ; case 0x88D1: /* 964-1 */ dommap() ; return "964-1.reg" ; case 0x88F0: /* 968 */ dommap() ; return "968.reg" ; case 0x8901: /* Trio64V2/DX or /GX */ dommap() ; return "Trio64V2.reg" ; case 0x8902: /* PLATO/PX */ dommap() ; return "PLATOPX.reg" ; case 0x8A01: /* ViRGE/DX or /GX */ dommap() ; return "ViRGE.reg" ; case 0x8A10: /* ViRGE/GX2 */ dommap() ; return "ViRGEGX2.reg" ; case 0x8C01: /* ViRGE/MX */ case 0x8C02: /* ViRGE/MX? */ dommap() ; return "ViRGEMX.reg" ; case 0x8C03: /* ViRGE/MX+ */ dommap() ; return "ViRGEMX+.reg" ; default: return NULL ; } } /* ------------------------------------------------------------------------ */ /* --- Helper routines --- ------------------------------------------------ */ /* ------------------------------------------------------------------------ */ /* Memory map regions requested by Vendor Chip Detection function */ static void dommap(void) { if (size0 && ptr0==NULL) ptr0 = mymmap(mem,base0,size0) ; if (size1 && ptr1==NULL) ptr1 = mymmap(mem,base1,size1) ; if (size2 && ptr2==NULL) ptr2 = mymmap(mem,base2,size2) ; } /* Add a Register Group (chip.reg) */ static void addgroup(char *grp1, char *grp2) { int i, n ; if (ngrps >= MAXGROUPS) return ; if (*grp2 == '-') *grp2 = 0 ; strncpy(grp[ngrps].name1,grp1,MAXGROUPLEN) ; strncpy(grp[ngrps].name2,grp2,MAXGROUPLEN) ; n = strlen(grp1) ; for ( i=0; i= MAXREGS) return ; if (!mask) mask = "0" ; for ( i=0; a->name; i++, a++ ) if (!strcmp(a->name,method)) reg[nregs].acc = i ; for ( i=0; i=16) return i ; } } return 0 ; } static int reg_groups(FILE *file) { int n ; while (n=nextline(file)) { if (*token[0] == '*') return 1 ; if (n>=2) addgroup(token[0],token[1]) ; else fprintf(stderr,"gfxdump: Ignored %s\n",buf) ; } return 0 ; } static int reg_regs(FILE *file) { int n ; while (n=nextline(file)) { if (*token[0] == '*') return 1 ; if (n>=6) addreg(token[0],token[1],token[2],token[3], token[4],token[5],token[6]) ; else fprintf(stderr,"gfxdump: Ignored %s\n",buf) ; } return 0 ; } static int reg_file(char *name) { int i, n, full=0 ; FILE *file ; if (!(file=fopen(name,"r"))) { perror("gfxdump: fopen(.reg) failed") ; exit(1) ; } while (full || (n=nextline(file))) { if (n && !strcmp(token[0],"*END*")) { while (nextline(file)) ; full = 0 ; } else if (!strcmp(token[0],"*INCLUDE*")) full = reg_file(token[1]) ; else if (!strcmp(token[0],"*GROUPS*")) full = reg_groups(file) ; else if (!strcmp(token[0],"*REGISTERS*")) full = reg_regs(file) ; else { full = 0 ; printf("gfxdump: ignored: %s\n",buf) ; } } fclose(file) ; return 0 ; } /* Print out the value of a register */ static void prtreg(REG *r) { int i, n ; n = acc[r->acc].prt(r) ; for ( i=n; i<=8; i++ ) printf(" ") ; printf("= ") ; for ( i=2*(4-r->size); i; i-- ) printf(" ") ; if (xopt) printf("0x") ; if (r->valid) switch (r->size) { case 1: printf("%02X", (u8)r->value) ; break ; case 2: printf("%04X",(u16)r->value) ; break ; case 3: printf("%06lX",(u32)r->value) ; break ; case 4: printf("%08lX",(u32)r->value) ; break ; } else for ( i=2*r->size; i; i-- ) printf("?") ; if (pageopt||groupopt||nameopt) printf(" ") ; if (pageopt) { n = printf("%s",r->page) ; if (groupopt||nameopt) for ( i=n; i<=6; i++ ) printf(" ") ; } if (groupopt) { n = printf("%s",grp[r->grp].name1) ; if (nameopt) for ( i=n; i<=MAXGROUPLEN; i++ ) printf(" ") ; } if (nameopt) { n = printf("%s",r->name) ; /*for ( i=n; i<=MAXREGLEN; i++ ) printf(" ") ;*/ } printf("\n") ; } /* Parse command line options */ static int parseopts(int argc, char **argv) { int i, j, n ; for ( i=1; i=1) ident = argv[i++] ; /* Reopen stdout if optional 2nd arg (output filename) given */ if (i=0) { vendor = pciinfo[idx].vendor ; device = pciinfo[idx].device ; base0 = pciinfo[idx].base0 ; base1 = pciinfo[idx].base1 ; base2 = pciinfo[idx].base2 ; baserom = pciinfo[idx].baserom ; for ( i=0; vendors[i].func; i++ ) if (vendors[i].vendor == vendor) { name = vendors[i].name ; func = vendors[i].func ; } if (!func) { fprintf(stderr,"Card @ %s (vendor %04X) is not a graphics card or is unsupported\n", ident,vendor) ; exit(1) ; } } else { fprintf(stderr,"Invalid PCI/AGP address %s or no card present\n",ident) ; exit(1) ; } /* No card specified; print out list of cards found */ else { if (!name || verbose) for ( i=0; i9 || pciinfo[i].card>9 || pciinfo[i].func>9) sp = " " ; for ( i=0; i9 || pciinfo[i].card>9 || pciinfo[i].func>9) ? "" : sp, pciinfo[i].vendor, pciinfo[i].device) ; if (name) fprintf(stderr," (%s)\n",name) ; else fprintf(stderr,"\n") ; } } exit(0) ; } /* Print out values */ if (verbose) { fprintf(stderr,"Card @ %s : %04X:%04X (%s):\n", ident,vendor,device,name) ; fprintf(stderr,"base[0,1,2] = 0x%08lX, 0x%08lX, 0x%08lX\n",base0,base1,base2) ; } /* Enable access to all I/O ports */ #ifdef __unix__ if (iopl(3)) { perror("gfxdump: iopl() failed") ; exit(1) ; } #endif /* Open /dev/mem for access to real memory */ #ifdef __unix__ if ( (mem = open("/dev/mem",O_RDWR)) == -1) { perror("gfxdump: open(/dev/mem) failed") ; exit(1) ; } #endif /* Save, then set the VGA KEY */ vgakey = inb(0x3D8) ; outb(0x3D8,0xA0|vgakey) ; /* Determine access methods and register * list from Chip Vendor and Device ID */ /* Note: The vendor function may call dommap() */ file = func() ; dommap() ; /* Read and parse chip.reg file */ if (!file) { fprintf(stderr, "gfxdump: Unknown Chip Device %04X:%04X\n",vendor,device) ; exit(1) ; } reg_file("VGA.reg") ; reg_file(file) ; /* Reparse command line options to recognize register group options */ parseopts(argc,argv) ; /* All registers ? */ if (allopt) for ( i=0; i0) reg[i].incl = 1 ; for ( k=0; k0) prtreg(®[i]) ; } /* Restore the VGA KEY */ outb(0x3D8,vgakey) ; return 0 ; } gatos-0.0.5/gfxdump/gfx.h0100644002411700123110000000624507030240376013711 0ustar bayleasr/**************************************************************************\ gfxdump (Program for dumping graphics chip registers) Copyright (C) 1999 Øyvind Aabling. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GETREG(TYPE,PTR,OFFZ) (*((volatile TYPE*)((PTR)+(OFFZ)))) #define SETREG(TYPE,PTR,OFFZ) (*((volatile TYPE*)((PTR)+(OFFZ)))) #include #include #include #include #include #include #include #include #ifdef __unix__ #include #endif #include "AsmMacros.h" /* Unsigned 1, 2 and 4 byte ints */ #define u8 unsigned char #define u16 unsigned short #define u32 unsigned long #ifndef __unix__ /*#include "winioctl.h"*/ #define FILE_DEVICE_UNKNOWN 0x00000022 #define METHOD_NEITHER 3 #define FILE_ANY_ACCESS 0 #define CTL_CODE( DeviceType, Function, Method, Access ) ( \ ((DeviceType)<<16) | ((Access)<<14) | ((Function)<<2) | (Method) ) #include #define NotVxD #include "mapdev.h" #endif /* Memory Map a piece of Real Memory */ static void *mymmap(int mem, u32 base, u32 size) { #ifdef __unix__ void *ptr=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,mem,base) ; if ((int)ptr == -1) { perror("gfxdump: mmap() failed") ; exit(1) ; } return ptr ; #else HANDLE hDevice ; PVOID inBuf[1] ; /* buffer for struct pointer to VxD */ DWORD RetInfo[2] ; /* buffer to receive data from VxD */ DWORD cbBytesReturned ; /* count of bytes returned from VxD */ MAPDEVREQUEST req ; /* map device request structure */ DWORD *pNicstar, Status, Time ; int i ; char *endptr ; const PCHAR VxDName = "\\\\.\\MAPDEV.VXD" ; const PCHAR VxDNameAlreadyLoaded = "\\\\.\\MAPDEV" ; hDevice = CreateFile(VxDName, 0,0,0, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, 0) ; if (hDevice == INVALID_HANDLE_VALUE) hDevice = CreateFile(VxDNameAlreadyLoaded, 0,0,0, CREATE_NEW, FILE_FLAG_DELETE_ON_CLOSE, 0) ; if (hDevice == INVALID_HANDLE_VALUE) { fprintf(stderr, "Cannot open driver, error=%08lx\n", GetLastError()) ; exit(1) ; } req.mdr_ServiceID = MDR_SERVICE_MAP ; req.mdr_PhysicalAddress = (PVOID)base ; req.mdr_SizeInBytes = size ; inBuf[0] = &req ; if ( ! DeviceIoControl(hDevice, MDR_SERVICE_MAP, inBuf, sizeof(PVOID), NULL, 0, &cbBytesReturned, NULL) ) { fprintf(stderr, "Failed to map device\n") ; exit(1) ; } return (void*)req.mdr_LinearAddress ; #endif } /* Unmap a Memory Mapped piece of Real Memory */ static void mymunmap(void *ptr, u32 size) { #ifdef __unix__ int res=munmap(ptr,size) ; if (res == -1) { perror("gfxdump: munmap() failed") ; exit(1) ; } #endif } gatos-0.0.5/gfxdump/AsmMacros.h0100644002411700123110000002330307030240376015004 0ustar bayleasr/* $XConsortium: AsmMacros.h /main/13 1996/10/25 11:33:12 kaleb $ */ /* * (c) Copyright 1993,1994 by David Wexelblat * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * DAVID WEXELBLAT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * Except as contained in this notice, the name of David Wexelblat shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from David Wexelblat. * */ /* * Copyright 1997 * Digital Equipment Corporation. All rights reserved. * This software is furnished under license and may be used and copied only in * accordance with the following terms and conditions. Subject to these * conditions, you may download, copy, install, use, modify and distribute * this software in source and/or binary form. No title or ownership is * transferred hereby. * * 1) Any source code used, modified or distributed must reproduce and retain * this copyright notice and list of conditions as they appear in the source * file. * * 2) No right is granted to use any trade name, trademark, or logo of Digital * Equipment Corporation. Neither the "Digital Equipment Corporation" name * nor any trademark or logo of Digital Equipment Corporation may be used * to endorse or promote products derived from this software without the * prior written permission of Digital Equipment Corporation. * * 3) This software is provided "AS-IS" and any express or implied warranties, * including but not limited to, any implied warranties of merchantability, * fitness for a particular purpose, or non-infringement are disclaimed. In * no event shall DIGITAL be liable for any damages whatsoever, and in * particular, DIGITAL shall not be liable for special, indirect, * consequential, or incidental damages or damages for * lost profits, loss of revenue or loss of use, whether such damages arise * in contract, * negligence, tort, under statute, in equity, at law or otherwise, even if * advised of the possibility of such damage. * */ /* $XFree86: xc/programs/Xserver/hw/xfree86/SuperProbe/AsmMacros.h,v 3.13 1999/03/28 15:32:21 dawes Exp $ */ #if defined(__GNUC__) #if defined(linux) && defined(__alpha__) #define inb _inb #define inw _inw #define inl _inl #define outb(p,v) _outb((v),(p)) #define outw(p,v) _outw((v),(p)) #define outl(p,v) _outl((v),(p)) #else #if defined(__sparc__) #ifndef ASI_PL #define ASI_PL 0x88 #endif static __inline__ void outb(port, val) unsigned long port; char val; { __asm__ __volatile__("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ void outw(port, val) unsigned long port; char val; { __asm__ __volatile__("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ void outl(port, val) unsigned long port; char val; { __asm__ __volatile__("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ unsigned int inb(port) unsigned long port; { unsigned char ret; __asm__ __volatile__("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } static __inline__ unsigned int inw(port) unsigned long port; { unsigned char ret; __asm__ __volatile__("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } static __inline__ unsigned int inl(port) unsigned long port; { unsigned char ret; __asm__ __volatile__("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } #else #ifdef __arm32__ unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void outb(port, val) short port; char val; { if ((unsigned short)port >= 0x400) return; *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase) = val; } static __inline__ void outw(port, val) short port; short val; { if ((unsigned short)port >= 0x400) return; *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase) = val; } static __inline__ void outl(port, val) short port; int val; { if ((unsigned short)port >= 0x400) return; *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase) = val; } static __inline__ unsigned int inb(port) short port; { if ((unsigned short)port >= 0x400) return((unsigned int)-1); return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase)); } static __inline__ unsigned int inw(port) short port; { if ((unsigned short)port >= 0x400) return((unsigned int)-1); return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase)); } static __inline__ unsigned int inl(port) short port; { if ((unsigned short)port >= 0x400) return((unsigned int)-1); return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase)); } #else /* __arm32__ */ #if defined(Lynx) && defined(__powerpc__) extern unsigned char *ioBase; static volatile void eieio() { __asm__ __volatile__ ("eieio"); } static void outb(port, value) short port; unsigned char value; { *(uchar *)(ioBase + port) = value; eieio(); } static void outw(port, value) short port; unsigned short value; { *(unsigned short *)(ioBase + port) = value; eieio(); } static void outl(port, value) short port; unsigned long value; { *(unsigned long *)(ioBase + port) = value; eieio(); } static unsigned char inb(port) short port; { unsigned char val; val = *((unsigned char *)(ioBase + port)); eieio(); return(val); } static unsigned short inw(port) short port; { unsigned short val; val = *((unsigned short *)(ioBase + port)); eieio(); return(val); } static unsigned long inl(port) short port; { unsigned long val; val = *((unsigned long *)(ioBase + port)); eieio(); return(val); } #else #ifdef GCCUSESGAS static __inline__ void outb(port, val) short port; char val; { __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port)); } static __inline__ void outw(port, val) short port; short val; { __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port)); } static __inline__ void outl(port, val) short port; unsigned int val; { __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port)); } static __inline__ unsigned int inb(port) short port; { unsigned char ret; __asm__ __volatile__("inb %1,%0" : "=a" (ret) : "d" (port)); return ret; } static __inline__ unsigned int inw(port) short port; { unsigned short ret; __asm__ __volatile__("inw %1,%0" : "=a" (ret) : "d" (port)); return ret; } static __inline__ unsigned int inl(port) short port; { unsigned int ret; __asm__ __volatile__("inl %1,%0" : "=a" (ret) : "d" (port)); return ret; } #else /* GCCUSESGAS */ static __inline__ void outb(port, val) short port; char val; { __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port)); } static __inline__ void outw(port, val) short port; short val; { __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port)); } static __inline__ void outl(port, val) short port; unsigned int val; { __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port)); } static __inline__ unsigned int inb(port) short port; { unsigned int ret; __asm__ __volatile__("in%B0 (%1)" : "=a" (ret) : "d" (port)); return ret; } static __inline__ unsigned int inw(port) short port; { unsigned int ret; __asm__ __volatile__("in%W0 (%1)" : "=a" (ret) : "d" (port)); return ret; } static __inline__ unsigned int inl(port) short port; { unsigned int ret; __asm__ __volatile__("in%L0 (%1)" : "=a" (ret) : "d" (port)); return ret; } #endif /* GCCUSESGAS */ #endif /* Lynx && __powerpc__ */ #endif /* arm32 */ #endif /* linux && __sparc__ */ #endif /* linux && __alpha__ */ #if defined(linux) || defined(__arm32__) || (defined(Lynx) && defined(__powerpc__)) #define intr_disable() #define intr_enable() #else static __inline__ void intr_disable() { __asm__ __volatile__("cli"); } static __inline__ void intr_enable() { __asm__ __volatile__("sti"); } #endif /* else !linux && !__arm32__ */ #else /* __GNUC__ */ #if defined(_MINIX) && defined(_ACK) /* inb, outb, inw and outw are defined in the library */ /* ... but I've no idea if the same is true for inl & outl */ u8_t inb(U16_t); void outb(U16_t, U8_t); u16_t inw(U16_t); void outw(U16_t, U16_t); u32_t inl(U16_t); void outl(U16_t, U32_t); #else /* not _MINIX and _ACK */ # if defined(__STDC__) && (__STDC__ == 1) # ifndef NCR # define asm __asm # endif # endif # ifdef SVR4 # include # ifndef __USLC__ # define __USLC__ # endif # endif #ifndef SCO325 # include #else # include "../common/scoasm.h" #endif #define intr_disable() asm("cli") #define intr_enable() asm("sti") #endif /* _MINIX and _ACK */ #endif /* __GNUC__ */ gatos-0.0.5/gfxdump/Mach64.reg0100644002411700123110000001755307030240376014501 0ustar bayleasr*GROUPS* PCI - PCI/AGP/Bus Control CFG - Chip Config Registers MISC - Miscellaneous PLL - PLL Clock Control CRTC - CRTC MEM - Memory Control DAC - DAC Control 2D - 2D Engine 3D - 3D Engine CAP MM Video Capture OV MM Overlay Scaler MPP MM MPP Bus Control I2C MM I2C Bus Control *REGISTERS* # access index doc size/ register name [value mask] # method page group M64PLL 00 4-53 1 PLL MPLL_CNTL M64PLL 01 4-53 1 PLL VPLL_CNTL M64PLL 02 4-54 1 PLL PLL_REF_DIV M64PLL 03 4-54 1 PLL PLL_GEN_CNTL M64PLL 04 4-55 1 PLL MCLK_FB_DIV M64PLL 05 4-55 1 PLL PLL_VCLK_CNTL M64PLL 06 4-56 1 PLL VCLK_POST_DIV M64PLL 07 4-56 1 PLL VCLK0_FB_DIV M64PLL 08 4-56 1 PLL VCLK1_FB_DIV M64PLL 09 4-57 1 PLL VCLK2_FB_DIV M64PLL 0A 4-57 1 PLL VCLK3_FB_DIV M64PLL 0B 4-57 1 PLL PLL_EXT_CNTL M64PLL 0C 4-58 1 PLL DLL_CNTL M64PLL 0D 4-59 1 PLL VFC_CNTL M64PLL 12 4-60 1 PLL AGP1_CNTL M64PLL 13 4-61 1 PLL AGP2_CNTL M64PLL 14 4-61 1 PLL DLL2_CNTL M64PLL 15 4-61 1 PLL SCLK_FB_DIV M64PLL 16 4-62 1 PLL SPLL_CNTL1 M64PLL 17 4-62 1 PLL SPLL_CNTL2 M64PLL 18 4-63 1 PLL APLL_STRAPS M64PLL 19 4-64 1 PLL EXT_VPLL_CNTL M64PLL 1A 4-64 1 PLL EXT_VPLL_REF_DIV M64PLL 1B 4-65 1 PLL EXT_VPLL_FB_DIV M64PLL 1C 4-65 1 PLL EXT_VPLL_MSB M64PLL 1D 4-66 1 PLL *HTOTAL_CNTL M64PLL 1E 4-66 1 PLL BYTE_CLK_CNTL M64MEM 000 4-33 4 CRTC CRTC_H_TOTAL_DISP M64MEM 001 4-34 4 CRTC CRTC_H_SYNC_STRT_WID M64MEM 002 4-34 4 CRTC CRTC_V_TOTAL_DISP M64MEM 003 4-35 4 CRTC CRTC_V_SYNC_STRT_WID M64MEM 004 4-36 4 CRTC CRTC_VLINE_CRNT_VLINE M64MEM 005 4-36 4 CRTC CRTC_OFF_PITCH M64MEM 006 4-37 4 CRTC CRTC_INT_CNTL M64MEM 007 4-39 4 CRTC CRTC_GEN_CNTL M64MEM 008 4-08 4 CFG DSP_CONFIG M64MEM 009 4-08 4 CFG DSP_ON_OFF M64MEM 00A 4-08 4 CFG TIMER_CONFIG M64MEM 00B 4-09 4 MEM MEM_BUF_CNTL M64MEM 00D 4-10 4 MEM MEM_ADDR_CONFIG M64MEM 00E 4-42 4 CRTC CRTC_TRAP M64MEM 010 4-42 4 CRTC OVR_CLR M64MEM 011 4-43 4 CRTC OVR_WID_LEFT_RIGHT M64MEM 012 4-44 4 CRTC OVR_WID_TOP_BOTTOM M64MEM 013 4-09 4 CFG VGA_DSP_CONFIG M64MEM 014 4-10 4 CFG VGA_DSP_ON_OFF M64MEM 018 4-45 4 CRTC CUR_CLR0 M64MEM 019 4-46 4 CRTC CUR_CLR1 M64MEM 01A 4-47 4 CRTC CUR_OFFSET M64MEM 01B 4-48 4 CRTC CUR_HORZ_VERT_POSN M64MEM 01C 4-48 4 CRTC CUR_HORZ_VERT_OFF M64MEM 01E 4-01 4 CFG GP_IO M64MEM 01F 4-22 4 CFG HS_DEBUG M64MEM 020 4-03 4 CFG SCRATCH_REG0 M64MEM 021 4-03 4 CFG SCRATCH_REG1 M64MEM 024 4-51 1 CFG CLOCK_CNTL M64MEM 025 4-29 4 CFG CONFIG_STAT1 M64MEM 026 4-29 4 CFG CONFIG_STAT2 M64MEM 028 4-04 4 PCI BUS_CNTL M64MEM 02B 4-12 4 MEM EXT_MEM_CNTL M64MEM 02C 4-15 4 MEM MEM_CNTL M64MEM 02D 4-17 4 MEM MEM_GVA_WP_SEL M64MEM 02E 4-18 4 MEM MEM_VGA_RP_SEL M64MEM 030 4-67 4 DAC DAC_REGS M64MEM 031 4-68 4 DAC DAC_CNTL M64MEM 032 4-70 4 DAC EXT_DAC_REGS M64MEM 034 4-20 4 CFG GEN_TEST_CNTL M64MEM 035 4-31 4 CFG CUSTOM_MACRO_CNTL M64MEM 037 4-25 4 CFG CONFIG_CNTL M64MEM 038 4-26 4 CFG CONFIG_CHIP_ID M64MEM 039 4-27 4 CFG CONFIG_STAT0 M64MEM 03A 4-22 4 CFG CRC_SIG M64MEM 040 5-09 4 2D DST_OFF_PITCH M64MEM 041 5-11 4 2D DST_X M64MEM 042 5-14 4 2D DST_Y M64MEM 043 5-14 4 2D DST_Y_X M64MEM 044 5-10 4 2D DST_WIDTH M64MEM 045 5-08 4 2D DST_HEIGHT M64MEM 046 5-08 4 2D DST_HEIGHT_WIDTH M64MEM 047 5-12 4 2D DST_X_WIDTH M64MEM 048 5-03 4 2D DST_BRES_LNTH M64MEM 049 5-02 4 2D DST_BRES_ERR M64MEM 04A 5-03 4 2D DST_BRES_INC M64MEM 04B 5-01 4 2D DST_BRES_DEC M64MEM 04C 5-05 4 2D DST_CNTL M64MEM 04D 5-14 4 2D *DST_Y_X M64MEM 04E 5-15 4 2D TRAIL_BRES_ERR M64MEM 04F 5-15 4 2D TRAIL_BRES_INC M64MEM 050 5-16 4 2D TRAIL_BRES_DEC M64MEM 051 5-03 4 2D DST_BRES_LNTH* M64MEM 052 5-17 4 2D Z_OFF_PITCH M64MEM 053 5-17 4 2D Z_CNTL M64MEM 054 5-18 4 2D ALPHA_TST_CNTL M64MEM 060 5-26 4 2D SRC_OFF_PITCH M64MEM 061 5-28 4 2D SRC_X M64MEM 062 5-29 4 2D SRC_Y M64MEM 063 5-31 4 2D SRC_Y_X M64MEM 064 5-27 4 2D SRC_WIDTH1 M64MEM 065 5-23 4 2D SRC_HEIGHT1 M64MEM 066 5-24 4 2D SRC_HEIGHT1_WIDTH1 M64MEM 067 5-29 4 2D SRC_X_START M64MEM 068 5-30 4 2D SRC_Y_START M64MEM 069 5-31 4 2D SRC_Y_X_START M64MEM 06A 5-27 4 2D SRC_WIDTH2 M64MEM 06B 5-25 4 2D SRC_HEIGHT2 M64MEM 06C 5-25 4 2D SRC_HEIGHT2_WIDTH M64MEM 06D 5-21 4 2D SRC_CNTL M64MEM 080 5-33 4 2D *HOST_DATA0 M64MEM 081 5-33 4 2D *HOST_DATA1 M64MEM 082 5-33 4 2D *HOST_DATA2 M64MEM 083 5-33 4 2D *HOST_DATA3 M64MEM 084 5-33 4 2D *HOST_DATA4 M64MEM 085 5-33 4 2D *HOST_DATA5 M64MEM 086 5-33 4 2D *HOST_DATA6 M64MEM 087 5-33 4 2D *HOST_DATA7 M64MEM 088 5-33 4 2D *HOST_DATA8 M64MEM 089 5-33 4 2D *HOST_DATA9 M64MEM 08A 5-33 4 2D *HOST_DATAA M64MEM 08B 5-33 4 2D *HOST_DATAB M64MEM 08C 5-33 4 2D *HOST_DATAC M64MEM 08D 5-33 4 2D *HOST_DATAD M64MEM 08E 5-33 4 2D *HOST_DATAE M64MEM 08F 5-33 4 2D *HOST_DATAF M64MEM 090 5-34 4 2D HOST_CNTL M64MEM 091 6-10 4 PCI *BM_HOSTDATA M64MEM 092 6-11 4 PCI *BM_ADDR/BM_DATA M64MEM 093 6-12 4 PCI BM_GUI_TABLE_CMD M64MEM 0A0 5-37 4 2D PAT_REG0 M64MEM 0A1 5-37 4 2D PAT_REG1 M64MEM 0A2 5-38 4 2D PAT_CNTL M64MEM 0A8 5-39 4 2D SC_LEFT M64MEM 0A9 5-40 4 2D SC_RIGHT M64MEM 0AA 5-40 4 2D *SC_LEFT_RIGHT M64MEM 0AB 5-41 4 2D SC_TOP M64MEM 0AC 5-41 4 2D SC_BOTTOM M64MEM 0AD 5-42 4 2D *SC_TOP_BOTTOM M64MEM 0B0 5-43 4 2D DP_BKGD_CLR M64MEM 0B1 5-43 4 2D DP_FRGD_CLR M64MEM 0B2 5-45 4 2D DP_WRITE_MSK M64MEM 0B4 5-46 4 2D DP_PIX_WIDTH M64MEM 0B5 5-51 4 2D DP_MIX M64MEM 0B6 5-58 4 2D DP_SRC M64MEM 0B7 5-45 4 2D *DP_FRGD_CLR_MIX M64MEM 0B8 5-44 4 2D *DP_FRGD_BKGD_CLR M64MEM 0BA 5-13 4 2D DST_X_Y M64MEM 0BB 5-11 4 2D DST_WIDTH_HEIGHT M64MEM 0BC 5-53 4 2D *USR_DST_PITCH M64MEM 0BE 5-57 4 2D DP_SET_GUI_ENGINE2 M64MEM 0BF 5-53 4 2D *DP_SET_GUI_ENGINE M64MEM 0C0 5-59 4 2D CLR_CMP_CLR M64MEM 0C1 5-61 4 2D CLR_CMP_MSK M64MEM 0C2 5-61 4 2D CLR_CMP_CNTL M64MEM 0C4 5-62 4 2D FIFO_STAT M64MEM 0CC 5-64 4 2D GUI_TRAJ_CNTL M64MEM 0CE 5-66 4 2D GUI_STAT M64MEM 0E6 5-20 4 2D COMPOSITE_SHADOW_ID M64MEM 100 X-08 4 OV OVERLAY_Y_X_START M64MEM 101 X-09 4 OV OVERLAY_Y_X_END M64MEM 102 X-06 4 OV OVERLAY_VIDEO_KEY_CLR M64MEM 103 X-07 4 OV OVERLAY_VIDEO_KEY_MSK M64MEM 104 X-03 4 OV OVERLAY_GRAPHICS_KEY_CLR M64MEM 105 X-04 4 OV OVERLAY_GRAPHICS_KEY_MSK M64MEM 106 X-05 4 OV OVERLAY_KEY_CNTL M64MEM 108 X-12 4 OV OVERLAY_SCALE_INC M64MEM 109 X-10 4 OV OVERLAY_SCALE_CNTL M64MEM 10A X-14 4 OV SCALER_HEIGHT_WIDTH M64MEM 10B X-13 4 OV SCALER_TEST M64MEM 10D X-15 4 OV SCALER_BUF0_OFFSET M64MEM 10E X-16 4 OV SCALER_BUF0_OFFSET M64MEM 10F X-17 4 OV SCALER_BUF_PITCH M64MEM 110 X-24 4 CAP CAPTURE_START_END M64MEM 111 X-23 4 CAP CAPTURE_X_WIDTH M64MEM 112 X-18 4 CAP VIDEO_FORMAT M64MEM 113 X-30 4 CAP VBI_START_END M64MEM 114 X-20 4 CAP CAPTURE_CONFIG M64MEM 115 X-25 4 CAP TRIG_CNTL M64MEM 116 X-01 4 OV OVERLAY_EXCLUSIVE_HORZ M64MEM 117 X-02 4 OV OVERLAY_EXCLUSIVE_VERT M64MEM 118 X-31 4 CAP VBI_WIDTH M64MEM 119 X-32 4 CAP CAPTURE_DEBUG M64MEM 11A X-26 4 CAP VIDEO_SYNC_TEST M64MEM 11C 4-49 4 MEM SNAPSHOT_VH_COUNTS M64MEM 11D 4-49 4 MEM SNAPSHOT_F_COUNT M64MEM 11E 4-49 4 MEM N_VIF_COUNT M64MEM 11F 4-50 4 MEM SNAPSHOT_VIF_COUNT M64MEM 120 X-28 4 CAP CAPTURE_BUF0_OFFSET M64MEM 121 X-29 4 CAP CAPTURE_BUF1_OFFSET M64MEM 122 X-27 4 CAP ONESHOT_BUF_OFFSET M64MEM 130 X-33 4 MPP MPP_CONFIG M64MEM 131 X-34 4 MPP MPP_STROBE_SEQ M64MEM 132 X-34 4 MPP MPP_ADDR M64MEM 133 X-35 4 MPP *MPP_DATA M64MEM 140 X-35 4 MPP TVO_CNTL M64MEM 151 4-24 4 CRTC CRT_HORZ_VERT_LOAD M64MEM 152 6-13 4 PCI AGP_BASE M64MEM 153 6-13 4 PCI AGP_CNTL M64MEM 154 ?-?? 4 OV SCALER_COLOR_CNTL M64MEM 155 ?-?? 4 OV SCALER_H_COEFF0 M64MEM 156 ?-?? 4 OV SCALER_H_COEFF1 M64MEM 157 ?-?? 4 OV SCALER_H_COEFF2 M64MEM 158 ?-?? 4 OV SCALER_H_COEFF3 M64MEM 159 ?-?? 4 OV SCALER_H_COEFF4 M64MEM 15E 5-63 4 2D GUI_CNTL M64MEM 160 6-09 4 PCI BM_FRAME_BUF_OFFSET M64MEM 161 6-09 4 PCI BM_SYSTEM_MEM_ADDR M64MEM 162 6-09 4 PCI BM_COMMAND M64MEM 163 6-09 4 PCI BM_STATUS M64MEM 16E 6-12 4 PCI BM_GUI_TABLE M64MEM 16F 6-10 4 PCI BM_SYSTEM_TABLE M64MEM 175 ?-?? 4 OV SCALER_BUF0_OFFSET_U M64MEM 176 ?-?? 4 OV SCALER_BUF0_OFFSET_V M64MEM 177 ?-?? 4 OV SCALER_BUF1_OFFSET_U M64MEM 178 ?-?? 4 OV SCALER_BUF1_OFFSET_V gatos-0.0.5/gfxdump/VGA.reg0100644002411700123110000002003007030240376014054 0ustar bayleasr*GROUPS* GEN VGA VGA General Registers ATC VGA VGA Attribute Controller Registers CRT VGA VGA CRT Controller Registers GRA VGA VGA Graphics Controller Registers SEQ VGA VGA Sequencer Registers DAC - VGA RAMDAC Registers *REGISTERS* # access index doc size/ register name [value mask] # method page group I/O 3C0 138 1 GEN ATCIDX I/O 3C2 131 1 GEN InputStatus0 I/O 3C4 167 1 GEN TSIDX I/O 3CA 133 1 GEN FeatureCtrlRead I/O 3CB 175 1 GEN SegmentSelect2 I/O 3CC 130 1 GEN MiscOutput I/O 3CD 175 1 GEN SegmentSelect1 I/O 3CE 176 1 GEN GDCIDX I/O 3D4 150 1 GEN CRTCIDX I/O 3D8 133 1 GEN KEYCtrl I/O 3DA 132 1 GEN InputStatus1 ATC 00 5-44 1 ATC Palette0 ATC 01 5-44 1 ATC Palette1 ATC 02 5-44 1 ATC Palette2 ATC 03 5-44 1 ATC Palette3 ATC 04 5-44 1 ATC Palette4 ATC 05 5-44 1 ATC Palette5 ATC 06 5-44 1 ATC Palette6 ATC 07 5-44 1 ATC Palette7 ATC 08 5-44 1 ATC Palette8 ATC 09 5-44 1 ATC Palette9 ATC 0A 5-44 1 ATC PaletteA ATC 0B 5-44 1 ATC PaletteB ATC 0C 5-44 1 ATC PaletteC ATC 0D 5-44 1 ATC PaletteD ATC 0E 5-44 1 ATC PaletteE ATC 0F 5-44 1 ATC PaletteF ATC 10 5-44 1 ATC ATCModeCtrl ATC 11 5-45 1 ATC OverscanColor ATC 12 5-45 1 ATC ColorPlaneEnable ATC 13 5-46 1 ATC HorizPixelPanning ATC 14 5-47 1 ATC ColorSelect CRT 00 5-13 1 CRT HorizTotal CRT 01 5-14 1 CRT HorizDisplayEnd CRT 02 5-14 1 CRT HorizBlankStart CRT 03 5-15 1 CRT HorizBlankEnd CRT 04 5-15 1 CRT HorizSyncStart CRT 05 5-16 1 CRT HorizSyncEnd CRT 06 5-16 1 CRT VertTotal CRT 07 5-17 1 CRT VertOverflowLow CRT 08 5-18 1 CRT InitRowAddr CRT 09 5-18 1 CRT MaxRowAddr CRT 0A 5-19 1 CRT CursorStartRow CRT 0B 5-20 1 CRT CursorEndRow CRT 0C 5-20 1 CRT LinearStartAddrMid CRT 0D 5-21 1 CRT LinearStartAddrLow CRT 0E 5-21 1 CRT CursorAddrHigh CRT 0F 5-22 1 CRT CursorAddrLow CRT 10 5-22 1 CRT VertSyncStart CRT 11 5-23 1 CRT VertSyncEnd CRT 12 5-23 1 CRT VertDisplayEnd CRT 13 5-24 1 CRT RowOffset CRT 14 5-24 1 CRT UnderlineRowAddr CRT 15 5-25 1 CRT VertBlankStart CRT 16 5-25 1 CRT VertBlankEnd CRT 17 5-26 1 CRT CRTCMode CRT 18 5-27 1 CRT LineCompare CRT 1E 5-27 1 CRT CRT1E CRT 1F 5-28 1 CRT CRT1F CRT 22 5-28 1 CRT CRT22 GRA 00 5-37 1 GRA SetReset GRA 01 5-38 1 GRA EnableSetReset GRA 02 5-38 1 GRA ColorCompare GRA 03 5-39 1 GRA DataRotateAndFuncSelect GRA 04 5-39 1 GRA ReadPlanSelect GRA 05 5-40 1 GRA GDCMode GRA 06 5-41 1 GRA GDCMisc GRA 07 5-41 1 GRA ColorCompareEnable GRA 08 5-42 1 GRA BitMask SEQ 00 5-9 1 SEQ SyncReset SEQ 01 5-10 1 SEQ TSMode SEQ 02 5-11 1 SEQ WritePlaneMask SEQ 03 5-11 1 SEQ FontSelect SEQ 04 5-12 1 SEQ MemoryMode DAC 00 ? 3 DAC DAC00 DAC 01 ? 3 DAC DAC01 DAC 02 ? 3 DAC DAC02 DAC 03 ? 3 DAC DAC03 DAC 04 ? 3 DAC DAC04 DAC 05 ? 3 DAC DAC05 DAC 06 ? 3 DAC DAC06 DAC 07 ? 3 DAC DAC07 DAC 08 ? 3 DAC DAC08 DAC 09 ? 3 DAC DAC09 DAC 0A ? 3 DAC DAC0A DAC 0B ? 3 DAC DAC0B DAC 0C ? 3 DAC DAC0C DAC 0D ? 3 DAC DAC0D DAC 0E ? 3 DAC DAC0E DAC 0F ? 3 DAC DAC0F DAC 10 ? 3 DAC DAC10 DAC 11 ? 3 DAC DAC11 DAC 12 ? 3 DAC DAC12 DAC 13 ? 3 DAC DAC13 DAC 14 ? 3 DAC DAC14 DAC 15 ? 3 DAC DAC15 DAC 16 ? 3 DAC DAC16 DAC 17 ? 3 DAC DAC17 DAC 18 ? 3 DAC DAC18 DAC 19 ? 3 DAC DAC19 DAC 1A ? 3 DAC DAC1A DAC 1B ? 3 DAC DAC1B DAC 1C ? 3 DAC DAC1C DAC 1D ? 3 DAC DAC1D DAC 1E ? 3 DAC DAC1E DAC 1F ? 3 DAC DAC1F DAC 20 ? 3 DAC DAC20 DAC 21 ? 3 DAC DAC21 DAC 22 ? 3 DAC DAC22 DAC 23 ? 3 DAC DAC23 DAC 24 ? 3 DAC DAC24 DAC 25 ? 3 DAC DAC25 DAC 26 ? 3 DAC DAC26 DAC 27 ? 3 DAC DAC27 DAC 28 ? 3 DAC DAC28 DAC 29 ? 3 DAC DAC29 DAC 2A ? 3 DAC DAC2A DAC 2B ? 3 DAC DAC2B DAC 2C ? 3 DAC DAC2C DAC 2D ? 3 DAC DAC2D DAC 2E ? 3 DAC DAC2E DAC 2F ? 3 DAC DAC2F DAC 30 ? 3 DAC DAC30 DAC 31 ? 3 DAC DAC31 DAC 32 ? 3 DAC DAC32 DAC 33 ? 3 DAC DAC33 DAC 34 ? 3 DAC DAC34 DAC 35 ? 3 DAC DAC35 DAC 36 ? 3 DAC DAC36 DAC 37 ? 3 DAC DAC37 DAC 38 ? 3 DAC DAC38 DAC 39 ? 3 DAC DAC39 DAC 3A ? 3 DAC DAC3A DAC 3B ? 3 DAC DAC3B DAC 3C ? 3 DAC DAC3C DAC 3D ? 3 DAC DAC3D DAC 3E ? 3 DAC DAC3E DAC 3F ? 3 DAC DAC3F DAC 40 ? 3 DAC DAC40 DAC 41 ? 3 DAC DAC41 DAC 42 ? 3 DAC DAC42 DAC 43 ? 3 DAC DAC43 DAC 44 ? 3 DAC DAC44 DAC 45 ? 3 DAC DAC45 DAC 46 ? 3 DAC DAC46 DAC 47 ? 3 DAC DAC47 DAC 48 ? 3 DAC DAC48 DAC 49 ? 3 DAC DAC49 DAC 4A ? 3 DAC DAC4A DAC 4B ? 3 DAC DAC4B DAC 4C ? 3 DAC DAC4C DAC 4D ? 3 DAC DAC4D DAC 4E ? 3 DAC DAC4E DAC 4F ? 3 DAC DAC4F DAC 50 ? 3 DAC DAC50 DAC 51 ? 3 DAC DAC51 DAC 52 ? 3 DAC DAC52 DAC 53 ? 3 DAC DAC53 DAC 54 ? 3 DAC DAC54 DAC 55 ? 3 DAC DAC55 DAC 56 ? 3 DAC DAC56 DAC 57 ? 3 DAC DAC57 DAC 58 ? 3 DAC DAC58 DAC 59 ? 3 DAC DAC59 DAC 5A ? 3 DAC DAC5A DAC 5B ? 3 DAC DAC5B DAC 5C ? 3 DAC DAC5C DAC 5D ? 3 DAC DAC5D DAC 5E ? 3 DAC DAC5E DAC 5F ? 3 DAC DAC5F DAC 60 ? 3 DAC DAC60 DAC 61 ? 3 DAC DAC61 DAC 62 ? 3 DAC DAC62 DAC 63 ? 3 DAC DAC63 DAC 64 ? 3 DAC DAC64 DAC 65 ? 3 DAC DAC65 DAC 66 ? 3 DAC DAC66 DAC 67 ? 3 DAC DAC67 DAC 68 ? 3 DAC DAC68 DAC 69 ? 3 DAC DAC69 DAC 6A ? 3 DAC DAC6A DAC 6B ? 3 DAC DAC6B DAC 6C ? 3 DAC DAC6C DAC 6D ? 3 DAC DAC6D DAC 6E ? 3 DAC DAC6E DAC 6F ? 3 DAC DAC6F DAC 70 ? 3 DAC DAC70 DAC 71 ? 3 DAC DAC71 DAC 72 ? 3 DAC DAC72 DAC 73 ? 3 DAC DAC73 DAC 74 ? 3 DAC DAC74 DAC 75 ? 3 DAC DAC75 DAC 76 ? 3 DAC DAC76 DAC 77 ? 3 DAC DAC77 DAC 78 ? 3 DAC DAC78 DAC 79 ? 3 DAC DAC79 DAC 7A ? 3 DAC DAC7A DAC 7B ? 3 DAC DAC7B DAC 7C ? 3 DAC DAC7C DAC 7D ? 3 DAC DAC7D DAC 7E ? 3 DAC DAC7E DAC 7F ? 3 DAC DAC7F DAC 80 ? 3 DAC DAC80 DAC 81 ? 3 DAC DAC81 DAC 82 ? 3 DAC DAC82 DAC 83 ? 3 DAC DAC83 DAC 84 ? 3 DAC DAC84 DAC 85 ? 3 DAC DAC85 DAC 86 ? 3 DAC DAC86 DAC 87 ? 3 DAC DAC87 DAC 88 ? 3 DAC DAC88 DAC 89 ? 3 DAC DAC89 DAC 8A ? 3 DAC DAC8A DAC 8B ? 3 DAC DAC8B DAC 8C ? 3 DAC DAC8C DAC 8D ? 3 DAC DAC8D DAC 8E ? 3 DAC DAC8E DAC 8F ? 3 DAC DAC8F DAC 90 ? 3 DAC DAC90 DAC 91 ? 3 DAC DAC91 DAC 92 ? 3 DAC DAC92 DAC 93 ? 3 DAC DAC93 DAC 94 ? 3 DAC DAC94 DAC 95 ? 3 DAC DAC95 DAC 96 ? 3 DAC DAC96 DAC 97 ? 3 DAC DAC97 DAC 98 ? 3 DAC DAC98 DAC 99 ? 3 DAC DAC99 DAC 9A ? 3 DAC DAC9A DAC 9B ? 3 DAC DAC9B DAC 9C ? 3 DAC DAC9C DAC 9D ? 3 DAC DAC9D DAC 9E ? 3 DAC DAC9E DAC 9F ? 3 DAC DAC9F DAC A0 ? 3 DAC DACA0 DAC A1 ? 3 DAC DACA1 DAC A2 ? 3 DAC DACA2 DAC A3 ? 3 DAC DACA3 DAC A4 ? 3 DAC DACA4 DAC A5 ? 3 DAC DACA5 DAC A6 ? 3 DAC DACA6 DAC A7 ? 3 DAC DACA7 DAC A8 ? 3 DAC DACA8 DAC A9 ? 3 DAC DACA9 DAC AA ? 3 DAC DACAA DAC AB ? 3 DAC DACAB DAC AC ? 3 DAC DACAC DAC AD ? 3 DAC DACAD DAC AE ? 3 DAC DACAE DAC AF ? 3 DAC DACAF DAC B0 ? 3 DAC DACB0 DAC B1 ? 3 DAC DACB1 DAC B2 ? 3 DAC DACB2 DAC B3 ? 3 DAC DACB3 DAC B4 ? 3 DAC DACB4 DAC B5 ? 3 DAC DACB5 DAC B6 ? 3 DAC DACB6 DAC B7 ? 3 DAC DACB7 DAC B8 ? 3 DAC DACB8 DAC B9 ? 3 DAC DACB9 DAC BA ? 3 DAC DACBA DAC BB ? 3 DAC DACBB DAC BC ? 3 DAC DACBC DAC BD ? 3 DAC DACBD DAC BE ? 3 DAC DACBE DAC BF ? 3 DAC DACBF DAC C0 ? 3 DAC DACC0 DAC C1 ? 3 DAC DACC1 DAC C2 ? 3 DAC DACC2 DAC C3 ? 3 DAC DACC3 DAC C4 ? 3 DAC DACC4 DAC C5 ? 3 DAC DACC5 DAC C6 ? 3 DAC DACC6 DAC C7 ? 3 DAC DACC7 DAC C8 ? 3 DAC DACC8 DAC C9 ? 3 DAC DACC9 DAC CA ? 3 DAC DACCA DAC CB ? 3 DAC DACCB DAC CC ? 3 DAC DACCC DAC CD ? 3 DAC DACCD DAC CE ? 3 DAC DACCE DAC CF ? 3 DAC DACCF DAC D0 ? 3 DAC DACD0 DAC D1 ? 3 DAC DACD1 DAC D2 ? 3 DAC DACD2 DAC D3 ? 3 DAC DACD3 DAC D4 ? 3 DAC DACD4 DAC D5 ? 3 DAC DACD5 DAC D6 ? 3 DAC DACD6 DAC D7 ? 3 DAC DACD7 DAC D8 ? 3 DAC DACD8 DAC D9 ? 3 DAC DACD9 DAC DA ? 3 DAC DACDA DAC DB ? 3 DAC DACDB DAC DC ? 3 DAC DACDC DAC DD ? 3 DAC DACDD DAC DE ? 3 DAC DACDE DAC DF ? 3 DAC DACDF DAC E0 ? 3 DAC DACE0 DAC E1 ? 3 DAC DACE1 DAC E2 ? 3 DAC DACE2 DAC E3 ? 3 DAC DACE3 DAC E4 ? 3 DAC DACE4 DAC E5 ? 3 DAC DACE5 DAC E6 ? 3 DAC DACE6 DAC E7 ? 3 DAC DACE7 DAC E8 ? 3 DAC DACE8 DAC E9 ? 3 DAC DACE9 DAC EA ? 3 DAC DACEA DAC EB ? 3 DAC DACEB DAC EC ? 3 DAC DACEC DAC ED ? 3 DAC DACED DAC EE ? 3 DAC DACEE DAC EF ? 3 DAC DACEF DAC F0 ? 3 DAC DACF0 DAC F1 ? 3 DAC DACF1 DAC F2 ? 3 DAC DACF2 DAC F3 ? 3 DAC DACF3 DAC F4 ? 3 DAC DACF4 DAC F5 ? 3 DAC DACF5 DAC F6 ? 3 DAC DACF6 DAC F7 ? 3 DAC DACF7 DAC F8 ? 3 DAC DACF8 DAC F9 ? 3 DAC DACF9 DAC FA ? 3 DAC DACFA DAC FB ? 3 DAC DACFB DAC FC ? 3 DAC DACFC DAC FD ? 3 DAC DACFD DAC FE ? 3 DAC DACFE DAC FF ? 3 DAC DACFF gatos-0.0.5/gfxdump/gfxdump.exe0100644002411700123110000010167107030240376015130 0ustar bayleasrMZÿÿ¸@€º´ Í!¸LÍ!This program cannot be run in DOS mode. $PELûò_8T@à 72 P@ p¬.textt02 `.bssd P€À.data0`6@À.idata¬p:@À.stab € >R.stabstrá HR; /* Access Method Index */ int grp ; /* Group Index */ char page[MAXPAGELEN+1] ; /* Page # in Chip Docs */ int size ; /* Register Bytesize */ int incl ; /* Include Register in output */ int valid ; /* Register Value Valid */ u32 value ; /* Register Value */ u32 mask ; /* Register Value Mask */ } REG ; /* Register Access Method Entry */ typedef struct { char *name ; /* Register AcU‰åÿ5b@h`@h`@h`@è?/ÉÃU‰åSjè0è4/èËÿÿÿè*ÿ5`@ÿ5`@ÿ5`@è)‰Ãè/Sèæ/‹]üÉÃU‰åƒ= b@tt‹Ôp@¡ b@‰ƒ=Üp@tÿ5 b@ÿ5Üp@èí.ƒÄPèì.ƒÄ¡Üp@ƒÀ tÿ5 b@PèË.ƒÄPèÊ.ƒÄ¡Üp@ƒÀ@tÿ5 b@Pè©.ƒÄPè¨.ÉÉöU‰åè0ÿÿÿÉÃ\\.\MAPDEV.VXD\\.\MAPDEVCannot open driver, error=%08lx Failed to map device vU‰åƒìjhjjjjhô@èå.‰Âƒúÿu@jhjjjjh@èÅ.‰Âƒúÿu èÁ.Ph@¡Üp@ƒÀ@Pèí-jèî-ÇEì"‹E ‰Eð‹E‰EôMì‰MäjEèPjjjEäPh"Rèz.…Àuh/@¡Üp@ƒÀ@Pè›-jèœ-‹EøÉÃvU‰åÉÃvU‰åŠE ‹UîÉÃU‰å‹E ‹UïÉÃU‰å‹Uì%ÿÉÉöU‰å‹UíÉÃvU‰åì¬WVS1Û‰dÿÿÿè+f‰]øˆØºø îºú îºø ì‰Áºú ì‰Æ„Éu „Àu fÇEøë3ºø í‰Æ¸€ïí‰Á‰ðïù€tèç¸é½fÇEøfƒ}øt…Û„¬fÇEúÿÿÇE¸ÇE´ÇE°Ç…hÿÿÿ½lÿÿÿÇEü1ö‹U°•‹D;LÁà‹Mü‰ÊÁâ Ê€ Љ…`ÿÿÿ‰ðÁà …`ÿÿÿ‰…\ÿÿÿºø ïºü 퉅lÿÿÿf½lÿÿÿÿÿ„ñf½nÿÿÿÿÿ„â‹\;L‰ `@‰ `@‰5`@‹\ÿÿÿƒÉ‰Èºø ïºü 퉅pÿÿÿ‹\ÿÿÿƒÉ‰Èºø ïºü í‰Á‰tÿÿÿ‹\ÿÿÿƒË ‰Øºø ïºü 퉅xÿÿÿ‹\ÿÿÿƒË‰Øºø ïºü 퉅|ÿÿÿ‹\ÿÿÿƒË‰Øºø ïºü í‰E€‹\ÿÿÿƒË‰Øºø ïºü í‰E„‹\ÿÿÿƒË‰Øºø ïºü í‰Eˆ‹\ÿÿÿƒË ‰Øºø ïºü í‰EŒ‹\ÿÿÿƒË$‰Øºø ïºü í‰E‹\ÿÿÿƒË0‰Øºø ïºü í‰Eœ‹\ÿÿÿƒË<‰Øºø ïºü í‰E¨‹\ÿÿÿƒË@‰Øºø ïºü í‰E¬áÿÿùt$ùu5€}…t/‹E´Áà‰…\ÿÿÿ¶U…‰T8Lëÿ…dÿÿÿƒ½dÿÿÿ~ ‹E´‰D‡LÿE´…öu€½zÿÿÿ|¾ëF‹…hÿÿÿÿ…hÿÿÿƒø?w jWè@ƒÄƒþ޶ýÿÿ‹Eü@‰Eüƒø†¤ýÿÿ‹E°‰…`ÿÿÿ@‰E°‹•`ÿÿÿB9U´‡ýÿÿfƒ}øt 1À…À„ã°ñºø î1Àºú îÇE¸ÇE´ÇE°Ç…hÿÿÿµlÿÿÿfÇEúÀ‹E°…ŠD3Lºú îf‹Mú‰Êí‰Ç‰½lÿÿÿ1Àºú î‹…lÿÿÿf‰…\ÿÿÿf=ÿÿ„,f‹•nÿÿÿf‰•`ÿÿÿfúÿÿ„f=ðð„ fúðð„þ‹D3L£ `@·Uú‰`@Ç`@ŠD3Lºú î‰ËƒÃ‰Ú퉅pÿÿÿ‰ËƒÃ‰Ú퉅tÿÿÿ‰ËƒÃ ‰Ú퉅xÿÿÿ‰ËƒÃ‰Ú퉅|ÿÿÿ‰ËƒÃ‰Úí‰E€‰ËƒÃ‰Úí‰E„‰ËƒÃ‰Úí‰Eˆ‰ËƒÃ ‰Úí‰EŒ‰ËƒÃ$‰Úí‰E‰ËƒÃ0‰Úí‰Eœ‰ËƒÃ<‰Úí‰E¨ƒÁ@‰Êí‰E¬1Àºú îÿu€}…t‹E´Áà‰…\ÿÿÿ¶U…‰T0LÿE´‹…hÿÿÿÿ…hÿÿÿƒø?w jVèOƒÄf‹EúþÄf‰Eúf=ÿφ~þÿÿ‹E°‰…`ÿÿÿ@‰E°‹•`ÿÿÿB9U´‡[þÿÿ1Àºø îè"1À¥Hÿÿÿ[^_ÉÃU‰åS‹]¡`@ƒø?Ú‰ÂÁâ¹TQ@¡ `@‰ ¡`@‰D ¡`@‰D f‹f‰D f‹Cf‰D ÇD ÿÿÿÿÇD ÿÿÿÿÇD ÿÿÿÿÇD  ‹C…Àt¨t$üë$ð‰D ‹C…Àt#‹ `@Áá¨t‰Âƒâüë‰Âƒâð¸TQ@‰T‹C…Àt#‹ `@Áá¨t‰Âƒâüë‰Âƒâð¸TQ@‰T‹S0…Òt¡`@Áà‰pQ@ÿ`@‹]üÉÃU‰åÉÃvU‰åÉÃvU‰åÇP@ÿÿÿÿÉÃU‰åÉÃvU‰å‹E‹H8ƒùtƒùt ë!ƒùtëf‹P$ìëf‹P$fíë f‹P$íë¸ï¾­ÞÉÃU‰å‹U‹B8ƒøt"ƒøt ë;ƒøt%ë3f‹B$f‹T`@Âìë'f‹B$f‹T`@Âfíëf‹B$f‹T`@Âíë¸ï¾­ÞÉÃvU‰å‹M‹A8ƒøt$ƒøt ë=ƒøt)ë5¡l`@‹Q$Š%ÿë'¡l`@‹Q$f‹%ÿÿë‹l`@‹A$‹ë¸ï¾­ÞÉÃU‰å‹M‹A8ƒøt$ƒøt ë=ƒøt)ë5¡p`@‹Q$Š%ÿë'¡p`@‹Q$f‹%ÿÿë‹p`@‹A$‹ë¸ï¾­ÞÉÃU‰å‹M‹A8ƒøt$ƒøt ë=ƒøt)ë5¡t`@‹Q$Š%ÿë'¡t`@‹Q$f‹%ÿÿë‹t`@‹A$‹ë¸ï¾­ÞÉÃU‰åVS±ÿºÚìºÀì‰Æ‹EŠ@$î‹Uƒz8uºÁìˆÁºÚì‰ðºÀî¶É‰Èeø[^ÉÃU‰åVS±ÿºÔì‰Æ‹EŠ@$î‹Uƒz8uºÕìˆÁ‰ðºÔî¶É‰Èeø[^ÉÃU‰åVS±ÿºÎì‰Æ‹EŠ@$î‹Uƒz8uºÏìˆÁ‰ðºÎî¶É‰Èeø[^ÉÃU‰åVS±ÿºÄì‰Æ‹EŠ@$î‹Uƒz8uºÅìˆÁ‰ðºÄî¶É‰Èeø[^ÉÃU‰åƒìWVSºÇì‰Á‹EŠ@$îºÉì‰ÆÁææÿì‰ÇÁç‰úâÿÖºÉì‰Ç‰û¶ÃƈȺÇî‰ðeì[^_ÉÉöU‰å‹E‹t`@ŠJŠ@$ˆB¡t`@‹P ˆH‰ÐÉÃU‰å‹E‹t`@ŠŠ‘Š@$Ààˆ‚‘¡t`@Š’ˆˆ‘¶ÂÉÃU‰å‹U‹B8ƒøt,ƒøt ëQƒøt7ëI‹B$€ôÁà‹t`@Š%ÿë4‹B$€ôÁà‹t`@f‹%ÿÿë‹B$€ôÁà‹t`@‹ë¸ï¾­ÞÉÃU‰åƒìWVS¾ÿÿÿÿf‹T`@‰ÙƒÁg‰Êì‰EøŠEøˆEÿ‹EŠ@$î‹U‹J8ƒùtƒùt ë‰ÚƒÂiì‰Æë‰ÚƒÂiì‰ÆìfÁàÆf‹T`@ƒÂgŠEÿî·Ö‰Ðeì[^_ÉÃET6KPLLM64PLLM64MEMPLLR128PLLMMRR128MMRDACSEQGRACRTATCMEM2MEM1MEMMEM0I/O1IOI/O%s[%02X]‰öU‰å‹Eÿp$‹@(Áàÿ°„`@hE@è5"ÉÃ%s_%04XvU‰å‹Eÿp$‹@(Áàÿ°„`@hq@è "ÉÃ%s_%02XvU‰å‹Eÿp$‹@(Áàÿ°„`@h@èÝ!ÉÃMEM_%d_%02XvU‰å‹E‹@$‰Â¶ÒRÁøPhÉ@è¯!ÉÃMach64.regRagePRO.regRage128.reg‰öU‰å·N`@=BL„í=IG„öD=TE„Ó=TC„Æ=XC„»éø=BG„Á=DG„¶éÝ=QG=PGž=MGŒ¿ë{=ZG±ëm=TLte7=ILt\=DLtS=GLtLé‰=MLt?|=RLx=PL|që-=LR=KR}J=FRY=ER|Rë:=WVI=TV|BÇh`@èÓ ¸÷@ë.Çh`@è½ ¸@ëÇh`@ è§ ¸@ë1ÀÉÃET4000w32p.regET6000.regET6300.regvU‰å·N`@=2=2}=2tëI=2t=Gt.ë8è= ¸d@ë.P`@ÿ?Ç``@è ¸s@ëè ¸~@ë1ÀÉÃP9000.regP9100.reg‰öU‰å·N`@=t =‘tëèÑ ¸ú@ëèÅ ¸ @ë1ÀÉÃGD7548.regGD5430.regGD5434-4.regGD5434-8.regGD5436.regGD5446.regGD5480.regGD5462.regGD5464.regGD5465.regCL6729.regCL6832.regGD7542.regGD7543.regGD7541.regU‰å·N`@=Є5g=¨„ô,= „ǃø8„¬ék=¤„»éZ=¸„×=¬„¾é==¼„Åé,=„ñ-=Ö„Ì=Ô„³é=„»éò=„Ï=„¶éÕ=„½éÄè% ¸F @é·è ¸Q @é§è ¸\ @é—èõ ¸i @é‡èå ¸v @ëzèÙ ¸ @ënèÍ ¸Œ @ëbèÁ ¸— @ëVèµ ¸¢ @ëJè© ¸­ @ë>è ¸¸ @ë2è‘ ¸Ã @ë&è… ¸Î @ëèy ¸Ù @ëèm ¸ä @ë1ÀÉÃTGUI9320.regTGUI9420.regTGUI9440.regTGUI9660.regTGUI9388.regTGUI9397.regTGUI9750.regTGUI9850.reg‰öU‰å·N`@= ”tQ!=ˆ“tl = “t3éŽ=—“tcé‚=`–t? =@”t*ëp=P—tQ=P˜tVë`踞"@ëV葸«"@ëJè…¸¸"@ë>èy¸Å"@ë2èm¸Ò"@ë&èa¸ß"@ëèU¸ì"@ëèI¸ù"@ë1ÀÉÃAtlas.regMill.regMystique.regMillII.regMillG200.regImpression.regProdG100.reg‰öU‰å·N`@=tm%=tL =t7é†=tC=tHëv= tW =!fë@=]=|VëH艸Â#@ëJè}¸Ì#@ë>èq¸Õ#@ë2èe¸â#@ë&èY¸í#@ëèM¸ú#@ëèA¸ $@ë1ÀÉÃSIS86C201.regSIS86C202.regSIS85C503.regSIS86C205.regSIS85C501.regSIS85C496.regSIS85C601.regSIS5107.regSIS85C5511.regSIS85C5513.regSIS5571.regSIS5597.regSIS7001.reg‰öU‰å·N`@=„ùQƒø„¾ƒø„“ƒø„šé)=„±=„˜é =–„Ÿéú=U„¿=Q„š=U„›éÒ=—U„¯=qU„–éµ=p„é¤èÁ¸Ê$@é—豸Ø$@é‡è¡¸æ$@ëz蕸ô$@ën艸%@ëbè}¸%@ëVèq¸%@ëJèe¸,%@ë>èY¸8%@ë2èM¸G%@ë&èA¸V%@ëè5¸b%@ëè)¸n%@ë1ÀÉÃImagine128.regImagine128II.regImagine128T2R.regU‰å·N`@=9#t! = #t ë.==Itë%èÁ¸â&@ë赸ñ&@ë詸'@ë1ÀÉÃMagicNM2070.regMagic128V.regMagic128ZV.regMagicNM2160.regU‰å·N`@ƒøt!ƒøtë<ƒøtƒøt&ë0è7¸b'@ë&è+¸r'@ë踀'@ëè¸'@ë1ÀÉÃV1000.regV2100.regU‰å·N`@ƒøt = tëè׸ø'@ëè˸(@ë1ÀÉÃGLINT300SX.regGLINT500TX.regGLINTDelta.regGLINTPermedia.regGLINTMX.regGLINTPermedia 2.regU‰å·N`@Hƒøwlÿ$…¸(@Ô(@à(@ì(@ø(@)@)@)@è'¸@(@ë>è¸O(@ë2è¸^(@ë&è¸m(@ëè÷¸(@ëè븋(@ë1ÀÉÃPlato.regViRGE.regTrio32+64.regAurora64V.regTrio64UV.regViRGEVX.reg868.reg928.reg864-0.reg864-1.reg964-0.reg964-1.reg968.regTrio64V2.regPLATOPX.regViRGEGX2.regViRGEMX.regViRGEMX+.regU‰å·N`@=Áˆ„‡=ˆ„*:=1V„±=Q„àéÏ=ˆ„ß=ˆ„äé³=€ˆ„==ˆ„æé•=°ˆ„õ=Àˆ„úéy=‰„19=ш„=Ј„çéN=ðˆ„ï=‰„ðé3=Œ'=Œ=Š„å=Š„æé=Œ„íéôèó¸ )@éçèã¸4)@é×èÓ¸B)@éÇèøP)@é·è³¸])@é§è£¸i)@é—蓸q)@é‡èƒ¸y)@ëzèw¸ƒ)@ënèk¸)@ëbè_¸—)@ëVèS¸¡)@ëJèG¸©)@ë>è;¸¶)@ë2è/¸*)@ë&è#¸Â)@ëè¸Ï)@ëè ¸Û)@ë1ÀÉÃU‰å¡``@…Àt#ƒ=l`@uPÿ5P`@ÿ5 `@è!åÿÿ£l`@ƒÄ ¡d`@…Àt#ƒ=p`@uPÿ5T`@ÿ5 `@èõäÿÿ£p`@ƒÄ ¡h`@…Àt ƒ=t`@uPÿ5X`@ÿ5 `@èÉäÿÿ£t`@ÉÉöU‰åƒìWVSƒ=|`@«‹E €8-uÆjÿu¡|`@€P¡P@Rèåjÿu ¡|`@€P¡P@TRèÆ‹}1Àü¹ÿÿÿÿò®÷щÏO1öƒÄ9þ}'‹]¾P觃ąÀt¾P蟈ƒÄCF9þ|Ü‹} 1Àü¹ÿÿÿÿò®÷щÏO1ö9þ}(‹] ¾PègƒÄ…Àt¾Pè_ˆƒÄCF9þ|Üjÿu¡|`@€P¡P@T Rè%jÿu ¡|`@€P¡P@TRèjÿu¡|`@€P¡P@TRèçƒÄ$jÿu ¡|`@€P¡P@T"RèÅ‹|`@‹ P@’BÆD -‹|`@‹ P@’BÆD+‹|`@‹ P@’BÆD-‹|`@‹ P@’BÆD!+ÿ|`@eð[^_ÉÃ0U‰åWVS¾€`@=x`@ÿKƒ} uÇE Q.@1Ûƒ=€`@t0ÿuÿ6è2ƒÄ…Àu¡x`@‹ P@ÀP‰\‘(CƒÆƒ>uÑ1Û9|`@~;‰Þÿu¡P@ðPèðƒÄ…Àu¡x`@‹ P@ÀP‰\‘,ƒÆ,C9|`@Èj ÿu¡x`@ÀP¡P@Rè’jÿu¡x`@ÀP¡P@T0Rèsjjÿu 臉Ëx`@‹ P@ÒB‰\$ƒÄ$jjÿu è`‰Ã‹x`@‹ P@ÒB‰\Hj jÿuèD‰Ã‹x`@‹ P@ÒBÁà‰\8ÇDDï¾­ÞB‰x`@eô[^_ÉÃ%255[^ ] U‰åVS‹uj@jhQ@èöƒÄ Vèô‰ÃƒÄ…ÛushP@hÂ/@VèãƒÄ ƒøu[ºP@‰Ð…ÀtÎhÌ/@Rè̓ąÀtë@Š€ú tø€ú tó€ú tî€8#u1À‰Q@…Ût…Àtƒû~‰Øë C1Òƒû€ë¬1Àeø[^ÉÃgfxdump: Ignored %s ‰öU‰åS‹]Sè6ÿÿÿƒÄ…ÀtG‹Q@€:*u¸ë7ƒø~ÿ5Q@RèÃûÿÿƒÄëÊhP@hu0@¡Üp@ƒÀ@Pè²ƒÄ ë­1À‹]üÉÃU‰åS‹]SèÒþÿÿƒÄ…Àte‹Q@€:*u¸ëUƒø~/ÿ5(Q@ÿ5$Q@ÿ5 Q@ÿ5Q@ÿ5Q@ÿ5Q@Rè ýÿÿƒÄë¬hP@hu0@¡Üp@ƒÀ@Pè0ƒÄ ë1À‹]üÉÃrgfxdump: fopen(.reg) failed*END**INCLUDE**GROUPS**REGISTERS*gfxdump: ignored: %s U‰åƒìWVS1öhq1@ÿuè‰ÃƒÄ…Ûuhs1@è jèš …öuSèÄýÿÿ‰EüƒÄ…À„´ƒ}üt(‹5Q@¿•1@¹ü¨ó¦uSè’ýÿÿƒÄ…Àuóë¿‹5Q@¿›1@¹ ü¨ó¦u ÿ5Q@èfÿÿÿë=‹5Q@¿¥1@¹ ü¨ó¦u Sèþÿÿë‹5Q@¿®1@¹ ü¨ó¦uSèGþÿÿ‰ÆƒÄéOÿÿÿ1öhP@hº1@èß ƒÄé5ÿÿÿSè8 1Àeð[^_Éà = 0x%02X%04X%06lX%08lX? %s ‰öU‰åVS‹u‹F(ÁàV‹€Œ`@ÿЉÃăûhÞ2@èp ƒÄCƒû~íhà2@è] ¸+F8EƒÄ…ÛthÞ2@è< ƒÄKuðƒ=H`@t hã2@è# ƒÄƒ~@tR‹F8ƒøt"ƒøtë_ƒøtƒøt$ëR¶FDPhæ2@ë·FDPhë2@ëÿvDhð2@ëÿvDhö2@èÍ ƒÄë‹N8M…Ûthü2@è° ƒÄKuðƒ=D`@uƒ=<`@u ƒ=@`@t hþ2@è… ƒÄƒ=D`@t>F0Ph3@èk ƒÄƒ=<`@u ƒ=@`@t‰ÃƒûhÞ2@èD ƒÄCƒû~íƒ=<`@tC‹F,€P¡P@Rh3@è ƒÄƒ=@`@t2‰ÃƒûhÞ2@èø ƒÄCƒû~íƒ=@`@tVh3@èÛ ƒÄh3@èÎ eø[^ÉÃ-a-b-d-e-g-n-p-v-x-rU‰åƒìWVSÇEü‹E9EüŽ‹] ƒÃ‹;Š€ú-t €ú+…v1Àü¹ÿÿÿÿò®÷щÏO1ö9þ}/‹¾Pèb ƒÄ…Àt‹¾PèW ‰Â‹ˆƒÄF9þ|Ò‹3¿Ý4@¹ü¨ó¦uÇ4`@éþ‹3¿à4@¹ü¨ó¦uÇ(`@éÜ‹3¿ã4@¹ü¨ó¦uÇ,`@麋3¿æ4@¹ü¨ó¦uÇ8`@阋3¿é4@¹ü¨ó¦uÇ<`@év‹3¿ì4@¹ü¨ó¦uÇ@`@éT‹3¿ï4@¹ü¨ó¦uÇD`@é2‹3¿ò4@¹ü¨ó¦uÇ$`@é‹3¿õ4@¹ü¨ó¦uÇH`@éî‹3¿ø4@¹ü¨ó¦u#‹E9EüƒÃÿEüÿ3èF £0`@ƒÄé¹1ö95|`@Žª‰÷¡P@øƒÀ Pÿ3èÆƒÄ…Àu ¡P@ÇD8(¡P@øƒÀPÿ3蠃ąÀu ¡P@ÇD8(¡P@øƒÀPÿ3èzƒÄ…Àu ¡P@ÇD8(ÿÿÿÿ¡P@øƒÀ!Pÿ3èTƒÄ…Àu ¡P@ÇD8(ÿÿÿÿƒÇ,F95|`@XÿÿÿƒÃÿEü‹E9EüŒxýÿÿƒ=8`@tÇD`@Ç@`@Ç<`@‹Eüeì[^_ÉÃS33DlabsRenditionNeomagicNumber NineSISMatroxTridentCirrus LogicWeitekTseng LabsATI Technologiesabafreopen(stdout) failed%d:%d:%dCard @ %s (vendor %04X) is not a graphics card or is unsupported Invalid PCI/AGP address %s or no card present %d:%d:%d%s : %04X:%04X (%s) Card @ %s : %04X:%04X (%s): base[0,1,2] = 0x%08lX, 0x%08lX, 0x%08lX gfxdump: Unknown Chip Device %04X:%04X VGA.regU‰åƒì8WVSè¾1ۉ߉}ð‰}ìÇEèÿÿÿÿÇEàD8@h`è|‰Á‰ P@h€èj‰Á‰ P@jWÿ5P@èjWÿ5P@èƒÄ ÿu ÿuèûÿÿ‰Æ‹E)ðƒÄ…À~ ‹U ‹²‰UðF9u~+¡Üp@ƒÀ P¹H8@ƒ=(`@t¹E8@Q‹E ÿ4°èûƒÄ ƒ=Üp@àuhJ8@èÅjèVèù×ÿÿ1ö95`@~RUô‰U܉óÿ³\Q@ÿ³XQ@ÿ³TQ@ha8@ÿuÜ诃ă}ðtÿuðÿuÜè3ƒÄ…Àu‰uèƒÃ F95`@·ƒ}ð„у}茩‹MèÁáºTQ@f‹\ f‰L`@f‹Df£N`@‹D£P`@‹D£T`@‹D£X`@‹D£\`@1öƒ=ˆa@t(‰Ù‰óf9‹€a@u‹»„a@‹ƒˆa@‰EìƒÃ ƒ»ˆa@u܃}ì…’·L`@Pÿuðhj8@¡Üp@ƒÀ@Pè8jè9ÿuðh¬8@¡Üp@ƒÀ@Pèjè…ÿt ƒ=$`@t8‹uð‹ `@9Î}+¿TQ@‰óƒ< ƒ|; ƒ|; ~ÇEàÞ2@ƒÃ F9Î|Ý1ö95`@ŽóÇEÔTQ@‰ó1ÿƒ=ˆa@t,f‹“`Q@f‰UΉùf‹EÎf9€a@u‹¹„a@ƒÁ ƒ¹ˆa@uá…ÿu ƒ=$`@„Ž·“bQ@R·ƒ`Q@P¹D8@‹UÔƒ: ƒ»XQ@  ƒ»\Q@ ‹MàQÿ³\Q@ÿ³XQ@‹EÔÿ0hÛ8@‹Üp@ƒÂ@RèƒÄ …ÿtWhò8@¡Üp@ƒÀ@PèûƒÄ ëh3@¡Üp@ƒÀ@PèãƒÄƒEÔ ƒÃ F95`@ÿÿÿjè̓=$`@tOW·N`@P·L`@Pÿuðhù8@¡Üp@ƒÀ@Pè”ÿ5X`@ÿ5T`@ÿ5P`@h9@¡Üp@ƒÀ@PèoƒÄ,ºØì‰ÁˆMç€É ˆÈî‹UìÿÒ‰Ãè»îÿÿ…Ûu+·N`@P·L`@Ph?9@¡Üp@ƒÀ@Pè(jè)hg9@èRôÿÿSèLôÿÿÿu ÿuèm÷ÿÿƒÄƒ=4`@t,1ö‹ |`@9Î} ‹=P@‰óƒ|(uÇD(ƒÃ,F9Î|é1ö‹ x`@9Î};‹P@¡P@‰E؉ωñ‹T ,’‹D ,P‹U؃|‚(~ÇD <ƒÁLF9þ|Ø1ÿ9=0`@Žœ1ö95x`@~S‰ó‹ P@ƒ|<t8ƒ=,`@u€<*t)‹T(Áâ P‹‚ˆ`@ÿЉ¡P@‰TDÇD@ƒÄƒÃLF95x`@¯1ö95x`@~(‰ó‹ P@ƒ|<~  PèlôÿÿƒÄƒÃLF95x`@ÛG9=0`@dÿÿÿŠEçºØî1Àe¼[^_ÉÃU‰åëƒÀ£$b@‹@üÿС$b@ƒ8uéÉÃU‰åS‹d@@ƒúÿu1Òƒ=h@@t¹d@@¸ƒÀBƒ<uö‰Ó…Ût ‹d@@ÿÐKuôhÌ>@èþ‹]üÉÃU‰åƒ=PQ@uÇPQ@è•ÿÿÿÉÃÿ%àp@ÿ%Øp@ÿ% q@ÿ%Ôp@ÿ%Üp@ÿ%@q@ÿ%äp@ÿ%q@ÿ%ðp@ÿ%q@ÿ%,q@ÿ% q@ÿ%@ @|@9@>@à@¨@4@0@<@|@+@0@˜@|@&@0@ô@|@"@"@P@P@@@˜@P@@@Ô@P@@@@P@@@L@P@ @@ô@|@þ@ú@¨@P@ó@0@@Ø@ì@ú@Ì@P@ä@ú@p@P@38@@ (8@Œ@!8@ @8@ð @# 8@#@+8@$@98@|%@]õ7@'@Èì7@ '@câ7@ (@==Û7@ (@3SØ7@è)@ÿÿÿÿp@@,b@) ; return "SIS85C5513.reg" ; case 0x5571: /* 5571 */ dommap() ; return "SIS5571.reg" ; case 0x5597: /* 5597 */ dommap() ; return "SIS5597.reg" ; case 0x7001: /* 7001 */ dommap() ; return "SIS7001.reg" ; default: return NULL ; } } /* Vendor 0x105D: Number Nine */ /* Number Nine */ static char *number9(void) { switch (device) { case 0x2309: /* Imagine-128 */ dommap() ; return "Imagine128.reg" ; @p|sÔp¸pœsLqdqtq€qˆq˜q¤q°q¸qÀqÌqÔqÜqèqôqr rr$r0r@7dÌ>@N€x€’€Á€â€€T€ €Æ€ð€€;€U€p€‘€Ê€í€€;€O‚Y‚|‚‚¤‚Ȃ炛€±€€Ý€(€ÐE¢F‚e‚E¢E¢E¢…‚E¢E¢E¢£‚E¢E¢E¢Å‚E¢E¢ë‚é•‚E¢‚E¢6€ž€E¢0 ‚E¢H ‚ýY €vq €¨† €óœ € E¢± €IÈ €JÝ €Kó €L €M €O4 €PJ €S` €Yx €¯ €|ç ‚J €5E¢( $ Ì>@E$B ¶ a $» ì>@E$O{ $Ì t/Jÿÿc0qÿÿ‹ÿÿ§€¸T0ÈèÖäd/îÿÿè_environ4'|; KôYh\__dll__ÿÿ}ÿÿ_strncpy¬/’ìž ¬\0ÀØÐ@ß@ÿÿ_isupper´/îÿÿ_atoi0ð_memsetÜ/__argc Ü+9D0endH0U_tolower¼/cd0etextt0qD{d ‡ ___main Received: from melita.melita.com by max4.rrze.uni-erlangen.de; Mon, 23 Jun 1997 21:48:16 +0200 Received: from mailgate.melita.com ([192.68.22.8]) by melita.melita.com (8.6.12/8.6.9) with SMTP id QAA29292 for ; Mon, 23 Jun 1997 16:17:55 -0400 Received: by mailgate.melita.com with Microsoft Mail id <33AEFD34@mailgate.melita.com>; Mon, 23 Jun 97 15:48:20 PDT From: Karen Hazzah To: "'Stefan.Dirsch@stud.uni-erlangen.de'" Subject: Your post to vxd newsgroup Date: Sun, 22 Jun 97 20:51:00 PDT Message-ID: <33AEFD34@mailgate.melita.com> Encoding: 22 TEXT X-Mailer: Microsoft Mail V3.0 I posted an answer to your question in the newsgroup. I also have additional information for you. I can email you the binary for VxD which does exactly what you need: given a physical address, returns a pointer that can be used by a Win32 application. I'll also give you source for a Win32 app which uses the VxD to read an area of physical memory. I don't offer this solution to everyone, since in most cases the proper solution is for them to write a VxD which interacts with their hardware, rather than simply getting a pointer to the hardware and interacting with it from an application. However, in your case, you're just using a VxD as a tool to get your Linux driver working...you shouldn't have to write a VxD for this :-) Let me know if you're interested. =============================================================================== Hello Karen A long time ago, you sent me your VXD for reading an area of physical memory under Win32, so I could make register dumps of the graphic chip. Did I ever mention, that it works perfectly for me? Why I contact you is, that I really would like to offer this solution to all XFree86 members, so that it will be much easier in the future for XFree86 to develop drivers for graphic boards. Can I count with your agreement? Would you like to add a special copyright to your software? Stefan =============================================================================== From KHazzah@melita.com Wed Mar 4 00:00:28 1998 Return-Path: Received: from melita.melita.com (melita.com [192.68.22.2]) by Galois.suse.de (8.8.8/8.8.8) with SMTP id AAA03709 for ; Wed, 4 Mar 1998 00:00:26 +0100 Received: from norcross.melita.com (norcross.melita.com [192.68.22.10]) by melita.melita.com (8.6.12/8.6.9) with ESMTP id TAA31217 for ; Tue, 3 Mar 1998 19:48:10 -0500 Received: by zippy.melita.com with Internet Mail Service (5.5.1960.3) id ; Tue, 3 Mar 1998 18:00:26 -0500 Message-ID: From: "Hazzah, Karen" To: Stefan Dirsch Subject: RE: VXD binary for Win32 for reading an area of physical memory Date: Tue, 3 Mar 1998 18:00:25 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.1960.3) Content-Type: text/plain Status: ROr OK, you have my permission to make it publicly available, as is. If you make it available on the web (ftp, etc.), please give me the URL so I can refer others to it. gatos-0.0.5/gfxdump/ET6000.reg0100644002411700123110000000722607030240376014271 0ustar bayleasr*GROUPS* PCI - PCI Registers PLL - PLL Clock Control Registers MEM - Memory Mapped Registers *REGISTERS* # access index doc size/ register name [value mask] # method page group ATC 16 143 1 ATC ATCMisc ATC 17 144 1 ATC ATCMisc1 CRT 21 163 1 CRT BaseAddrReadback1 CRT 22 163 1 CRT BaseAddrReadback2 CRT 23 164 1 CRT BaseAddrReadback3 CRT 30 164 1 CRT LineCounterLow CRT 31 164 1 CRT LineCounterHigh CRT 33 165 1 CRT ExtStartAddr CRT 34 165 1 CRT AuxCtrl CRT 35 166 1 CRT VertOverflowHigh CRT 3F 166 1 CRT HorizOverflow SEQ 06 173 1 SEQ TSStateCtrl ET6KPLL 00 122 4 PLL PLL0 ET6KPLL 01 122 4 PLL PLL1 ET6KPLL 02 122 4 PLL PLL2 ET6KPLL 03 122 4 PLL PLL3 ET6KPLL 04 122 4 PLL PLL4 ET6KPLL 05 122 4 PLL PLL5 ET6KPLL 06 122 4 PLL PLL6 ET6KPLL 07 122 4 PLL PLL7 ET6KPLL 08 123 4 PLL CRCData ET6KPLL 09 124 4 PLL SpriteColor ET6KPLL 0A 122 4 PLL PLLA ET6KPLL 0D 125 1 PLL CLKDACCommand ET6KPLL 0E 125 1 PLL CRCCtrl ET6KPLL 0F 126 1 PLL CLKDACID I/O1 00 96 2 PCI VendorID I/O1 02 97 2 PCI DeviceID I/O1 04 97 2 PCI DeviceCommand I/O1 06 98 2 PCI DeviceStatus I/O1 08 99 1 PCI RevisionID I/O1 09 99 1 PCI RegLvlProgItf I/O1 0A 99 1 PCI Subclass I/O1 0B 99 1 PCI Class I/O1 10 100 4 PCI MemoryBaseAddr I/O1 14 100 4 PCI IOBaseAddr I/O1 30 101 4 PCI ExpansionROMAddr I/O1 3C 101 1 PCI DeviceInterruptLine I/O1 3D 101 1 PCI DeviceInterruptPin I/O1 40 103 1 PCI MemoryMapCtrl I/O1 41 104 1 PCI SystemPerformanceCtrl I/O1 42 105 1 PCI MCLKCtrl I/O1 43 106 1 PCI XCLKSCLKCtrl I/O1 44 107 1 PCI RASCASCfg I/O1 45 108 1 PCI MemoryCfg I/O1 46 109 1 PCI CRTDisplayFeature I/O1 47 110 1 PCI TestSetup I/O1 4E 111 1 PCI VESADDCBusCtrl I/O1 4F 112 1 PCI GeneralPurposeOutput I/O1 50 113 1 PCI ImageStartAddrLow I/O1 51 113 1 PCI ImageStartAddrMid I/O1 52 114 1 PCI ImageStartAddrHigh I/O1 53 114 1 PCI ImageXferLenLow I/O1 54 114 1 PCI ImageXferLenHigh I/O1 55 115 1 PCI ImageRowOffsetLow I/O1 56 115 1 PCI ImageRowOffsetHigh I/O1 57 115 1 PCI ImagePortCtrl I/O1 58 116 1 PCI VideoCtrl1 I/O1 59 117 1 PCI VideoCtrl2 I/O1 5C 117 1 PCI ChromaKeyCompare0 I/O1 5D 118 1 PCI ChromaKeyCompare1 I/O1 5E 118 1 PCI ChromaKeyCompare2 I/O1 66 121 1 PCI CLKDACPowerCtrl I/O1 67 121 1 PCI CLKIDX I/O1 80 127 1 PCI DisplayListAddrLow I/O1 81 127 1 PCI DisplayListAddrHigh I/O1 82 128 1 PCI SpriteHorizPreset I/O1 83 128 1 PCI SpriteVertPreset I/O1 84 128 1 PCI SpriteHorizPosLow I/O1 85 129 1 PCI SpriteHorizPosHigh I/O1 86 129 1 PCI SpriteVertPosLow I/O1 87 129 1 PCI SpriteVertPosHigh MEM0 00 184 4 MEM MMUMemBase0 MEM0 04 184 4 MEM MMUMemBase1 MEM0 13 185 1 MEM MMUCtrl MEM0 30 187 1 MEM ACLSuspTerm MEM0 31 187 1 MEM ACLOperState MEM0 32 188 1 MEM ACLConf MEM0 34 189 1 MEM ACLInterruptMask MEM0 35 190 1 MEM ACLInterruptStatus MEM0 36 191 1 MEM ACLStatus MEM0 37 191 1 MEM ACLPowerCtrl MEM0 80 192 4 MEM ACLPatternAddr MEM0 84 192 4 MEM ACLSourceAddr MEM0 88 193 2 MEM ACLPatternYOffset MEM0 8A 193 2 MEM ACLSourceYOffset MEM0 8C 194 2 MEM ACLDestYOffset MEM0 8E 194 1 MEM ACLPixelDepth MEM0 8F 195 1 MEM ACLDirection MEM0 90 196 1 MEM ACLPatternWrap MEM0 91 197 1 MEM ACLXferDisable MEM0 92 197 1 MEM ACLSourceWrap MEM0 93 198 1 MEM ACLSecondaryEdge MEM0 98 199 2 MEM ACLXCount MEM0 9A 199 2 MEM ACLYCount MEM0 9C 200 1 MEM ACLMixCtrl MEM0 9D 201 1 MEM ACLSteppingInhibit MEM0 9E 201 1 MEM ACLBackRasterOper MEM0 9F 202 1 MEM ACLForeRasterOper MEM0 A0 202 4 MEM ACLDestAddr MEM0 A4 202 4 MEM ACLMixAddr MEM0 A8 203 2 MEM ACLMixYOffset MEM0 AA 203 2 MEM ACLPrimErrorTerm MEM0 AC 203 2 MEM ACLPrimDeltaMinor MEM0 AE 204 2 MEM ACLPrimDeltaMajor MEM0 B2 204 2 MEM ACLSecondErrorTerm MEM0 B4 205 2 MEM ACLSecondDeltaMinor MEM0 B6 205 2 MEM ACLSecondDeltaMajor gatos-0.0.5/gfxdump/RagePRO.reg0100644002411700123110000001755307030240376014716 0ustar bayleasr*GROUPS* PCI - PCI/AGP/Bus Control CFG - Chip Config Registers MISC - Miscellaneous PLL - PLL Clock Control CRTC - CRTC MEM - Memory Control DAC - DAC Control 2D - 2D Engine 3D - 3D Engine CAP MM Video Capture OV MM Overlay Scaler MPP MM MPP Bus Control I2C MM I2C Bus Control *REGISTERS* # access index doc size/ register name [value mask] # method page group M64PLL 00 4-53 1 PLL MPLL_CNTL M64PLL 01 4-53 1 PLL VPLL_CNTL M64PLL 02 4-54 1 PLL PLL_REF_DIV M64PLL 03 4-54 1 PLL PLL_GEN_CNTL M64PLL 04 4-55 1 PLL MCLK_FB_DIV M64PLL 05 4-55 1 PLL PLL_VCLK_CNTL M64PLL 06 4-56 1 PLL VCLK_POST_DIV M64PLL 07 4-56 1 PLL VCLK0_FB_DIV M64PLL 08 4-56 1 PLL VCLK1_FB_DIV M64PLL 09 4-57 1 PLL VCLK2_FB_DIV M64PLL 0A 4-57 1 PLL VCLK3_FB_DIV M64PLL 0B 4-57 1 PLL PLL_EXT_CNTL M64PLL 0C 4-58 1 PLL DLL_CNTL M64PLL 0D 4-59 1 PLL VFC_CNTL M64PLL 12 4-60 1 PLL AGP1_CNTL M64PLL 13 4-61 1 PLL AGP2_CNTL M64PLL 14 4-61 1 PLL DLL2_CNTL M64PLL 15 4-61 1 PLL SCLK_FB_DIV M64PLL 16 4-62 1 PLL SPLL_CNTL1 M64PLL 17 4-62 1 PLL SPLL_CNTL2 M64PLL 18 4-63 1 PLL APLL_STRAPS M64PLL 19 4-64 1 PLL EXT_VPLL_CNTL M64PLL 1A 4-64 1 PLL EXT_VPLL_REF_DIV M64PLL 1B 4-65 1 PLL EXT_VPLL_FB_DIV M64PLL 1C 4-65 1 PLL EXT_VPLL_MSB M64PLL 1D 4-66 1 PLL *HTOTAL_CNTL M64PLL 1E 4-66 1 PLL BYTE_CLK_CNTL M64MEM 000 4-33 4 CRTC CRTC_H_TOTAL_DISP M64MEM 001 4-34 4 CRTC CRTC_H_SYNC_STRT_WID M64MEM 002 4-34 4 CRTC CRTC_V_TOTAL_DISP M64MEM 003 4-35 4 CRTC CRTC_V_SYNC_STRT_WID M64MEM 004 4-36 4 CRTC CRTC_VLINE_CRNT_VLINE M64MEM 005 4-36 4 CRTC CRTC_OFF_PITCH M64MEM 006 4-37 4 CRTC CRTC_INT_CNTL M64MEM 007 4-39 4 CRTC CRTC_GEN_CNTL M64MEM 008 4-08 4 CFG DSP_CONFIG M64MEM 009 4-08 4 CFG DSP_ON_OFF M64MEM 00A 4-08 4 CFG TIMER_CONFIG M64MEM 00B 4-09 4 MEM MEM_BUF_CNTL M64MEM 00D 4-10 4 MEM MEM_ADDR_CONFIG M64MEM 00E 4-42 4 CRTC CRTC_TRAP M64MEM 010 4-42 4 CRTC OVR_CLR M64MEM 011 4-43 4 CRTC OVR_WID_LEFT_RIGHT M64MEM 012 4-44 4 CRTC OVR_WID_TOP_BOTTOM M64MEM 013 4-09 4 CFG VGA_DSP_CONFIG M64MEM 014 4-10 4 CFG VGA_DSP_ON_OFF M64MEM 018 4-45 4 CRTC CUR_CLR0 M64MEM 019 4-46 4 CRTC CUR_CLR1 M64MEM 01A 4-47 4 CRTC CUR_OFFSET M64MEM 01B 4-48 4 CRTC CUR_HORZ_VERT_POSN M64MEM 01C 4-48 4 CRTC CUR_HORZ_VERT_OFF M64MEM 01E 4-01 4 CFG GP_IO M64MEM 01F 4-22 4 CFG HS_DEBUG M64MEM 020 4-03 4 CFG SCRATCH_REG0 M64MEM 021 4-03 4 CFG SCRATCH_REG1 M64MEM 024 4-51 1 CFG CLOCK_CNTL M64MEM 025 4-29 4 CFG CONFIG_STAT1 M64MEM 026 4-29 4 CFG CONFIG_STAT2 M64MEM 028 4-04 4 PCI BUS_CNTL M64MEM 02B 4-12 4 MEM EXT_MEM_CNTL M64MEM 02C 4-15 4 MEM MEM_CNTL M64MEM 02D 4-17 4 MEM MEM_GVA_WP_SEL M64MEM 02E 4-18 4 MEM MEM_VGA_RP_SEL M64MEM 030 4-67 4 DAC DAC_REGS M64MEM 031 4-68 4 DAC DAC_CNTL M64MEM 032 4-70 4 DAC EXT_DAC_REGS M64MEM 034 4-20 4 CFG GEN_TEST_CNTL M64MEM 035 4-31 4 CFG CUSTOM_MACRO_CNTL M64MEM 037 4-25 4 CFG CONFIG_CNTL M64MEM 038 4-26 4 CFG CONFIG_CHIP_ID M64MEM 039 4-27 4 CFG CONFIG_STAT0 M64MEM 03A 4-22 4 CFG CRC_SIG M64MEM 040 5-09 4 2D DST_OFF_PITCH M64MEM 041 5-11 4 2D DST_X M64MEM 042 5-14 4 2D DST_Y M64MEM 043 5-14 4 2D DST_Y_X M64MEM 044 5-10 4 2D DST_WIDTH M64MEM 045 5-08 4 2D DST_HEIGHT M64MEM 046 5-08 4 2D DST_HEIGHT_WIDTH M64MEM 047 5-12 4 2D DST_X_WIDTH M64MEM 048 5-03 4 2D DST_BRES_LNTH M64MEM 049 5-02 4 2D DST_BRES_ERR M64MEM 04A 5-03 4 2D DST_BRES_INC M64MEM 04B 5-01 4 2D DST_BRES_DEC M64MEM 04C 5-05 4 2D DST_CNTL M64MEM 04D 5-14 4 2D *DST_Y_X M64MEM 04E 5-15 4 2D TRAIL_BRES_ERR M64MEM 04F 5-15 4 2D TRAIL_BRES_INC M64MEM 050 5-16 4 2D TRAIL_BRES_DEC M64MEM 051 5-03 4 2D DST_BRES_LNTH* M64MEM 052 5-17 4 2D Z_OFF_PITCH M64MEM 053 5-17 4 2D Z_CNTL M64MEM 054 5-18 4 2D ALPHA_TST_CNTL M64MEM 060 5-26 4 2D SRC_OFF_PITCH M64MEM 061 5-28 4 2D SRC_X M64MEM 062 5-29 4 2D SRC_Y M64MEM 063 5-31 4 2D SRC_Y_X M64MEM 064 5-27 4 2D SRC_WIDTH1 M64MEM 065 5-23 4 2D SRC_HEIGHT1 M64MEM 066 5-24 4 2D SRC_HEIGHT1_WIDTH1 M64MEM 067 5-29 4 2D SRC_X_START M64MEM 068 5-30 4 2D SRC_Y_START M64MEM 069 5-31 4 2D SRC_Y_X_START M64MEM 06A 5-27 4 2D SRC_WIDTH2 M64MEM 06B 5-25 4 2D SRC_HEIGHT2 M64MEM 06C 5-25 4 2D SRC_HEIGHT2_WIDTH M64MEM 06D 5-21 4 2D SRC_CNTL M64MEM 080 5-33 4 2D *HOST_DATA0 M64MEM 081 5-33 4 2D *HOST_DATA1 M64MEM 082 5-33 4 2D *HOST_DATA2 M64MEM 083 5-33 4 2D *HOST_DATA3 M64MEM 084 5-33 4 2D *HOST_DATA4 M64MEM 085 5-33 4 2D *HOST_DATA5 M64MEM 086 5-33 4 2D *HOST_DATA6 M64MEM 087 5-33 4 2D *HOST_DATA7 M64MEM 088 5-33 4 2D *HOST_DATA8 M64MEM 089 5-33 4 2D *HOST_DATA9 M64MEM 08A 5-33 4 2D *HOST_DATAA M64MEM 08B 5-33 4 2D *HOST_DATAB M64MEM 08C 5-33 4 2D *HOST_DATAC M64MEM 08D 5-33 4 2D *HOST_DATAD M64MEM 08E 5-33 4 2D *HOST_DATAE M64MEM 08F 5-33 4 2D *HOST_DATAF M64MEM 090 5-34 4 2D HOST_CNTL M64MEM 091 6-10 4 PCI *BM_HOSTDATA M64MEM 092 6-11 4 PCI *BM_ADDR/BM_DATA M64MEM 093 6-12 4 PCI BM_GUI_TABLE_CMD M64MEM 0A0 5-37 4 2D PAT_REG0 M64MEM 0A1 5-37 4 2D PAT_REG1 M64MEM 0A2 5-38 4 2D PAT_CNTL M64MEM 0A8 5-39 4 2D SC_LEFT M64MEM 0A9 5-40 4 2D SC_RIGHT M64MEM 0AA 5-40 4 2D *SC_LEFT_RIGHT M64MEM 0AB 5-41 4 2D SC_TOP M64MEM 0AC 5-41 4 2D SC_BOTTOM M64MEM 0AD 5-42 4 2D *SC_TOP_BOTTOM M64MEM 0B0 5-43 4 2D DP_BKGD_CLR M64MEM 0B1 5-43 4 2D DP_FRGD_CLR M64MEM 0B2 5-45 4 2D DP_WRITE_MSK M64MEM 0B4 5-46 4 2D DP_PIX_WIDTH M64MEM 0B5 5-51 4 2D DP_MIX M64MEM 0B6 5-58 4 2D DP_SRC M64MEM 0B7 5-45 4 2D *DP_FRGD_CLR_MIX M64MEM 0B8 5-44 4 2D *DP_FRGD_BKGD_CLR M64MEM 0BA 5-13 4 2D DST_X_Y M64MEM 0BB 5-11 4 2D DST_WIDTH_HEIGHT M64MEM 0BC 5-53 4 2D *USR_DST_PITCH M64MEM 0BE 5-57 4 2D DP_SET_GUI_ENGINE2 M64MEM 0BF 5-53 4 2D *DP_SET_GUI_ENGINE M64MEM 0C0 5-59 4 2D CLR_CMP_CLR M64MEM 0C1 5-61 4 2D CLR_CMP_MSK M64MEM 0C2 5-61 4 2D CLR_CMP_CNTL M64MEM 0C4 5-62 4 2D FIFO_STAT M64MEM 0CC 5-64 4 2D GUI_TRAJ_CNTL M64MEM 0CE 5-66 4 2D GUI_STAT M64MEM 0E6 5-20 4 2D COMPOSITE_SHADOW_ID M64MEM 100 X-08 4 OV OVERLAY_Y_X_START M64MEM 101 X-09 4 OV OVERLAY_Y_X_END M64MEM 102 X-06 4 OV OVERLAY_VIDEO_KEY_CLR M64MEM 103 X-07 4 OV OVERLAY_VIDEO_KEY_MSK M64MEM 104 X-03 4 OV OVERLAY_GRAPHICS_KEY_CLR M64MEM 105 X-04 4 OV OVERLAY_GRAPHICS_KEY_MSK M64MEM 106 X-05 4 OV OVERLAY_KEY_CNTL M64MEM 108 X-12 4 OV OVERLAY_SCALE_INC M64MEM 109 X-10 4 OV OVERLAY_SCALE_CNTL M64MEM 10A X-14 4 OV SCALER_HEIGHT_WIDTH M64MEM 10B X-13 4 OV SCALER_TEST M64MEM 10D X-15 4 OV SCALER_BUF0_OFFSET M64MEM 10E X-16 4 OV SCALER_BUF0_OFFSET M64MEM 10F X-17 4 OV SCALER_BUF_PITCH M64MEM 110 X-24 4 CAP CAPTURE_START_END M64MEM 111 X-23 4 CAP CAPTURE_X_WIDTH M64MEM 112 X-18 4 CAP VIDEO_FORMAT M64MEM 113 X-30 4 CAP VBI_START_END M64MEM 114 X-20 4 CAP CAPTURE_CONFIG M64MEM 115 X-25 4 CAP TRIG_CNTL M64MEM 116 X-01 4 OV OVERLAY_EXCLUSIVE_HORZ M64MEM 117 X-02 4 OV OVERLAY_EXCLUSIVE_VERT M64MEM 118 X-31 4 CAP VBI_WIDTH M64MEM 119 X-32 4 CAP CAPTURE_DEBUG M64MEM 11A X-26 4 CAP VIDEO_SYNC_TEST M64MEM 11C 4-49 4 MEM SNAPSHOT_VH_COUNTS M64MEM 11D 4-49 4 MEM SNAPSHOT_F_COUNT M64MEM 11E 4-49 4 MEM N_VIF_COUNT M64MEM 11F 4-50 4 MEM SNAPSHOT_VIF_COUNT M64MEM 120 X-28 4 CAP CAPTURE_BUF0_OFFSET M64MEM 121 X-29 4 CAP CAPTURE_BUF1_OFFSET M64MEM 122 X-27 4 CAP ONESHOT_BUF_OFFSET M64MEM 130 X-33 4 MPP MPP_CONFIG M64MEM 131 X-34 4 MPP MPP_STROBE_SEQ M64MEM 132 X-34 4 MPP MPP_ADDR M64MEM 133 X-35 4 MPP *MPP_DATA M64MEM 140 X-35 4 MPP TVO_CNTL M64MEM 151 4-24 4 CRTC CRT_HORZ_VERT_LOAD M64MEM 152 6-13 4 PCI AGP_BASE M64MEM 153 6-13 4 PCI AGP_CNTL M64MEM 154 ?-?? 4 OV SCALER_COLOR_CNTL M64MEM 155 ?-?? 4 OV SCALER_H_COEFF0 M64MEM 156 ?-?? 4 OV SCALER_H_COEFF1 M64MEM 157 ?-?? 4 OV SCALER_H_COEFF2 M64MEM 158 ?-?? 4 OV SCALER_H_COEFF3 M64MEM 159 ?-?? 4 OV SCALER_H_COEFF4 M64MEM 15E 5-63 4 2D GUI_CNTL M64MEM 160 6-09 4 PCI BM_FRAME_BUF_OFFSET M64MEM 161 6-09 4 PCI BM_SYSTEM_MEM_ADDR M64MEM 162 6-09 4 PCI BM_COMMAND M64MEM 163 6-09 4 PCI BM_STATUS M64MEM 16E 6-12 4 PCI BM_GUI_TABLE M64MEM 16F 6-10 4 PCI BM_SYSTEM_TABLE M64MEM 175 ?-?? 4 OV SCALER_BUF0_OFFSET_U M64MEM 176 ?-?? 4 OV SCALER_BUF0_OFFSET_V M64MEM 177 ?-?? 4 OV SCALER_BUF1_OFFSET_U M64MEM 178 ?-?? 4 OV SCALER_BUF1_OFFSET_V gatos-0.0.5/gfxdump/mapdev.h0100644002411700123110000000177607030240376014405 0ustar bayleasr// MAPDEV.h - include file for VxD MAPDEV // Copyright (c) 1996 Vireo Software, Inc. #ifndef NotVxD #include #define MAPDEV_Major 1 #define MAPDEV_Minor 0 #define MAPDEV_DeviceID UNDEFINED_DEVICE_ID #define MAPDEV_Init_Order UNDEFINED_INIT_ORDER #define LPVOID PVOID #endif // This is the request structure that applications use // to request services from the MAPDEV VxD. typedef struct _MapDevRequest { DWORD mdr_ServiceID; // supplied by caller LPVOID mdr_PhysicalAddress; // supplied by caller DWORD mdr_SizeInBytes; // supplied by caller LPVOID mdr_LinearAddress; // returned by VxD WORD mdr_Selector; // returned if 16-bit caller WORD mdr_Status; // MDR_xxxx code below } MAPDEVREQUEST, *PMAPDEVREQUEST; #define MDR_SERVICE_MAP CTL_CODE(FILE_DEVICE_UNKNOWN, 1, METHOD_NEITHER, FILE_ANY_ACCESS) #define MDR_SERVICE_UNMAP CTL_CODE(FILE_DEVICE_UNKNOWN, 2, METHOD_NEITHER, FILE_ANY_ACCESS) #define MDR_STATUS_SUCCESS 1 #define MDR_STATUS_ERROR 0 gatos-0.0.5/gfxdump/pci.c0100644002411700123110000010473407030240376013675 0ustar bayleasr/* XFree86 3.3.3 scanpci.c, modified for GATOS/win/gfxdump by Øyvind Aabling. */ #include #include #ifdef __unix__ #include #include #else #include #endif #define outb pcioutb #define outl pcioutl #define inb pciinb #define inl pciinl /* $XConsortium: scanpci.c /main/25 1996/10/27 11:48:40 kaleb $ */ /* * name: scanpci.c * * purpose: This program will scan for and print details of * devices on the PCI bus. * author: Robin Cutshaw (robin@xfree86.org) * * supported O/S's: SVR4, UnixWare, SCO, Solaris, * FreeBSD, NetBSD, 386BSD, BSDI BSD/386, * Linux, Mach/386, ISC * DOS (WATCOM 9.5 compiler) * * compiling: [g]cc scanpci.c -o scanpci * for SVR4 (not Solaris), UnixWare use: * [g]cc -DSVR4 scanpci.c -o scanpci * for DOS, watcom 9.5: * wcc386p -zq -omaxet -7 -4s -s -w3 -d2 name.c * and link with PharLap or other dos extender for exe * */ /* $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.34.2.17 1998/11/10 11:55:40 dawes Exp $ */ /* * Copyright 1995 by Robin Cutshaw * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #if defined(__SVR4) #if !defined(SVR4) #define SVR4 #endif #endif #ifdef __EMX__ #define INCL_DOSFILEMGR #include #endif #include #include #if defined(SVR4) #if defined(sun) #ifndef __EXTENSIONS__ #define __EXTENSIONS__ #endif #endif #include #include #if defined(NCR) #define __STDC #include #undef __STDC #else #include #endif #if defined(__SUNPRO_C) || defined(sun) || defined(__sun) #include #else #include #endif #include #endif #if defined(__FreeBSD__) || defined(__386BSD__) #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__NetBSD__) #include #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__bsdi__) #include #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(SCO) || defined(ISC) #ifndef ISC #include #endif #include #include #include #include #include #include #include #endif #if defined(Lynx_22) #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__WATCOMC__) #include void outl(unsigned port, unsigned data); #pragma aux outl = "out dx, eax" parm [dx] [eax]; void outb(unsigned port, unsigned data); #pragma aux outb = "out dx, al" parm [dx] [eax]; unsigned inl(unsigned port); #pragma aux inl = "in eax, dx" parm [dx]; unsigned inb(unsigned port); #pragma aux inb = "xor eax,eax" "in al, dx" parm [dx]; #else /* __WATCOMC__ */ #if defined(__GNUC__) #if !defined(__alpha__) && !defined(__powerpc__) #if defined(GCCUSESGAS) #define OUTB_GCC "outb %0,%1" #define OUTL_GCC "outl %0,%1" #define INB_GCC "inb %1,%0" #define INL_GCC "inl %1,%0" #else #define OUTB_GCC "out%B0 (%1)" #define OUTL_GCC "out%L0 (%1)" #define INB_GCC "in%B0 (%1)" #define INL_GCC "in%L0 (%1)" #endif /* GCCUSESGAS */ static void outb(unsigned short port, unsigned char val) { __asm__ __volatile__(OUTB_GCC : :"a" (val), "d" (port)); } static void outl(unsigned short port, unsigned long val) { __asm__ __volatile__(OUTL_GCC : :"a" (val), "d" (port)); } static unsigned char inb(unsigned short port) { unsigned char ret; __asm__ __volatile__(INB_GCC : "=a" (ret) : "d" (port)); return ret; } static unsigned long inl(unsigned short port) { unsigned long ret; __asm__ __volatile__(INL_GCC : "=a" (ret) : "d" (port)); return ret; } #endif /* !defined(__alpha__) && !defined(__powerpc__) */ #else /* __GNUC__ */ #if defined(__STDC__) && (__STDC__ == 1) # if !defined(NCR) # define asm __asm # endif #endif #if defined(__SUNPRO_C) /* * This section is a gross hack in if you tell anyone that I wrote it, * I'll deny it. :-) * The leave/ret instructions are the big hack to leave %eax alone on return. */ unsigned char inb(int port) { asm(" movl 8(%esp),%edx"); asm(" subl %eax,%eax"); asm(" inb (%dx)"); asm(" leave"); asm(" ret"); } unsigned short inw(int port) { asm(" movl 8(%esp),%edx"); asm(" subl %eax,%eax"); asm(" inw (%dx)"); asm(" leave"); asm(" ret"); } unsigned long inl(int port) { asm(" movl 8(%esp),%edx"); asm(" inl (%dx)"); asm(" leave"); asm(" ret"); } void outb(int port, unsigned char value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outb (%dx)"); } void outw(int port, unsigned short value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outw (%dx)"); } void outl(int port, unsigned long value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outl (%dx)"); } #else #if defined(SVR4) # if !defined(__USLC__) # define __USLC__ # endif #endif #ifdef __unix__ #ifndef SCO325 # include #else # include "scoasm.h" #endif #endif #endif /* SUNPRO_C */ #endif /* __GNUC__ */ #endif /* __WATCOMC__ */ #undef outb #undef outl #undef inb #undef inl #if defined(__GLIBC__) && __GLIBC__ >= 2 #if defined(linux) #include #endif #endif #if defined(__alpha__) #if defined(linux) #include #define BUS(tag) (((tag)>>16)&0xff) #define DFN(tag) (((tag)>>8)&0xff) int pciconfig_read( unsigned char bus, unsigned char dfn, unsigned char off, unsigned char len, void * buf) { return syscall(__NR_pciconfig_read, bus, dfn, off, len, buf); } int pciconfig_write( unsigned char bus, unsigned char dfn, unsigned char off, unsigned char len, void * buf) { return syscall(__NR_pciconfig_write, bus, dfn, off, len, buf); } #else Generate compiler error - scanpci unsupported on non-linux alpha platforms #endif /* linux */ #endif /* __alpha__ */ #if defined(Lynx) && defined(__powerpc__) /* let's mimick the Linux Alpha stuff for LynxOS so we don't have * to change too much code */ #include unsigned char *pciConfBase; static __inline__ unsigned long swapl(unsigned long val) { unsigned char *p = (unsigned char *)&val; return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0)); } #define BUS(tag) (((tag)>>16)&0xff) #define DFN(tag) (((tag)>>8)&0xff) #define PCIBIOS_DEVICE_NOT_FOUND 0x86 #define PCIBIOS_SUCCESSFUL 0x00 int pciconfig_read( unsigned char bus, unsigned char dev, unsigned char offset, int len, /* unused, alway 4 */ unsigned long *val) { unsigned long _val; unsigned long *ptr; dev >>= 3; if (bus || dev >= 16) { *val = 0xFFFFFFFF; return PCIBIOS_DEVICE_NOT_FOUND; } else { ptr = (unsigned long *)(pciConfBase + ((1<>= 3; _val = swapl(val); if (bus || dev >= 16) { return PCIBIOS_DEVICE_NOT_FOUND; } else { ptr = (unsigned long *)(pciConfBase + ((1< 0) { pcr._pcibuses[pcr._pcinumbus++] = pcr._secondary_bus_number; } break; case PCI_CLASS_BRIDGE: if ( ++hostbridges > 1) { pcr._pcibuses[pcr._pcinumbus] = pcr._pcinumbus; pcr._pcinumbus++; } break; default: break; } if((func==0) && ((pcr._header_type & PCI_MULTIFUNC_DEV) == 0)) { /* not a multi function device */ func = 8; } else { func++; } if (idx++ >= MAX_PCI_DEVICES) continue; identify_card(&pcr, verbose); } while( func < 8 ); } } while (++pcr._pcibusidx < pcr._pcinumbus); } #if !defined(__alpha__) && !defined(__powerpc__) /* Now try pci config 2 probe (deprecated) */ if ((pcr._configtype == 2) || do_mode2_scan) { outb(PCI_MODE2_ENABLE_REG, 0xF1); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ /*printf("\nPCI probing configuration type 2\n");*/ pcr._pcibuses[0] = 0; pcr._pcinumbus = 1; pcr._pcibusidx = 0; idx = 0; do { for (pcr._ioaddr = 0xC000; pcr._ioaddr < 0xD000; pcr._ioaddr += 0x0100){ outb(PCI_MODE2_FORWARD_REG, pcr._pcibuses[pcr._pcibusidx]); /* bus 0 for now */ pcr._device_vendor = inl(pcr._ioaddr); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ if ((pcr._vendor == 0xFFFF) || (pcr._device == 0xFFFF)) continue; if ((pcr._vendor == 0xF0F0) || (pcr._device == 0xF0F0)) continue; /* catch ASUS P55TP4XE motherboards */ /*printf("\npci bus 0x%x slot at 0x%04x, vendor 0x%04x device 0x%04x\n", pcr._pcibuses[pcr._pcibusidx], pcr._ioaddr, pcr._vendor, pcr._device);*/ pcibus = pcr._pcibuses[pcr._pcibusidx] ; pcicard = pcr._ioaddr ; pcifunc = 0 ; outb(PCI_MODE2_FORWARD_REG, pcr._pcibuses[pcr._pcibusidx]); /* bus 0 for now */ pcr._status_command = inl(pcr._ioaddr + 0x04); pcr._class_revision = inl(pcr._ioaddr + 0x08); pcr._bist_header_latency_cache = inl(pcr._ioaddr + 0x0C); pcr._base0 = inl(pcr._ioaddr + 0x10); pcr._base1 = inl(pcr._ioaddr + 0x14); pcr._base2 = inl(pcr._ioaddr + 0x18); pcr._base3 = inl(pcr._ioaddr + 0x1C); pcr._base4 = inl(pcr._ioaddr + 0x20); pcr._base5 = inl(pcr._ioaddr + 0x24); pcr._baserom = inl(pcr._ioaddr + 0x30); pcr._max_min_ipin_iline = inl(pcr._ioaddr + 0x3C); pcr._user_config = inl(pcr._ioaddr + 0x40); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ /* check for pci-pci bridges (currently we only know Digital) */ if ((pcr._vendor == 0x1011) && (pcr._device == 0x0001)) if (pcr._secondary_bus_number > 0) pcr._pcibuses[pcr._pcinumbus++] = pcr._secondary_bus_number; if (idx++ >= MAX_PCI_DEVICES) continue; identify_card(&pcr, verbose); } } while (++pcr._pcibusidx < pcr._pcinumbus); outb(PCI_MODE2_ENABLE_REG, 0x00); } #endif /* __alpha__ */ disable_os_io(); return 0 ; } void identify_card(struct pci_config_reg *pcr, int verbose) { if (pcicards>=MAX_PCI_DEVICES) return ; pciinfo[pcicards].bus = pcibus ; pciinfo[pcicards].card = pcicard ; pciinfo[pcicards].func = pcifunc ; pciinfo[pcicards].vendor = pcr->_vendor ; pciinfo[pcicards].device = pcr->_device ; pciinfo[pcicards].base0 = 0xFFFFFFFF ; pciinfo[pcicards].base1 = 0xFFFFFFFF ; pciinfo[pcicards].base2 = 0xFFFFFFFF ; pciinfo[pcicards].baserom = 0x000C0000 ; if (pcr->_base0) pciinfo[pcicards].base0 = pcr->_base0 & ((pcr->_base0&0x1) ? 0xFFFFFFFC : 0xFFFFFFF0) ; if (pcr->_base1) pciinfo[pcicards].base1 = pcr->_base1 & ((pcr->_base1&0x1) ? 0xFFFFFFFC : 0xFFFFFFF0) ; if (pcr->_base2) pciinfo[pcicards].base2 = pcr->_base2 & ((pcr->_base2&0x1) ? 0xFFFFFFFC : 0xFFFFFFF0) ; if (pcr->_baserom) pciinfo[pcicards].baserom = pcr->_baserom ; pcicards++ ; } void print_i128(struct pci_config_reg *pcr) { /* if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); printf(" MW0_AD 0x%08x addr 0x%08x %spre-fetchable\n", pcr->_base0, pcr->_base0 & 0xFFC00000, pcr->_base0 & 0x8 ? "" : "not-"); printf(" MW1_AD 0x%08x addr 0x%08x %spre-fetchable\n", pcr->_base1, pcr->_base1 & 0xFFC00000, pcr->_base1 & 0x8 ? "" : "not-"); printf(" XYW_AD(A) 0x%08x addr 0x%08x\n", pcr->_base2, pcr->_base2 & 0xFFC00000); printf(" XYW_AD(B) 0x%08x addr 0x%08x\n", pcr->_base3, pcr->_base3 & 0xFFC00000); printf(" RBASE_G 0x%08x addr 0x%08x\n", pcr->_base4, pcr->_base4 & 0xFFFF0000); printf(" IO 0x%08x addr 0x%08x\n", pcr->_base5, pcr->_base5 & 0xFFFFFF00); printf(" RBASE_E 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); */ } void print_pcibridge(struct pci_config_reg *pcr) { /* if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); printf(" PRIBUS 0x%02x SECBUS 0x%02x SUBBUS 0x%02x SECLT 0x%02x\n", pcr->_primary_bus_number, pcr->_secondary_bus_number, pcr->_subordinate_bus_number, pcr->_secondary_latency_timer); printf(" IOBASE: 0x%02x00 IOLIM 0x%02x00 SECSTATUS 0x%04x\n", pcr->_io_base, pcr->_io_limit, pcr->_secondary_status); printf(" NOPREFETCH MEMBASE: 0x%08x MEMLIM 0x%08x\n", pcr->_mem_base, pcr->_mem_limit); printf(" PREFETCH MEMBASE: 0x%08x MEMLIM 0x%08x\n", pcr->_prefetch_mem_base, pcr->_prefetch_mem_limit); printf(" RBASE_E 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); */ } static int io_fd; #ifdef __EMX__ USHORT callgate[3] = {0,0,0}; #endif void enable_os_io() { io_fd = -1 ; #if defined(SVR4) || defined(SCO) || defined(ISC) #if defined(SI86IOPL) sysi86(SI86IOPL, 3); #else sysi86(SI86V86, V86SC_IOPL, PS_IOPL); #endif #endif #if defined(linux) iopl(3); #endif #if defined(__FreeBSD__) || defined(__386BSD__) || defined(__bsdi__) if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) { perror("/dev/console"); exit(1); } #if defined(__FreeBSD__) || defined(__386BSD__) if (ioctl(io_fd, KDENABIO, 0) < 0) { perror("ioctl(KDENABIO)"); exit(1); } #endif #if defined(__bsdi__) if (ioctl(io_fd, PCCONENABIOPL, 0) < 0) { perror("ioctl(PCCONENABIOPL)"); exit(1); } #endif #endif #if defined(__NetBSD__) #if !defined(USE_I386_IOPL) if ((io_fd = open("/dev/io", O_RDWR, 0)) < 0) { perror("/dev/io"); exit(1); } #else if (i386_iopl(1) < 0) { perror("i386_iopl"); exit(1); } #endif /* USE_I386_IOPL */ #endif /* __NetBSD__ */ #if defined(__OpenBSD__) if (i386_iopl(1) < 0) { perror("i386_iopl"); exit(1); } #endif /* __OpenBSD__ */ #if defined(MACH386) if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) { perror("/dev/iopl"); exit(1); } #endif #ifdef __EMX__ { HFILE hfd; ULONG dlen,action; APIRET rc; static char *ioDrvPath = "/dev/fastio$"; if (DosOpen((PSZ)ioDrvPath, (PHFILE)&hfd, (PULONG)&action, (ULONG)0, FILE_SYSTEM, FILE_OPEN, OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY, (ULONG)0) != 0) { fprintf(stderr,"Error opening fastio$ driver...\n"); fprintf(stderr,"Please install xf86sup.sys in config.sys!\n"); exit(42); } callgate[0] = callgate[1] = 0; /* Get callgate from driver for fast io to ports and other stuff */ rc = DosDevIOCtl(hfd, (ULONG)0x76, (ULONG)0x64, NULL, 0, NULL, (ULONG*)&callgate[2], sizeof(USHORT), &dlen); if (rc) { fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n", rc,dlen); DosClose(hfd); exit(42); } /* Calling callgate with function 13 sets IOPL for the program */ asm volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" : /*no outputs */ : /*no inputs */ : "eax","ebx","ecx","edx","cc"); DosClose(hfd); } #endif #if defined(Lynx) && defined(__powerpc__) pciConfBase = (unsigned char *) smem_create("PCI-CONF", (char *)0x80800000, 64*1024, SM_READ|SM_WRITE); if (pciConfBase == (void *) -1) exit(1); #endif } void disable_os_io() { #if defined(SVR4) || defined(SCO) || defined(ISC) #if defined(SI86IOPL) sysi86(SI86IOPL, 0); #else sysi86(SI86V86, V86SC_IOPL, 0); #endif #endif #if defined(linux) iopl(0); #endif #if defined(__FreeBSD__) || defined(__386BSD__) if (ioctl(io_fd, KDDISABIO, 0) < 0) { perror("ioctl(KDDISABIO)"); close(io_fd); exit(1); } close(io_fd); #endif #if defined(__NetBSD__) #if !defined(USE_I386_IOPL) close(io_fd); #else if (i386_iopl(0) < 0) { perror("i386_iopl"); exit(1); } #endif /* NetBSD1_1 */ #endif /* __NetBSD__ */ #if defined(__bsdi__) if (ioctl(io_fd, PCCONDISABIOPL, 0) < 0) { perror("ioctl(PCCONDISABIOPL)"); close(io_fd); exit(1); } close(io_fd); #endif #if defined(MACH386) close(io_fd); #endif #if defined(Lynx) && defined(__powerpc__) smem_create(NULL, (char *) pciConfBase, 0, SM_DETACH); smem_remove("PCI-CONF"); pciConfBase = NULL; #endif } gatos-0.0.5/intl/0042755002411700123110000000000007030251711012241 5ustar bayleasrgatos-0.0.5/intl/ChangeLog0100644002411700123110000010461406765053731014034 0ustar bayleasr1998-04-29 Ulrich Drepper * intl/localealias.c (read_alias_file): Use unsigned char for local variables. Remove unused variable tp. * intl/l10nflist.c (_nl_normalize_codeset): Use unsigned char * for type of codeset. For loosing Solaris systems. * intl/loadinfo.h: Adapt prototype of _nl_normalize_codeset. * intl/bindtextdom.c (BINDTEXTDOMAIN): Don't define local variable len if not needed. Patches by Jim Meyering. 1998-04-28 Ulrich Drepper * loadmsgcat.c (_nl_load_domain): Don't assign the element use_mmap if mmap is not supported. * hash-string.h: Don't include . 1998-04-27 Ulrich Drepper * textdomain.c: Use strdup is available. * localealias.c: Define HAVE_MEMPCPY so that we can use this function. Define and use semapahores to protect modfication of global objects when compiling for glibc. Add code to allow freeing alias table. * l10nflist.c: Don't assume stpcpy not being a macro. * gettextP.h: Define internal_function macri if not already done. Use glibc byte-swap macros instead of defining SWAP when compiled for glibc. (struct loaded_domain): Add elements to allow unloading. * Makefile.in (distclean): Don't remove libintl.h here. * bindtextdomain.c: Carry over changes from glibc. Use strdup if available. * dcgettext.c: Don't assume stpcpy not being a macro. Mark internal functions. Add memory freeing code for glibc. * dgettext.c: Update copyright. * explodename.c: Include stdlib.h and string.h only if they exist. Use strings.h eventually. * finddomain.c: Mark internal functions. Use strdup if available. Add memory freeing code for glibc. 1997-10-10 20:00 Ulrich Drepper * libgettext.h: Fix dummy textdomain and bindtextdomain macros. They should return reasonable values. Reported by Tom Tromey . 1997-09-16 03:33 Ulrich Drepper * libgettext.h: Define PARAMS also to `args' if __cplusplus is defined. * intlh.inst.in: Likewise. Reported by Jean-Marc Lasgouttes . * libintl.glibc: Update from current glibc version. 1997-09-06 02:10 Ulrich Drepper * intlh.inst.in: Reformat copyright. 1997-08-19 15:22 Ulrich Drepper * dcgettext.c (DCGETTEXT): Remove wrong comment. 1997-08-16 00:13 Ulrich Drepper * Makefile.in (install-data): Don't change directory to install. 1997-08-01 14:30 Ulrich Drepper * cat-compat.c: Fix copyright. * localealias.c: Don't define strchr unless !HAVE_STRCHR. * loadmsgcat.c: Update copyright. Fix typos. * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. (_nl_make_l10nflist): Handle sponsor and revision correctly. * gettext.c: Update copyright. * gettext.h: Likewise. * hash-string.h: Likewise. * finddomain.c: Remoave dead code. Define strchr only if !HAVE_STRCHR. * explodename.c: Include . * explodename.c: Reformat copyright text. (_nl_explode_name): Fix typo. * dcgettext.c: Define and use __set_errno. (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is not defined. * bindtextdom.c: Pretty printing. 1997-05-01 02:25 Ulrich Drepper * dcgettext.c (guess_category_value): Don't depend on HAVE_LC_MESSAGES. We don't need the macro here. Patch by Bruno Haible . * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL macro. Instead use HAVE_LOCALE_NULL and define it when using glibc, as in dcgettext.c. Patch by Bruno Haible . * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois Pinard. Mon Mar 10 06:51:17 1997 Ulrich Drepper * Makefile.in: Implement handling of libtool. * gettextP.h: Change data structures for use of generic lowlevel i18n file handling. Wed Dec 4 20:21:18 1996 Ulrich Drepper * textdomain.c: Put parentheses around arguments of memcpy macro definition. * localealias.c: Likewise. * l10nflist.c: Likewise. * finddomain.c: Likewise. * bindtextdom.c: Likewise. Reported by Thomas Esken. Mon Nov 25 22:57:51 1996 Ulrich Drepper * textdomain.c: Move definition of `memcpy` macro to right position. Fri Nov 22 04:01:58 1996 Ulrich Drepper * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using bcopy if not already defined. Reported by Thomas Esken. * bindtextdom.c: Likewise. * l10nflist.c: Likewise. * localealias.c: Likewise. * textdomain.c: Likewise. Tue Oct 29 11:10:27 1996 Ulrich Drepper * Makefile.in (libdir): Change to use exec_prefix instead of prefix. Reported by Knut-HåvardAksnes . Sat Aug 31 03:07:09 1996 Ulrich Drepper * l10nflist.c (_nl_normalize_codeset): We convert to lower case, so don't prepend uppercase `ISO' for only numeric arg. Fri Jul 19 00:15:46 1996 Ulrich Drepper * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after definition of _GNU_SOURCE. Patch by Roland McGrath. * Makefile.in (uninstall): Fix another bug with `for' loop and empty arguments. Patch by Jim Meyering. Correct name os uninstalled files: no intl- prefix anymore. * Makefile.in (install-data): Again work around shells which cannot handle mpty for list. Reported by Jim Meyering. Sat Jul 13 18:11:35 1996 Ulrich Drepper * Makefile.in (install): Split goal. Now depend on install-exec and install-data. (install-exec, install-data): New goals. Created from former install goal. Reported by Karl Berry. Sat Jun 22 04:58:14 1996 Ulrich Drepper * Makefile.in (MKINSTALLDIRS): New variable. Path to mkinstalldirs script. (install): use MKINSTALLDIRS variable or if the script is not present try to find it in the $top_scrdir). Wed Jun 19 02:56:56 1996 Ulrich Drepper * l10nflist.c: Linux libc *partly* includes the argz_* functions. Grr. Work around by renaming the static version and use macros for renaming. Tue Jun 18 20:11:17 1996 Ulrich Drepper * l10nflist.c: Correct presence test macros of __argz_* functions. * l10nflist.c: Include based on test of it instead when __argz_* functions are available. Reported by Andreas Schwab. Thu Jun 13 15:17:44 1996 Ulrich Drepper * explodename.c, l10nflist.c: Define NULL for dumb systems. Tue Jun 11 17:05:13 1996 Ulrich Drepper * intlh.inst.in, libgettext.h (dcgettext): Rename local variable result to __result to prevent name clash. * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to get prototype for stpcpy and strcasecmp. * intlh.inst.in, libgettext.h: Move declaration of `_nl_msg_cat_cntr' outside __extension__ block to prevent warning from gcc's -Wnested-extern option. Fri Jun 7 01:58:00 1996 Ulrich Drepper * Makefile.in (install): Remove comment. Thu Jun 6 17:28:17 1996 Ulrich Drepper * Makefile.in (install): Work around for another Buglix stupidity. Always use an `else' close for `if's. Reported by Nelson Beebe. * Makefile.in (intlh.inst): Correct typo in phony rule. Reported by Nelson Beebe. Thu Jun 6 01:49:52 1996 Ulrich Drepper * dcgettext.c (read_alias_file): Rename variable alloca_list to block_list as the macro calls assume. Patch by Eric Backus. * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using malloc. (read_alias_file): Rename varriabe alloca_list to block_list as the macro calls assume. Patch by Eric Backus. * l10nflist.c: Correct conditional for inclusion. Reported by Roland McGrath. * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not all-@USE_NLS@. * Makefile.in (install): intlh.inst comes from local dir, not $(srcdir). * Makefile.in (intlh.inst): Special handling of this goal. If used in gettext, this is really a rul to construct this file. If used in any other package it is defined as a .PHONY rule with empty body. * finddomain.c: Extract locale file information handling into l10nfile.c. Rename local stpcpy__ function to stpcpy. * dcgettext.c (stpcpy): Add local definition. * l10nflist.c: Solve some portability problems. Patches partly by Thomas Esken. Add local definition of stpcpy. Tue Jun 4 02:47:49 1996 Ulrich Drepper * intlh.inst.in: Don't depend including on HAVE_LOCALE_H. Instead configure must rewrite this fiile depending on the result of the configure run. * Makefile.in (install): libintl.inst is now called intlh.inst. Add rules for updating intlh.inst from intlh.inst.in. * libintl.inst: Renamed to intlh.inst.in. * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1 because gcc has __buitlin_alloca. Reported by Roland McGrath. Mon Jun 3 00:32:16 1996 Ulrich Drepper * Makefile.in (installcheck): New goal to fulfill needs of automake's distcheck. * Makefile.in (install): Reorder commands so that VERSION is found. * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in @datadir@/gettext. (COMSRCS): Add l10nfile.c. (OBJECTS): Add l10nfile.o. (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common). (DISTFILE.gettext): Remove $(DISTFILES.common). (all-gettext): Remove goal. (install): If $(PACKAGE) = gettext install, otherwose do nothing. No package but gettext itself should install libintl.h + headers. (dist): Extend goal to work for gettext, too. (dist-gettext): Remove goal. * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc. Sun Jun 2 17:33:06 1996 Ulrich Drepper * loadmsgcat.c (_nl_load_domain): Parameter is now comes from find_l10nfile. Sat Jun 1 02:23:03 1996 Ulrich Drepper * l10nflist.c (__argz_next): Add definition. * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca code. Use new l10nfile handling. * localealias.c [!HAVE_ALLOCA]: Add code for handling missing alloca code. * l10nflist.c: Initial revision. Tue Apr 2 18:51:18 1996 Ulrich Drepper * Makefile.in (all-gettext): New goal. Same as all-yes. Thu Mar 28 23:01:22 1996 Karl Eichwalder * Makefile.in (gettextsrcdir): Define using @datadir@. Tue Mar 26 12:39:14 1996 Ulrich Drepper * finddomain.c: Include . Reported by Roland McGrath. Sat Mar 23 02:00:35 1996 Ulrich Drepper * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing with external declaration. Sat Mar 2 00:47:09 1996 Ulrich Drepper * Makefile.in (all-no): Rename from all_no. Sat Feb 17 00:25:59 1996 Ulrich Drepper * gettextP.h [loaded_domain]: Array `successor' must now contain up to 63 elements (because of codeset name normalization). * finddomain.c: Implement codeset name normalization. Thu Feb 15 04:39:09 1996 Ulrich Drepper * Makefile.in (all): Define to `all-@USE_NLS@'. (all-yes, all_no): New goals. `all-no' is noop, `all-yes' is former all. Mon Jan 15 21:46:01 1996 Howard Gayle * localealias.c (alias_compare): Increment string pointers in loop of strcasecmp replacement. Fri Dec 29 21:16:34 1995 Ulrich Drepper * Makefile.in (install-src): Who commented this goal out ? :-) Fri Dec 29 15:08:16 1995 Ulrich Drepper * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls should not effect it because a missing catalog is no error. Reported by Harald Knig . Tue Dec 19 22:09:13 1995 Ulrich Drepper * Makefile.in (Makefile): Explicitly use $(SHELL) for running shell scripts. Fri Dec 15 17:34:59 1995 Andreas Schwab * Makefile.in (install-src): Only install library and header when we use the own implementation. Don't do it when using the system's gettext or catgets functions. * dcgettext.c (find_msg): Must not swap domain->hash_size here. Sat Dec 9 16:24:37 1995 Ulrich Drepper * localealias.c, libintl.inst, libgettext.h, hash-string.h, gettextP.h, finddomain.c, dcgettext.c, cat-compat.c: Use PARAMS instead of __P. Suggested by Roland McGrath. Tue Dec 5 11:39:14 1995 Larry Schwimmer * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty. Mon Dec 4 15:42:07 1995 Ulrich Drepper * Makefile.in (install-src): Install libintl.inst instead of libintl.h.install. Sat Dec 2 22:51:38 1995 Marcus Daniels * cat-compat.c (textdomain): Reverse order in which files are tried you load. First try local file, when this failed absolute path. Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe * cat-compat.c (bindtextdomain): Add missing { }. Sun Nov 26 18:21:41 1995 Ulrich Drepper * libintl.inst: Add missing __P definition. Reported by Nelson Beebe. * Makefile.in: Add dummy `all' and `dvi' goals. Reported by Tom Tromey. Sat Nov 25 16:12:01 1995 Franc,ois Pinard * hash-string.h: Capitalize arguments of macros. Sat Nov 25 12:01:36 1995 Ulrich Drepper * Makefile.in (DISTFILES): Prevent files names longer than 13 characters. libintl.h.glibc->libintl.glibc, libintl.h.install->libintl.inst. Reported by Joshua R. Poulson. Sat Nov 25 11:31:12 1995 Eric Backus * dcgettext.c: Fix bug in preprocessor conditionals. Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe * libgettext.h: Solaris cc does not understand #if !SYMBOL1 && !SYMBOL2. Sad but true. Thu Nov 23 16:22:14 1995 Ulrich Drepper * hash-string.h (hash_string): Fix for machine with >32 bit `unsigned long's. * dcgettext.c (DCGETTEXT): Fix horrible bug in loop for alternative translation. Thu Nov 23 01:45:29 1995 Ulrich Drepper * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed: Some further simplifications in message number generation. Mon Nov 20 21:08:43 1995 Ulrich Drepper * libintl.h.glibc: Use __const instead of const in prototypes. * Makefile.in (install-src): Install libintl.h.install instead of libintl.h. This is a stripped-down version. Suggested by Peter Miller. * libintl.h.install, libintl.h.glibc: Initial revision. * localealias.c (_nl_expand_alias, read_alias_file): Protect prototypes in type casts by __P. Tue Nov 14 16:43:58 1995 Ulrich Drepper * hash-string.h: Correct prototype for hash_string. Sun Nov 12 12:42:30 1995 Ulrich Drepper * hash-string.h (hash_string): Add prototype. * gettextP.h: Fix copyright. (SWAP): Add prototype. Wed Nov 8 22:56:33 1995 Ulrich Drepper * localealias.c (read_alias_file): Forgot sizeof. Avoid calling *printf function. This introduces a big overhead. Patch by Roland McGrath. Tue Nov 7 14:21:08 1995 Ulrich Drepper * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy. * finddomain.c (stpcpy): Define substitution function local. The macro was to flaky. * cat-compat.c: Fix typo. * xopen-msg.sed, linux-msg.sed: While bringing message number to right place only accept digits. * linux-msg.sed, xopen-msg.sed: Now that the counter does not have leading 0s we don't need to remove them. Reported by Marcus Daniels. * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in dependency. Reported by Marcus Daniels. * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement. Generally cleanup using #if instead of #ifndef. * Makefile.in: Correct typos in comment. By Franc,ois Pinard. Mon Nov 6 00:27:02 1995 Ulrich Drepper * Makefile.in (install-src): Don't install libintl.h and libintl.a if we use an available gettext implementation. Sun Nov 5 22:02:08 1995 Ulrich Drepper * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported by Franc,ois Pinard. * libgettext.h: Use #if instead of #ifdef/#ifndef. * finddomain.c: Comments describing what has to be done should start with FIXME. Sun Nov 5 19:38:01 1995 Ulrich Drepper * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning. DISTFILES.common names the files common to both dist goals. DISTFILES.gettext are the files only distributed in GNU gettext. Sun Nov 5 17:32:54 1995 Ulrich Drepper * dcgettext.c (DCGETTEXT): Correct searching in derived locales. This was necessary since a change in _nl_find_msg several weeks ago. I really don't know this is still not fixed. Sun Nov 5 12:43:12 1995 Ulrich Drepper * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This might mark a special condition. * finddomain.c (make_entry_rec): Don't make illegal entry as decided. * Makefile.in (dist): Suppress error message when ln failed. Get files from $(srcdir) explicitly. * libgettext.h (gettext_const): Rename to gettext_noop. Fri Nov 3 07:36:50 1995 Ulrich Drepper * finddomain.c (make_entry_rec): Protect against wrong locale names by testing mask. * libgettext.h (gettext_const): Add macro definition. Capitalize macro arguments. Thu Nov 2 23:15:51 1995 Ulrich Drepper * finddomain.c (_nl_find_domain): Test for pointer != NULL before accessing value. Reported by Tom Tromey. * gettext.c (NULL): Define as (void*)0 instad of 0. Reported by Franc,ois Pinard. Mon Oct 30 21:28:52 1995 Ulrich Drepper * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering. Sat Oct 28 23:20:47 1995 Ulrich Drepper * libgettext.h: Disable dcgettext optimization for Solaris 2.3. * localealias.c (alias_compare): Peter Miller reported that tolower in some systems is even dumber than I thought. Protect call by `isupper'. Fri Oct 27 22:22:51 1995 Ulrich Drepper * Makefile.in (libdir, includedir): New variables. (install-src): Install libintl.a and libintl.h in correct dirs. Fri Oct 27 22:07:29 1995 Ulrich Drepper * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c. * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques. * localealias.c: Fix typo and superflous test. Reported by Christian von Roques. Fri Oct 6 11:52:05 1995 Ulrich Drepper * finddomain.c (_nl_find_domain): Correct some remainder from the pre-CEN syntax. Now we don't have a constant number of successors anymore. Wed Sep 27 21:41:13 1995 Ulrich Drepper * Makefile.in (DISTFILES): Add libintl.h.glibc. * Makefile.in (dist-libc): Add goal for packing sources for glibc. (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc. * loadmsgcat.c: Forget to continue #if line. * localealias.c: [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name space clean. * dcgettext.c, finddomain.c: Better comment to last change. * loadmsgcat.c: [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to __fstat, __open, __close, __read, __mmap, and __munmap resp to keep ANSI C name space clean. * finddomain.c: [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean. * dcgettext.c: [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to keep ANSI C name space clean. * libgettext.h: Include sys/types.h for those old SysV systems out there. Reported by Francesco Potorti`. * loadmsgcat.c (use_mmap): Define if compiled for glibc. * bindtextdom.c: Include all those standard headers unconditionally if _LIBC is defined. * finddomain.c: Fix 2 times defiend -> defined. * textdomain.c: Include libintl.h instead of libgettext.h when compiling for glibc. Include all those standard headers unconditionally if _LIBC is defined. * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc. * gettext.c: Include libintl.h instead of libgettext.h when compiling for glibc. Get NULL from stddef.h if we compile for glibc. * finddomain.c: Include libintl.h instead of libgettext.h when compiling for glibc. Include all those standard headers unconditionally if _LIBC is defined. * dcgettext.c: Include all those standard headers unconditionally if _LIBC is defined. * dgettext.c: If compiled in glibc include libintl.h instead of libgettext.h. (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc. * dcgettext.c: If compiled in glibc include libintl.h instead of libgettext.h. (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc. * bindtextdom.c: If compiled in glibc include libintl.h instead of libgettext.h. Mon Sep 25 22:23:06 1995 Ulrich Drepper * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0. Reported by Marcus Daniels. * cat-compat.c (bindtextdomain): String used in putenv must not be recycled. Reported by Marcus Daniels. * libgettext.h (__USE_GNU_GETTEXT): Additional symbol to signal that we use GNU gettext library. * cat-compat.c (bindtextdomain): Fix bug with the strange stpcpy replacement. Reported by Nelson Beebe. Sat Sep 23 08:23:51 1995 Ulrich Drepper * cat-compat.c: Include for stpcpy prototype. * localealias.c (read_alias_file): While expand strdup code temporary variable `cp' hided higher level variable with same name. Rename to `tp'. * textdomain.c (textdomain): Avoid warning by using temporary variable in strdup code. * finddomain.c (_nl_find_domain): Remove unused variable `application'. Thu Sep 21 15:51:44 1995 Ulrich Drepper * localealias.c (alias_compare): Use strcasecmp() only if available. Else use implementation in place. * intl-compat.c: Wrapper functions now call *__ functions instead of __*. * libgettext.h: Declare prototypes for *__ functions instead for __*. * cat-compat.c, loadmsgcat.c: Don't use xmalloc, xstrdup, and stpcpy. These functions are not part of the standard libc and so prevent libintl.a from being used standalone. * bindtextdom.c: Don't use xmalloc, xstrdup, and stpcpy. These functions are not part of the standard libc and so prevent libintl.a from being used standalone. Rename to bindtextdomain__ if not used in GNU C Library. * dgettext.c: Rename function to dgettext__ if not used in GNU C Library. * gettext.c: Don't use xmalloc, xstrdup, and stpcpy. These functions are not part of the standard libc and so prevent libintl.a from being used standalone. Functions now called gettext__ if not used in GNU C Library. * dcgettext.c, localealias.c, textdomain.c, finddomain.c: Don't use xmalloc, xstrdup, and stpcpy. These functions are not part of the standard libc and so prevent libintl.a from being used standalone. Sun Sep 17 23:14:49 1995 Ulrich Drepper * finddomain.c: Correct some bugs in handling of CEN standard locale definitions. Thu Sep 7 01:49:28 1995 Ulrich Drepper * finddomain.c: Implement CEN syntax. * gettextP.h (loaded_domain): Extend number of successors to 31. Sat Aug 19 19:25:29 1995 Ulrich Drepper * Makefile.in (aliaspath): Remove path to X11 locale dir. * Makefile.in: Make install-src depend on install. This helps gettext to install the sources and other packages can use the install goal. Sat Aug 19 15:19:33 1995 Ulrich Drepper * Makefile.in (uninstall): Remove stuff installed by install-src. Tue Aug 15 13:13:53 1995 Ulrich Drepper * VERSION.in: Initial revision. * Makefile.in (DISTFILES): Add VERSION file. This is not necessary for gettext, but for other packages using this library. Tue Aug 15 06:16:44 1995 Ulrich Drepper * gettextP.h (_nl_find_domain): New prototype after changing search strategy. * finddomain.c (_nl_find_domain): We now try only to find a specified catalog. Fall back to other catalogs listed in the locale list is now done in __dcgettext. * dcgettext.c (__dcgettext): Now we provide message fall back even to different languages. I.e. if a message is not available in one language all the other in the locale list a tried. Formerly fall back was only possible within one language. Implemented by moving one loop from _nl_find_domain to here. Mon Aug 14 23:45:50 1995 Ulrich Drepper * Makefile.in (gettextsrcdir): Directory where source of GNU gettext library are made available. (INSTALL, INSTALL_DATA): Programs used for installing sources. (gettext-src): New. Rule to install GNU gettext sources for use in gettextize shell script. Sun Aug 13 14:40:48 1995 Ulrich Drepper * loadmsgcat.c (_nl_load_domain): Use mmap for loading only when munmap function is also available. * Makefile.in (install): Depend on `all' goal. Wed Aug 9 11:04:33 1995 Ulrich Drepper * localealias.c (read_alias_file): Do not overwrite '\n' when terminating alias value string. * localealias.c (read_alias_file): Handle long lines. Ignore the rest not fitting in the buffer after the initial `fgets' call. Wed Aug 9 00:54:29 1995 Ulrich Drepper * gettextP.h (_nl_load_domain): Add prototype, replacing prototype for _nl_load_msg_cat. * finddomain.c (_nl_find_domain): Remove unneeded variable filename and filename_len. (expand_alias): Remove prototype because functions does not exist anymore. * localealias.c (read_alias_file): Change type of fname_len parameter to int. (xmalloc): Add prototype. * loadmsgcat.c: Better prototypes for xmalloc. Tue Aug 8 22:30:39 1995 Ulrich Drepper * finddomain.c (_nl_find_domain): Allow alias name to be constructed from the four components. * Makefile.in (aliaspath): New variable. Set to preliminary value. (SOURCES): Add localealias.c. (OBJECTS): Add localealias.o. * gettextP.h: Add prototype for _nl_expand_alias. * finddomain.c: Aliasing handled in intl/localealias.c. * localealias.c: Aliasing for locale names. * bindtextdom.c: Better prototypes for xmalloc and xstrdup. Mon Aug 7 23:47:42 1995 Ulrich Drepper * Makefile.in (DISTFILES): gettext.perl is now found in misc/. * cat-compat.c (bindtextdomain): Correct implementation. dirname parameter was not used. Reported by Marcus Daniels. * gettextP.h (loaded_domain): New fields `successor' and `decided' for oo, lazy message handling implementation. * dcgettext.c: Adopt for oo, lazy message handliing. Now we can inherit translations from less specific locales. (find_msg): New function. * loadmsgcat.c, finddomain.c: Complete rewrite. Implement oo, lazy message handling :-). We now have an additional environment variable `LANGUAGE' with a higher priority than LC_ALL for the LC_MESSAGE locale. Here we can set a colon separated list of specifications each of the form `language[_territory[.codeset]][@modifier]'. Sat Aug 5 09:55:42 1995 Ulrich Drepper * finddomain.c (unistd.h): Include to get _PC_PATH_MAX defined on system having it. Fri Aug 4 22:42:00 1995 Ulrich Drepper * finddomain.c (stpcpy): Include prototype. * Makefile.in (dist): Remove `copying instead' message. Wed Aug 2 18:52:03 1995 Ulrich Drepper * Makefile.in (ID, TAGS): Do not use $^. Tue Aug 1 20:07:11 1995 Ulrich Drepper * Makefile.in (TAGS, ID): Use $^ as command argument. (TAGS): Give etags -o option t write to current directory, not $(srcdir). (ID): Use $(srcdir) instead os $(top_srcdir)/src. (distclean): Remove ID. Sun Jul 30 11:51:46 1995 Ulrich Drepper * Makefile.in (gnulocaledir): New variable, always using share/ for data directory. (DEFS): Add GNULOCALEDIR, used in finddomain.c. * finddomain.c (_nl_default_dirname): Set to GNULOCALEDIR, because it always has to point to the directory where GNU gettext Library writes it to. * intl-compat.c (textdomain, bindtextdomain): Undefine macros before function definition. Sat Jul 22 01:10:02 1995 Ulrich Drepper * libgettext.h (_LIBINTL_H): Protect definition in case where this file is included as libgettext.h on Solaris machines. Add comment about this. Wed Jul 19 02:36:42 1995 Ulrich Drepper * intl-compat.c (textdomain): Correct typo. Wed Jul 19 01:51:35 1995 Ulrich Drepper * dcgettext.c (dcgettext): Function now called __dcgettext. * dgettext.c (dgettext): Now called __dgettext and calls __dcgettext. * gettext.c (gettext): Function now called __gettext and calls __dgettext. * textdomain.c (textdomain): Function now called __textdomain. * bindtextdom.c (bindtextdomain): Function now called __bindtextdomain. * intl-compat.c: Initial revision. * Makefile.in (SOURCES): Add intl-compat.c. (OBJECTS): We always compile the GNU gettext library functions. OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o, and intl-compat.o. (GETTOBJS): Contains now only intl-compat.o. * libgettext.h: Re-include protection matches dualistic character of libgettext.h. For all functions in GNU gettext library define __ counter part. * finddomain.c (strchr): Define as index if not found in C library. (_nl_find_domain): For relative paths paste / in between. Tue Jul 18 16:37:45 1995 Ulrich Drepper * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h. * xopen-msg.sed: Fix bug with `msgstr ""' lines. A little bit better comments. Tue Jul 18 01:18:27 1995 Ulrich Drepper * Makefile.in: po-mode.el, makelinks, combine-sh are now found in ../misc. * po-mode.el, makelinks, combine-sh, elisp-comp: Moved to ../misc/. * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__. Sun Jul 16 22:33:02 1995 Ulrich Drepper * Makefile.in (INSTALL, INSTALL_DATA): New variables. (install-data, uninstall): Install/uninstall .elc file. * po-mode.el (Installation comment): Add .pox as possible extension of .po files. Sun Jul 16 13:23:27 1995 Ulrich Drepper * elisp-comp: Complete new version by Franc,ois: This does not fail when not compiling in the source directory. Sun Jul 16 00:12:17 1995 Ulrich Drepper * Makefile.in (../po/cat-id-tbl.o): Use $(MAKE) instead of make for recursive make. * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh. (install-exec): Add missing dummy goal. (install-data, uninstall): @ in multi-line shell command at beginning, not in front of echo. Reported by Eric Backus. Sat Jul 15 00:21:28 1995 Ulrich Drepper * Makefile.in (DISTFILES): Rename libgettext.perl to gettext.perl to fit in 14 chars file systems. * gettext.perl: Rename to gettext.perl to fit in 14 chars file systems. Thu Jul 13 23:17:20 1995 Ulrich Drepper * cat-compat.c: If !STDC_HEADERS try to include malloc.h. Thu Jul 13 20:55:02 1995 Ulrich Drepper * po2tbl.sed.in: Pretty printing. * linux-msg.sed, xopen-msg.sed: Correct bugs with handling substitute flags in branches. * hash-string.h (hash_string): Old K&R compilers don't under stand `unsigned char'. * gettext.h (nls_uint32): Some old K&R compilers (eg HP) don't understand `unsigned int'. * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes. Thu Jul 13 01:34:33 1995 Ulrich Drepper * Makefile.in (ELCFILES): New variable. (DISTFILES): Add elisp-comp. Add implicit rule for .el -> .elc compilation. (install-data): install $ELCFILES (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp. * elisp-comp: Initial revision Wed Jul 12 16:14:52 1995 Ulrich Drepper * Makefile.in: cat-id-tbl.c is now found in po/. This enables us to use an identical intl/ directory in all packages. * dcgettext.c (dcgettext): hashing does not work for table size <= 2. * textdomain.c: fix typo (#if def -> #if defined) Tue Jul 11 18:44:43 1995 Ulrich Drepper * Makefile.in (stamp-cat-id): use top_srcdir to address source files (DISTFILES,distclean): move tupdate.perl to src/ * po-to-tbl.sed.in: add additional jump to clear change flag to recognize multiline strings Tue Jul 11 01:32:50 1995 Ulrich Drepper * textdomain.c: Protect inclusion of stdlib.h and string.h. * loadmsgcat.c: Protect inclusion of stdlib.h. * libgettext.h: Protect inclusion of locale.h. Allow use in C++ programs. Define NULL is not happened already. * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of po-to-tbl.sed. (distclean): remove po-to-tbl.sed and tupdate.perl. * tupdate.perl.in: Substitute Perl path even in exec line. Don't include entries without translation from old .po file. Tue Jul 4 00:41:51 1995 Ulrich Drepper * tupdate.perl.in: use "Updated: " in msgid "". * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR). Define getenv if !__STDC__. * bindtextdom.c: Protect stdlib.h and string.h inclusion. Define free if !__STDC__. * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. Define free if !__STDC__. * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR. Mon Jul 3 23:56:30 1995 Ulrich Drepper * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR. Remove unneeded $(srcdir) from Makefile.in dependency. * makelinks: Add copyright and short description. * po-mode.el: Last version for 0.7. * tupdate.perl.in: Fix die message. * dcgettext.c: Protect include of string.h. * gettext.c: Protect include of stdlib.h and further tries to get NULL. * finddomain.c: Some corrections in includes. * Makefile.in (INCLUDES): Prune list correct path to Makefile.in. * po-to-tbl.sed: Adopt for new .po file format. * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format. Sun Jul 2 23:55:03 1995 Ulrich Drepper * tupdate.perl.in: Complete rewrite for new .po file format. Sun Jul 2 02:06:50 1995 Ulrich Drepper * First official release. This directory contains all the code needed to internationalize own packages. It provides functions which allow to use the X/Open catgets function with an interface like the Uniforum gettext function. For system which does not have neither of those a complete implementation is provided. gatos-0.0.5/intl/Makefile.in0100644002411700123110000001451306765053731014325 0ustar bayleasr# Makefile for directory with message catalog handling in GNU NLS Utilities. # Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ libdir = $(exec_prefix)/lib includedir = $(prefix)/include datadir = $(prefix)/@DATADIRNAME@ localedir = $(datadir)/locale gnulocaledir = $(prefix)/share/locale gettextsrcdir = @datadir@/gettext/intl aliaspath = $(localedir):. subdir = intl INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ l = @l@ AR = ar CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) HEADERS = $(COMHDRS) libgettext.h loadinfo.h COMHDRS = gettext.h gettextP.h hash-string.h SOURCES = $(COMSRCS) intl-compat.c cat-compat.c COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ explodename.c OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ explodename.$lo CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo GETTOBJS = intl-compat.$lo DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ xopen-msg.sed $(HEADERS) $(SOURCES) DISTFILES.normal = VERSION DISTFILES.gettext = libintl.glibc intlh.inst.in .SUFFIXES: .SUFFIXES: .c .o .lo .c.o: $(COMPILE) $< .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) $< INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib all: all-@USE_INCLUDED_LIBINTL@ all-yes: libintl.$la intlh.inst all-no: libintl.a: $(OBJECTS) rm -f $@ $(AR) cru $@ $(OBJECTS) $(RANLIB) $@ libintl.la: $(OBJECTS) $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ -version-info 1:0 -rpath $(libdir) ../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot cd ../po && $(MAKE) cat-id-tbl.$lo check: all # This installation goal is only used in GNU gettext. Packages which # only use the library should use install instead. # We must not install the libintl.h/libintl.a files if we are on a # system which has the gettext() function in its C library or in a # separate library or use the catgets interface. A special case is # where configure found a previously installed GNU gettext library. # If you want to use the one which comes with this version of the # package, you have to use `configure --with-included-gettext'. install: install-exec install-data install-exec: all if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ if test -r $(MKINSTALLDIRS); then \ $(MKINSTALLDIRS) $(libdir) $(includedir); \ else \ $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ fi; \ $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ else \ : ; \ fi install-data: all if test "$(PACKAGE)" = "gettext"; then \ if test -r $(MKINSTALLDIRS); then \ $(MKINSTALLDIRS) $(gettextsrcdir); \ else \ $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ fi; \ $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ dists="$(DISTFILES.common)"; \ for file in $$dists; do \ $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: dists="$(DISTFILES.common)"; \ for file in $$dists; do \ rm -f $(gettextsrcdir)/$$file; \ done info dvi: $(OBJECTS): ../config.h libgettext.h bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) id: ID ID: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) mostlyclean: rm -f *.a *.o *.lo core core.* libintl.h clean: mostlyclean distclean: clean rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." # GNU gettext needs not contain the file `VERSION' but contains some # other files which should not be distributed in other packages. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: Makefile $(DISTFILES) if test "$(PACKAGE)" = gettext; then \ additional="$(DISTFILES.gettext)"; \ else \ additional="$(DISTFILES.normal)"; \ fi; \ for file in $(DISTFILES.common) $$additional; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done dist-libc: tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc Makefile: Makefile.in ../config.status cd .. \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status # The dependency for intlh.inst is different in gettext and all other # packages. Because we cannot you GNU make features we have to solve # the problem while rewriting Makefile.in. @GT_YES@intlh.inst: intlh.inst.in ../config.status @GT_YES@ cd .. \ @GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ @GT_YES@ $(SHELL) ./config.status @GT_NO@.PHONY: intlh.inst @GT_NO@intlh.inst: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: gatos-0.0.5/intl/linux-msg.sed0100644002411700123110000000520506765053731014676 0ustar bayleasr# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file # Copyright (C) 1995 Free Software Foundation, Inc. # Ulrich Drepper , 1995. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # # The first directive in the .msg should be the definition of the # message set number. We use always set number 1. # 1 { i\ $set 1 # Automatically created by po2msg.sed h s/.*/0/ x } # # Mitch's old catalog format does not allow comments. # # We copy the original message as a comment into the .msg file. # /^msgid/ { s/msgid[ ]*"// # # This does not work now with the new format. # /"$/! { # s/\\$// # s/$/ ... (more lines following)"/ # } x # The following nice solution is by # Bruno td # Increment a decimal number in pattern space. # First hide trailing `9' digits. :d s/9\(_*\)$/_\1/ td # Assure at least one digit is available. s/^\(_*\)$/0\1/ # Increment the last digit. s/8\(_*\)$/9\1/ s/7\(_*\)$/8\1/ s/6\(_*\)$/7\1/ s/5\(_*\)$/6\1/ s/4\(_*\)$/5\1/ s/3\(_*\)$/4\1/ s/2\(_*\)$/3\1/ s/1\(_*\)$/2\1/ s/0\(_*\)$/1\1/ # Convert the hidden `9' digits to `0's. s/_/0/g x G s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p } # # The .msg file contains, other then the .po file, only the translations # but each given a unique ID. Starting from 1 and incrementing by 1 for # each message we assign them to the messages. # It is important that the .po file used to generate the cat-id-tbl.c file # (with po-to-tbl) is the same as the one used here. (At least the order # of declarations must not be changed.) # /^msgstr/ { s/msgstr[ ]*"\(.*\)"/# \1/ # Clear substitution flag. tb # Append the next line. :b N # Look whether second part is continuation line. s/\(.*\n\)"\(.*\)"/\1\2/ # Yes, then branch. ta P D # Note that D includes a jump to the start!! # We found a continuation line. But before printing insert '\'. :a s/\(.*\)\(\n.*\)/\1\\\2/ P # We cannot use D here. s/.*\n\(.*\)/\1/ tb } d gatos-0.0.5/intl/po2tbl.sed.in0100644002411700123110000000456506765053731014572 0ustar bayleasr# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets # Copyright (C) 1995 Free Software Foundation, Inc. # Ulrich Drepper , 1995. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # 1 { i\ /* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\ \ #if HAVE_CONFIG_H\ # include \ #endif\ \ #include "libgettext.h"\ \ const struct _msg_ent _msg_tbl[] = { h s/.*/0/ x } # # Write msgid entries in C array form. # /^msgid/ { s/msgid[ ]*\(".*"\)/ {\1/ tb # Append the next line :b N # Look whether second part is continuation line. s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/ # Yes, then branch. ta # Because we assume that the input file correctly formed the line # just read cannot be again be a msgid line. So it's safe to ignore # it. s/\(.*\)\n.*/\1/ bc # We found a continuation line. But before printing insert '\'. :a s/\(.*\)\(\n.*\)/\1\\\2/ P # We cannot use D here. s/.*\n\(.*\)/\1/ # Some buggy seds do not clear the `successful substitution since last ``t''' # flag on `N', so we do a `t' here to clear it. tb # Not reached :c x # The following nice solution is by # Bruno td # Increment a decimal number in pattern space. # First hide trailing `9' digits. :d s/9\(_*\)$/_\1/ td # Assure at least one digit is available. s/^\(_*\)$/0\1/ # Increment the last digit. s/8\(_*\)$/9\1/ s/7\(_*\)$/8\1/ s/6\(_*\)$/7\1/ s/5\(_*\)$/6\1/ s/4\(_*\)$/5\1/ s/3\(_*\)$/4\1/ s/2\(_*\)$/3\1/ s/1\(_*\)$/2\1/ s/0\(_*\)$/1\1/ # Convert the hidden `9' digits to `0's. s/_/0/g x G s/\(.*\)\n\([0-9]*\)/\1, \2},/ s/\(.*\)"$/\1/ p } # # Last line. # $ { i\ };\ g s/0*\(.*\)/int _msg_tbl_length = \1;/p } d gatos-0.0.5/intl/xopen-msg.sed0100644002411700123110000000537606765053731014701 0ustar bayleasr# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file # Copyright (C) 1995 Free Software Foundation, Inc. # Ulrich Drepper , 1995. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # # The first directive in the .msg should be the definition of the # message set number. We use always set number 1. # 1 { i\ $set 1 # Automatically created by po2msg.sed h s/.*/0/ x } # # We copy all comments into the .msg file. Perhaps they can help. # /^#/ s/^#[ ]*/$ /p # # We copy the original message as a comment into the .msg file. # /^msgid/ { # Does not work now # /"$/! { # s/\\$// # s/$/ ... (more lines following)"/ # } s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/ p } # # The .msg file contains, other then the .po file, only the translations # but each given a unique ID. Starting from 1 and incrementing by 1 for # each message we assign them to the messages. # It is important that the .po file used to generate the cat-id-tbl.c file # (with po-to-tbl) is the same as the one used here. (At least the order # of declarations must not be changed.) # /^msgstr/ { s/msgstr[ ]*"\(.*\)"/\1/ x # The following nice solution is by # Bruno td # Increment a decimal number in pattern space. # First hide trailing `9' digits. :d s/9\(_*\)$/_\1/ td # Assure at least one digit is available. s/^\(_*\)$/0\1/ # Increment the last digit. s/8\(_*\)$/9\1/ s/7\(_*\)$/8\1/ s/6\(_*\)$/7\1/ s/5\(_*\)$/6\1/ s/4\(_*\)$/5\1/ s/3\(_*\)$/4\1/ s/2\(_*\)$/3\1/ s/1\(_*\)$/2\1/ s/0\(_*\)$/1\1/ # Convert the hidden `9' digits to `0's. s/_/0/g x # Bring the line in the format ` ' G s/^[^\n]*$/& / s/\(.*\)\n\([0-9]*\)/\2 \1/ # Clear flag from last substitution. tb # Append the next line. :b N # Look whether second part is a continuation line. s/\(.*\n\)"\(.*\)"/\1\2/ # Yes, then branch. ta P D # Note that `D' includes a jump to the start!! # We found a continuation line. But before printing insert '\'. :a s/\(.*\)\(\n.*\)/\1\\\2/ P # We cannot use the sed command `D' here s/.*\n\(.*\)/\1/ tb } d gatos-0.0.5/intl/gettext.h0100644002411700123110000000620506765053731014114 0ustar bayleasr/* Internal header for GNU gettext internationalization functions. Copyright (C) 1995, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETTEXT_H #define _GETTEXT_H 1 #include #if HAVE_LIMITS_H || _LIBC # include #endif /* @@ end of prolog @@ */ /* The magic number of the GNU message catalog format. */ #define _MAGIC 0x950412de #define _MAGIC_SWAPPED 0xde120495 /* Revision number of the currently used .mo (binary) file format. */ #define MO_REVISION_NUMBER 0 /* The following contortions are an attempt to use the C preprocessor to determine an unsigned integral type that is 32 bits wide. An alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but doing that would require that the configure script compile and *run* the resulting executable. Locally running cross-compiled executables is usually not possible. */ #if __STDC__ # define UINT_MAX_32_BITS 4294967295U #else # define UINT_MAX_32_BITS 0xFFFFFFFF #endif /* If UINT_MAX isn't defined, assume it's a 32-bit type. This should be valid for all systems GNU cares about because that doesn't include 16-bit systems, and only modern systems (that certainly have ) have 64+-bit integral types. */ #ifndef UINT_MAX # define UINT_MAX UINT_MAX_32_BITS #endif #if UINT_MAX == UINT_MAX_32_BITS typedef unsigned nls_uint32; #else # if USHRT_MAX == UINT_MAX_32_BITS typedef unsigned short nls_uint32; # else # if ULONG_MAX == UINT_MAX_32_BITS typedef unsigned long nls_uint32; # else /* The following line is intended to throw an error. Using #error is not portable enough. */ "Cannot determine unsigned 32-bit data type." # endif # endif #endif /* Header for binary .mo file format. */ struct mo_file_header { /* The magic number. */ nls_uint32 magic; /* The revision number of the file format. */ nls_uint32 revision; /* The number of strings pairs. */ nls_uint32 nstrings; /* Offset of table with start offsets of original strings. */ nls_uint32 orig_tab_offset; /* Offset of table with start offsets of translation strings. */ nls_uint32 trans_tab_offset; /* Size of hashing table. */ nls_uint32 hash_tab_size; /* Offset of first hashing entry. */ nls_uint32 hash_tab_offset; }; struct string_desc { /* Length of addressed string. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; /* @@ begin of epilog @@ */ #endif /* gettext.h */ gatos-0.0.5/intl/gettextP.h0100644002411700123110000000420606765053731014233 0ustar bayleasr/* Header describing internals of gettext library Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETTEXTP_H #define _GETTEXTP_H #include "loadinfo.h" /* @@ end of prolog @@ */ #ifndef PARAMS # if __STDC__ # define PARAMS(args) args # else # define PARAMS(args) () # endif #endif #ifndef internal_function # define internal_function #endif #ifndef W # define W(flag, data) ((flag) ? SWAP (data) : (data)) #endif #ifdef _LIBC # include # define SWAP(i) bswap_32 (i) #else static nls_uint32 SWAP PARAMS ((nls_uint32 i)); static inline nls_uint32 SWAP (i) nls_uint32 i; { return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); } #endif struct loaded_domain { const char *data; int use_mmap; size_t mmap_size; int must_swap; nls_uint32 nstrings; struct string_desc *orig_tab; struct string_desc *trans_tab; nls_uint32 hash_size; nls_uint32 *hash_tab; }; struct binding { struct binding *next; char *domainname; char *dirname; }; struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname, char *__locale, const char *__domainname)) internal_function; void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain)) internal_function; void _nl_unload_domain PARAMS ((struct loaded_domain *__domain)) internal_function; /* @@ begin of epilog @@ */ #endif /* gettextP.h */ gatos-0.0.5/intl/hash-string.h0100644002411700123110000000337306765053731014662 0ustar bayleasr/* Implements a string hashing function. Copyright (C) 1995, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* @@ end of prolog @@ */ #ifndef PARAMS # if __STDC__ # define PARAMS(Args) Args # else # define PARAMS(Args) () # endif #endif /* We assume to have `unsigned long int' value with at least 32 bits. */ #define HASHWORDBITS 32 /* Defines the so called `hashpjw' function by P.J. Weinberger [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 1986, 1987 Bell Telephone Laboratories, Inc.] */ static unsigned long hash_string PARAMS ((const char *__str_param)); static inline unsigned long hash_string (str_param) const char *str_param; { unsigned long int hval, g; const char *str = str_param; /* Compute the hash value for the given string. */ hval = 0; while (*str != '\0') { hval <<= 4; hval += (unsigned long) *str++; g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4)); if (g != 0) { hval ^= g >> (HASHWORDBITS - 8); hval ^= g; } } return hval; } gatos-0.0.5/intl/libgettext.h0100644002411700123110000001314506765053731014604 0ustar bayleasr/* Message catalogs for internationalization. Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Because on some systems (e.g. Solaris) we sometimes have to include the systems libintl.h as well as this file we have more complex include protection above. But the systems header might perhaps also define _LIBINTL_H and therefore we have to protect the definition here. */ #if !defined _LIBINTL_H || !defined _LIBGETTEXT_H #ifndef _LIBINTL_H # define _LIBINTL_H 1 #endif #define _LIBGETTEXT_H 1 /* We define an additional symbol to signal that we use the GNU implementation of gettext. */ #define __USE_GNU_GETTEXT 1 #include #if HAVE_LOCALE_H # include #endif #ifdef __cplusplus extern "C" { #endif /* @@ end of prolog @@ */ #ifndef PARAMS # if __STDC__ || defined __cplusplus # define PARAMS(args) args # else # define PARAMS(args) () # endif #endif #ifndef NULL # if !defined __cplusplus || defined __GNUC__ # define NULL ((void *) 0) # else # define NULL (0) # endif #endif #if !HAVE_LC_MESSAGES /* This value determines the behaviour of the gettext() and dgettext() function. But some system does not have this defined. Define it to a default value. */ # define LC_MESSAGES (-1) #endif /* Declarations for gettext-using-catgets interface. Derived from Jim Meyering's libintl.h. */ struct _msg_ent { const char *_msg; int _msg_number; }; #if HAVE_CATGETS /* These two variables are defined in the automatically by po-to-tbl.sed generated file `cat-id-tbl.c'. */ extern const struct _msg_ent _msg_tbl[]; extern int _msg_tbl_length; #endif /* For automatical extraction of messages sometimes no real translation is needed. Instead the string itself is the result. */ #define gettext_noop(Str) (Str) /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ extern char *gettext PARAMS ((const char *__msgid)); extern char *gettext__ PARAMS ((const char *__msgid)); /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid)); extern char *dgettext__ PARAMS ((const char *__domainname, const char *__msgid)); /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid, int __category)); extern char *dcgettext__ PARAMS ((const char *__domainname, const char *__msgid, int __category)); /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ extern char *textdomain PARAMS ((const char *__domainname)); extern char *textdomain__ PARAMS ((const char *__domainname)); /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ extern char *bindtextdomain PARAMS ((const char *__domainname, const char *__dirname)); extern char *bindtextdomain__ PARAMS ((const char *__domainname, const char *__dirname)); #if ENABLE_NLS /* Solaris 2.3 has the gettext function but dcgettext is missing. So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4 has dcgettext. */ # if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT) # define gettext(Msgid) \ dgettext (NULL, Msgid) # define dgettext(Domainname, Msgid) \ dcgettext (Domainname, Msgid, LC_MESSAGES) # if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7 /* This global variable is defined in loadmsgcat.c. We need a sign, whether a new catalog was loaded, which can be associated with all translations. */ extern int _nl_msg_cat_cntr; # define dcgettext(Domainname, Msgid, Category) \ (__extension__ \ ({ \ char *__result; \ if (__builtin_constant_p (Msgid)) \ { \ static char *__translation__; \ static int __catalog_counter__; \ if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ { \ __translation__ = \ dcgettext__ (Domainname, Msgid, Category); \ __catalog_counter__ = _nl_msg_cat_cntr; \ } \ __result = __translation__; \ } \ else \ __result = dcgettext__ (Domainname, Msgid, Category); \ __result; \ })) # endif # endif #else # define gettext(Msgid) (Msgid) # define dgettext(Domainname, Msgid) (Msgid) # define dcgettext(Domainname, Msgid, Category) (Msgid) # define textdomain(Domainname) ((char *) Domainname) # define bindtextdomain(Domainname, Dirname) ((char *) Dirname) #endif /* @@ begin of epilog @@ */ #ifdef __cplusplus } #endif #endif gatos-0.0.5/intl/loadinfo.h0100644002411700123110000000455506765053731014231 0ustar bayleasr/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef PARAMS # if __STDC__ # define PARAMS(args) args # else # define PARAMS(args) () # endif #endif /* Encoding of locale name parts. */ #define CEN_REVISION 1 #define CEN_SPONSOR 2 #define CEN_SPECIAL 4 #define XPG_NORM_CODESET 8 #define XPG_CODESET 16 #define TERRITORY 32 #define CEN_AUDIENCE 64 #define XPG_MODIFIER 128 #define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE) #define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER) struct loaded_l10nfile { const char *filename; int decided; const void *data; struct loaded_l10nfile *next; struct loaded_l10nfile *successor[1]; }; extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset, size_t name_len)); extern struct loaded_l10nfile * _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, const char *language, const char *territory, const char *codeset, const char *normalized_codeset, const char *modifier, const char *special, const char *sponsor, const char *revision, const char *filename, int do_allocate)); extern const char *_nl_expand_alias PARAMS ((const char *name)); extern int _nl_explode_name PARAMS ((char *name, const char **language, const char **modifier, const char **territory, const char **codeset, const char **normalized_codeset, const char **special, const char **sponsor, const char **revision)); gatos-0.0.5/intl/bindtextdom.c0100644002411700123110000001232306765053731014742 0ustar bayleasr/* Implementation of the bindtextdomain(3) function Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #if defined STDC_HEADERS || defined _LIBC # include #else # ifdef HAVE_MALLOC_H # include # else void free (); # endif #endif #if defined HAVE_STRING_H || defined _LIBC # include #else # include # ifndef memcpy # define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif #ifdef _LIBC # include #else # include "libgettext.h" #endif #include "gettext.h" #include "gettextP.h" /* @@ end of prolog @@ */ /* Contains the default location of the message catalogs. */ extern const char _nl_default_dirname[]; /* List with bindings of specific domains. */ extern struct binding *_nl_domain_bindings; /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define BINDTEXTDOMAIN __bindtextdomain # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define BINDTEXTDOMAIN bindtextdomain__ #endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ char * BINDTEXTDOMAIN (domainname, dirname) const char *domainname; const char *dirname; { struct binding *binding; /* Some sanity checks. */ if (domainname == NULL || domainname[0] == '\0') return NULL; for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (dirname == NULL) /* The current binding has be to returned. */ return binding == NULL ? (char *) _nl_default_dirname : binding->dirname; if (binding != NULL) { /* The domain is already bound. If the new value and the old one are equal we simply do nothing. Otherwise replace the old binding. */ if (strcmp (dirname, binding->dirname) != 0) { char *new_dirname; if (strcmp (dirname, _nl_default_dirname) == 0) new_dirname = (char *) _nl_default_dirname; else { #if defined _LIBC || defined HAVE_STRDUP new_dirname = strdup (dirname); if (new_dirname == NULL) return NULL; #else size_t len = strlen (dirname) + 1; new_dirname = (char *) malloc (len); if (new_dirname == NULL) return NULL; memcpy (new_dirname, dirname, len); #endif } if (binding->dirname != _nl_default_dirname) free (binding->dirname); binding->dirname = new_dirname; } } else { /* We have to create a new binding. */ #if !defined _LIBC && !defined HAVE_STRDUP size_t len; #endif struct binding *new_binding = (struct binding *) malloc (sizeof (*new_binding)); if (new_binding == NULL) return NULL; #if defined _LIBC || defined HAVE_STRDUP new_binding->domainname = strdup (domainname); if (new_binding->domainname == NULL) return NULL; #else len = strlen (domainname) + 1; new_binding->domainname = (char *) malloc (len); if (new_binding->domainname == NULL) return NULL; memcpy (new_binding->domainname, domainname, len); #endif if (strcmp (dirname, _nl_default_dirname) == 0) new_binding->dirname = (char *) _nl_default_dirname; else { #if defined _LIBC || defined HAVE_STRDUP new_binding->dirname = strdup (dirname); if (new_binding->dirname == NULL) return NULL; #else len = strlen (dirname) + 1; new_binding->dirname = (char *) malloc (len); if (new_binding->dirname == NULL) return NULL; memcpy (new_binding->dirname, dirname, len); #endif } /* Now enqueue it. */ if (_nl_domain_bindings == NULL || strcmp (domainname, _nl_domain_bindings->domainname) < 0) { new_binding->next = _nl_domain_bindings; _nl_domain_bindings = new_binding; } else { binding = _nl_domain_bindings; while (binding->next != NULL && strcmp (domainname, binding->next->domainname) > 0) binding = binding->next; new_binding->next = binding->next; binding->next = new_binding; } binding = new_binding; } return binding->dirname; } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__bindtextdomain, bindtextdomain); #endif gatos-0.0.5/intl/dcgettext.c0100644002411700123110000004020006765053731014407 0ustar bayleasr/* Implementation of the dcgettext(3) function. Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif #endif #include #ifndef errno extern int errno; #endif #ifndef __set_errno # define __set_errno(val) errno = (val) #endif #if defined STDC_HEADERS || defined _LIBC # include #else char *getenv (); # ifdef HAVE_MALLOC_H # include # else void free (); # endif #endif #if defined HAVE_STRING_H || defined _LIBC # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include #else # include #endif #if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif #endif #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include "gettext.h" #include "gettextP.h" #ifdef _LIBC # include #else # include "libgettext.h" #endif #include "hash-string.h" /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define getcwd __getcwd # ifndef stpcpy # define stpcpy __stpcpy # endif #else # if !defined HAVE_GETCWD char *getwd (); # define getcwd(buf, max) getwd (buf) # else char *getcwd (); # endif # ifndef HAVE_STPCPY static char *stpcpy PARAMS ((char *dest, const char *src)); # endif #endif /* Amount to increase buffer size by in each try. */ #define PATH_INCR 32 /* The following is from pathmax.h. */ /* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define PATH_MAX but might cause redefinition warnings when sys/param.h is later included (as on MORE/BSD 4.3). */ #if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__)) # include #endif #ifndef _POSIX_PATH_MAX # define _POSIX_PATH_MAX 255 #endif #if !defined(PATH_MAX) && defined(_PC_PATH_MAX) # define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX)) #endif /* Don't include sys/param.h if it already has been. */ #if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN) # include #endif #if !defined(PATH_MAX) && defined(MAXPATHLEN) # define PATH_MAX MAXPATHLEN #endif #ifndef PATH_MAX # define PATH_MAX _POSIX_PATH_MAX #endif /* XPG3 defines the result of `setlocale (category, NULL)' as: ``Directs `setlocale()' to query `category' and return the current setting of `local'.'' However it does not specify the exact format. And even worse: POSIX defines this not at all. So we can use this feature only on selected system (e.g. those using GNU C Library). */ #ifdef _LIBC # define HAVE_LOCALE_NULL #endif /* Name of the default domain used for gettext(3) prior any call to textdomain(3). The default value for this is "messages". */ const char _nl_default_default_domain[] = "messages"; /* Value used as the default domain for gettext(3). */ const char *_nl_current_default_domain = _nl_default_default_domain; /* Contains the default location of the message catalogs. */ const char _nl_default_dirname[] = GNULOCALEDIR; /* List with bindings of specific domains created by bindtextdomain() calls. */ struct binding *_nl_domain_bindings; /* Prototypes for local functions. */ static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file, const char *msgid)) internal_function; static const char *category_to_name PARAMS ((int category)) internal_function; static const char *guess_category_value PARAMS ((int category, const char *categoryname)) internal_function; /* For those loosing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA /* Nothing has to be done. */ # define ADD_BLOCK(list, address) /* nothing */ # define FREE_BLOCKS(list) /* nothing */ #else struct block_list { void *address; struct block_list *next; }; # define ADD_BLOCK(list, addr) \ do { \ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ /* If we cannot get a free block we cannot add the new element to \ the list. */ \ if (newp != NULL) { \ newp->address = (addr); \ newp->next = (list); \ (list) = newp; \ } \ } while (0) # define FREE_BLOCKS(list) \ do { \ while (list != NULL) { \ struct block_list *old = list; \ list = list->next; \ free (old); \ } \ } while (0) # undef alloca # define alloca(size) (malloc (size)) #endif /* have alloca */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DCGETTEXT __dcgettext #else # define DCGETTEXT dcgettext__ #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ char * DCGETTEXT (domainname, msgid, category) const char *domainname; const char *msgid; int category; { #ifndef HAVE_ALLOCA struct block_list *block_list = NULL; #endif struct loaded_l10nfile *domain; struct binding *binding; const char *categoryname; const char *categoryvalue; char *dirname, *xdomainname; char *single_locale; char *retval; int saved_errno = errno; /* If no real MSGID is given return NULL. */ if (msgid == NULL) return NULL; /* If DOMAINNAME is NULL, we are interested in the default domain. If CATEGORY is not LC_MESSAGES this might not make much sense but the defintion left this undefined. */ if (domainname == NULL) domainname = _nl_current_default_domain; /* First find matching binding. */ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) { int compare = strcmp (domainname, binding->domainname); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It is not in the list. */ binding = NULL; break; } } if (binding == NULL) dirname = (char *) _nl_default_dirname; else if (binding->dirname[0] == '/') dirname = binding->dirname; else { /* We have a relative path. Make it absolute now. */ size_t dirname_len = strlen (binding->dirname) + 1; size_t path_max; char *ret; path_max = (unsigned) PATH_MAX; path_max += 2; /* The getcwd docs say to do this. */ dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, dirname); __set_errno (0); while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) { path_max += PATH_INCR; dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, dirname); __set_errno (0); } if (ret == NULL) { /* We cannot get the current working directory. Don't signal an error but simply return the default string. */ FREE_BLOCKS (block_list); __set_errno (saved_errno); return (char *) msgid; } stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname); } /* Now determine the symbolic name of CATEGORY and its value. */ categoryname = category_to_name (category); categoryvalue = guess_category_value (category, categoryname); xdomainname = (char *) alloca (strlen (categoryname) + strlen (domainname) + 5); ADD_BLOCK (block_list, xdomainname); stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"), domainname), ".mo"); /* Creating working area. */ single_locale = (char *) alloca (strlen (categoryvalue) + 1); ADD_BLOCK (block_list, single_locale); /* Search for the given string. This is a loop because we perhaps got an ordered list of languages to consider for th translation. */ while (1) { /* Make CATEGORYVALUE point to the next element of the list. */ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':') ++categoryvalue; if (categoryvalue[0] == '\0') { /* The whole contents of CATEGORYVALUE has been searched but no valid entry has been found. We solve this situation by implicitly appending a "C" entry, i.e. no translation will take place. */ single_locale[0] = 'C'; single_locale[1] = '\0'; } else { char *cp = single_locale; while (categoryvalue[0] != '\0' && categoryvalue[0] != ':') *cp++ = *categoryvalue++; *cp = '\0'; } /* If the current locale value is C (or POSIX) we don't load a domain. Return the MSGID. */ if (strcmp (single_locale, "C") == 0 || strcmp (single_locale, "POSIX") == 0) { FREE_BLOCKS (block_list); __set_errno (saved_errno); return (char *) msgid; } /* Find structure describing the message catalog matching the DOMAINNAME and CATEGORY. */ domain = _nl_find_domain (dirname, single_locale, xdomainname); if (domain != NULL) { retval = find_msg (domain, msgid); if (retval == NULL) { int cnt; for (cnt = 0; domain->successor[cnt] != NULL; ++cnt) { retval = find_msg (domain->successor[cnt], msgid); if (retval != NULL) break; } } if (retval != NULL) { FREE_BLOCKS (block_list); __set_errno (saved_errno); return retval; } } } /* NOTREACHED */ } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dcgettext, dcgettext); #endif static char * internal_function find_msg (domain_file, msgid) struct loaded_l10nfile *domain_file; const char *msgid; { size_t top, act, bottom; struct loaded_domain *domain; if (domain_file->decided == 0) _nl_load_domain (domain_file); if (domain_file->data == NULL) return NULL; domain = (struct loaded_domain *) domain_file->data; /* Locate the MSGID and its translation. */ if (domain->hash_size > 2 && domain->hash_tab != NULL) { /* Use the hashing table. */ nls_uint32 len = strlen (msgid); nls_uint32 hash_val = hash_string (msgid); nls_uint32 idx = hash_val % domain->hash_size; nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); if (nstr == 0) /* Hash table entry is empty. */ return NULL; if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len && strcmp (msgid, domain->data + W (domain->must_swap, domain->orig_tab[nstr - 1].offset)) == 0) return (char *) domain->data + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); while (1) { if (idx >= domain->hash_size - incr) idx -= domain->hash_size - incr; else idx += incr; nstr = W (domain->must_swap, domain->hash_tab[idx]); if (nstr == 0) /* Hash table entry is empty. */ return NULL; if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len && strcmp (msgid, domain->data + W (domain->must_swap, domain->orig_tab[nstr - 1].offset)) == 0) return (char *) domain->data + W (domain->must_swap, domain->trans_tab[nstr - 1].offset); } /* NOTREACHED */ } /* Now we try the default method: binary search in the sorted array of messages. */ bottom = 0; top = domain->nstrings; while (bottom < top) { int cmp_val; act = (bottom + top) / 2; cmp_val = strcmp (msgid, domain->data + W (domain->must_swap, domain->orig_tab[act].offset)); if (cmp_val < 0) top = act; else if (cmp_val > 0) bottom = act + 1; else break; } /* If an translation is found return this. */ return bottom >= top ? NULL : (char *) domain->data + W (domain->must_swap, domain->trans_tab[act].offset); } /* Return string representation of locale CATEGORY. */ static const char * internal_function category_to_name (category) int category; { const char *retval; switch (category) { #ifdef LC_COLLATE case LC_COLLATE: retval = "LC_COLLATE"; break; #endif #ifdef LC_CTYPE case LC_CTYPE: retval = "LC_CTYPE"; break; #endif #ifdef LC_MONETARY case LC_MONETARY: retval = "LC_MONETARY"; break; #endif #ifdef LC_NUMERIC case LC_NUMERIC: retval = "LC_NUMERIC"; break; #endif #ifdef LC_TIME case LC_TIME: retval = "LC_TIME"; break; #endif #ifdef LC_MESSAGES case LC_MESSAGES: retval = "LC_MESSAGES"; break; #endif #ifdef LC_RESPONSE case LC_RESPONSE: retval = "LC_RESPONSE"; break; #endif #ifdef LC_ALL case LC_ALL: /* This might not make sense but is perhaps better than any other value. */ retval = "LC_ALL"; break; #endif default: /* If you have a better idea for a default value let me know. */ retval = "LC_XXX"; } return retval; } /* Guess value of current locale from value of the environment variables. */ static const char * internal_function guess_category_value (category, categoryname) int category; const char *categoryname; { const char *retval; /* The highest priority value is the `LANGUAGE' environment variable. This is a GNU extension. */ retval = getenv ("LANGUAGE"); if (retval != NULL && retval[0] != '\0') return retval; /* `LANGUAGE' is not set. So we have to proceed with the POSIX methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems this can be done by the `setlocale' function itself. */ #if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL return setlocale (category, NULL); #else /* Setting of LC_ALL overwrites all other. */ retval = getenv ("LC_ALL"); if (retval != NULL && retval[0] != '\0') return retval; /* Next comes the name of the desired category. */ retval = getenv (categoryname); if (retval != NULL && retval[0] != '\0') return retval; /* Last possibility is the LANG environment variable. */ retval = getenv ("LANG"); if (retval != NULL && retval[0] != '\0') return retval; /* We use C as the default domain. POSIX says this is implementation defined. */ return "C"; #endif } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (dest, src) char *dest; const char *src; { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif #ifdef _LIBC /* If we want to free all resources we have to do some work at program's end. */ static void __attribute__ ((unused)) free_mem (void) { struct binding *runp; for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next) { free (runp->domainname); if (runp->dirname != _nl_default_dirname) /* Yes, this is a pointer comparison. */ free (runp->dirname); } if (_nl_current_default_domain != _nl_default_default_domain) /* Yes, again a pointer comparison. */ free ((char *) _nl_current_default_domain); } text_set_element (__libc_subfreeres, free_mem); #endif gatos-0.0.5/intl/dgettext.c0100644002411700123110000000337206765053731014255 0ustar bayleasr/* Implementation of the dgettext(3) function Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #if defined HAVE_LOCALE_H || defined _LIBC # include #endif #ifdef _LIBC # include #else # include "libgettext.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define DGETTEXT __dgettext # define DCGETTEXT __dcgettext #else # define DGETTEXT dgettext__ # define DCGETTEXT dcgettext__ #endif /* Look up MSGID in the DOMAINNAME message catalog of the current LC_MESSAGES locale. */ char * DGETTEXT (domainname, msgid) const char *domainname; const char *msgid; { return DCGETTEXT (domainname, msgid, LC_MESSAGES); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__dgettext, dgettext); #endif gatos-0.0.5/intl/gettext.c0100644002411700123110000000362306765053731014110 0ustar bayleasr/* Implementation of gettext(3) function. Copyright (C) 1995, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #ifdef _LIBC # define __need_NULL # include #else # ifdef STDC_HEADERS # include /* Just for NULL. */ # else # ifdef HAVE_STRING_H # include # else # define NULL ((void *) 0) # endif # endif #endif #ifdef _LIBC # include #else # include "libgettext.h" #endif /* @@ end of prolog @@ */ /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define GETTEXT __gettext # define DGETTEXT __dgettext #else # define GETTEXT gettext__ # define DGETTEXT dgettext__ #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ char * GETTEXT (msgid) const char *msgid; { return DGETTEXT (NULL, msgid); } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__gettext, gettext); #endif gatos-0.0.5/intl/finddomain.c0100644002411700123110000001333406765053731014534 0ustar bayleasr/* Handle list of needed message catalogs Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #if defined STDC_HEADERS || defined _LIBC # include #else # ifdef HAVE_MALLOC_H # include # else void free (); # endif #endif #if defined HAVE_STRING_H || defined _LIBC # include #else # include # ifndef memcpy # define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif #if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif #endif #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #include "gettext.h" #include "gettextP.h" #ifdef _LIBC # include #else # include "libgettext.h" #endif /* @@ end of prolog @@ */ /* List of already loaded domains. */ static struct loaded_l10nfile *_nl_loaded_domains; /* Return a data structure describing the message catalog described by the DOMAINNAME and CATEGORY parameters with respect to the currently established bindings. */ struct loaded_l10nfile * internal_function _nl_find_domain (dirname, locale, domainname) const char *dirname; char *locale; const char *domainname; { struct loaded_l10nfile *retval; const char *language; const char *modifier; const char *territory; const char *codeset; const char *normalized_codeset; const char *special; const char *sponsor; const char *revision; const char *alias_value; int mask; /* LOCALE can consist of up to four recognized parts for the XPG syntax: language[_territory[.codeset]][@modifier] and six parts for the CEN syntax: language[_territory][+audience][+special][,[sponsor][_revision]] Beside the first part all of them are allowed to be missing. If the full specified locale is not found, the less specific one are looked for. The various parts will be stripped off according to the following order: (1) revision (2) sponsor (3) special (4) codeset (5) normalized codeset (6) territory (7) audience/modifier */ /* If we have already tested for this locale entry there has to be one data set in the list of loaded domains. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, 0, locale, NULL, NULL, NULL, NULL, NULL, NULL, NULL, domainname, 0); if (retval != NULL) { /* We know something about this locale. */ int cnt; if (retval->decided == 0) _nl_load_domain (retval); if (retval->data != NULL) return retval; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided == 0) _nl_load_domain (retval->successor[cnt]); if (retval->successor[cnt]->data != NULL) break; } return cnt >= 0 ? retval : NULL; /* NOTREACHED */ } /* See whether the locale value is an alias. If yes its value *overwrites* the alias name. No test for the original value is done. */ alias_value = _nl_expand_alias (locale); if (alias_value != NULL) { #if defined _LIBC || defined HAVE_STRDUP locale = strdup (alias_value); if (locale == NULL) return NULL; #else size_t len = strlen (alias_value) + 1; locale = (char *) malloc (len); if (locale == NULL) return NULL; memcpy (locale, alias_value, len); #endif } /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = _nl_explode_name (locale, &language, &modifier, &territory, &codeset, &normalized_codeset, &special, &sponsor, &revision); /* Create all possible locale entries which might be interested in generalization. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, mask, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, domainname, 1); if (retval == NULL) /* This means we are out of core. */ return NULL; if (retval->decided == 0) _nl_load_domain (retval); if (retval->data == NULL) { int cnt; for (cnt = 0; retval->successor[cnt] != NULL; ++cnt) { if (retval->successor[cnt]->decided == 0) _nl_load_domain (retval->successor[cnt]); if (retval->successor[cnt]->data != NULL) break; } } /* The room for an alias was dynamically allocated. Free it now. */ if (alias_value != NULL) free (locale); return retval; } #ifdef _LIBC static void __attribute__ ((unused)) free_mem (void) { struct loaded_l10nfile *runp = _nl_loaded_domains; while (runp != NULL) { struct loaded_l10nfile *here = runp; if (runp->data != NULL) _nl_unload_domain ((struct loaded_domain *) runp->data); runp = runp->next; free (here); } } text_set_element (__libc_subfreeres, free_mem); #endif gatos-0.0.5/intl/loadmsgcat.c0100644002411700123110000001374506765053731014550 0ustar bayleasr/* Load needed message catalogs. Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #if defined STDC_HEADERS || defined _LIBC # include #endif #if defined HAVE_UNISTD_H || defined _LIBC # include #endif #if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC # include #endif #include "gettext.h" #include "gettextP.h" /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ISO C functions. This is required by the standard because some ISO C functions will require linking with this object file and the name space must not be polluted. */ # define open __open # define close __close # define read __read # define mmap __mmap # define munmap __munmap #endif /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ int _nl_msg_cat_cntr = 0; /* Load the message catalogs specified by FILENAME. If it is no valid message catalog do nothing. */ void internal_function _nl_load_domain (domain_file) struct loaded_l10nfile *domain_file; { int fd; size_t size; struct stat st; struct mo_file_header *data = (struct mo_file_header *) -1; #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || defined _LIBC int use_mmap = 0; #endif struct loaded_domain *domain; domain_file->decided = 1; domain_file->data = NULL; /* If the record does not represent a valid locale the FILENAME might be NULL. This can happen when according to the given specification the locale file name is different for XPG and CEN syntax. */ if (domain_file->filename == NULL) return; /* Try to open the addressed file. */ fd = open (domain_file->filename, O_RDONLY); if (fd == -1) return; /* We must know about the size of the file. */ if (fstat (fd, &st) != 0 || (size = (size_t) st.st_size) != st.st_size || size < sizeof (struct mo_file_header)) { /* Something went wrong. */ close (fd); return; } #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || defined _LIBC /* Now we are ready to load the file. If mmap() is available we try this first. If not available or it failed we try to load it. */ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); if (data != (struct mo_file_header *) -1) { /* mmap() call was successful. */ close (fd); use_mmap = 1; } #endif /* If the data is not yet available (i.e. mmap'ed) we try to load it manually. */ if (data == (struct mo_file_header *) -1) { size_t to_read; char *read_ptr; data = (struct mo_file_header *) malloc (size); if (data == NULL) return; to_read = size; read_ptr = (char *) data; do { long int nb = (long int) read (fd, read_ptr, to_read); if (nb == -1) { close (fd); return; } read_ptr += nb; to_read -= nb; } while (to_read > 0); close (fd); } /* Using the magic number we can test whether it really is a message catalog file. */ if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED) { /* The magic number is wrong: not a message catalog file. */ #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || defined _LIBC if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); return; } domain_file->data = (struct loaded_domain *) malloc (sizeof (struct loaded_domain)); if (domain_file->data == NULL) return; domain = (struct loaded_domain *) domain_file->data; domain->data = (char *) data; #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || defined _LIBC domain->use_mmap = use_mmap; #endif domain->mmap_size = size; domain->must_swap = data->magic != _MAGIC; /* Fill in the information about the available tables. */ switch (W (domain->must_swap, data->revision)) { case 0: domain->nstrings = W (domain->must_swap, data->nstrings); domain->orig_tab = (struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); domain->trans_tab = (struct string_desc *) ((char *) data + W (domain->must_swap, data->trans_tab_offset)); domain->hash_size = W (domain->must_swap, data->hash_tab_size); domain->hash_tab = (nls_uint32 *) ((char *) data + W (domain->must_swap, data->hash_tab_offset)); break; default: /* This is an illegal revision. */ #if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \ || defined _LIBC if (use_mmap) munmap ((caddr_t) data, size); else #endif free (data); free (domain); domain_file->data = NULL; return; } /* Show that one domain is changed. This might make some cached translations invalid. */ ++_nl_msg_cat_cntr; } #ifdef _LIBC void internal_function _nl_unload_domain (domain) struct loaded_domain *domain; { if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); else free ((void *) domain->data); free (domain); } #endif gatos-0.0.5/intl/localealias.c0100644002411700123110000002355406765053731014702 0ustar bayleasr/* Handle aliases for locale names. Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #ifdef __GNUC__ # define alloca __builtin_alloca # define HAVE_ALLOCA 1 #else # if defined HAVE_ALLOCA_H || defined _LIBC # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca char *alloca (); # endif # endif # endif #endif #if defined STDC_HEADERS || defined _LIBC # include #else char *getenv (); # ifdef HAVE_MALLOC_H # include # else void free (); # endif #endif #if defined HAVE_STRING_H || defined _LIBC # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include #else # include # ifndef memcpy # define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif #if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif #endif #include "gettext.h" #include "gettextP.h" /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # define strcasecmp __strcasecmp # define mempcpy __mempcpy # define HAVE_MEMPCPY 1 /* We need locking here since we can be called from different places. */ # include __libc_lock_define_initialized (static, lock); #endif /* For those loosing systems which don't have `alloca' we have to add some additional code emulating it. */ #ifdef HAVE_ALLOCA /* Nothing has to be done. */ # define ADD_BLOCK(list, address) /* nothing */ # define FREE_BLOCKS(list) /* nothing */ #else struct block_list { void *address; struct block_list *next; }; # define ADD_BLOCK(list, addr) \ do { \ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ /* If we cannot get a free block we cannot add the new element to \ the list. */ \ if (newp != NULL) { \ newp->address = (addr); \ newp->next = (list); \ (list) = newp; \ } \ } while (0) # define FREE_BLOCKS(list) \ do { \ while (list != NULL) { \ struct block_list *old = list; \ list = list->next; \ free (old); \ } \ } while (0) # undef alloca # define alloca(size) (malloc (size)) #endif /* have alloca */ struct alias_map { const char *alias; const char *value; }; static char *string_space = NULL; static size_t string_space_act = 0; static size_t string_space_max = 0; static struct alias_map *map; static size_t nmap = 0; static size_t maxmap = 0; /* Prototypes for local functions. */ static size_t read_alias_file PARAMS ((const char *fname, int fname_len)) internal_function; static void extend_alias_table PARAMS ((void)); static int alias_compare PARAMS ((const struct alias_map *map1, const struct alias_map *map2)); const char * _nl_expand_alias (name) const char *name; { static const char *locale_alias_path = LOCALE_ALIAS_PATH; struct alias_map *retval; const char *result = NULL; size_t added; #ifdef _LIBC __libc_lock_lock (lock); #endif do { struct alias_map item; item.alias = name; if (nmap > 0) retval = (struct alias_map *) bsearch (&item, map, nmap, sizeof (struct alias_map), (int (*) PARAMS ((const void *, const void *)) ) alias_compare); else retval = NULL; /* We really found an alias. Return the value. */ if (retval != NULL) { result = retval->value; break; } /* Perhaps we can find another alias file. */ added = 0; while (added == 0 && locale_alias_path[0] != '\0') { const char *start; while (locale_alias_path[0] == ':') ++locale_alias_path; start = locale_alias_path; while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':') ++locale_alias_path; if (start < locale_alias_path) added = read_alias_file (start, locale_alias_path - start); } } while (added != 0); #ifdef _LIBC __libc_lock_unlock (lock); #endif return result; } static size_t internal_function read_alias_file (fname, fname_len) const char *fname; int fname_len; { #ifndef HAVE_ALLOCA struct block_list *block_list = NULL; #endif FILE *fp; char *full_fname; size_t added; static const char aliasfile[] = "/locale.alias"; full_fname = (char *) alloca (fname_len + sizeof aliasfile); ADD_BLOCK (block_list, full_fname); #ifdef HAVE_MEMPCPY mempcpy (mempcpy (full_fname, fname, fname_len), aliasfile, sizeof aliasfile); #else memcpy (full_fname, fname, fname_len); memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); #endif fp = fopen (full_fname, "r"); if (fp == NULL) { FREE_BLOCKS (block_list); return 0; } added = 0; while (!feof (fp)) { /* It is a reasonable approach to use a fix buffer here because a) we are only interested in the first two fields b) these fields must be usable as file names and so must not be that long */ unsigned char buf[BUFSIZ]; unsigned char *alias; unsigned char *value; unsigned char *cp; if (fgets (buf, sizeof buf, fp) == NULL) /* EOF reached. */ break; /* Possibly not the whole line fits into the buffer. Ignore the rest of the line. */ if (strchr (buf, '\n') == NULL) { char altbuf[BUFSIZ]; do if (fgets (altbuf, sizeof altbuf, fp) == NULL) /* Make sure the inner loop will be left. The outer loop will exit at the `feof' test. */ break; while (strchr (altbuf, '\n') == NULL); } cp = buf; /* Ignore leading white space. */ while (isspace (cp[0])) ++cp; /* A leading '#' signals a comment line. */ if (cp[0] != '\0' && cp[0] != '#') { alias = cp++; while (cp[0] != '\0' && !isspace (cp[0])) ++cp; /* Terminate alias name. */ if (cp[0] != '\0') *cp++ = '\0'; /* Now look for the beginning of the value. */ while (isspace (cp[0])) ++cp; if (cp[0] != '\0') { size_t alias_len; size_t value_len; value = cp++; while (cp[0] != '\0' && !isspace (cp[0])) ++cp; /* Terminate value. */ if (cp[0] == '\n') { /* This has to be done to make the following test for the end of line possible. We are looking for the terminating '\n' which do not overwrite here. */ *cp++ = '\0'; *cp = '\n'; } else if (cp[0] != '\0') *cp++ = '\0'; if (nmap >= maxmap) extend_alias_table (); alias_len = strlen (alias) + 1; value_len = strlen (value) + 1; if (string_space_act + alias_len + value_len > string_space_max) { /* Increase size of memory pool. */ size_t new_size = (string_space_max + (alias_len + value_len > 1024 ? alias_len + value_len : 1024)); char *new_pool = (char *) realloc (string_space, new_size); if (new_pool == NULL) { FREE_BLOCKS (block_list); return added; } string_space = new_pool; string_space_max = new_size; } map[nmap].alias = memcpy (&string_space[string_space_act], alias, alias_len); string_space_act += alias_len; map[nmap].value = memcpy (&string_space[string_space_act], value, value_len); string_space_act += value_len; ++nmap; ++added; } } } /* Should we test for ferror()? I think we have to silently ignore errors. --drepper */ fclose (fp); if (added > 0) qsort (map, nmap, sizeof (struct alias_map), (int (*) PARAMS ((const void *, const void *))) alias_compare); FREE_BLOCKS (block_list); return added; } static void extend_alias_table () { size_t new_size; struct alias_map *new_map; new_size = maxmap == 0 ? 100 : 2 * maxmap; new_map = (struct alias_map *) realloc (map, (new_size * sizeof (struct alias_map))); if (new_map == NULL) /* Simply don't extend: we don't have any more core. */ return; map = new_map; maxmap = new_size; } #ifdef _LIBC static void __attribute__ ((unused)) free_mem (void) { if (string_space != NULL) free (string_space); if (map != NULL) free (map); } text_set_element (__libc_subfreeres, free_mem); #endif static int alias_compare (map1, map2) const struct alias_map *map1; const struct alias_map *map2; { #if defined _LIBC || defined HAVE_STRCASECMP return strcasecmp (map1->alias, map2->alias); #else const unsigned char *p1 = (const unsigned char *) map1->alias; const unsigned char *p2 = (const unsigned char *) map2->alias; unsigned char c1, c2; if (p1 == p2) return 0; do { /* I know this seems to be odd but the tolower() function in some systems libc cannot handle nonalpha characters. */ c1 = isupper (*p1) ? tolower (*p1) : *p1; c2 = isupper (*p2) ? tolower (*p2) : *p2; if (c1 == '\0') break; ++p1; ++p2; } while (c1 == c2); return c1 - c2; #endif } gatos-0.0.5/intl/textdomain.c0100644002411700123110000000630106765053731014574 0ustar bayleasr/* Implementation of the textdomain(3) function. Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #if defined STDC_HEADERS || defined _LIBC # include #endif #if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC # include #else # include # ifndef memcpy # define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif #ifdef _LIBC # include #else # include "libgettext.h" #endif /* @@ end of prolog @@ */ /* Name of the default text domain. */ extern const char _nl_default_default_domain[]; /* Default text domain in which entries for gettext(3) are to be found. */ extern const char *_nl_current_default_domain; /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ prefix. So we have to make a difference here. */ #ifdef _LIBC # define TEXTDOMAIN __textdomain # ifndef strdup # define strdup(str) __strdup (str) # endif #else # define TEXTDOMAIN textdomain__ #endif /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ char * TEXTDOMAIN (domainname) const char *domainname; { char *old; /* A NULL pointer requests the current setting. */ if (domainname == NULL) return (char *) _nl_current_default_domain; old = (char *) _nl_current_default_domain; /* If domain name is the null string set to default domain "messages". */ if (domainname[0] == '\0' || strcmp (domainname, _nl_default_default_domain) == 0) _nl_current_default_domain = _nl_default_default_domain; else { /* If the following malloc fails `_nl_current_default_domain' will be NULL. This value will be returned and so signals we are out of core. */ #if defined _LIBC || defined HAVE_STRDUP _nl_current_default_domain = strdup (domainname); #else size_t len = strlen (domainname) + 1; char *cp = (char *) malloc (len); if (cp != NULL) memcpy (cp, domainname, len); _nl_current_default_domain = cp; #endif } if (old != _nl_default_default_domain) free (old); return (char *) _nl_current_default_domain; } #ifdef _LIBC /* Alias for function name in GNU C Library. */ weak_alias (__textdomain, textdomain); #endif gatos-0.0.5/intl/l10nflist.c0100644002411700123110000002424406765053731014242 0ustar bayleasr/* Handle list of needed message catalogs Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #if defined HAVE_STRING_H || defined _LIBC # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif # include #else # include # ifndef memcpy # define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif #if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif #endif #if defined _LIBC || defined HAVE_ARGZ_H # include #endif #include #include #if defined STDC_HEADERS || defined _LIBC # include #endif #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ #ifdef _LIBC /* Rename the non ANSI C functions. This is required by the standard because some ANSI C functions will require linking with this object file and the name space must not be polluted. */ # ifndef stpcpy # define stpcpy(dest, src) __stpcpy(dest, src) # endif #else # ifndef HAVE_STPCPY static char *stpcpy PARAMS ((char *dest, const char *src)); # endif #endif /* Define function which are usually not available. */ #if !defined _LIBC && !defined HAVE___ARGZ_COUNT /* Returns the number of strings in ARGZ. */ static size_t argz_count__ PARAMS ((const char *argz, size_t len)); static size_t argz_count__ (argz, len) const char *argz; size_t len; { size_t count = 0; while (len > 0) { size_t part_len = strlen (argz); argz += part_len + 1; len -= part_len + 1; count++; } return count; } # undef __argz_count # define __argz_count(argz, len) argz_count__ (argz, len) #endif /* !_LIBC && !HAVE___ARGZ_COUNT */ #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's except the last into the character SEP. */ static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep)); static void argz_stringify__ (argz, len, sep) char *argz; size_t len; int sep; { while (len > 0) { size_t part_len = strlen (argz); argz += part_len; len -= part_len + 1; if (len > 0) *argz++ = sep; } } # undef __argz_stringify # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep) #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */ #if !defined _LIBC && !defined HAVE___ARGZ_NEXT static char *argz_next__ PARAMS ((char *argz, size_t argz_len, const char *entry)); static char * argz_next__ (argz, argz_len, entry) char *argz; size_t argz_len; const char *entry; { if (entry) { if (entry < argz + argz_len) entry = strchr (entry, '\0') + 1; return entry >= argz + argz_len ? NULL : (char *) entry; } else if (argz_len > 0) return argz; else return 0; } # undef __argz_next # define __argz_next(argz, len, entry) argz_next__ (argz, len, entry) #endif /* !_LIBC && !HAVE___ARGZ_NEXT */ /* Return number of bits set in X. */ static int pop PARAMS ((int x)); static inline int pop (x) int x; { /* We assume that no more than 16 bits are used. */ x = ((x & ~0x5555) >> 1) + (x & 0x5555); x = ((x & ~0x3333) >> 2) + (x & 0x3333); x = ((x >> 4) + x) & 0x0f0f; x = ((x >> 8) + x) & 0xff; return x; } struct loaded_l10nfile * _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, do_allocate) struct loaded_l10nfile **l10nfile_list; const char *dirlist; size_t dirlist_len; int mask; const char *language; const char *territory; const char *codeset; const char *normalized_codeset; const char *modifier; const char *special; const char *sponsor; const char *revision; const char *filename; int do_allocate; { char *abs_filename; struct loaded_l10nfile *last = NULL; struct loaded_l10nfile *retval; char *cp; size_t entries; int cnt; /* Allocate room for the full file name. */ abs_filename = (char *) malloc (dirlist_len + strlen (language) + ((mask & TERRITORY) != 0 ? strlen (territory) + 1 : 0) + ((mask & XPG_CODESET) != 0 ? strlen (codeset) + 1 : 0) + ((mask & XPG_NORM_CODESET) != 0 ? strlen (normalized_codeset) + 1 : 0) + (((mask & XPG_MODIFIER) != 0 || (mask & CEN_AUDIENCE) != 0) ? strlen (modifier) + 1 : 0) + ((mask & CEN_SPECIAL) != 0 ? strlen (special) + 1 : 0) + (((mask & CEN_SPONSOR) != 0 || (mask & CEN_REVISION) != 0) ? (1 + ((mask & CEN_SPONSOR) != 0 ? strlen (sponsor) + 1 : 0) + ((mask & CEN_REVISION) != 0 ? strlen (revision) + 1 : 0)) : 0) + 1 + strlen (filename) + 1); if (abs_filename == NULL) return NULL; retval = NULL; last = NULL; /* Construct file name. */ memcpy (abs_filename, dirlist, dirlist_len); __argz_stringify (abs_filename, dirlist_len, ':'); cp = abs_filename + (dirlist_len - 1); *cp++ = '/'; cp = stpcpy (cp, language); if ((mask & TERRITORY) != 0) { *cp++ = '_'; cp = stpcpy (cp, territory); } if ((mask & XPG_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, codeset); } if ((mask & XPG_NORM_CODESET) != 0) { *cp++ = '.'; cp = stpcpy (cp, normalized_codeset); } if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0) { /* This component can be part of both syntaces but has different leading characters. For CEN we use `+', else `@'. */ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@'; cp = stpcpy (cp, modifier); } if ((mask & CEN_SPECIAL) != 0) { *cp++ = '+'; cp = stpcpy (cp, special); } if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) { *cp++ = ','; if ((mask & CEN_SPONSOR) != 0) cp = stpcpy (cp, sponsor); if ((mask & CEN_REVISION) != 0) { *cp++ = '_'; cp = stpcpy (cp, revision); } } *cp++ = '/'; stpcpy (cp, filename); /* Look in list of already loaded domains whether it is already available. */ last = NULL; for (retval = *l10nfile_list; retval != NULL; retval = retval->next) if (retval->filename != NULL) { int compare = strcmp (retval->filename, abs_filename); if (compare == 0) /* We found it! */ break; if (compare < 0) { /* It's not in the list. */ retval = NULL; break; } last = retval; } if (retval != NULL || do_allocate == 0) { free (abs_filename); return retval; } retval = (struct loaded_l10nfile *) malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) * (1 << pop (mask)) * sizeof (struct loaded_l10nfile *))); if (retval == NULL) return NULL; retval->filename = abs_filename; retval->decided = (__argz_count (dirlist, dirlist_len) != 1 || ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0)); retval->data = NULL; if (last == NULL) { retval->next = *l10nfile_list; *l10nfile_list = retval; } else { retval->next = last->next; last->next = retval; } entries = 0; /* If the DIRLIST is a real list the RETVAL entry corresponds not to a real file. So we have to use the DIRLIST separation mechanism of the inner loop. */ cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; for (; cnt >= 0; --cnt) if ((cnt & ~mask) == 0 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) { /* Iterate over all elements of the DIRLIST. */ char *dir = NULL; while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) != NULL) retval->successor[entries++] = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, 1); } retval->successor[entries] = NULL; return retval; } /* Normalize codeset name. There is no standard for the codeset names. Normalization allows the user to use any of the common names. */ const char * _nl_normalize_codeset (codeset, name_len) const unsigned char *codeset; size_t name_len; { int len = 0; int only_digit = 1; char *retval; char *wp; size_t cnt; for (cnt = 0; cnt < name_len; ++cnt) if (isalnum (codeset[cnt])) { ++len; if (isalpha (codeset[cnt])) only_digit = 0; } retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1); if (retval != NULL) { if (only_digit) wp = stpcpy (retval, "iso"); else wp = retval; for (cnt = 0; cnt < name_len; ++cnt) if (isalpha (codeset[cnt])) *wp++ = tolower (codeset[cnt]); else if (isdigit (codeset[cnt])) *wp++ = codeset[cnt]; *wp = '\0'; } return (const char *) retval; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (dest, src) char *dest; const char *src; { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif gatos-0.0.5/intl/explodename.c0100644002411700123110000001101006765053731014712 0ustar bayleasr/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #if defined STDC_HEADERS || defined _LIBC # include #endif #if defined HAVE_STRING_H || defined _LIBC # include #else # include #endif #include #include "loadinfo.h" /* On some strange systems still no definition of NULL is found. Sigh! */ #ifndef NULL # if defined __STDC__ && __STDC__ # define NULL ((void *) 0) # else # define NULL 0 # endif #endif /* @@ end of prolog @@ */ int _nl_explode_name (name, language, modifier, territory, codeset, normalized_codeset, special, sponsor, revision) char *name; const char **language; const char **modifier; const char **territory; const char **codeset; const char **normalized_codeset; const char **special; const char **sponsor; const char **revision; { enum { undecided, xpg, cen } syntax; char *cp; int mask; *modifier = NULL; *territory = NULL; *codeset = NULL; *normalized_codeset = NULL; *special = NULL; *sponsor = NULL; *revision = NULL; /* Now we determine the single parts of the locale name. First look for the language. Termination symbols are `_' and `@' if we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */ mask = 0; syntax = undecided; *language = cp = name; while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@' && cp[0] != '+' && cp[0] != ',') ++cp; if (*language == cp) /* This does not make sense: language has to be specified. Use this entry as it is without exploding. Perhaps it is an alias. */ cp = strchr (*language, '\0'); else if (cp[0] == '_') { /* Next is the territory. */ cp[0] = '\0'; *territory = ++cp; while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@' && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= TERRITORY; if (cp[0] == '.') { /* Next is the codeset. */ syntax = xpg; cp[0] = '\0'; *codeset = ++cp; while (cp[0] != '\0' && cp[0] != '@') ++cp; mask |= XPG_CODESET; if (*codeset != cp && (*codeset)[0] != '\0') { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; } } } if (cp[0] == '@' || (syntax != xpg && cp[0] == '+')) { /* Next is the modifier. */ syntax = cp[0] == '@' ? xpg : cen; cp[0] = '\0'; *modifier = ++cp; while (syntax == cen && cp[0] != '\0' && cp[0] != '+' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= XPG_MODIFIER | CEN_AUDIENCE; } if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_')) { syntax = cen; if (cp[0] == '+') { /* Next is special application (CEN syntax). */ cp[0] = '\0'; *special = ++cp; while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_') ++cp; mask |= CEN_SPECIAL; } if (cp[0] == ',') { /* Next is sponsor (CEN syntax). */ cp[0] = '\0'; *sponsor = ++cp; while (cp[0] != '\0' && cp[0] != '_') ++cp; mask |= CEN_SPONSOR; } if (cp[0] == '_') { /* Next is revision (CEN syntax). */ cp[0] = '\0'; *revision = ++cp; mask |= CEN_REVISION; } } /* For CEN syntax values it might be important to have the separator character in the file name, not for XPG syntax. */ if (syntax == xpg) { if (*territory != NULL && (*territory)[0] == '\0') mask &= ~TERRITORY; if (*codeset != NULL && (*codeset)[0] == '\0') mask &= ~XPG_CODESET; if (*modifier != NULL && (*modifier)[0] == '\0') mask &= ~XPG_MODIFIER; } return mask; } gatos-0.0.5/intl/intl-compat.c0100644002411700123110000000315606765053731014654 0ustar bayleasr/* intl-compat.c - Stub functions to call gettext functions from GNU gettext Library. Copyright (C) 1995 Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include "libgettext.h" /* @@ end of prolog @@ */ #undef gettext #undef dgettext #undef dcgettext #undef textdomain #undef bindtextdomain char * bindtextdomain (domainname, dirname) const char *domainname; const char *dirname; { return bindtextdomain__ (domainname, dirname); } char * dcgettext (domainname, msgid, category) const char *domainname; const char *msgid; int category; { return dcgettext__ (domainname, msgid, category); } char * dgettext (domainname, msgid) const char *domainname; const char *msgid; { return dgettext__ (domainname, msgid); } char * gettext (msgid) const char *msgid; { return gettext__ (msgid); } char * textdomain (domainname) const char *domainname; { return textdomain__ (domainname); } gatos-0.0.5/intl/cat-compat.c0100644002411700123110000001474106765053731014457 0ustar bayleasr/* Compatibility code for gettext-using-catgets interface. Copyright (C) 1995, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif #include #ifdef STDC_HEADERS # include # include #else char *getenv (); # ifdef HAVE_MALLOC_H # include # endif #endif #ifdef HAVE_NL_TYPES_H # include #endif #include "libgettext.h" /* @@ end of prolog @@ */ /* XPG3 defines the result of `setlocale (category, NULL)' as: ``Directs `setlocale()' to query `category' and return the current setting of `local'.'' However it does not specify the exact format. And even worse: POSIX defines this not at all. So we can use this feature only on selected system (e.g. those using GNU C Library). */ #ifdef _LIBC # define HAVE_LOCALE_NULL #endif /* The catalog descriptor. */ static nl_catd catalog = (nl_catd) -1; /* Name of the default catalog. */ static const char default_catalog_name[] = "messages"; /* Name of currently used catalog. */ static const char *catalog_name = default_catalog_name; /* Get ID for given string. If not found return -1. */ static int msg_to_cat_id PARAMS ((const char *msg)); /* Substitution for systems lacking this function in their C library. */ #if !_LIBC && !HAVE_STPCPY static char *stpcpy PARAMS ((char *dest, const char *src)); #endif /* Set currently used domain/catalog. */ char * textdomain (domainname) const char *domainname; { nl_catd new_catalog; char *new_name; size_t new_name_len; char *lang; #if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ && defined HAVE_LOCALE_NULL lang = setlocale (LC_MESSAGES, NULL); #else lang = getenv ("LC_ALL"); if (lang == NULL || lang[0] == '\0') { lang = getenv ("LC_MESSAGES"); if (lang == NULL || lang[0] == '\0') lang = getenv ("LANG"); } #endif if (lang == NULL || lang[0] == '\0') lang = "C"; /* See whether name of currently used domain is asked. */ if (domainname == NULL) return (char *) catalog_name; if (domainname[0] == '\0') domainname = default_catalog_name; /* Compute length of added path element. */ new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang) + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1 + sizeof (".cat"); new_name = (char *) malloc (new_name_len); if (new_name == NULL) return NULL; strcpy (new_name, PACKAGE); new_catalog = catopen (new_name, 0); if (new_catalog == (nl_catd) -1) { /* NLSPATH search didn't work, try absolute path */ sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang, PACKAGE); new_catalog = catopen (new_name, 0); if (new_catalog == (nl_catd) -1) { free (new_name); return (char *) catalog_name; } } /* Close old catalog. */ if (catalog != (nl_catd) -1) catclose (catalog); if (catalog_name != default_catalog_name) free ((char *) catalog_name); catalog = new_catalog; catalog_name = new_name; return (char *) catalog_name; } char * bindtextdomain (domainname, dirname) const char *domainname; const char *dirname; { #if HAVE_SETENV || HAVE_PUTENV char *old_val, *new_val, *cp; size_t new_val_len; /* This does not make much sense here but to be compatible do it. */ if (domainname == NULL) return NULL; /* Compute length of added path element. If we use setenv we don't need the first byts for NLSPATH=, but why complicate the code for this peanuts. */ new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname) + sizeof ("/%L/LC_MESSAGES/%N.cat"); old_val = getenv ("NLSPATH"); if (old_val == NULL || old_val[0] == '\0') { old_val = NULL; new_val_len += 1 + sizeof (LOCALEDIR) - 1 + sizeof ("/%L/LC_MESSAGES/%N.cat"); } else new_val_len += strlen (old_val); new_val = (char *) malloc (new_val_len); if (new_val == NULL) return NULL; # if HAVE_SETENV cp = new_val; # else cp = stpcpy (new_val, "NLSPATH="); # endif cp = stpcpy (cp, dirname); cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:"); if (old_val == NULL) { # if __STDC__ stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat"); # else cp = stpcpy (cp, LOCALEDIR); stpcpy (cp, "/%L/LC_MESSAGES/%N.cat"); # endif } else stpcpy (cp, old_val); # if HAVE_SETENV setenv ("NLSPATH", new_val, 1); free (new_val); # else putenv (new_val); /* Do *not* free the environment entry we just entered. It is used from now on. */ # endif #endif return (char *) domainname; } #undef gettext char * gettext (msg) const char *msg; { int msgid; if (msg == NULL || catalog == (nl_catd) -1) return (char *) msg; /* Get the message from the catalog. We always use set number 1. The message ID is computed by the function `msg_to_cat_id' which works on the table generated by `po-to-tbl'. */ msgid = msg_to_cat_id (msg); if (msgid == -1) return (char *) msg; return catgets (catalog, 1, msgid, (char *) msg); } /* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries for the one equal to msg. If it is found return the ID. In case when the string is not found return -1. */ static int msg_to_cat_id (msg) const char *msg; { int cnt; for (cnt = 0; cnt < _msg_tbl_length; ++cnt) if (strcmp (msg, _msg_tbl[cnt]._msg) == 0) return _msg_tbl[cnt]._msg_number; return -1; } /* @@ begin of epilog @@ */ /* We don't want libintl.a to depend on any other library. So we avoid the non-standard function stpcpy. In GNU C Library this function is available, though. Also allow the symbol HAVE_STPCPY to be defined. */ #if !_LIBC && !HAVE_STPCPY static char * stpcpy (dest, src) char *dest; const char *src; { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } #endif gatos-0.0.5/intl/VERSION0100644002411700123110000000005106765053731013320 0ustar bayleasrGNU gettext library from gettext-0.10.35 gatos-0.0.5/m4/0042755002411700123110000000000007030251711011613 5ustar bayleasrgatos-0.0.5/m4/Makefile.in0100644002411700123110000001336007030251711013656 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ EXTRA_DIST = README curses.m4 gatos.m4 gettext.m4 libtool.m4 MACROS_FILES = curses.m4 gatos.m4 gettext.m4 libtool.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps m4/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = m4 distdir: $(DISTFILES) @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-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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: 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 mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/m4/README0100644002411700123110000000036006765053732012506 0ustar bayleasrThese files are used by a program called aclocal (part of the GNU automake package). aclocal uses these files to create aclocal.m4 which is in turn used by autoconf to create the configure script at the the top level in this distribution. gatos-0.0.5/m4/Makefile.am0100644002411700123110000000104007011544303013636 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## EXTRA_DIST = README curses.m4 gatos.m4 gettext.m4 libtool.m4 MACROS_FILES = \ curses.m4 \ gatos.m4 \ gettext.m4 \ libtool.m4 ## ## ## mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/m4/curses.m40100644002411700123110000002132606765053731013400 0ustar bayleasrdnl Curses detection: Munged from Midnight Commander's configure.in dnl dnl What it does: dnl ============= dnl dnl - Determine which version of curses is installed on your system dnl and set the -I/-L/-l compiler entries and add a few preprocessor dnl symbols dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that dnl @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in dnl Makefile.in's dnl - Modify the following configure variables (these are the only dnl curses.m4 variables you can access from within configure.in) dnl CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if dnl an ncurses.h that's been renamed to curses.h dnl is found. dnl CURSES_LIBS - sets -L and -l's appropriately dnl CFLAGS - if --with-sco, add -D_SVID3 dnl has_curses - exports result of tests to rest of configure dnl dnl Usage: dnl ====== dnl 1) Add lines indicated below to acconfig.h dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in dnl 3) Instead of #include you should use the following to dnl properly locate ncurses or curses header file dnl dnl #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) dnl #include dnl #else dnl #include dnl #endif dnl dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS dnl dnl Notes with automake: dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from dnl configure.in dnl - your Makefile.am can look something like this dnl ----------------------------------------------- dnl INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) dnl if HAS_CURSES dnl CURSES_TARGETS=name_of_curses_prog dnl endif dnl bin_PROGRAMS = other_programs $(CURSES_TARGETS) dnl other_programs_SOURCES = blah blah blah dnl name_of_curses_prog_SOURCES = blah blah blah dnl other_programs_LDADD = blah dnl name_of_curses_prog_LDADD = blah $(CURSES_LIBS) dnl ----------------------------------------------- dnl dnl dnl The following lines should be added to acconfig.h: dnl ================================================== dnl dnl /*=== Curses version detection defines ===*/ dnl /* Found some version of curses that we're going to use */ dnl #undef HAS_CURSES dnl dnl /* Use SunOS SysV curses? */ dnl #undef USE_SUNOS_CURSES dnl dnl /* Use old BSD curses - not used right now */ dnl #undef USE_BSD_CURSES dnl dnl /* Use SystemV curses? */ dnl #undef USE_SYSV_CURSES dnl dnl /* Use Ncurses? */ dnl #undef USE_NCURSES dnl dnl /* If you Curses does not have color define this one */ dnl #undef NO_COLOR_CURSES dnl dnl /* Define if you want to turn on SCO-specific code */ dnl #undef SCO_FLAVOR dnl dnl /* Set to reflect version of ncurses * dnl * 0 = version 1.* dnl * 1 = version 1.9.9g dnl * 2 = version 4.0/4.1 */ dnl #undef NCURSES_970530 dnl dnl /*=== End new stuff for acconfig.h ===*/ dnl AC_DEFUN(AC_CHECK_CURSES,[ search_ncurses=true screen_manager="" has_curses=false CFLAGS=${CFLAGS--O} AC_SUBST(CURSES_LIBS) AC_SUBST(CURSES_INCLUDEDIR) AC_ARG_WITH(sco, [ --with-sco Use this to turn on SCO-specific code],[ if test x$withval = xyes; then AC_DEFINE(SCO_FLAVOR) CFLAGS="$CFLAGS -D_SVID3" fi ]) AC_ARG_WITH(sunos-curses, [ --with-sunos-curses Used to force SunOS 4.x curses],[ if test x$withval = xyes; then AC_USE_SUNOS_CURSES fi ]) AC_ARG_WITH(osf1-curses, [ --with-osf1-curses Used to force OSF/1 curses],[ if test x$withval = xyes; then AC_USE_OSF1_CURSES fi ]) AC_ARG_WITH(vcurses, [ --with-vcurses[=incdir] Used to force SysV curses], if test x$withval != xyes; then CURSES_INCLUDEDIR="-I$withval" fi AC_USE_SYSV_CURSES ) AC_ARG_WITH(ncurses, [ --with-ncurses[=dir] Compile with ncurses/locate base dir], if test x$withval = xno ; then search_ncurses=false elif test x$withval != xyes ; then CURSES_LIBS="$LIBS -L$withval/lib -lncurses" CURSES_INCLUDEDIR="-I$withval/include" search_ncurses=false screen_manager="ncurses" AC_DEFINE(USE_NCURSES) AC_DEFINE(HAS_CURSES) has_curses=true fi ) if $search_ncurses then AC_SEARCH_NCURSES() fi ]) AC_DEFUN(AC_USE_SUNOS_CURSES, [ search_ncurses=false screen_manager="SunOS 4.x /usr/5include curses" AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) AC_DEFINE(USE_SUNOS_CURSES) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_INCLUDEDIR="-I/usr/5include" CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a" AC_MSG_RESULT(Please note that some screen refreshs may fail) ]) AC_DEFUN(AC_USE_OSF1_CURSES, [ AC_MSG_RESULT(Using OSF1 curses) search_ncurses=false screen_manager="OSF1 curses" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(NO_COLOR_CURSES) AC_DEFINE(USE_SYSV_CURSES) CURSES_LIBS="-lcurses" ]) AC_DEFUN(AC_USE_SYSV_CURSES, [ AC_MSG_RESULT(Using SysV curses) AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_SYSV_CURSES) search_ncurses=false screen_manager="SysV/curses" CURSES_LIBS="-lcurses" ]) dnl AC_ARG_WITH(bsd-curses, dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy], dnl search_ncurses=false dnl screen_manager="Ultrix/cursesX" dnl if test $system = ULTRIX dnl then dnl THIS_CURSES=cursesX dnl else dnl THIS_CURSES=curses dnl fi dnl dnl CURSES_LIBS="-l$THIS_CURSES -ltermcap" dnl AC_DEFINE(HAS_CURSES) dnl has_curses=true dnl AC_DEFINE(USE_BSD_CURSES) dnl AC_MSG_RESULT(Please note that some screen refreshs may fail) dnl AC_WARN(Use of the bsdcurses extension has some) dnl AC_WARN(display/input problems.) dnl AC_WARN(Reconsider using xcurses) dnl) dnl dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename dnl AC_DEFUN(AC_NCURSES, [ if $search_ncurses then if test -f $1/$2 then AC_MSG_RESULT(Found ncurses on $1/$2) CURSES_LIBS="$3" CURSES_INCLUDEDIR="$4" search_ncurses=false screen_manager=$5 AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) fi fi ]) AC_DEFUN(AC_SEARCH_NCURSES, [ AC_CHECKING("location of ncurses.h file") AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include") AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local") AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") dnl dnl We couldn't find ncurses, try SysV curses dnl if $search_ncurses then AC_EGREP_HEADER(init_color, /usr/include/curses.h, AC_USE_SYSV_CURSES) AC_EGREP_CPP(USE_NCURSES,[ #include #ifdef __NCURSES_H #undef USE_NCURSES USE_NCURSES #endif ],[ CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES" AC_DEFINE(HAS_CURSES) has_curses=true AC_DEFINE(USE_NCURSES) search_ncurses=false screen_manager="ncurses installed as curses" ]) fi dnl dnl Try SunOS 4.x /usr/5{lib,include} ncurses dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES dnl should be replaced by a more fine grained selection routine dnl if $search_ncurses then if test -f /usr/5include/curses.h then AC_USE_SUNOS_CURSES fi else # check for ncurses version, to properly ifdef mouse-fix AC_MSG_CHECKING(for ncurses version) ncurses_version=unknown cat > conftest.$ac_ext < #else #include #endif #undef VERSION VERSION:NCURSES_VERSION EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | egrep "VERSION:" >conftest.out 2>&1; then changequote(,)dnl ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'` changequote([,])dnl fi rm -rf conftest* AC_MSG_RESULT($ncurses_version) case "$ncurses_version" in changequote(,)dnl 4.[01]) changequote([,])dnl AC_DEFINE(NCURSES_970530,2) ;; 1.9.9g) AC_DEFINE(NCURSES_970530,1) ;; 1*) AC_DEFINE(NCURSES_970530,0) ;; esac fi ]) gatos-0.0.5/m4/gatos.m40100644002411700123110000002340307020525141013167 0ustar bayleasr############################################################ ## gatos.m4 ### 0.2 ### 26 Aug 1999 ### ############################################################ ## usage: ## IBTK_CHECK: enable/disable checking ibtk header files/lib. ## check by default. ## AC_TRY_CPP_MOD: modified version of autoconf part ## (needed by AC_CHECK_HEADER_MOD) ## AC_CHECK_HEADER_MOD: modified version of autoconf part ## needed by FreeBSD. ## AM_INCLUDES_IBTK: check IBTK header files (platform dependent). ## AM_LIB_IBTK: check IBTK library. ## GATOS_DGA_VMODE: check header files and lib of ## libXxf86dga and libXxf86vmode ## GATOS_HASH_CHARS: check enabling of hashing chars feature ## GATOS_RAW_CC_EDS: check enabling of raw cc and raw eds feature ## GATOS_I2C_DELAY: check for i2c timer source ## GATOS_SOUND_OSSEMU: check enabling of oss sound emulation ## under NetBSD ## GATOS_SHM: enable/disable IPC shared memory. ## GATOS_IPC: enable/disable IPC messages. ############################################################ AC_DEFUN(IBTK_CHECK,[ AC_ARG_ENABLE(ibtk-ckeck, [GATOS Features: --enable-ibtk-check Enable IBTK header files/lib checking (default)],,) if test "$enable_ibtk_check" = "yes"; then ibtk_check=yes elif test "$enable_ibtk_check" = "no"; then ibtk_check=no else ibtk_check=yes fi ]) dnl ################################################ AC_DEFUN(AC_TRY_CPP_MOD, [AC_REQUIRE_CPP()dnl cat > conftest.$ac_ext <&AC_FD_CC echo "configure: failed program was:" >&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$3], , , [ rm -rf conftest* $3 ])dnl fi rm -f conftest*]) dnl ################################################ AC_DEFUN(AC_CHECK_HEADER_MOD, [dnl Do the transliteration at runtime so arg 1 can be a shell variable. ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_header_$ac_safe, [AC_TRY_CPP_MOD([#include <$1>], eval "ac_cv_header_$ac_safe=yes", eval "ac_cv_header_$ac_safe=no")])dnl if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) ifelse([$3], , , [$3 ])dnl fi ]) dnl ################################################ AC_DEFUN(AM_INCLUDES_IBTK,[ IBTK_HEADER_FILES="ibox.h ibutton.h idialogs.h idodad.h igbox.h \ iintbox.h ilistbox.h irealbox.h isbutton.h islider.h \ istatbar.h itextbox.h iwindow.h pclaim.h version.h" case "$ArchRunning" in x86Linux) hdir="ibtk" ;; x86FreeBSD) hdir="/usr/local/include/ibtk" ;; x86NetBSD) hdir="/usr/local/include/ibtk" ;; *) AC_MSG_ERROR(Unknown Arch) ;; esac for ibtkh in $IBTK_HEADER_FILES; do AC_CHECK_HEADER_MOD($hdir/$ibtkh, have_ibtk_headers=yes, \ AC_MSG_ERROR(some IBTK headers missing... please check.)) done ]) dnl ################################################ AC_DEFUN(AM_LIB_IBTK,[ AC_CHECK_LIB(ibtk, main, have_ibtk_lib=yes, AC_MSG_ERROR(libibtk not present. Xatitv will cannot compile.), -L$x_libraries -L/usr/lib -L/usr/local/lib) ]) dnl ################################################ AC_DEFUN(GATOS_DGA_VMODE,[ XEXTLIBS="" XEXTFLAGS="" AC_MSG_CHECKING(using DGA and VMODE extensions support) AC_ARG_WITH(dga-vmode, [ --with-dga-vmode Use DGA and VMODE extensions support (default)], [case "$withval" in no) AC_MSG_RESULT(no) dga_vmode=no ;; *) AC_MSG_RESULT(yes) dga_vmode=yes ;; esac],[ dga_vmode=yes AC_MSG_RESULT(yes) ]) dnl forced to no, set to yes if everything going all right use_dga_vmode=no if test "$dga_vmode" = "yes"; then AC_CHECK_HEADER_MOD(X11/extensions/xf86dga.h, have_dga_header=yes, have_dga_header=no) AC_CHECK_HEADER_MOD(X11/extensions/xf86vmode.h, have_vmode_header=yes, have_vmode_header=no) AC_CHECK_LIB(Xxf86dga, main, [have_dga_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86dga"; XEXTFLAGS="$XEXTFLAGS -DUSE_DGA"], have_dga_lib=no, -L$x_libraries) AC_CHECK_LIB(Xxf86vm, main, [have_vmode_lib=yes; XEXTLIBS="$XEXTLIBS -lXxf86vm"; XEXTFLAGS="$XEXTFLAGS -DUSE_VMODE"], have_vmode_lib=no, -L$x_libraries) if test "$have_dga_header" = "yes"; then if test "$have_dga_lib" = "yes" ; then if test "$have_vmode_header" = "yes" ; then if test "$have_vmode_lib" = "yes" ; then use_dga_vmode=yes XEXTLIBS="$XEXTLIBS -lXext" fi fi fi fi fi AC_SUBST(XEXTLIBS) AC_SUBST(XEXTFLAGS) ]) dnl ################################################ AC_DEFUN(GATOS_HASH_CHARS,[ HASH_CHARS="" AC_MSG_CHECKING(enable CHAR HASHING) AC_ARG_ENABLE(hash-chars, [ --enable-hash-chars Enable char hashing (default) consumes more memory in favor of speed], [case "$enableval" in yes) hash_chars=yes AC_MSG_RESULT(yes) ;; no) hash_chars=no AC_MSG_RESULT(no) ;; *) AC_MSG_ERROR(bad value ${enableval} for hash-chars option) ;; esac],[ AC_MSG_RESULT(yes) hash_chars=yes]) if test "$hash_chars" = "yes"; then HASH_CHARS="-DHASH_CHARS" fi AC_SUBST(HASH_CHARS) ]) dnl ################################################ AC_DEFUN(GATOS_RAW_CC_EDS,[ RAW_OUTPUT="" AC_MSG_CHECKING(output RAW CC) AC_ARG_ENABLE(raw-cc, [ --enable-raw-cc Output the raw cc (expect 0)], [case "$enableval" in yes) raw_cc=yes AC_MSG_RESULT(yes) ;; no) raw_cc=no AC_MSG_RESULT(no) ;; *) AC_MSG_ERROR(bad value ${enableval} for raw-cc option) ;; esac],[ AC_MSG_RESULT(no) raw_cc=no]) if test "$raw_cc" = "yes"; then RAW_OUTPUT="-DCCTEST" fi AC_MSG_CHECKING(output RAW EDS) AC_ARG_ENABLE(raw-eds, [ --enable-raw-eds Output the raw eds (expect 0)], [case "$enableval" in yes) raw_eds=yes AC_MSG_RESULT(yes) ;; no) AC_MSG_RESULT(no) raw_eds=no ;; *) AC_MSG_ERROR(bad value ${enableval} for raw-eds option) ;; esac],[ AC_MSG_RESULT(no) raw_eds=no]) if test "$raw_eds" = "yes"; then RAW_OUTPUT="-DCCTEST -DEDSTEST" fi dnl Check if CC and EDS aren't enabled as same time if test "$raw_cc" = "yes"; then if test "$raw_eds" = "yes"; then AC_MSG_ERROR(raw cc or raw eds can't be enabled as same time !) fi fi AC_SUBST(RAW_OUTPUT) ]) dnl ################################################ AC_DEFUN(GATOS_I2C_DELAY,[ AC_MSG_CHECKING(using DELAY from the Linux/(Free/Net)BSD kernel sources) AC_ARG_WITH(kernel-delay, [ --with-kernel-delay Use delay from Linux/(Free/Net)BSD kernel sources (default) --without-kernel-delay Use i2c delay in i2c.c], [case "$withval" in no) AC_MSG_RESULT(no) kernel_delay=false ;; *) AC_MSG_RESULT(yes) AC_DEFINE(WITH_KERNEL_DELAY) kernel_delay=true ;; esac],[ AC_MSG_RESULT(yes) AC_DEFINE(WITH_KERNEL_DELAY) kernel_delay=true]) AM_CONDITIONAL(WITH_KERNEL_DELAY, test "$kernel_delay" = "true") ]) dnl ################################################ AC_DEFUN(GATOS_SOUND_OSSEMU,[ AC_MSG_CHECKING(using the OSS sound emulation in NetBSD) AC_ARG_WITH(ossemu, [ --with-ossemu Use the OSS sound emulation in NetBSD (default=no)], [case "$withval" in yes) if test "$ArchRunning" != "x86NetBSD"; then AC_MSG_ERROR(Only available in NetBSD!) else AC_MSG_RESULT(yes) AC_DEFINE(WITH_OSSEMU) netbsd_ossemu=yes fi ;; *) AC_MSG_RESULT(no) netbsd_ossemu=no ;; esac],[ AC_MSG_RESULT(no) netbsd_ossemu=no]) AM_CONDITIONAL(WITH_OSSEMU, test "$netbsd_ossemu" = "yes") ]) dnl ################################################ AC_DEFUN(GATOS_SHM,[ AC_MSG_CHECKING(using IPC shared memory) AC_ARG_WITH(shm, [ --with-shm Use IPC shared memory support (default=no)], [case "$withval" in no) AC_MSG_RESULT(no) shm=no ;; *) AC_MSG_RESULT(yes) shm=yes ;; esac],[ shm=no AC_MSG_RESULT(no) ]) if test "$shm" = "yes"; then USE_SHM="-DUSE_SHM" fi AC_SUBST(USE_SHM) ]) dnl ################################################ AC_DEFUN(GATOS_IPC,[ AC_MSG_CHECKING(using IPC messages) AC_ARG_WITH(ipc, [ --with-ipc Use IPC messages support (default=no)], [case "$withval" in no) AC_MSG_RESULT(no) ipcmsg=no ;; *) AC_MSG_RESULT(yes) ipcmsg=yes ;; esac],[ ipcmsg=no AC_MSG_RESULT(no) ]) if test "$ipcmsg" = "yes"; then USE_IPC="-DUSE_IPC" fi AC_SUBST(USE_IPC) ]) dnl ################################################ gatos-0.0.5/m4/gettext.m40100644002411700123110000003074706765053731013567 0ustar bayleasr###################################################################### # progtest.m4 from gettext 0.32 ###################################################################### # Search path for a program which passes the given test. # Ulrich Drepper , 1996. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN(AM_PATH_PROG_WITH_TEST, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test -n "[$]$1"; then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) ###################################################################### # lcmessage.m4 from gettext 0.32 ###################################################################### # Check whether LC_MESSAGES is available in . # Ulrich Drepper , 1995. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 1 AC_DEFUN(AM_LC_MESSAGES, [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES) fi fi]) ###################################################################### # gettext.m4 from gettext 0.32 ###################################################################### # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # serial 3 AC_DEFUN(AM_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) USE_INCLUDED_LIBINTL=no dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then AC_DEFINE(ENABLE_NLS) AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. dnl catgets is only used if permitted by option --with-catgets. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, [AC_TRY_LINK([#include ], [return (int) gettext ("")], gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) if test "$gt_cv_func_gettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CACHE_CHECK([for gettext in libintl], gt_cv_func_gettext_libintl, [AC_TRY_LINK([], [return (int) gettext ("")], gt_cv_func_gettext_libintl=yes, gt_cv_func_gettext_libintl=no)])]) fi if test "$gt_cv_func_gettext_libc" = "yes" \ || test "$gt_cv_func_gettext_libintl" = "yes"; then AC_DEFINE(HAVE_GETTEXT) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) INSTOBJEXT=.mo fi fi ]) if test "$CATOBJEXT" = "NONE"; then AC_MSG_CHECKING([whether catgets can be used]) AC_ARG_WITH(catgets, [ --with-catgets use catgets functions if available], nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) AC_MSG_RESULT($nls_cv_use_catgets) if test "$nls_cv_use_catgets" = "yes"; then dnl No gettext in C library. Try catgets next. AC_CHECK_LIB(i, main) AC_CHECK_FUNC(catgets, [AC_DEFINE(HAVE_CATGETS) INTLOBJS="\$(CATOBJS)" AC_PATH_PROG(GENCAT, gencat, no)dnl if test "$GENCAT" != "no"; then AC_PATH_PROG(GMSGFMT, gmsgfmt, no) if test "$GMSGFMT" = "no"; then AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) fi AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.cat INSTOBJEXT=.cat DATADIRNAME=lib INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi]) fi fi if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_SUBST(MSGFMT) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo INSTOBJEXT=.mo DATADIRNAME=share INTLDEPS='$(top_builddir)/intl/libintl.a' INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext programs is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi # If this is used in GNU gettext we have to set USE_NLS to `yes' # because some of the sources are only built for this goal. if test "$PACKAGE" = gettext; then USE_NLS=yes USE_INCLUDED_LIBINTL=yes fi dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(AM_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h sys/param.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ __argz_count __argz_stringify __argz_next]) if test "${ac_cv_func_stpcpy+set}" != "set"; then AC_CHECK_FUNCS(stpcpy) fi if test "${ac_cv_func_stpcpy}" = "yes"; then AC_DEFINE(HAVE_STPCPY) fi AM_LC_MESSAGES AM_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl The reference to in the installed file dnl must be resolved because we cannot expect the users of this dnl to define HAVE_LOCALE_H. if test $ac_cv_header_locale_h = yes; then INCLUDE_LOCALE_H="#include " else INCLUDE_LOCALE_H="\ /* The system does not provide the header . Take care yourself. */" fi AC_SUBST(INCLUDE_LOCALE_H) dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux libc-5 and the normal X/Open format test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi dnl po2tbl.sed is always needed. sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed dnl In the intl/Makefile.in we have a special dependency which makes dnl only sense for gettext. We comment this out for non-gettext dnl packages. if test "$PACKAGE" = "gettext"; then GT_NO="#NO#" GT_YES= else GT_NO= GT_YES="#YES#" fi AC_SUBST(GT_NO) AC_SUBST(GT_YES) dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl *** For now the libtool support in intl/Makefile is not for real. l= AC_SUBST(l) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) gatos-0.0.5/m4/libtool.m40100644002411700123110000003443206765053732013543 0ustar bayleasr## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- ## Copyright (C) 1996-1999 Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## ## As a special exception to the GNU General Public License, if you ## distribute this file as part of a program that contains a ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. # serial 39 AC_PROG_LIBTOOL AC_DEFUN(AC_PROG_LIBTOOL, [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl # Save cache, so that ltconfig can load it AC_CACHE_SAVE # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || AC_MSG_ERROR([libtool configure failed]) # Reload cache, that may have been modified by ltconfig AC_CACHE_LOAD # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Redirect the config.log output again, so that the ltconfig log is not # clobbered by the next message. exec 5>>./config.log ]) AC_DEFUN(AC_LIBTOOL_SETUP, [AC_PREREQ(2.13)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl dnl # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], [libtool_flags="$libtool_flags --enable-dlopen"]) ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [libtool_flags="$libtool_flags --enable-win32-dll"]) AC_ARG_ENABLE(libtool-lock, [ --disable-libtool-lock avoid locking (might break parallel builds)]) test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" # Some flags need to be propagated to the compiler or linker for good # libtool support. case "$host" in *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac ]) # AC_LIBTOOL_DLOPEN - enable checks for dlopen support AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) # AC_ENABLE_SHARED - implement the --enable-shared flag # Usage: AC_ENABLE_SHARED[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_SHARED, [dnl define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(shared, changequote(<<, >>)dnl << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$ac_save_ifs" ;; esac], enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl ]) # AC_DISABLE_SHARED - set the default shared flag to --disable-shared AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no)]) # AC_ENABLE_STATIC - implement the --enable-static flag # Usage: AC_ENABLE_STATIC[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_STATIC, [dnl define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(static, changequote(<<, >>)dnl << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$ac_save_ifs" ;; esac], enable_static=AC_ENABLE_STATIC_DEFAULT)dnl ]) # AC_DISABLE_STATIC - set the default static flag to --disable-static AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no)]) # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to # `yes'. AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE(fast-install, changequote(<<, >>)dnl << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], changequote([, ])dnl [p=${PACKAGE-default} case "$enableval" in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," for pkg in $enableval; do if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$ac_save_ifs" ;; esac], enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl ]) # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no)]) # AC_PROG_LD - find the path to the GNU or non-GNU linker AC_DEFUN(AC_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. changequote(,)dnl [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' changequote([,])dnl # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else ac_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_SUBST(LD) AC_PROG_LD_GNU ]) AC_DEFUN(AC_PROG_LD_GNU, [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) # AC_PROG_NM - find the path to a BSD-compatible name lister AC_DEFUN(AC_PROG_NM, [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM" else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$ac_dir/nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm fi]) NM="$ac_cv_path_NM" AC_MSG_RESULT([$NM]) AC_SUBST(NM) ]) # AC_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case "$host" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, main, LIBM="-lm") ;; esac ]) # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for # the libltdl convenience library, adds --enable-ltdl-convenience to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library, and adds --enable-ltdl-install to # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed # to be `${top_builddir}/libltdl'. Make sure you start DIR with # '${top_builddir}/' (note the single quotes!) if your package is not # flat, and, if you're not using automake, define top_builddir as # appropriate in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" fi ]) dnl old names AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl dnl This is just to quiet aclocal about the macro not being used if(a,b,[AC_DISABLE_FAST_INSTALL])dnl gatos-0.0.5/man/0042755002411700123110000000000007030251713012050 5ustar bayleasrgatos-0.0.5/man/Makefile.in0100644002411700123110000002277007030251712014117 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ SUBDIRS = en fr mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status # 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 = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = man distdir: $(DISTFILES) @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=../$(top_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: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* 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 -rm -f libtool distclean: distclean-recursive 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 .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 mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/man/Makefile.am0100644002411700123110000000064707011544303014105 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## SUBDIRS = en fr ## ## ## mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/man/en/0042755002411700123110000000000007030251713012452 5ustar bayleasrgatos-0.0.5/man/en/Makefile.in0100644002411700123110000001665007030251713014522 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ man_MANS = gatos.1 gatos-conf.1 gatos.conf.1 atisplit.1 atitv.1 atitogif.1 atitojpg.1 atitoppm.1 yuvsum.1 xatitv.1 scanpci.1 EXTRA_DIST = $(man_MANS) atitv.1.in gatos.conf.1.in xatitv.1.in gatoslibdir = $(sysconfdir)/gatos.conf mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h CONFIG_CLEAN_FILES = man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/en/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) 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)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) 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)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = man/en distdir: $(DISTFILES) @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)/man1 clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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-man1 uninstall-man1 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 atitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < atitv.1.in > atitv.1 gatos.conf.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < gatos.conf.1.in > gatos.conf.1 xatitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < xatitv.1.in > xatitv.1 mostlyclean-generic: atitv.1 gatos.conf.1 xatitv.1 -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/man/en/Makefile.am0100644002411700123110000000167707027767314014533 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## ## English man pages man_MANS = \ gatos.1 \ gatos-conf.1 \ gatos.conf.1 \ atisplit.1 \ atitv.1 \ atitogif.1 \ atitojpg.1 \ atitoppm.1 \ yuvsum.1 \ xatitv.1 \ scanpci.1 EXTRA_DIST = $(man_MANS) atitv.1.in gatos.conf.1.in xatitv.1.in ## ## ## gatoslibdir = $(sysconfdir)/gatos.conf atitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < atitv.1.in > atitv.1 gatos.conf.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < gatos.conf.1.in > gatos.conf.1 xatitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < xatitv.1.in > xatitv.1 ## ## mostlyclean-generic: atitv.1 gatos.conf.1 xatitv.1 -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/man/en/gatos.10100644002411700123110000001242207027457147013664 0ustar bayleasr.\" -*-Nroff-*- .\" gatos man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH GATOS 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME Gatos - ATI-TV for GNU/Linux .SH DESCRIPTION The \fBGATOS\fP (\fIG\fPeneral \fIA\fPTI \fIT\fPV and \fIO\fPverlay \fIS\fPoftware) is an effort to create standard drivers for all currently unsupported features of ATI video cards, specifically TV features. .SH HOMEPAGE The \fBGATOS\fP homepage is located at: .nf \fIhttp://www.core.binghamton.edu/~insomnia/gatos/\fP .fi .sp Updates, news, additional documentation and the FAQ can be found there. .SH MAINTAINER \fBInsomnia\fP (Stea Greene) <\fIinsomnia@core.binghamton.edu\fP> send bug reports and code patches to this address. .SH REQUIREMENTS .TP \fB\-GNU/Linux, FreeBSD and NetBSD\fP (\fIonly tested on x86\fP). .TP \fB\-ATI\fP All-In-Wonder, All-In-Wonder Pro or Rage II/Pro with ATI-TV tuner card. Limited support for the All-In-Wonder 128 and Rage128 with ATI-TV tuner card. .TP \fB\-XFree86\fP recommended, but not required. .SH PROGRAMS There are many programs packaged with \fIGATOS\fP: .PP .RS .nf \fB-\fP \fIxatitv\fP : GUI "TV in a window" application. \fB-\fP \fIatitv\fP : Simple text-mode program. \fB-\fP \fIgatos-conf\fP : GUI GATOS configuration application. \fB-\fP \fIatitoppm\fP, \fB-\fP \fIatitogif\fP, \fB-\fP \fIatitojpg\fP, \fB-\fP \fIyuvsum\fP, \fB-\fP \fIatisplit\fP : YUV conversion program. \fB-\fP \fIscanpci\fP : PCI bus utility. .fi .RE .SH BUG REPORTS To submit a bug report, send an e-mail to: .nf \fBInsomnia\fP (Stea Greene) <\fIinsomnia@core.binghamton.edu\fP> .sp with a \fIsubject line\fP of: \fBGATOS BUG\fP: <\fIbrief description\fP...> .sp Then in the main body of the message: .TP \fB\- \fPDescribe the bug in detail, including how to repeat the misbehavior, .TP \fB\- \fPSpecify what version of \fIGATOS\fP and what version of \fIIBTK\fP you are using, .TP \fB\- \fPThen include a dump of "\fIxatitv -v\fP" (either as a MIME attachment or right in the message), .TP \fB\- \fPInclude a patch of any changes you made to the code that may fix the problem. See \fBPATCHES\fP below, .PP When a bug is fixed or if the bug report is not understood, you will get a reply, \fBso make sure your message is properly reply-able\fP. .fi .SH PATCHES .nf To create a patch, first make sure you have a full tree of both the original and the modified trees (herin called "\fIgatos\-orig\fP" and "\fIgatos\-new\fP" respectively). .PP Make sure each tree is clean by using: .TP .B "\->" \fImake distclean\fP .PP in \fBEACH\fP directory. Then change to the directory immediately above these two directories and use the following command: .TP .B "\->" \fIdiff \-ur gatos\-orig gatos\-new > gatos\-new\-patch\fP .PP Look at \fIgatos\-new\-patch\fP (with a text editor or viewer) and make sure nothing is changed that you didn't intend to be. You can submit this patch to me either included in an e\-mail, or as a MIME attachment, or you can compress it and send it as a MIME attachment, as follows: .PP Compress it with: .TP .B "\->" \fIgzip -9 gatos\-new\-patch\fP .PP Then send \fIgatos\-new\-patch.gz\fP to me as a MIME attachment. .PP If there is a problem with the patch, or I have a question or the patch/description is not understood, you will get a reply, \fBso make sure your message is properly reply-able\fP. .fi .SH LICENSE .nf Files \fBnot\fP covered by the main \fPGATOS\fP license (GNU Public License): .TP delay.S, delay.h and linkage.h are from the Linux 2.0.36 kernel sources (slightly modified) and are Copyright (C) 1993 by Linus Torvalds. .TP scanpci.c is from XFree86 3.3.3 and is Copyright (C) 1995 by Robin Cutshaw. .TP pci.c is modified from scanpci.c and is Copyright (C) 1995+1999 by Robin Cutshaw and \(/Oyvind Aabling. .fi .SH AUTHORS Primary Authors: .nf \(/Oyvind Aabling <\fIOyvind.Aabling@uni-c.dk\fP> Daniel Caujolle-Bert <\fIlobadia@club-internet.fr\fP> Vladimir Dergachev <\fIvdergach@sas.upenn.edu\fP> Insomnia (Stea Greene) <\fIinsomnia@core.binghamton.edu\fP> Christian Lupien <\fIlupien@physics.utoronto.ca\fP> Octavian PURDILA <\fIpurdila@sundy.cs.pub.ro\fP> .fi .PP .PP Other Contributors: .nf Bob Bell <\fIbbell@macroped.com\fP> Bruce Forsberg <\fIforsberg@adnc.com\fP> Chris Hardy <\fIchris@hardys.org\fP> Victor Bogado da Silva Lins <\fIbogado@openlink.com.br\fP> Ken Dresser <\fIKen@dresser.net\fP> Jan ONDREJ <\fIondrejj@salstar.shadow.sk\fP> techt <\fItecht@pikeonline.net\fP> hook <\fIhook@netrio.com.br\fP> Rodrigo Ventura <\fIyoda@isr.ist.utl.pt\fP> .PP .PP .fi Based on: .RS .TP .B "\-aiwtv-0.22" by \(/Oyvind Aabling. .TP .B "\-aiwtv-0.20uX" by \(/Oyvind Aabling, Christian Lupien, Vladimir Dergachev and Bruce Forsberg. .TP .B "\-atitv-0.21#X" by \(/Oyvind Aabling, Insomnia (Stea Greene) and Bruce Forsberg. .TP .B "\-Limited documentation and some support" from ATI Technologies Inc. .RE gatos-0.0.5/man/en/gatos-conf.10100644002411700123110000000227707027457147014616 0ustar bayleasr.\" -*-Nroff-*- .\" gatos-conf man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) for 0.0.5 .\" .\" Last update: Mon Dec 20 03:03:57 CET 1999 .\" " .TH gatos-conf 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME gatos-conf \- GUI \fBGATOS\fP configuration application. .SH SYNOPSIS .BI "gatos-conf" .SH DESCRIPTION The program \fIgatos-conf\fP allows you to graphically configure the correct values in the gatos.conf and XF86Config configuration files. .TP \fB\-\fP Even if you chose "Gatos will Probe RAM", you still need to select the correct amount of ram. .TP \fB\-\fP I2C mode selection should be left on "Gatos autodetection" unless gatos fails to startup. .TP \fB\-\fP Television type is optional, it can be setup within xatitv. .SH OPTIONS .TP \fB\-X\fP Set pathname of XF86Config file. .sp ex: gatos-conf -X /usr/local/etc/XF86Config .TP \fB\-\-help Get help. .SH SEE ALSO gatos, atitv, atisplit, atitogif, atitojpg, xatitv, yuvsum, scanpci. .SH AUTHORS \fIGatos-conf\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien and Daniel Caujolle-Bert. gatos-0.0.5/man/en/gatos.conf.10100644002411700123110000000447507030251712014601 0ustar bayleasr.\" -*-Nroff-*- .\" gatos.conf man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:03 CET 1999 .\" " .TH gatos.conf 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME gatos.conf \- Configuration file of the \fBGATOS\fP package. .SH DESCRIPTION The \fIGatos\fP library use a configuration file called \fIgatos.conf\fP for its initialization. It can be found at \fI/etc/gatos.conf\fP. .PP .PP They are some keywords described below: .TP \fB videoram\fP <\fIvalue\fP> Specify the \fBFULL\fP amount of video RAM on your card, \fIvalue\fP is in kilobytes. This is optional, as \fIGatos\fP will autodetect this if it is not present. .TP \fB buffermem\fP <\fIvalue\fP> Specify the amount of video RAM you've \fBreserved\fP for GATOS (see also XF86Config.sample), \fIvalue\fP is in kilobytes. This parameter is NOT optional. .TP \fB format\fP <\fIformat\fP> Specify the format used in your area. This is optional as \fIGatos\fP will autodetect this if it is not present. .sp For \fIformats\fP available, see below: .nf \fI 1\fP NTSC-M : US and many others \fI 2\fP NTSC-Japan : Japan \fI 3\fP PAL-B : Many (Europe) \fI 3\fP PAL-D : China \fI 3\fP PAL-G : Many (Europe) \fI 3\fP PAL-H : Belgium \fI 3\fP PAL-I : Great Britain and others \fI 4\fP PAL-M : Brazil (NTSC\-like PAL format) \fI 5\fP PAL-N : Paraguay, Uruguay \fI 6\fP SECAM : East Europe, France, Middle East \fI 7\fP PAL-Ncomb : Argentina .fi .TP \fB i2c_mode\fP <\fImode\fP> Specify the I2C mode if automatic detection fails. This keyword is commented by default and should only be used if \fIGatos\fP fails to initialize. .sp For \fImodes\fP available, see below: .nf \fI 1\fP : Register type A: DAC_CNTL+GEN_TEST_CNTL Registers \fI 2\fP : Register type B: GP_IO Register \fI 3\fP : Rage PRO interface (I2C_CNTL_{0,1} registers) \fI 4\fP : Register type LG: GP_IO Register \fI 5\fP : MPP/ImpacTV interface .fi .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS Refer to the \fIgatos\fP manual page. gatos-0.0.5/man/en/atisplit.10100644002411700123110000000457407027457147014411 0ustar bayleasr.\" -*-Nroff-*- .\" atisplit man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:05:42 CET 1999 .\" " .TH atisplit 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME atisplit \- conversion utility from the \fBGATOS\fP package. .SH SYNOPSIS .BI "atisplit" .SH DESCRIPTION The program \fIatisplit\fP is a small utility to convert \fIgatos\fP capture file (\fIgatos.yuv\fP) into a series of yuv frames good for input to \fImpeg_encode\fP program. .PP \fImpeg_encode\fP can be obtained on metalab (\fIhttp://www.metalab.unc.edu/\fP). .PP note that since mpeg_encode uses yuv files with only quarter of cb and cr fields the output files have less information than the input one. in particular the total size of the output files should be just below 3/4 of the size of the input file. .SH USAGE .B "\-" Start the "TV in a Window" application: .RS .I "./xatitv &" .RE and capture whatever you want, .RS .I "atisplit" .RE atisplit furiously prints out frames. .PP .PP .B "\-" You must edit the default.lparam file (see below); .PP .PP .B "\-" And, .RS .I "mpeg_encode default.lparam" .RE this produce \fIoutput.mpg\fP MPEG file. .SH MPEG_ENCODE CONFIGURATION FILE You can find a sample \fIdefault.lparam\fP file below: .nf # # use this as a guideline for any parameters you # don't really understand or don't care about. # PATTERN IBBPBBPBBPBBPBB OUTPUT output.mpg BASE_FILE_FORMAT YUV GOP_SIZE 10 SLICES_PER_FRAME 1 PIXEL HALF RANGE 10 PSEARCH_ALG LOGARITHMIC BSEARCH_ALG CROSS2 IQSCALE 8 PQSCALE 10 BQSCALE 25 REFERENCE_FRAME ORIGINAL # # you really need to understand the following # YUV_SIZE 320x240 INPUT_CONVERT * INPUT_DIR ./ INPUT tv*.yuv [000001-000100] END_INPUT .fi .SH FILES .PP .nf default.lparam output.mpg .fi .SH SEE ALSO gatos, gatos-conf, atitv, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS \fIAtisplit\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/atitv.10100644002411700123110000000363507030251712013664 0ustar bayleasr.\" -*-Nroff-*- .\" atitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 03:03:25 CET 1999 .\" " .TH atitv 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME atitv \- Simple text-mode program from the \fBGATOS\fP package. .SH SYNOPSIS .BI "atitv" .SH DESCRIPTION The program \fIatitv\fP is still under development. It gives basic functionality needed to record video and take snapshots. .SH FILE FORMATS Note, motion capture in atitv use a special ".yuv" file format unique to gatos. .sp Snapshots on the other hand save to ".ppm" files, which are viewable (and convertible) by most graphics programs. .SH OPTIONS .TP \fB\-h \-\-help\fP Get help. .TP \fB\-\-version\fP Get version info. .TP \fB\-m\fP <\fImux\fP> Specify which input to use (Composite, SVHS or TV). .TP \fB\-v\fP <\fIvolume\fP> Set volume. .TP \fB\-c\fP <\fIchannel\fP> Set channel. .TP \fB\-s\fP <\fIxs\fP> <\fIys\fP> Set capture size. .SH COMMANDS .TP \fBrec\fP <\fIn\fP> <\fIf\fP> Record \fIyuv\fP file for \fIn\fP seconds to filename \fIf\fP. .TP \fBsnap\fP <\fIf\fP> Capture a single \fIppm\fP frame to filename \fIf\fP. .SH EXAMPLES .TP \fBatitv\fI \-c 10 rec 10 f1.yuv \-c 11 rec 10 f2.yuv\fP This will change to channel 10, record 10 seconds to "f1.yuv" then change to channel 11 and record 10 seconds to "f2.yuv" .TP \fBatitv\fI \-m SVHS snap pic.ppm\fP This will change to the SVHS connector and capture one frame to "pic.ppm" .SH FILES .TP /etc/gatos.conf - Configuration file of GATOS. .SH SEE ALSO gatos, gatos-conf, gatos.conf, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS \fIAtitv\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/atitogif.10100644002411700123110000000201107027457147014346 0ustar bayleasr.\" -*-Nroff-*- .\" atitogif man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 03:05:12 CET 1999 .\" " .TH atitogif 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME atitogif \- YUV conversion program from the \fBGATOS\fP package. .SH SYNOPSIS .BI "atitogif < gatos.yuv" .SH DESCRIPTION The program \fIatitogif\fP convert the "\fI.yuv\fP" files created by gatos to a series of "\fI.gif\fP" files. .SH NOTE Unlike \fIatitoppm\fP, this application requires various utilities to be present (such as \fIppmtogif\fP, etc...). If they are not, this program will fail. .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS \fIAtitogif\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/atitojpg.10100644002411700123110000000201107027457147014361 0ustar bayleasr.\" -*-Nroff-*- .\" atitojpg man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 03:04:34 CET 1999 .\" " .TH atitojpg 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME atitojpg \- YUV conversion program from the \fBGATOS\fP package. .SH SYNOPSIS .BI "atitojpg < gatos.yuv" .SH DESCRIPTION The program \fIatitojpg\fP convert the "\fI.yuv\fP" files created by gatos to a series of "\fI.jpg\fP" files. .SH NOTE Unlike \fIatitoppm\fP, this application requires various utilities to be present (such as \fIppmtojpg\fP, etc...). If they are not, this program will fail. .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitogif, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS \fIAtitojpg\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/atitoppm.10100644002411700123110000000154207027457147014405 0ustar bayleasr.\" -*-Nroff-*- .\" atitoppm man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:03:57 CET 1999 .\" " .TH atitoppm 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME atitoppm \- YUV conversion program from the \fBGATOS\fP package. .SH SYNOPSIS .BI "atitoppm < gatos.yuv" .SH DESCRIPTION The program \fIatitoppm\fP convert the "\fI.yuv\fP" files created by gatos to a series of "\fI.ppm\fP" files. .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, xatitv, yuvsum, scanpci. .SH AUTHORS \fIAtitoppm\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/yuvsum.10100644002411700123110000000152507027457147014121 0ustar bayleasr.\" -*-Nroff-*- .\" yuvsum man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1 (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 02:59:04 CET 1999 .\" " .TH yuvsum 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME yuvsum \- YUV conversion program from the \fBGATOS\fP package. .SH SYNOPSIS .BI "yuvsum < gatos.yuv" .SH DESCRIPTION The program \fIyuvsum\fP averages all images in gatos.yuv (\fImust all be same size\fP) into one ppm format image. .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, atitoppm, xatitv. .SH AUTHORS \fIYuvsum\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/xatitv.10100644002411700123110000001006007030251712014042 0ustar bayleasr.\" -*-Nroff-*- .\" xatitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5 .\" .\" Last update: Mon Dec 20 03:00:05 CET 1999 .\" " .TH xatitv 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME xatitv \- GUI "TV in a Window" application from the \fBGATOS\fP package. .SH SYNOPSIS .BI "xatitv [options]" .SH DESCRIPTION \fIXatitv\fP is the main program shipped with GATOS. It allows GUI access to all \fBGATOS\fP functionality, save tv-out. The GUI is pretty self-explanatory, but here are the basics: .TP .B "\-" When first run, hit setup and configure format and options, than do a channel scan. .TP .B "\-" Use the three buttons labeled \fITV\fP, \fICV\fP and \fISV\fP to select video input from \fITV tuner\fP, \fIComposite Video\fP and \fISVHS\fP respectively. .TP .B "\-" The \fIAdv.\fP, \fICapture\fP and \fIEdit Channel\fP buttons toggle other sections of the GUI. .TP .B "\-" \fIVolume\fP, \fIBrightness\fP, \fIContrast\fP, \fIHue\fP and \fISaturation\fP can be modified by clicking the mouse at any location along their respective sliders. .TP .B "\-" The \fIEdit Channel\fP GUI can be used to set channel-specific video and audio settings (if a channel is too bright/dark, too loud/quiet, etc) and to remove bogus channels. It can also be used to name a channel so you can later select that channel by name. .TP .B "\-" There are many other feature, look around and tinker with them. .TP .B "\-" Most features have keyboard shortcuts: .RS .TP \fB\-\fP\fIEsc\fP Quit. .TP \fB\-\fP\fITab\fP/\fIRight-Click\fP Hide/Show GUI. .TP \fB\-\fP\fIF1\fP-\fIF8\fP Favorite channels (\fICTRL\+Key\fP to set). .TP \fB\-\fP\fIF9\fP-\fIF12\fP Output debug info. .TP \fB\-\fP\fINumbers\fP Change channel by number. .TP \fB\-\fP\fILetters\fP/\fIspace\fP Change channel by name. .TP \fB\-\fP\fIEnter\fP/\fIReturn\fP Finish entering item (channel name/number). .TP \fB\-\fP\fIUp\fP/\fIDown\fP Scroll through settings. .TP \fB\-\fP\fILeft\fP/\fIRight\fP Change current setting. .TP \fB\-\fP\fIKeypad \+\fP/\fI\-\fP Change channel. .TP \fB\-\fP\fIBackspace\fP Switches to the previous channel that you spent more than 5 seconds at. .TP \fB\-\fP\fIKeypad /\fP Toggle mute. .TP \fB\-\fP\fIKeypad *\fP or \fIDouble-Click\fP Toggle fullscreen Mode. .TP \fB\-\fP\fI` \fPor\fI ~\fP Toggle closed captioning (\fICC\fP). .TP \fB\-\fP\fI>\fP and \fI<\fP Increase/Decrease size of window by a factor of 2. .TP \fB\-\fP\fIPause\fP Freeze capture on current frame. .TP \fB\-\fP\fIPrintScreen\fP Capture single frame (Snapshot). .RE .SH FILE FORMATS Note, motion capture in xatitv use a special ".yuv" file format unique to gatos. .sp Snapshots on the other hand save to ".ppm" files, which are viewable (and convertible) by most graphics programs. .sp There is no automatic intelligence in xatitv to select this file's extension, so to make sure other programs don't get confused, always take snapshots to a ".ppm" file, and capture video to ".yuv" files. This should be fixed in the next version. .sp Snapshots to files containing a number (eg: gatos000.ppm) will automatically increment the number in this filename for the next snapshot. So after taking a ppm snapshot to gatos000.ppm, xatitv will capture the next to gatos001.ppm, then gatos002.ppm, etc.... .SH OPTIONS .TP \fB\-pci\fP <\fIpciaddr\fP> Override PCI address in \fIgatos.conf\fP. .TP \fB\-q Quiet mode (disable messages output). .TP \fB\-v Verbose mode (display many debug infos). .TP \fB\-qv\fP|\fB-vq\fP Display \fIGATOS\fP and \fIIBTK\fP versions used. .TP \fB\-d\fP<\fIvalue\fP> Set verbosity level (\fBno\fP space between \fId\fP and \fIvalue\fP). .TP \fB\-nosa\fP \fIOnly\fP for testing. .SH FILES .TP /etc/gatos.conf - Configuration file of GATOS. .SH SEE ALSO gatos, gatos-conf, gatos.conf, atitv, atisplit, atitogif, atitojpg, yuvsum, scanpci. .SH AUTHORS \fIXatitv\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/scanpci.10100644002411700123110000000164307027426550014164 0ustar bayleasr.\" -*-Nroff-*- .\" scanpci man page .\" Written by Robin Cutshaw, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5 .\" .\" Last update: Mon Dec 20 03:01:23 CET 1999 .\" " .TH scanpci 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME scanpci \- PCI bus utility from the \fBGATOS\fP package. .SH SYNOPSIS .BI "scanpci [\fI-v12\fP]" .SH DESCRIPTION The program \fIscanpci\fP will scan for and print details of devices on the PCI bus. .SH OPTIONS .TP \fB\-1\fP Try PCI configuration type 1. .TP \fB\-2\fP Try PCI configuration type 2 (\fIdeprecated\fP). .TP \fB\-v\fP Verbose mode. .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, xatitv, yuvsum. .SH AUTHORS \fIScanpci\fP is a part of \fBXFree86 3.3.3\fP. It was written and copyrighted (C) 1995 by Robin Cutshaw (\fIrobin@xfree86.org\fP). gatos-0.0.5/man/en/atitv.1.in0100644002411700123110000000363007027517746014306 0ustar bayleasr.\" -*-Nroff-*- .\" atitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 03:03:25 CET 1999 .\" " .TH atitv 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME atitv \- Simple text-mode program from the \fBGATOS\fP package. .SH SYNOPSIS .BI "atitv" .SH DESCRIPTION The program \fIatitv\fP is still under development. It gives basic functionality needed to record video and take snapshots. .SH FILE FORMATS Note, motion capture in atitv use a special ".yuv" file format unique to gatos. .sp Snapshots on the other hand save to ".ppm" files, which are viewable (and convertible) by most graphics programs. .SH OPTIONS .TP \fB\-h \-\-help\fP Get help. .TP \fB\-\-version\fP Get version info. .TP \fB\-m\fP <\fImux\fP> Specify which input to use (Composite, SVHS or TV). .TP \fB\-v\fP <\fIvolume\fP> Set volume. .TP \fB\-c\fP <\fIchannel\fP> Set channel. .TP \fB\-s\fP <\fIxs\fP> <\fIys\fP> Set capture size. .SH COMMANDS .TP \fBrec\fP <\fIn\fP> <\fIf\fP> Record \fIyuv\fP file for \fIn\fP seconds to filename \fIf\fP. .TP \fBsnap\fP <\fIf\fP> Capture a single \fIppm\fP frame to filename \fIf\fP. .SH EXAMPLES .TP \fBatitv\fI \-c 10 rec 10 f1.yuv \-c 11 rec 10 f2.yuv\fP This will change to channel 10, record 10 seconds to "f1.yuv" then change to channel 11 and record 10 seconds to "f2.yuv" .TP \fBatitv\fI \-m SVHS snap pic.ppm\fP This will change to the SVHS connector and capture one frame to "pic.ppm" .SH FILES .TP &GATOSCFG& - Configuration file of GATOS. .SH SEE ALSO gatos, gatos-conf, gatos.conf, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS \fIAtitv\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/en/gatos.conf.1.in0100644002411700123110000000447007027517746015223 0ustar bayleasr.\" -*-Nroff-*- .\" gatos.conf man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:03 CET 1999 .\" " .TH gatos.conf 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME gatos.conf \- Configuration file of the \fBGATOS\fP package. .SH DESCRIPTION The \fIGatos\fP library use a configuration file called \fIgatos.conf\fP for its initialization. It can be found at \fI&GATOSCFG&\fP. .PP .PP They are some keywords described below: .TP \fB videoram\fP <\fIvalue\fP> Specify the \fBFULL\fP amount of video RAM on your card, \fIvalue\fP is in kilobytes. This is optional, as \fIGatos\fP will autodetect this if it is not present. .TP \fB buffermem\fP <\fIvalue\fP> Specify the amount of video RAM you've \fBreserved\fP for GATOS (see also XF86Config.sample), \fIvalue\fP is in kilobytes. This parameter is NOT optional. .TP \fB format\fP <\fIformat\fP> Specify the format used in your area. This is optional as \fIGatos\fP will autodetect this if it is not present. .sp For \fIformats\fP available, see below: .nf \fI 1\fP NTSC-M : US and many others \fI 2\fP NTSC-Japan : Japan \fI 3\fP PAL-B : Many (Europe) \fI 3\fP PAL-D : China \fI 3\fP PAL-G : Many (Europe) \fI 3\fP PAL-H : Belgium \fI 3\fP PAL-I : Great Britain and others \fI 4\fP PAL-M : Brazil (NTSC\-like PAL format) \fI 5\fP PAL-N : Paraguay, Uruguay \fI 6\fP SECAM : East Europe, France, Middle East \fI 7\fP PAL-Ncomb : Argentina .fi .TP \fB i2c_mode\fP <\fImode\fP> Specify the I2C mode if automatic detection fails. This keyword is commented by default and should only be used if \fIGatos\fP fails to initialize. .sp For \fImodes\fP available, see below: .nf \fI 1\fP : Register type A: DAC_CNTL+GEN_TEST_CNTL Registers \fI 2\fP : Register type B: GP_IO Register \fI 3\fP : Rage PRO interface (I2C_CNTL_{0,1} registers) \fI 4\fP : Register type LG: GP_IO Register \fI 5\fP : MPP/ImpacTV interface .fi .SH SEE ALSO gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTHORS Refer to the \fIgatos\fP manual page. gatos-0.0.5/man/en/xatitv.1.in0100644002411700123110000001005307027521750014461 0ustar bayleasr.\" -*-Nroff-*- .\" xatitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: updates for 0.0.5 .\" .\" Last update: Mon Dec 20 03:00:05 CET 1999 .\" " .TH xatitv 1 "20 Dec 1999 " " " "GATOS Manual" .SH NAME xatitv \- GUI "TV in a Window" application from the \fBGATOS\fP package. .SH SYNOPSIS .BI "xatitv [options]" .SH DESCRIPTION \fIXatitv\fP is the main program shipped with GATOS. It allows GUI access to all \fBGATOS\fP functionality, save tv-out. The GUI is pretty self-explanatory, but here are the basics: .TP .B "\-" When first run, hit setup and configure format and options, than do a channel scan. .TP .B "\-" Use the three buttons labeled \fITV\fP, \fICV\fP and \fISV\fP to select video input from \fITV tuner\fP, \fIComposite Video\fP and \fISVHS\fP respectively. .TP .B "\-" The \fIAdv.\fP, \fICapture\fP and \fIEdit Channel\fP buttons toggle other sections of the GUI. .TP .B "\-" \fIVolume\fP, \fIBrightness\fP, \fIContrast\fP, \fIHue\fP and \fISaturation\fP can be modified by clicking the mouse at any location along their respective sliders. .TP .B "\-" The \fIEdit Channel\fP GUI can be used to set channel-specific video and audio settings (if a channel is too bright/dark, too loud/quiet, etc) and to remove bogus channels. It can also be used to name a channel so you can later select that channel by name. .TP .B "\-" There are many other feature, look around and tinker with them. .TP .B "\-" Most features have keyboard shortcuts: .RS .TP \fB\-\fP\fIEsc\fP Quit. .TP \fB\-\fP\fITab\fP/\fIRight-Click\fP Hide/Show GUI. .TP \fB\-\fP\fIF1\fP-\fIF8\fP Favorite channels (\fICTRL\+Key\fP to set). .TP \fB\-\fP\fIF9\fP-\fIF12\fP Output debug info. .TP \fB\-\fP\fINumbers\fP Change channel by number. .TP \fB\-\fP\fILetters\fP/\fIspace\fP Change channel by name. .TP \fB\-\fP\fIEnter\fP/\fIReturn\fP Finish entering item (channel name/number). .TP \fB\-\fP\fIUp\fP/\fIDown\fP Scroll through settings. .TP \fB\-\fP\fILeft\fP/\fIRight\fP Change current setting. .TP \fB\-\fP\fIKeypad \+\fP/\fI\-\fP Change channel. .TP \fB\-\fP\fIBackspace\fP Switches to the previous channel that you spent more than 5 seconds at. .TP \fB\-\fP\fIKeypad /\fP Toggle mute. .TP \fB\-\fP\fIKeypad *\fP or \fIDouble-Click\fP Toggle fullscreen Mode. .TP \fB\-\fP\fI` \fPor\fI ~\fP Toggle closed captioning (\fICC\fP). .TP \fB\-\fP\fI>\fP and \fI<\fP Increase/Decrease size of window by a factor of 2. .TP \fB\-\fP\fIPause\fP Freeze capture on current frame. .TP \fB\-\fP\fIPrintScreen\fP Capture single frame (Snapshot). .RE .SH FILE FORMATS Note, motion capture in xatitv use a special ".yuv" file format unique to gatos. .sp Snapshots on the other hand save to ".ppm" files, which are viewable (and convertible) by most graphics programs. .sp There is no automatic intelligence in xatitv to select this file's extension, so to make sure other programs don't get confused, always take snapshots to a ".ppm" file, and capture video to ".yuv" files. This should be fixed in the next version. .sp Snapshots to files containing a number (eg: gatos000.ppm) will automatically increment the number in this filename for the next snapshot. So after taking a ppm snapshot to gatos000.ppm, xatitv will capture the next to gatos001.ppm, then gatos002.ppm, etc.... .SH OPTIONS .TP \fB\-pci\fP <\fIpciaddr\fP> Override PCI address in \fIgatos.conf\fP. .TP \fB\-q Quiet mode (disable messages output). .TP \fB\-v Verbose mode (display many debug infos). .TP \fB\-qv\fP|\fB-vq\fP Display \fIGATOS\fP and \fIIBTK\fP versions used. .TP \fB\-d\fP<\fIvalue\fP> Set verbosity level (\fBno\fP space between \fId\fP and \fIvalue\fP). .TP \fB\-nosa\fP \fIOnly\fP for testing. .SH FILES .TP &GATOSCFG& - Configuration file of GATOS. .SH SEE ALSO gatos, gatos-conf, gatos.conf, atitv, atisplit, atitogif, atitojpg, yuvsum, scanpci. .SH AUTHORS \fIXatitv\fP was written and copyrighted by Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien, and Daniel Caujolle-Bert. gatos-0.0.5/man/fr/0042755002411700123110000000000007030251713012457 5ustar bayleasrgatos-0.0.5/man/fr/Makefile.in0100644002411700123110000001666107030251713014531 0ustar bayleasr# 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@ 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ mandir = ${prefix}/man/fr man_MANS = gatos.1 gatos-conf.1 gatos.conf.1 atisplit.1 atitv.1 atitogif.1 atitojpg.1 atitoppm.1 yuvsum.1 xatitv.1 scanpci.1 EXTRA_DIST = $(man_MANS) atitv.1.in gatos.conf.1.in xatitv.1.in gatoslibdir = $(sysconfdir)/gatos.conf mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h CONFIG_CLEAN_FILES = man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/fr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) 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)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) 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)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = man/fr distdir: $(DISTFILES) @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)/man1 clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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-man1 uninstall-man1 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 atitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < atitv.1.in > atitv.1 gatos.conf.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < gatos.conf.1.in > gatos.conf.1 xatitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < xatitv.1.in > xatitv.1 mostlyclean-generic: atitv.1 gatos.conf.1 xatitv.1 -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/man/fr/Makefile.am0100644002411700123110000000173107027767314014527 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## ## French man pages mandir = ${prefix}/man/fr man_MANS = \ gatos.1 \ gatos-conf.1 \ gatos.conf.1 \ atisplit.1 \ atitv.1 \ atitogif.1 \ atitojpg.1 \ atitoppm.1 \ yuvsum.1 \ xatitv.1 \ scanpci.1 EXTRA_DIST = $(man_MANS) atitv.1.in gatos.conf.1.in xatitv.1.in ## ## ## gatoslibdir = $(sysconfdir)/gatos.conf atitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < atitv.1.in > atitv.1 gatos.conf.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < gatos.conf.1.in > gatos.conf.1 xatitv.1: @sed "s#&GATOSCFG&#$(gatoslibdir)#" < xatitv.1.in > xatitv.1 ## ## mostlyclean-generic: atitv.1 gatos.conf.1 xatitv.1 -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/man/fr/gatos.10100644002411700123110000001336407027426550013671 0ustar bayleasr.\" -*-Nroff-*- .\" french gatos man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH GATOS 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM Gatos \- ATI\-TV pour GNU/Linux .SH DESCRIPTION Le \fBGATOS\fP (\fIG\fPeneral \fIA\fPTI \fIT\fPV and \fIO\fPverlay \fIS\fPoftware) est un effort pour créér des pilotes standards pour toute les fonctionnalitées non supportées pour le moment des cartes vidéo ATI, plus spécialement les fonctions TV. .SH HOMEPAGE Le homepage de \fBGATOS\fP est localisée à: .nf \fIhttp://www.core.binghamton.edu/~insomnia/gatos/\fP .fi .sp Mises à jours, nouveautées, documentation additonnelle et la FAQ sont disponibles sur ce site. .SH MAINTAINEUR \fBInsomnia\fP (Stea Greene) <\fIinsomnia@core.binghamton.edu\fP> envoyez les rapports de bug et les codes correctifs à cette adresse. .SH CONDITIONS .TP \fB\-GNU/Linux, FreeBSD et NetBSD\fP (\fItesté uniquement sur x86\fP). .TP \fB\-ATI\fP All\-In\-Wonder, All\-In\-Wonder Pro ou Rage II/Pro avec la carte tuner ATI\-TV. Support limité pour les cartes All-In-Wonder 128 et Rage128 avec le tuner ATI-TV. .TP \fB\-XFree86\fP recommandé, mais non requis. .SH PROGRAMMES Il y a plusieurs programmes fournis avec le package \fIGATOS\fP: .PP .RS .nf \fB-\fP \fIxatitv\fP : Application graphique "TV dans une fenêtre". \fB-\fP \fIatitv\fP : Simples programmes en mode texte. \fB-\fP \fIgatos-conf\fP : Application graphique de configuration pour GATOS. \fB-\fP \fIatitoppm\fP, \fB-\fP \fIatitogif\fP, \fB-\fP \fIatitojpg\fP, \fB-\fP \fIyuvsum\fP, \fB-\fP \fIatisplit\fP : Utilitaire de conversion YUV. \fB-\fP \fIscanpci\fP : Utilitaire pour le bus PCI. .fi .RE .SH RAPPORTS DE BUGS Pour soumettre un rapport de bug, envoyez un e\-mail à: .nf \fBInsomnia\fP (Stea Greene) <\fIinsomnia@core.binghamton.edu\fP> .sp avec dans le \fIsujet\fP: \fBGATOS BUG\fP: <\fIbrève description\fP...> .sp Et dans le corps du message: .TP \fB\- \fPDécrivez le bug en détail, en incluant comment reproduire le disfonctionnement, .TP \fB\- \fPSpécifiez quelle version de \fIGATOS\fP et d'\fIIBTK\fP vous utilisez, .TP \fB\- \fPIncluez aussi un dump de "\fIxatitv \-v\fP" (dans un attachement MIME ou dans le message lui même), .TP \fB\- \fPIncluez un patch de tout changement que vous avez fait au code pour résoudre le problème. Voir la section \fBPATCHES\fP plus bas, .PP Quand un bug est corrigé ou si un rapport de bug n'est pas bien compris, vous aurez une reponse au message, donc \fBassurez vous de la validité de l'adresse de retour\fP. .fi .SH PATCHES .nf Pour créér un patch, premièrement assurez vous que vous avez les sources complets de la version originale et modifiée (respectivement nommés "\fIgatos\-orig\fP" et "\fIgatos\-new\fP"). .PP Assurez vous aussi que ces arborescences de sources sont propres en utilisant la commande: .TP .B "\->" \fImake distclean\fP .PP dans \fBCHAQUE\fP répertoire. Ceci fait, changer pour le répertoire parent de ces deux répertoires et utilisez cette commande: .TP .B "\->" \fIdiff \-ur gatos\-orig gatos\-new > gatos\-new\-patch\fP .PP Regardez le résultat \fIgatos\-new\-patch\fP (avec un éditeur de texte ou un visualiseur) et vérifiez que les changements soient ceux que vous avez effectués. Vous pouvez alors me soumettre ce patch en l'incluant dans un e\-mail, ou par un attachement MIME, ou encore vous pouvez le compresser et l'envoyer dans un attachement MIME, comme il suit: .PP Compressez le avec: .TP .B "\->" \fIgzip \-9 gatos\-new\-patch\fP .PP Vous pourrez alors m'envoyer le patch \fIgatos\-new\-patch.gz\fP dans un attachement MIME. .PP Si il y a un problème avec le patch, si j'ai une question ou si la description du patch est mal comprise, vous aurez une réponse au message, donc \fBassurez vous de la validité de l'adresse de retour\fP. .fi .SH LICENCE .nf Fichiers \fBnon\fP couverts par la licence principale de \fPGATOS\fP (GNU Public License): .TP delay.S, delay.h et linkage.h proviennent des sources du noyau Linux 2.0.36 (légèrement modifiés) et sont sous Copyright (C) 1993 de Linus Torvalds. .TP scanpci.c provient d'XFree86 3.3.3 et est sous Copyright (C) 1995 de Robin Cutshaw. .TP pci.c est modifié de scanpci.c et est sous Copyright (C) 1995+1999 de Robin Cutshaw et \(/Oyvind Aabling. .fi .SH AUTEURS Auteurs Principaux: .nf \(/Oyvind Aabling <\fIOyvind.Aabling@uni\-c.dk\fP> Daniel Caujolle\-Bert <\fIlobadia@club\-internet.fr\fP> Vladimir Dergachev <\fIvdergach@sas.upenn.edu\fP> Insomnia (Stea Greene) <\fIinsomnia@core.binghamton.edu\fP> Christian Lupien <\fIlupien@physics.utoronto.ca\fP> Octavian PURDILA <\fIpurdila@sundy.cs.pub.ro\fP> .fi .PP .PP Autres Contributeurs: .nf Bob Bell <\fIbbell@macroped.com\fP> Bruce Forsberg <\fIforsberg@adnc.com\fP> Chris Hardy <\fIchris@hardys.org\fP> Victor Bogado da Silva Lins <\fIbogado@openlink.com.br\fP> Ken Dresser <\fIKen@dresser.net\fP> Jan ONDREJ <\fIondrejj@salstar.shadow.sk\fP> techt <\fItecht@pikeonline.net\fP> hook <\fIhook@netrio.com.br\fP> Rodrigo Ventura <\fIyoda@isr.ist.utl.pt\fP> .PP .PP .fi Basé sur: .RS .TP .B "\-aiwtv\-0.22" de \(/Oyvind Aabling. .TP .B "\-aiwtv\-0.20uX" de \(/Oyvind Aabling, Christian Lupien, Vladimir Dergachev et Bruce Forsberg. .TP .B "\-atitv\-0.21#X" de \(/Oyvind Aabling, Insomnia (Stea Greene) et Bruce Forsberg. .TP .B "\-Documentation limitée et un peu de support" d'ATI Technologies Inc. .RE gatos-0.0.5/man/fr/gatos-conf.10100644002411700123110000000244007027517746014615 0ustar bayleasr.\" -*-Nroff-*- .\" gatos-conf man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) for 0.0.5 .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH gatos-conf 1 "20 Dec 1999 " " " "Manuel de GATOS" .SH NOM gatos-conf \- Application graphique pour la configuration de \fBGATOS\fP. .SH SYNOPSIS .BI "gatos-conf" .SH DESCRIPTION Le programme \fIgatos-conf\fP permet de configurer graphiquement les valeurs dans les fichiers gatos.conf et XF86Config. .TP \fB\-\fP Même si vous choisissez "Gatos trouveras la RAM", vous devez tout de même sélectionner la quantité de mémoire Vidéo. .TP \fB\-\fP La sélection du mode I2C doit être laissée sur "Autodétection par Gatos", sinon gatos peut échouer au démarrage. .TP \fB\-\fP Le type Télévisuel est optionnel, il peut être réglé à partir d'xatitv. .SH OPTIONS .TP \fB\-X\fP Définie le chemin et le nom du fichier XF86Config. .sp ex: gatos-conf -X /usr/local/etc/XF86Config .TP \fB\-\-help\fP Affiche l'aide. .SH VOIR AUSSI gatos, atitv, atisplit, atitogif, atitojpg, xatitv, yuvsum, scanpci. .SH AUTEURS \fIGatos-conf\fP a été écrit et est sous copyright par Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/gatos.conf.10100644002411700123110000000504107030251713014575 0ustar bayleasr.\" -*-Nroff-*- .\" french gatos.conf man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH gatos.conf 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM gatos.conf \- Fichier de configuration du package \fBGATOS\fP. .SH DESCRIPTION La bibliothèque \fIGatos\fP utilise un fichier de configuration nommé \fI"gatos.conf"\fP pour son initialisation. Il doit être trouvé dans \fI/etc/gatos.conf\fP. .PP .PP Il y a plusieurs sections décrites ci\-dessous: .TP \fB videoram\fP <\fIvaleur\fP> Spécifie la \fBTOTALITE\fP de mémoire vidéo de votre carte, \fIvaleur\fP est en kilo\-octets. Ceci est optionnel, \fIGatos\fP peut détecter cette valeur si elle n'est pas présente. .TP \fB buffermem\fP <\fIvaleur\fP> Spécifie la quantité de mémoire vidéo que vous désirez \fBallouer\fP pour GATOS (voir aussi XF86Config.sample.french), \fIvaleur\fP est en kilo\-octets. Ce paramètre n'est PAS optionnel. .TP \fB format\fP <\fIformat\fP> Spécifie le format utilisé dans votre région.Ceci est optionnel, \fIGatos\fP peut détecter cette valeur si elle n'est pas présente. .sp Pour les différents \fIformats\fP disponibles, voir ci\-dessous: .nf \fI 1\fP NTSC\-M : US et plusieurs autres \fI 2\fP NTSC\-Japan : Japon \fI 3\fP PAL\-B : Plusieurs (Europe) \fI 3\fP PAL\-D : Chine \fI 3\fP PAL\-G : Plusieurs (Europe) \fI 3\fP PAL\-H : Belgique \fI 3\fP PAL\-I : Grande Bretagne et autres \fI 4\fP PAL\-M : Bresil (comme du NTSC format PAL) \fI 5\fP PAL\-N : Paraguay, Uruguay \fI 6\fP SECAM : Europe de l'Est, France, Middle East \fI 7\fP PAL\-Ncomb : Argentine .fi .TP \fB i2c_mode\fP <\fImode\fP> Spécifie le mode I2C si la détection automatique a échoue. Cette section est commentée par défaut et ne doit être utilisé que si \fIGatos\fP échoue à l'initialisation. .sp Pour les \fImodes\fP disponibles, voir ci\-dessous: .nf \fI 1\fP : Registre de type A: Registres DAC_CNTL+GEN_TEST_CNTL \fI 2\fP : Registre de type B: Registre GP_IO \fI 3\fP : Interface Rage PRO (registres I2C_CNTL_{0,1}) \fI 4\fP : Registre de type LG: Registre GP_IO \fI 5\fP : Interface MPP/ImpacTV .fi .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEUR Référez vous à la page de manuel \fIgatos\fP. gatos-0.0.5/man/fr/atisplit.10100644002411700123110000000510707027517746014411 0ustar bayleasr.\" -*-Nroff-*- .\" french atisplit man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH atisplit 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM atisplit \- Utilitaire de conversion provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "atisplit" .SH DESCRIPTION Le programme \fIatisplit\fP est un petit utilitaire qui permet de convertir les fichiers de capture de \fIgatos\fP (\fIgatos.yuv\fP) en une série de trames yuv valides pour être utilisées par le programme \fImpeg_encode\fP. .PP \fImpeg_encode\fP peut être obtenu chez metalab (\fIhttp://www.metalab.unc.edu/\fP). .PP notez que depuis que mpeg_encode utilise des fichiers yuv avec un quart des champs cb et cr, les fichiers de sortie ont moins d'informations que les fichiers d'entrée. En particulier la taille totale du fichier de sortie sera juste les 3/4 de celle du fichier d'entrée. .SH USAGE .B "\-" Lancez l'application "TV dans une fenêtre": .RS .I "xatitv &" .RE et capturez ce que vous désirez, .RS .I "atisplit" .RE atisplit affiche furieusement les trames. .PP .PP .B "\-" Vous devez éditer le fichier default.lparam (voir ci\-dessous); .PP .PP .B "\-" Et, .RS .I "mpeg_encode default.lparam" .RE ceci produit le fichier MPEG \fIoutput.mpg\fP. .SH FICHIER DE CONFIGURATION DE MPEG_ENCODE Vous trouverez un fichier \fIdefault.lparam\fP simple ci\-dessous: .nf # # utilisez ceci comme un guide pour tout les paramètres que vous # ne comprenez pas complètement ou qui ne vous interesse pas. # PATTERN IBBPBBPBBPBBPBB OUTPUT output.mpg BASE_FILE_FORMAT YUV GOP_SIZE 10 SLICES_PER_FRAME 1 PIXEL HALF RANGE 10 PSEARCH_ALG LOGARITHMIC BSEARCH_ALG CROSS2 IQSCALE 8 PQSCALE 10 BQSCALE 25 REFERENCE_FRAME ORIGINAL # # vous devez réellement comprendre ce qui suit # YUV_SIZE 320x240 INPUT_CONVERT * INPUT_DIR ./ INPUT tv*.yuv [000001\-000100] END_INPUT .fi .SH FICHIERS .PP .nf default.lparam output.mpg .fi .SH VOIR AUSSI gatos, gatos-conf, atitv, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEURS \fIAtisplit\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/atitv.10100644002411700123110000000433507030251713013670 0ustar bayleasr.\" -*-Nroff-*- .\" french atitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH atitv 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM atitv \- Programme simple en mode texte provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "atitv" .SH DESCRIPTION Le programme \fIatitv\fP est toujours en développement. Il donne accès à des fonctionnalitées basiques requisent pour enregistrer de la vidéo et pour prendre des clichés. .SH FORMAT DE FICHIERS Note, les captures animées faites avec atitv utilisent un format de fichier spécial ".yuv" unique a gatos. .sp Les prises de clichés sont sauvés au format ".ppm", qui sont visibles (et convertibles) par la plupart des programmes de manipulations graphique. .SH OPTIONS .TP \fB\-h \-\-help\fP Affiche l'aide. .TP \fB\-\-version\fP Affiche la version. .TP \fB\-m\fP <\fImux\fP> Spécifie quelle entrée utiliser (Composite, SVHS ou TV). .TP \fB\-v\fP <\fIvolume\fP> Règle le volume. .TP \fB\-c\fP <\fIcanal\fP> Règle le canal. .TP \fB\-s\fP <\fIxs\fP> <\fIys\fP> Définie la taille de la capture. .SH COMMANDES .TP \fBrec\fP <\fIn\fP> <\fIf\fP> Enregistre dans un fichier \fIyuv\fP \fIn\fP secondes dans le fichier \fIf\fP. .TP \fBsnap\fP <\fIf\fP> Capture une seule trame \fIppm\fP et l'enregistre dans le fichier \fIf\fP. .SH EXEMPLES .TP \fBatitv\fI \-c 10 rec 10 f1.yuv \-c 11 rec 10 f2.yuv\fP Ceci aura pour effet de passer sur le canal 10, d'enregistrer 10 secondes dans le fichier "f1.yuv" puis de passer sur le canal 11 et d'enregistrer 10 secondes dans le fichier "f2.yuv". .TP \fBatitv\fI \-m SVHS snap pic.ppm\fP Ceci aura pour effet de passer sur le connecteur SVHS et d'enregistrer une trame dans le fichier "pic.ppm". .SH FICHIERS .TP /etc/gatos.conf \- Fichier de configuration de GATOS. .SH VOIR AUSSI gatos, gatos-conf, gatos.conf, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEURS \fIAtitv\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/atitogif.10100644002411700123110000000212007027517746014356 0ustar bayleasr.\" -*-Nroff-*- .\" french atitogif man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH atitogif 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM atitogif \- Utilitaire de conversion YUV provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "atitogif < gatos.yuv" .SH DESCRIPTION Le programme \fIatitogif\fP converti les fichiers "\fI.yuv\fP" créés par gatos en une série de fichiers "\fI.gif\fP". .SH NOTE A l'inverse d'\fIatitoppm\fP, cette application requière la présence d'une série d'utilitaires (comme \fIppmtogif\fP, etc...). S'ils ne sont pas installés, ce programme ne fonctionnera pas. .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEURS \fIAtitogif\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/atitojpg.10100644002411700123110000000211707027517746014377 0ustar bayleasr.\" -*-Nroff-*- .\" french atitojpg man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH atitojpg 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM atitojpg \- Programme de conversion YUV provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "atitojpg < gatos.yuv" .SH DESCRIPTION Le programme \fIatitojpg\fP converti les fichiers "\fI.yuv\fP" créés par gatos en une série de fichiers "\fI.jpg\fP". .SH NOTE A l'inverse d'\fIatitoppm\fP, cette application requière la présence d'une série d'utilitaires (comme \fIppmtojpg\fP, etc...). S'ils ne sont pas installés, ce programme ne fonctionnera pas. .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitogif, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEURS \fIAtitojpg\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/atitoppm.10100644002411700123110000000161007027517746014410 0ustar bayleasr.\" -*-Nroff-*- .\" french atitoppm man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH atitoppm 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM atitoppm \- Utilitaire de conversion YUV provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "atitoppm < gatos.yuv" .SH DESCRIPTION Le programme \fIatitoppm\fP converti les fichiers "\fI.yuv\fP" créés par gatos en une série de fichiers "\fI.ppm\fP". .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, xatitv, yuvsum, scanpci. .SH AUTEURS \fIAtitoppm\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/yuvsum.10100644002411700123110000000164407027517746014132 0ustar bayleasr.\" -*-Nroff-*- .\" french yuvsum man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1 (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH yuvsum 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM yuvsum \- Utilitaire de conversion YUV provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "yuvsum < gatos.yuv" .SH DESCRIPTION Le programme \fIyuvsum\fP fait la moyenne de toutes les images du fichier gatos.yuv (\fIelles doivent être de même taille\fP) en un fichier au format graphique ppm. .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, atitoppm, xatitv. .SH AUTEURS \fIYuvsum\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/xatitv.10100644002411700123110000001120607030251713014053 0ustar bayleasr.\" -*-Nroff-*- .\" french xatitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH xatitv 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM xatitv \- Programme graphique "TV dans une fenêtre" provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "xatitv [options]" .SH DESCRIPTION \fIXatitv\fP est le programme principal fourni avec GATOS. Il permet l'accès en mode graphique à toutes les fonctions de \fBGATOS\fP, à l'exception de la sortie TV. L'interface utilisateur parle d'elle même, mais voici les fonctions de base: .TP \fB\-\fP Au premier lancement, cliquez sur setup et configurez le format et les options, puis lancez une recherche des canaux. .TP \fB\-\fP Utilisez les trois boutons nommés \fITV\fP, \fICV\fP et \fISV\fP pour selectionner la source vidéo à partir de, respectivement, \fITuner TV\fP, \fIVidéo Composite\fP et \fISVHS\fP. .TP \fB\-\fP Les boutons \fIAdv.\fP, \fPCapture\fP et \fIEdit Channel\fP sélectionnent les autres sections de l'interface utilisateur. .TP \fB\-\fP \fIVolume\fP, \fIBrightness\fP, \fIContrast\fP, \fIHue\fP et \fISaturation\fP peuvent êtres modifiés en cliquant avec la souris à n'importe quel endroit de leurs ascenseurs respectifs. .TP \fB\-\fP La partie \fIEdit Channel\fP peut être utilisée pour définir les caractéristiques spécifiques pour la vidéo et l'audio (si un canal et trop brillant/sombre, trop bruyant/silencieux, etc) et pour supprimer de mauvais canaux. Il peut être utilisé pour nommer un canal pour pouvoir ensuite le sélectionner par son nom. .TP \fB\-\fP Il y a beaucoup d'autres fonctionnalitées, regardez et essayez les. .TP \fB\-\fP Beaucoup de fonctionnalitées ont des raccourcis clavier: .RS .TP \fB\-\fP\fIEsc\fP Quitte. .TP \fB\-\fP\fITab\fP/\fIClick\-Droit\fP Cache/Affiche l'interface utilisateur. .TP \fB\-\fP\fIF1\fP-\fIF8\fP Canaux favoris (définis avec \fICTRL+Key\fP). .TP \fB\-\fP\fIF9\fP-\fIF12\fP Affiche les infos de débugage. .TP \fB\-\fP\fINuméros\fP Change de canal par numéro. .TP \fB\-\fP\fILettres\fP/\fIEspace\fP Change de canal par le nom. .TP \fB\-\fP\fIEntrée\fP/\fIRetour\fP Termine la saisie (nom/numéro du canal). .TP \fB\-\fP\fIHaut\fP/\fIBas\fP Fait défiler les réglages. .TP \fB\-\fP\fIGauche\fP/\fIDroit\fP Change le réglage courant. .TP \fB\-\fP\fIPavé Num. \+\fP/\fI\-\fP Change de canal. .TP \fB\-\fP\fIBackspace\fP Reviens sur le canal précédent quitté il y a plus de 5 secondes. .TP \fB\-\fP\fIPavé Num. /\fP Bascule du mode muet. .TP \fB\-\fP\fIPavé Num. *\fP Bascule du mode plein écran. .TP \fB\-\fP\fI` \fPou\fI ~\fP Bascule du mode Closed Captioning (CC). .TP \fB\-\fP\fI>\fP et \fI<\fP Augmente/Réduit la taille de la fenêtre par un facteur de 2. .TP \fB\-\fP\fIPause\fP Gèle la capture sur la trame courante. .TP \fB\-\fP\fIImp. Ecran\fP Capture une seule trame (prends un cliché). .RE .SH FORMAT DE FICHIERS Note, les captures animées faites avec xatitv utilisent un format de fichier spécial ".yuv" unique a gatos. .sp Les prises de clichés sont sauvés au format ".ppm", qui sont visibles (et convertibles) par la plupart des programmes de manipulations graphique. .sp Il n'y a pas d'intelligence automatique dans xatitv pour sélectionner l'extension de ces fichiers, donc pour être sûr de ne pas mettre en defaut d'autres programmes, prenez toujours les clichés dans un fichier ".ppm", et des captures vidéo dans un fichier ".yuv". Ceci seras corrigé dans la prochaine version. .sp Prendre des clichés dans des fichiers contenant un numéro (ex: gatos000.ppm) auras pour effet d'incrementer automatiquement ce nombre pour le prochain fichier. Donc aprés avoir pris un cliché ppm dans gatos000.ppm, xatitv captureras le suivant dans gatos001.ppm, puis gatos002.ppm, etc... .SH OPTIONS .TP \fB\-pci\fP <\fIpciaddr\fP> Force l'adresse PCI du fichier \fIgatos.conf\fP. .TP \fB\-q\fP Mode muet (masque les infos de debuggage). .TP \fB\-v\fP Mode bavard (affiche beaucoup d'infos de debuggage). .TP \fB\-qv\fP|\fB-vq\fP Affiche les versions de \fIGATOS\fP et d'\fIIBTK\fP utilisées. .TP \fB\-d\fP<\fIvaleur\fP> Définis le niveau de bavardage (\fBpas\fP d'espace entre \fId\fP et \fIvaleur\fP). .TP \fB\-nosa\fP \fIUniquement\fP pour des tests. .SH FICHIERS .TP /etc/gatos.conf \- Fichier de configuration de GATOS. .SH VOIR AUSSI gatos, gatos-conf, gatos.conf, atitv, atisplit, atitogif, atitojpg, yuvsum, scanpci. .SH AUTEURS \fIXatitv\fP a été écrit et est sous copyright par Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/scanpci.10100644002411700123110000000174307027426550014172 0ustar bayleasr.\" -*-Nroff-*- .\" french scanpci man page .\" Written by Robin Cutshaw, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH scanpci 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM scanpci \- Utilitaire pour le bus PCI provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "scanpci [\fI-v12\fP]" .SH DESCRIPTION Le programme \fIscanpci\fP scruptera et affichera les détails à propos de périphériques sur le bus PCI. .SH OPTIONS .TP \fB\-1\fP Tente la configuration PCI type 1. .TP \fB\-2\fP Tente la configuration PCI type 2 (\fIdéprécié\fP). .TP \fB\-v\fP Mode bavard. .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, xatitv, yuvsum. .SH AUTEURS \fIScanpci\fP fait parti d'\fBXFree86 3.3.3\fP. Il a été écrit et est sous copyright (C) 1995 de Robin Cutshaw (\fIrobin@xfree86.org\fP). gatos-0.0.5/man/fr/atitv.1.in0100644002411700123110000000433007027517746014311 0ustar bayleasr.\" -*-Nroff-*- .\" french atitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH atitv 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM atitv \- Programme simple en mode texte provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "atitv" .SH DESCRIPTION Le programme \fIatitv\fP est toujours en développement. Il donne accès à des fonctionnalitées basiques requisent pour enregistrer de la vidéo et pour prendre des clichés. .SH FORMAT DE FICHIERS Note, les captures animées faites avec atitv utilisent un format de fichier spécial ".yuv" unique a gatos. .sp Les prises de clichés sont sauvés au format ".ppm", qui sont visibles (et convertibles) par la plupart des programmes de manipulations graphique. .SH OPTIONS .TP \fB\-h \-\-help\fP Affiche l'aide. .TP \fB\-\-version\fP Affiche la version. .TP \fB\-m\fP <\fImux\fP> Spécifie quelle entrée utiliser (Composite, SVHS ou TV). .TP \fB\-v\fP <\fIvolume\fP> Règle le volume. .TP \fB\-c\fP <\fIcanal\fP> Règle le canal. .TP \fB\-s\fP <\fIxs\fP> <\fIys\fP> Définie la taille de la capture. .SH COMMANDES .TP \fBrec\fP <\fIn\fP> <\fIf\fP> Enregistre dans un fichier \fIyuv\fP \fIn\fP secondes dans le fichier \fIf\fP. .TP \fBsnap\fP <\fIf\fP> Capture une seule trame \fIppm\fP et l'enregistre dans le fichier \fIf\fP. .SH EXEMPLES .TP \fBatitv\fI \-c 10 rec 10 f1.yuv \-c 11 rec 10 f2.yuv\fP Ceci aura pour effet de passer sur le canal 10, d'enregistrer 10 secondes dans le fichier "f1.yuv" puis de passer sur le canal 11 et d'enregistrer 10 secondes dans le fichier "f2.yuv". .TP \fBatitv\fI \-m SVHS snap pic.ppm\fP Ceci aura pour effet de passer sur le connecteur SVHS et d'enregistrer une trame dans le fichier "pic.ppm". .SH FICHIERS .TP &GATOSCFG& \- Fichier de configuration de GATOS. .SH VOIR AUSSI gatos, gatos-conf, gatos.conf, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEURS \fIAtitv\fP a été écrit et est sous copyright de Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/man/fr/gatos.conf.1.in0100644002411700123110000000503407027517746015225 0ustar bayleasr.\" -*-Nroff-*- .\" french gatos.conf man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH gatos.conf 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM gatos.conf \- Fichier de configuration du package \fBGATOS\fP. .SH DESCRIPTION La bibliothèque \fIGatos\fP utilise un fichier de configuration nommé \fI"gatos.conf"\fP pour son initialisation. Il doit être trouvé dans \fI&GATOSCFG&\fP. .PP .PP Il y a plusieurs sections décrites ci\-dessous: .TP \fB videoram\fP <\fIvaleur\fP> Spécifie la \fBTOTALITE\fP de mémoire vidéo de votre carte, \fIvaleur\fP est en kilo\-octets. Ceci est optionnel, \fIGatos\fP peut détecter cette valeur si elle n'est pas présente. .TP \fB buffermem\fP <\fIvaleur\fP> Spécifie la quantité de mémoire vidéo que vous désirez \fBallouer\fP pour GATOS (voir aussi XF86Config.sample.french), \fIvaleur\fP est en kilo\-octets. Ce paramètre n'est PAS optionnel. .TP \fB format\fP <\fIformat\fP> Spécifie le format utilisé dans votre région.Ceci est optionnel, \fIGatos\fP peut détecter cette valeur si elle n'est pas présente. .sp Pour les différents \fIformats\fP disponibles, voir ci\-dessous: .nf \fI 1\fP NTSC\-M : US et plusieurs autres \fI 2\fP NTSC\-Japan : Japon \fI 3\fP PAL\-B : Plusieurs (Europe) \fI 3\fP PAL\-D : Chine \fI 3\fP PAL\-G : Plusieurs (Europe) \fI 3\fP PAL\-H : Belgique \fI 3\fP PAL\-I : Grande Bretagne et autres \fI 4\fP PAL\-M : Bresil (comme du NTSC format PAL) \fI 5\fP PAL\-N : Paraguay, Uruguay \fI 6\fP SECAM : Europe de l'Est, France, Middle East \fI 7\fP PAL\-Ncomb : Argentine .fi .TP \fB i2c_mode\fP <\fImode\fP> Spécifie le mode I2C si la détection automatique a échoue. Cette section est commentée par défaut et ne doit être utilisé que si \fIGatos\fP échoue à l'initialisation. .sp Pour les \fImodes\fP disponibles, voir ci\-dessous: .nf \fI 1\fP : Registre de type A: Registres DAC_CNTL+GEN_TEST_CNTL \fI 2\fP : Registre de type B: Registre GP_IO \fI 3\fP : Interface Rage PRO (registres I2C_CNTL_{0,1}) \fI 4\fP : Registre de type LG: Registre GP_IO \fI 5\fP : Interface MPP/ImpacTV .fi .SH VOIR AUSSI gatos, gatos-conf, atitv, atisplit, atitogif, atitojpg, atitoppm, xatitv, yuvsum, scanpci. .SH AUTEUR Référez vous à la page de manuel \fIgatos\fP. gatos-0.0.5/man/fr/xatitv.1.in0100644002411700123110000001120107027517746014474 0ustar bayleasr.\" -*-Nroff-*- .\" french xatitv man page .\" Written by Gatos Devel. Team, and so grinded and scribbled by DCB. .\" .\" History: .\" 0.1: (first generation) .\" 0.2: some clean-ups and cosmetic changes .\" 0.3: update for 0.0.5. .\" .\" Last update: Mon Dec 20 03:02:41 CET 1999 .\" " .TH xatitv 1 "20 Decembre 1999 " " " "Manuel de GATOS" .SH NOM xatitv \- Programme graphique "TV dans une fenêtre" provenant du package \fBGATOS\fP. .SH SYNOPSIS .BI "xatitv [options]" .SH DESCRIPTION \fIXatitv\fP est le programme principal fourni avec GATOS. Il permet l'accès en mode graphique à toutes les fonctions de \fBGATOS\fP, à l'exception de la sortie TV. L'interface utilisateur parle d'elle même, mais voici les fonctions de base: .TP \fB\-\fP Au premier lancement, cliquez sur setup et configurez le format et les options, puis lancez une recherche des canaux. .TP \fB\-\fP Utilisez les trois boutons nommés \fITV\fP, \fICV\fP et \fISV\fP pour selectionner la source vidéo à partir de, respectivement, \fITuner TV\fP, \fIVidéo Composite\fP et \fISVHS\fP. .TP \fB\-\fP Les boutons \fIAdv.\fP, \fPCapture\fP et \fIEdit Channel\fP sélectionnent les autres sections de l'interface utilisateur. .TP \fB\-\fP \fIVolume\fP, \fIBrightness\fP, \fIContrast\fP, \fIHue\fP et \fISaturation\fP peuvent êtres modifiés en cliquant avec la souris à n'importe quel endroit de leurs ascenseurs respectifs. .TP \fB\-\fP La partie \fIEdit Channel\fP peut être utilisée pour définir les caractéristiques spécifiques pour la vidéo et l'audio (si un canal et trop brillant/sombre, trop bruyant/silencieux, etc) et pour supprimer de mauvais canaux. Il peut être utilisé pour nommer un canal pour pouvoir ensuite le sélectionner par son nom. .TP \fB\-\fP Il y a beaucoup d'autres fonctionnalitées, regardez et essayez les. .TP \fB\-\fP Beaucoup de fonctionnalitées ont des raccourcis clavier: .RS .TP \fB\-\fP\fIEsc\fP Quitte. .TP \fB\-\fP\fITab\fP/\fIClick\-Droit\fP Cache/Affiche l'interface utilisateur. .TP \fB\-\fP\fIF1\fP-\fIF8\fP Canaux favoris (définis avec \fICTRL+Key\fP). .TP \fB\-\fP\fIF9\fP-\fIF12\fP Affiche les infos de débugage. .TP \fB\-\fP\fINuméros\fP Change de canal par numéro. .TP \fB\-\fP\fILettres\fP/\fIEspace\fP Change de canal par le nom. .TP \fB\-\fP\fIEntrée\fP/\fIRetour\fP Termine la saisie (nom/numéro du canal). .TP \fB\-\fP\fIHaut\fP/\fIBas\fP Fait défiler les réglages. .TP \fB\-\fP\fIGauche\fP/\fIDroit\fP Change le réglage courant. .TP \fB\-\fP\fIPavé Num. \+\fP/\fI\-\fP Change de canal. .TP \fB\-\fP\fIBackspace\fP Reviens sur le canal précédent quitté il y a plus de 5 secondes. .TP \fB\-\fP\fIPavé Num. /\fP Bascule du mode muet. .TP \fB\-\fP\fIPavé Num. *\fP Bascule du mode plein écran. .TP \fB\-\fP\fI` \fPou\fI ~\fP Bascule du mode Closed Captioning (CC). .TP \fB\-\fP\fI>\fP et \fI<\fP Augmente/Réduit la taille de la fenêtre par un facteur de 2. .TP \fB\-\fP\fIPause\fP Gèle la capture sur la trame courante. .TP \fB\-\fP\fIImp. Ecran\fP Capture une seule trame (prends un cliché). .RE .SH FORMAT DE FICHIERS Note, les captures animées faites avec xatitv utilisent un format de fichier spécial ".yuv" unique a gatos. .sp Les prises de clichés sont sauvés au format ".ppm", qui sont visibles (et convertibles) par la plupart des programmes de manipulations graphique. .sp Il n'y a pas d'intelligence automatique dans xatitv pour sélectionner l'extension de ces fichiers, donc pour être sûr de ne pas mettre en defaut d'autres programmes, prenez toujours les clichés dans un fichier ".ppm", et des captures vidéo dans un fichier ".yuv". Ceci seras corrigé dans la prochaine version. .sp Prendre des clichés dans des fichiers contenant un numéro (ex: gatos000.ppm) auras pour effet d'incrementer automatiquement ce nombre pour le prochain fichier. Donc aprés avoir pris un cliché ppm dans gatos000.ppm, xatitv captureras le suivant dans gatos001.ppm, puis gatos002.ppm, etc... .SH OPTIONS .TP \fB\-pci\fP <\fIpciaddr\fP> Force l'adresse PCI du fichier \fIgatos.conf\fP. .TP \fB\-q\fP Mode muet (masque les infos de debuggage). .TP \fB\-v\fP Mode bavard (affiche beaucoup d'infos de debuggage). .TP \fB\-qv\fP|\fB-vq\fP Affiche les versions de \fIGATOS\fP et d'\fIIBTK\fP utilisées. .TP \fB\-d\fP<\fIvaleur\fP> Définis le niveau de bavardage (\fBpas\fP d'espace entre \fId\fP et \fIvaleur\fP). .TP \fB\-nosa\fP \fIUniquement\fP pour des tests. .SH FICHIERS .TP &GATOSCFG& \- Fichier de configuration de GATOS. .SH VOIR AUSSI gatos, gatos-conf, gatos.conf, atitv, atisplit, atitogif, atitojpg, yuvsum, scanpci. .SH AUTEURS \fIXatitv\fP a été écrit et est sous copyright par Steaphan Greene, \(/Oyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien et Daniel Caujolle-Bert. gatos-0.0.5/po/0042755002411700123110000000000007030251715011715 5ustar bayleasrgatos-0.0.5/po/Makefile.in0100644002411700123110000002434407030251714013763 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ SUBDIRS = @LANG_SUBDIRS@ DIST_SUBDIRS = @LANG_SUBDIRS@ model EXTRA_DIST = gatos.pot atisplit.pot atitogif.pot atitojpg.pot atitoppm.pot yuvsum.pot POTFILES.in # THIS is a general list for merging! APPS = gatos atisplit atitogif atitojpg atitoppm yuvsum mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status # 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 = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = po distdir: $(DISTFILES) @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 $(DIST_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=../$(top_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: 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 -rm -f libtool distclean: distclean-recursive 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 .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 ### merge: @apps='$(APPS)'; \ langs='$(DIST_SUBDIRS)'; \ for cat in $$apps; do \ for lang in $$langs; do \ if test -r $$lang/$$cat.po; then \ echo $$cat; \ msgmerge -o $$cat.new $$lang/$$cat.po $$cat.pot; \ if test -s $$cat.new && diff $$lang/$$cat.po $$cat.new; then \ rm $$cat.new; \ else \ mv $$cat.new $$lang/$$cat.po ; \ fi; \ fi ;\ done ;\ done messages: cd ../src && $(MAKE) $@ distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) POTFILES -rm -f config.cache config.log stamp-h stamp-h[0-9]* -rm -f model/Makefile *~ \#* .*~ .\#* mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/po/Makefile.am0100644002411700123110000000237607011544303013751 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## SUBDIRS = @LANG_SUBDIRS@ DIST_SUBDIRS = @LANG_SUBDIRS@ model EXTRA_DIST = gatos.pot atisplit.pot atitogif.pot atitojpg.pot atitoppm.pot \ yuvsum.pot POTFILES.in # THIS is a general list for merging! APPS = gatos atisplit atitogif atitojpg atitoppm yuvsum ### merge: @apps='$(APPS)'; \ langs='$(DIST_SUBDIRS)'; \ for cat in $$apps; do \ for lang in $$langs; do \ if test -r $$lang/$$cat.po; then \ echo $$cat; \ msgmerge -o $$cat.new $$lang/$$cat.po $$cat.pot; \ if test -s $$cat.new && diff $$lang/$$cat.po $$cat.new; then \ rm $$cat.new; \ else \ mv $$cat.new $$lang/$$cat.po ; \ fi; \ fi ;\ done ;\ done messages: cd ../src && $(MAKE) $@ distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) POTFILES -rm -f config.cache config.log stamp-h stamp-h[0-9]* -rm -f model/Makefile *~ \#* .*~ .\#* mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/po/gatos.pot0100644002411700123110000002771707027767314013604 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitv.c:200 msgid "" "\n" "Commands:\n" msgstr "" #. printf(_(" tvout [on|off]: Turn tv-out signal on/off [not yet functional].\n")); #: atitv.c:204 msgid "" "\n" "For Example:\n" msgstr "" #: atitv.c:192 msgid "" "\n" "Options:\n" msgstr "" #: gatos-conf.cpp:905 msgid "" "\n" "options:\n" msgstr "" #: gatos-conf.cpp:907 msgid " ex: gatos-conf -X /usr/local/etc/XF86Config\n" msgstr "" #: atitv.c:207 msgid " then change to channel 11 and record 10 seconds to \"f2.yuv\"\n" msgstr "" #: atitv.c:210 msgid " to \"pic.ppm\"\n" msgstr "" #: atitv.c:206 msgid " -This will change to channel 10, record 10 seconds to \"f1.yuv\"\n" msgstr "" #: atitv.c:209 msgid " -This will change to the SVHS connector and capture one frame\n" msgstr "" #: gatos-conf.cpp:909 msgid " --help: Display this help text.\n" msgstr "" #: atitv.c:194 msgid " --version: Get version info.\n" msgstr "" #: gatos-conf.cpp:906 msgid " -X: Set pathname of XF86Config file.\n" msgstr "" #: atitv.c:198 msgid " -c : Set channel.\n" msgstr "" #: atitv.c:193 msgid " -h --help: Get help (this message).\n" msgstr "" #: gatos-conf.cpp:908 msgid " -h,\n" msgstr "" #. printf(_(" -l : Specify which mixer line ATI card is connected to.\n")); #: atitv.c:196 msgid " -m : Specify which input to use (Composite, SVHS or TV).\n" msgstr "" #: atitv.c:199 msgid " -s : Set capture size.\n" msgstr "" #: atitv.c:197 msgid " -v : Set volume.\n" msgstr "" #: atitv.c:205 msgid " atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv\n" msgstr "" #: atitv.c:208 msgid " atitv -m SVHS snap pic.ppm\n" msgstr "" #: atitv.c:201 msgid " rec : record yuv file for n seconds to filename f.\n" msgstr "" #: atitv.c:202 msgid " snap : capture a single ppm frame to filename f.\n" msgstr "" #: gatos-conf.cpp:230 #, c-format msgid "%s << problem!!" msgstr "" #: xutils.c:922 #, c-format msgid ", and %s found.\n" msgstr "" #: xutils.c:921 #, c-format msgid "-pre%d" msgstr "" #: gatos-conf.cpp:411 msgid "16Mb" msgstr "" #: gatos-conf.cpp:408 msgid "2Mb" msgstr "" #: gatos-conf.cpp:412 msgid "32Mb" msgstr "" #: gatos-conf.cpp:409 msgid "4Mb" msgstr "" #: gatos-conf.cpp:435 msgid "600kb for NTSC" msgstr "" #: gatos-conf.cpp:436 msgid "864kb for PAL/SECAM" msgstr "" #: gatos-conf.cpp:410 msgid "8Mb" msgstr "" #: gatos-conf.cpp:437 msgid ">>" msgstr "" #: gatos-conf.cpp:481 msgid "Abort" msgstr "" #: xatitv.cpp:2548 msgid "Add" msgstr "" #: xatitv.cpp:2450 msgid "Adv." msgstr "" #: xatitv.cpp:2602 msgid "Always On Top" msgstr "" #. None #: gatos-conf.cpp:497 msgid "Autodetect Autodetect video format" msgstr "" #: xatitv.cpp:2610 msgid "Autohide" msgstr "" #: xatitv.cpp:1043 xatitv.cpp:1879 xatitv.cpp:2050 msgid "Bad ButtonPress!\n" msgstr "" #: xatitv.cpp:1080 xatitv.cpp:1095 msgid "Bad Slider Pressed!\n" msgstr "" #: xatitv.cpp:1153 msgid "Bad Testbutton Pressed!\n" msgstr "" #: xatitv.cpp:2564 msgid "Bright: " msgstr "" #: xatitv.cpp:1363 msgid "Brightness" msgstr "" #: xatitv.cpp:2501 msgid "Brightness: " msgstr "" #: gatos-conf.cpp:434 msgid "Buffer size" msgstr "" #: xatitv.cpp:2480 msgid "CC" msgstr "" #: xatitv.cpp:2640 msgid "CC Mode" msgstr "" #: xatitv.cpp:2641 msgid "CC1" msgstr "" #: xatitv.cpp:2641 msgid "CC2" msgstr "" #: xatitv.cpp:2460 msgid "CV" msgstr "" #: gatos-conf.cpp:672 gatos-conf.cpp:853 #, c-format msgid "Can't make backup file %s\n" msgstr "" #: xatitv.cpp:1394 msgid "Caption:\\rCC1" msgstr "" #: xatitv.cpp:1397 msgid "Caption:\\rCC2" msgstr "" #: xatitv.cpp:1406 msgid "Caption:\\rERROR" msgstr "" #: xatitv.cpp:1386 xatitv.cpp:1391 msgid "Caption:\\rNone" msgstr "" #: xatitv.cpp:1400 msgid "Caption:\\rTEXT1" msgstr "" #: xatitv.cpp:1403 msgid "Caption:\\rTEXT2" msgstr "" #: xatitv.cpp:2453 msgid "Capture" msgstr "" #: xatitv.cpp:2125 xatitv.cpp:2153 xatitv.cpp:2160 #, c-format msgid "Channel %d%c" msgstr "" #: xatitv.cpp:2521 msgid "Cold" msgstr "" #: xatitv.cpp:507 msgid "Composite-Video Input" msgstr "" #: xatitv.cpp:379 msgid "Configfile not found - Running gatos-conf.\n" msgstr "" #: xatitv.cpp:389 msgid "Continuing execution of xatitv." msgstr "" #: xatitv.cpp:2568 msgid "Contr: " msgstr "" #: xatitv.cpp:1368 msgid "Contrast" msgstr "" #: xatitv.cpp:2504 msgid "Contrast: " msgstr "" #: xatitv.cpp:2647 msgid "Convert to Standard" msgstr "" #: xatitv.cpp:2530 msgid "Delete" msgstr "" #: xatitv.cpp:2651 xatitv.cpp:2659 msgid "Done" msgstr "" #: xatitv.cpp:2456 msgid "Edit Channel" msgstr "" #: atitv.c:100 msgid "Error: -c switch needs 1 option\n" msgstr "" #: atitv.c:65 msgid "Error: -m switch needs 1 option\n" msgstr "" #: atitv.c:92 msgid "Error: -s switch needs 2 options\n" msgstr "" #: atitv.c:83 msgid "Error: -v switch needs 1 option\n" msgstr "" #: atitv.c:110 #, c-format msgid "Error: No such channel \"%s\"\n" msgstr "" #: atitv.c:74 #, c-format msgid "Error: No such mux input \"%s\"\n" msgstr "" #: atitv.c:123 msgid "Error: rec command needs 2 options\n" msgstr "" #: atitv.c:137 msgid "Error: snap command needs 1 option\n" msgstr "" #: atitv.c:181 #, c-format msgid "Error: unknown command \"%s\"\n" msgstr "" #: atitv.c:52 atitv.c:59 #, c-format msgid "Error: unknown option \"%s\"\n" msgstr "" #: xutils.c:920 #, c-format msgid "Expected IBTK version %d.%d.%d" msgstr "" #: xatitv.cpp:2599 msgid "Fixed Aspect Ratio" msgstr "" #: xatitv.cpp:2519 msgid "Full" msgstr "" #: xatitv.cpp:2524 msgid "Gamma: " msgstr "" #: gatos-conf.cpp:549 msgid "Gatos autodection" msgstr "" #: gatos-conf.cpp:429 msgid "Gatos will Probe RAM" msgstr "" #: xatitv.cpp:2507 xatitv.cpp:2572 msgid "Hue: " msgstr "" #: gatos-conf.cpp:466 msgid "I2C mode selection" msgstr "" #: xatitv.cpp:374 #, c-format msgid "IBTK version %s\n" msgstr "" #: xatitv.cpp:382 msgid "If prompted for a password, Enter root password to run gatos-conf.\n" msgstr "" #: xatitv.cpp:1377 msgid "Input:\\rComposite" msgstr "" #: xatitv.cpp:1374 msgid "Input:\\rS-Video" msgstr "" #: xatitv.cpp:1380 msgid "Input:\\rTV signal" msgstr "" #: gatos-conf.cpp:554 msgid "MPP/ImpacTV interface" msgstr "" #: xatitv.cpp:2589 msgid "Mixer" msgstr "" #: xatitv.cpp:2473 msgid "Mute" msgstr "" #: channels.c:51 gatos-conf.cpp:503 msgid "NTSC Japanese TV Antenna" msgstr "" #: channels.c:53 gatos-conf.cpp:505 msgid "NTSC Japanese TV Cable (CATV)" msgstr "" #: channels.c:49 gatos-conf.cpp:501 msgid "NTSC North/South American Cable (CATV)" msgstr "" #. NTSC #: channels.c:47 gatos-conf.cpp:499 msgid "NTSC North/South American TV Antenna" msgstr "" #: xatitv.cpp:1974 msgid "New Channel" msgstr "" #. None #: channels.c:45 msgid "None None/Other Standard (Old Method)" msgstr "" #: xatitv.cpp:508 msgid "Not Connected" msgstr "" #: xatitv.cpp:2595 msgid "Option" msgstr "" #: xatitv.cpp:2617 msgid "Overclock" msgstr "" #: channels.c:59 gatos-conf.cpp:511 msgid "PAL-B Australia" msgstr "" #: channels.c:57 gatos-conf.cpp:509 msgid "PAL-B Europe Antenna" msgstr "" #: channels.c:63 gatos-conf.cpp:515 msgid "PAL-B+G Italy" msgstr "" #: channels.c:61 gatos-conf.cpp:513 msgid "PAL-B+G New Zealand" msgstr "" #: channels.c:71 gatos-conf.cpp:523 msgid "PAL-B+G/H/I Many (Europe and others)" msgstr "" #. PAL #: channels.c:55 gatos-conf.cpp:507 msgid "PAL-B/G Cable" msgstr "" #: channels.c:73 gatos-conf.cpp:525 msgid "PAL-D/K China" msgstr "" #: channels.c:77 gatos-conf.cpp:529 msgid "PAL-D/K+? Korea" msgstr "" #: channels.c:75 gatos-conf.cpp:527 msgid "PAL-D/K+G Romania" msgstr "" #: channels.c:69 gatos-conf.cpp:521 msgid "PAL-I Angola" msgstr "" #: channels.c:65 gatos-conf.cpp:517 msgid "PAL-I Ireland" msgstr "" #: channels.c:67 gatos-conf.cpp:519 msgid "PAL-I South Africa" msgstr "" #: channels.c:79 gatos-conf.cpp:531 msgid "PAL-M Brazil" msgstr "" #: channels.c:81 gatos-conf.cpp:533 msgid "PAL-N Paraguay" msgstr "" #: channels.c:83 gatos-conf.cpp:535 msgid "PAL-N+? Uruguay" msgstr "" #: channels.c:85 gatos-conf.cpp:537 msgid "PAL-combN Argentina" msgstr "" #: xatitv.cpp:2537 msgid "Play" msgstr "" #: xatitv.cpp:2658 msgid "Please Be Patient" msgstr "" #: gatos-conf.cpp:407 msgid "RAM on Card" msgstr "" #: gatos-conf.cpp:552 msgid "Rage PRO interface" msgstr "" #: xatitv.cpp:2535 msgid "Rec" msgstr "" #: gatos-conf.cpp:550 msgid "Register type A" msgstr "" #: gatos-conf.cpp:551 msgid "Register type B" msgstr "" #: gatos-conf.cpp:553 msgid "Register type LG" msgstr "" #: xatitv.cpp:2550 msgid "Remove" msgstr "" #: xatitv.cpp:2645 msgid "Rescan Channels" msgstr "" #: xatitv.cpp:506 msgid "S-Video Input" msgstr "" #: xatitv.cpp:2516 msgid "SAP" msgstr "" #: channels.c:91 gatos-conf.cpp:543 msgid "SECAM-B+G Greece, Morocco" msgstr "" #: channels.c:89 gatos-conf.cpp:541 msgid "SECAM-B+G Italy" msgstr "" #: channels.c:93 gatos-conf.cpp:545 msgid "SECAM-D+K Russia, Vietnam" msgstr "" #: channels.c:95 gatos-conf.cpp:547 msgid "SECAM-K1 Togo, Niger, Congo" msgstr "" #. SECAM #: channels.c:87 gatos-conf.cpp:539 msgid "SECAM-L France" msgstr "" #: xatitv.cpp:2461 msgid "SV" msgstr "" #: xatitv.cpp:2576 msgid "Sat: " msgstr "" #: xatitv.cpp:2510 msgid "Saturation: " msgstr "" #: gatos-conf.cpp:479 msgid "Save & Quit" msgstr "" #: xatitv.cpp:2596 msgid "Save Window Size" msgstr "" #: xatitv.cpp:2527 msgid "Scan" msgstr "" #: xatitv.cpp:2654 msgid "Scanning For Channels" msgstr "" #: gatos-conf.cpp:472 xatitv.cpp:2583 msgid "Select Television Type" msgstr "" #: xatitv.cpp:2580 msgid "Set to Default" msgstr "" #: xatitv.cpp:2448 msgid "Setup" msgstr "" #: xatitv.cpp:2533 msgid "Snap" msgstr "" #: xatitv.cpp:2513 msgid "Stereo" msgstr "" #: xatitv.cpp:1425 msgid "Stereo/SAP:\\r /" msgstr "" #: xatitv.cpp:1417 msgid "Stereo/SAP:\\r /SAP" msgstr "" #: xatitv.cpp:1422 msgid "Stereo/SAP:\\rST/" msgstr "" #: xatitv.cpp:1414 msgid "Stereo/SAP:\\rST/SAP" msgstr "" #: xatitv.cpp:2539 msgid "Stop" msgstr "" #: xatitv.cpp:2459 msgid "TV" msgstr "" #: xatitv.cpp:2631 #, c-format msgid "Test Var #%d%c" msgstr "" #: xatitv.cpp:2641 msgid "Text1" msgstr "" #: xatitv.cpp:2641 msgid "Text2" msgstr "" #: atitv.c:191 msgid "USAGE: atitv [options] [[options] ]...\n" msgstr "" #: gatos-conf.cpp:655 gatos-conf.cpp:757 gatos-conf.cpp:834 gatos-conf.cpp:880 #: gatos-conf.cpp:885 #, c-format msgid "Unable to open %s\n" msgstr "" #: gatos-conf.cpp:836 #, c-format msgid "Unable to open %s or %s\n" msgstr "" #: gatos-conf.cpp:565 gatos-conf.cpp:569 #, c-format msgid "Unable to save %s\n" msgstr "" #: gatos-conf.cpp:904 msgid "Usage: gatos-conf [options]\n" msgstr "" #: xatitv.cpp:2622 msgid "Use DGA/VM" msgstr "" #: xatitv.cpp:2605 msgid "Use Desktop Mode" msgstr "" #: xatitv.cpp:2614 msgid "Use Sensitive SCAN" msgstr "" #: gatos-conf.cpp:227 #, c-format msgid "Video RAM available for X: %dkb" msgstr "" #: xatitv.cpp:2559 msgid "Vol: " msgstr "" #: xatitv.cpp:1358 msgid "Volume" msgstr "" #: xatitv.cpp:2469 msgid "Volume: " msgstr "" #: atitv.c:50 #, c-format msgid "atitv - gatos %s\n" msgstr "" #: gatos-conf.cpp:136 msgid "gatos-conf: this program must be run as root.\n" msgstr "" #: xatitv.cpp:358 msgid "" "xatitv doesn't work with remote display, use --force-display to override.\n" msgstr "" #: xutils.c:919 msgid "xatitv: Bad IBTK library version." msgstr "" #: xatitv.cpp:393 msgid "xatitv: gatos_init()" msgstr "" #: xatitv.cpp:414 msgid "xatitv: gatos_setcolorkey()" msgstr "" gatos-0.0.5/po/atisplit.pot0100644002411700123110000000122307027767314014300 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atisplit.c:99 atisplit.c:106 #, c-format msgid "atisplit:opening file \"%s\":" msgstr "" #: atisplit.c:56 atisplit.c:121 #, c-format msgid "atisplit:writing to file \"%s\":" msgstr "" gatos-0.0.5/po/atitogif.pot0100644002411700123110000000131207027767314014254 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitogif.c:62 atitogif.c:69 msgid "fork() failed" msgstr "" #: atitogif.c:49 msgid "open(/dev/null) failed" msgstr "" #: atitogif.c:57 msgid "open(outfile) failed" msgstr "" #: atitogif.c:59 atitogif.c:60 msgid "pipe() failed" msgstr "" gatos-0.0.5/po/atitojpg.pot0100644002411700123110000000125607027767314014276 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitojpg.c:59 msgid "fork() failed" msgstr "" #: atitojpg.c:47 msgid "open(/dev/null) failed" msgstr "" #: atitojpg.c:55 msgid "open(outfile) failed" msgstr "" #: atitojpg.c:57 msgid "pipe() failed" msgstr "" gatos-0.0.5/po/atitoppm.pot0100644002411700123110000000101107027767314014277 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitoppm.c:45 msgid "fopen() failed" msgstr "" gatos-0.0.5/po/yuvsum.pot0100644002411700123110000000100707027767314014017 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: yuvsum.c:73 msgid "fopen() failed" msgstr "" gatos-0.0.5/po/POTFILES.in0100644002411700123110000000051607026261370013472 0ustar bayleasrsrc/ati.c src/atim64.c src/atir128.c src/atisplit.c src/atitogif.c src/atitojpg.c src/atitoppm.c src/atitv.c src/board.c src/bogo.c src/bt829.c src/cc.c src/ccshow.c src/channels.c src/fi12xx.c src/gatos.c src/gatos-conf.cpp src/i2c.c src/ipc.c src/pci.c src/saa5281.c src/sound.c src/tvout.c src/xatitv.cpp src/xutils.c src/yuvsum.c gatos-0.0.5/po/fr/0042755002411700123110000000000007030251715012324 5ustar bayleasrgatos-0.0.5/po/fr/Makefile.in0100644002411700123110000001616107030251715014371 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ GMOFILES = gatos.gmo atisplit.gmo atitogif.gmo atitojpg.gmo atitoppm.gmo yuvsum.gmo POFILES = $(GMOFILES:.gmo=.po) LANG = fr localedir = $(datadir)/locale EXTRA_DIST = $(POFILES) SUFFIXES = .po .gmo mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h CONFIG_CLEAN_FILES = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .gmo .po $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/fr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = po/fr distdir: $(DISTFILES) @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 $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook 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-data-local install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-local uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-local install-data-am install-data install-am install \ uninstall-local uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean all: all-$(USE_NLS) install-data-local: install-$(USE_NLS) .po.gmo: @file=`echo $* | sed 's,.*/,,'`.gmo; \ echo $(GMSGFMT) -o $$file $< ;\ rm -f $$file && $(GMSGFMT) -o $$file $< all-yes: $(GMOFILES) all-no: install-yes: all @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$cat $$dir/$$name; \ echo "installing $$cat as $$dir/$$name"; \ done install-no: uninstall-local: @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ rm -f $$cat $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done dist-hook: $(GMOFILES) cp $(GMOFILES) $(distdir) clean-gmo: -rm -f $(GMOFILES) mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f $(GMOFILES) Makefile.in ############################################################################### # 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: gatos-0.0.5/po/fr/Makefile.am0100644002411700123110000000300107011544303014342 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## ## This has to be set. The rest should be reusable GMOFILES = gatos.gmo atisplit.gmo atitogif.gmo atitojpg.gmo \ atitoppm.gmo yuvsum.gmo POFILES = $(GMOFILES:.gmo=.po) LANG = fr localedir = $(datadir)/locale EXTRA_DIST = $(POFILES) all: all-$(USE_NLS) install-data-local: install-$(USE_NLS) SUFFIXES = .po .gmo .po.gmo: @file=`echo $* | sed 's,.*/,,'`.gmo; \ echo $(GMSGFMT) -o $$file $< ;\ rm -f $$file && $(GMSGFMT) -o $$file $< all-yes: $(GMOFILES) all-no: install-yes: all @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$cat $$dir/$$name; \ echo "installing $$cat as $$dir/$$name"; \ done install-no: uninstall-local: @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ rm -f $$cat $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done dist-hook: $(GMOFILES) cp $(GMOFILES) $(distdir) clean-gmo: -rm -f $(GMOFILES) mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f $(GMOFILES) Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/po/fr/gatos.po0100644002411700123110000004013007027767314014007 0ustar bayleasr# gatos fr. # Copyright (C) 1999 Free Software Foundation, Inc. # Daniel Caujolle-Bert , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gatos 0.0.5\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: 1999-12-20 01:23+CESTLast-Translator: Daniel Caujolle-Bert " "\n" "Language-Team: Daniel Caujolle-Bert \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: atitv.c:200 msgid "" "\n" "Commands:\n" msgstr "" "\n" "Commandes\n" #. printf(_(" tvout [on|off]: Turn tv-out signal on/off [not yet functional].\n")); #: atitv.c:204 msgid "" "\n" "For Example:\n" msgstr "" "\n" "Par Exemple:\n" #: atitv.c:192 msgid "" "\n" "Options:\n" msgstr "" "\n" "Options:\n" #: gatos-conf.cpp:905 msgid "" "\n" "options:\n" msgstr "" "\n" "options:\n" #: gatos-conf.cpp:907 msgid " ex: gatos-conf -X /usr/local/etc/XF86Config\n" msgstr " ex: gatos-conf -X /usr/local/etc/XF86Config\n" #: atitv.c:207 msgid " then change to channel 11 and record 10 seconds to \"f2.yuv\"\n" msgstr "" " puis passeras sur le canal 11 et enregistrera 10 secondes dans " "\"f2.yuv\"\n" #: atitv.c:210 msgid " to \"pic.ppm\"\n" msgstr " dans \"pic.ppm\"\n" #: atitv.c:206 msgid " -This will change to channel 10, record 10 seconds to \"f1.yuv\"\n" msgstr "" " -Ceci passeras sur le canal 10, enregistrera 10 secondes dans " "\"f1.yuv\"\n" #: atitv.c:209 msgid " -This will change to the SVHS connector and capture one frame\n" msgstr " -Ceci passeras sur le connecteur SVHS et captureras une trame\n" #: gatos-conf.cpp:909 msgid " --help: Display this help text.\n" msgstr " --help: Affiche ce texte d'aide.\n" #: atitv.c:194 msgid " --version: Get version info.\n" msgstr " --version: Affiche la version.\n" #: gatos-conf.cpp:906 msgid " -X: Set pathname of XF86Config file.\n" msgstr "" " -X: Définie le chemin et le nom du fichier XF86Config.\n" #: atitv.c:198 msgid " -c : Set channel.\n" msgstr " -c : Défini le canal.\n" #: atitv.c:193 msgid " -h --help: Get help (this message).\n" msgstr " -h --help: Affiche l'aide (ce message).\n" #: gatos-conf.cpp:908 msgid " -h,\n" msgstr " -h,\n" #. printf(_(" -l : Specify which mixer line ATI card is connected to.\n")); #: atitv.c:196 msgid " -m : Specify which input to use (Composite, SVHS or TV).\n" msgstr "" " -m : Spécifie quelle entrée utiliser (Composite, SVHS ou TV).\n" #: atitv.c:199 msgid " -s : Set capture size.\n" msgstr " -s : Définie la taille de capture.\n" #: atitv.c:197 msgid " -v : Set volume.\n" msgstr " -v : Règle le volume.\n" #: atitv.c:205 msgid " atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv\n" msgstr " atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv\n" #: atitv.c:208 msgid " atitv -m SVHS snap pic.ppm\n" msgstr " atitv -m SVHS snap pic.ppm\n" #: atitv.c:201 msgid " rec : record yuv file for n seconds to filename f.\n" msgstr "" " rec : enregistre un fichier yuv de n secondes dans le fichier " "f.\n" #: atitv.c:202 msgid " snap : capture a single ppm frame to filename f.\n" msgstr " snap : capture une seule trame ppm dans le fichier f.\n" #: gatos-conf.cpp:230 #, c-format msgid "%s << problem!!" msgstr "%s << problème!!" #: xutils.c:922 #, c-format msgid ", and %s found.\n" msgstr ", et %s trouvée.\n" #: xutils.c:921 #, c-format msgid "-pre%d" msgstr "-pre%d" #: gatos-conf.cpp:411 msgid "16Mb" msgstr "16Mo" #: gatos-conf.cpp:408 msgid "2Mb" msgstr "2Mo" #: gatos-conf.cpp:412 msgid "32Mb" msgstr "32Mo" #: gatos-conf.cpp:409 msgid "4Mb" msgstr "4Mo" #: gatos-conf.cpp:435 msgid "600kb for NTSC" msgstr "600ko pour le NTSC" #: gatos-conf.cpp:436 msgid "864kb for PAL/SECAM" msgstr "864ko pour le PAL/SECAM" #: gatos-conf.cpp:410 msgid "8Mb" msgstr "8Mo" #: gatos-conf.cpp:437 msgid ">>" msgstr ">>" #: gatos-conf.cpp:481 msgid "Abort" msgstr "Annule" #: xatitv.cpp:2548 msgid "Add" msgstr "Ajoute" #: xatitv.cpp:2450 msgid "Adv." msgstr "Sup." #: xatitv.cpp:2602 msgid "Always On Top" msgstr "Toujours Devant" #. None #: gatos-conf.cpp:497 msgid "Autodetect Autodetect video format" msgstr "Autodétection Autodétection du format video" #: xatitv.cpp:2610 msgid "Autohide" msgstr "Masquage Auto" #: xatitv.cpp:1043 xatitv.cpp:1879 xatitv.cpp:2050 msgid "Bad ButtonPress!\n" msgstr "Mauvais Bouton Pressé!\n" #: xatitv.cpp:1080 xatitv.cpp:1095 msgid "Bad Slider Pressed!\n" msgstr "Mauvais Ascenseur Pressé!\n" #: xatitv.cpp:1153 msgid "Bad Testbutton Pressed!\n" msgstr "Mauvais BoutonTest Pressé!\n" #: xatitv.cpp:2564 msgid "Bright: " msgstr "Brill.: " #: xatitv.cpp:1363 msgid "Brightness" msgstr "Brillance" #: xatitv.cpp:2501 msgid "Brightness: " msgstr "Brillance: " #: gatos-conf.cpp:434 msgid "Buffer size" msgstr "Taille du buffer" #: xatitv.cpp:2480 msgid "CC" msgstr "CC" #: xatitv.cpp:2640 msgid "CC Mode" msgstr "Mode CC" #: xatitv.cpp:2641 msgid "CC1" msgstr "CC1" #: xatitv.cpp:2641 msgid "CC2" msgstr "CC2" #: xatitv.cpp:2460 msgid "CV" msgstr "CV" #: gatos-conf.cpp:672 gatos-conf.cpp:853 #, c-format msgid "Can't make backup file %s\n" msgstr "Ne peut pas créér le fichier de sauvegarde %s\n" #: xatitv.cpp:1394 msgid "Caption:\\rCC1" msgstr "Caption:\\rCC1" #: xatitv.cpp:1397 msgid "Caption:\\rCC2" msgstr "Caption:\\rCC2" #: xatitv.cpp:1406 msgid "Caption:\\rERROR" msgstr "Caption:\\rERREUR" #: xatitv.cpp:1386 xatitv.cpp:1391 msgid "Caption:\\rNone" msgstr "Caption:\\Aucun" #: xatitv.cpp:1400 msgid "Caption:\\rTEXT1" msgstr "Caption:\\rTEXTE1" #: xatitv.cpp:1403 msgid "Caption:\\rTEXT2" msgstr "Caption:\\rTEXTE2" #: xatitv.cpp:2453 msgid "Capture" msgstr "Capture" #: xatitv.cpp:2125 xatitv.cpp:2153 xatitv.cpp:2160 #, c-format msgid "Channel %d%c" msgstr "Canal %d%c" #: xatitv.cpp:2521 msgid "Cold" msgstr "Froid" #: xatitv.cpp:507 msgid "Composite-Video Input" msgstr "Entrée Vidéo-Composite" #: xatitv.cpp:379 msgid "Configfile not found - Running gatos-conf.\n" msgstr "Fichier de configuration non trouvé - Exécute gatos-conf.\n" #: xatitv.cpp:389 msgid "Continuing execution of xatitv." msgstr "Continue l'exécution de xatitv." #: xatitv.cpp:2568 msgid "Contr: " msgstr "Contr: " #: xatitv.cpp:1368 msgid "Contrast" msgstr "Contraste" #: xatitv.cpp:2504 msgid "Contrast: " msgstr "Contraste: " #: xatitv.cpp:2647 msgid "Convert to Standard" msgstr "Convertir au Standard" #: xatitv.cpp:2530 msgid "Delete" msgstr "Supprime" #: xatitv.cpp:2651 xatitv.cpp:2659 msgid "Done" msgstr "Fin" #: xatitv.cpp:2456 msgid "Edit Channel" msgstr "Editer Canal" #: atitv.c:100 msgid "Error: -c switch needs 1 option\n" msgstr "Erreur: le paramètre -c requière 1 option\n" #: atitv.c:65 msgid "Error: -m switch needs 1 option\n" msgstr "Erreur: le paramètre -m requière 1 option\n" #: atitv.c:92 msgid "Error: -s switch needs 2 options\n" msgstr "Erreur: le paramètre -s requière 2 options\n" #: atitv.c:83 msgid "Error: -v switch needs 1 option\n" msgstr "Erreur: le paramètre -v requière 1 option\n" #: atitv.c:110 #, c-format msgid "Error: No such channel \"%s\"\n" msgstr "Erreur: Pas de canal \"%s\"\n" #: atitv.c:74 #, c-format msgid "Error: No such mux input \"%s\"\n" msgstr "Erreur: Aucun connecteur d'entrée \"%s\"\n" #: atitv.c:123 msgid "Error: rec command needs 2 options\n" msgstr "Erreur: la commande rec requière 2 options\n" #: atitv.c:137 msgid "Error: snap command needs 1 option\n" msgstr "Erreur: la commande snap requière 1 option\n" #: atitv.c:181 #, c-format msgid "Error: unknown command \"%s\"\n" msgstr "Erreur: commande inconnue \"%s\"\n" #: atitv.c:52 atitv.c:59 #, c-format msgid "Error: unknown option \"%s\"\n" msgstr "Erreur: option inconnue \"%s\"\n" #: xutils.c:920 #, c-format msgid "Expected IBTK version %d.%d.%d" msgstr "Version attendue d'IBTK %d.%d.%d" #: xatitv.cpp:2599 msgid "Fixed Aspect Ratio" msgstr "Ratio d'Aspect Fixe" #: xatitv.cpp:2519 msgid "Full" msgstr "Plein" #: xatitv.cpp:2524 msgid "Gamma: " msgstr "Gamma: " #: gatos-conf.cpp:549 msgid "Gatos autodection" msgstr "Autodétection par Gatos" #: gatos-conf.cpp:429 msgid "Gatos will Probe RAM" msgstr "Gatos trouvera la RAM" #: xatitv.cpp:2507 xatitv.cpp:2572 msgid "Hue: " msgstr "Nuance:" #: gatos-conf.cpp:466 msgid "I2C mode selection" msgstr "Sélection du mode I2C" #: xatitv.cpp:374 #, c-format msgid "IBTK version %s\n" msgstr "IBTK version %s\n" #: xatitv.cpp:382 msgid "If prompted for a password, Enter root password to run gatos-conf.\n" msgstr "" "Si un prompt pour un mot de passe apparait, entrez le mot de passe du root " "pour exécuter gatos-conf.\n" #: xatitv.cpp:1377 msgid "Input:\\rComposite" msgstr "Entrée:\\rComposite" #: xatitv.cpp:1374 msgid "Input:\\rS-Video" msgstr "Entrée:\\rS-Video" #: xatitv.cpp:1380 msgid "Input:\\rTV signal" msgstr "Entrée:\\rSignal TV" #: gatos-conf.cpp:554 msgid "MPP/ImpacTV interface" msgstr "Interface MPP/ImpacTV" #: xatitv.cpp:2589 msgid "Mixer" msgstr "Mixer" #: xatitv.cpp:2473 msgid "Mute" msgstr "Muet" #: channels.c:51 gatos-conf.cpp:503 msgid "NTSC Japanese TV Antenna" msgstr "NTSC Japon TV Antenne" #: channels.c:53 gatos-conf.cpp:505 msgid "NTSC Japanese TV Cable (CATV)" msgstr "NTSC Japon TV Cable (CATV)" #: channels.c:49 gatos-conf.cpp:501 msgid "NTSC North/South American Cable (CATV)" msgstr "NTSC Amérique du Nord/Sub Cable (CATV)" #. NTSC #: channels.c:47 gatos-conf.cpp:499 msgid "NTSC North/South American TV Antenna" msgstr "NTSC Amérique du Nord/Sub TV Antenne" #: xatitv.cpp:1974 msgid "New Channel" msgstr "Nouveau Canal" #. None #: channels.c:45 msgid "None None/Other Standard (Old Method)" msgstr "Aucun Aucun/Autre Standard" #: xatitv.cpp:508 msgid "Not Connected" msgstr "Pas Connecté" #: xatitv.cpp:2595 msgid "Option" msgstr "Options" #: xatitv.cpp:2617 msgid "Overclock" msgstr "Overclock" #: channels.c:59 gatos-conf.cpp:511 msgid "PAL-B Australia" msgstr "PAL-B Australie" #: channels.c:57 gatos-conf.cpp:509 msgid "PAL-B Europe Antenna" msgstr "PAL-B Europe Antenne" #: channels.c:63 gatos-conf.cpp:515 msgid "PAL-B+G Italy" msgstr "PAL-B+G Italie" #: channels.c:61 gatos-conf.cpp:513 msgid "PAL-B+G New Zealand" msgstr "PAL-B+G Nouvelle Zélande" #: channels.c:71 gatos-conf.cpp:523 msgid "PAL-B+G/H/I Many (Europe and others)" msgstr "PAL-B+G/H/I Plusieurs (Europe et autres)" #. PAL #: channels.c:55 gatos-conf.cpp:507 msgid "PAL-B/G Cable" msgstr "PAL-B/G Cable" #: channels.c:73 gatos-conf.cpp:525 msgid "PAL-D/K China" msgstr "PAL-D/K Chine" #: channels.c:77 gatos-conf.cpp:529 msgid "PAL-D/K+? Korea" msgstr "PAL-D/K+? Korée" #: channels.c:75 gatos-conf.cpp:527 msgid "PAL-D/K+G Romania" msgstr "PAL-D/K+G Roumanie" #: channels.c:69 gatos-conf.cpp:521 msgid "PAL-I Angola" msgstr "PAL-I Angola" #: channels.c:65 gatos-conf.cpp:517 msgid "PAL-I Ireland" msgstr "PAL-I Irelande" #: channels.c:67 gatos-conf.cpp:519 msgid "PAL-I South Africa" msgstr "PAL-I Afrique du Sud" #: channels.c:79 gatos-conf.cpp:531 msgid "PAL-M Brazil" msgstr "PAL-M Brézil" #: channels.c:81 gatos-conf.cpp:533 msgid "PAL-N Paraguay" msgstr "PAL-N Paraguay" #: channels.c:83 gatos-conf.cpp:535 msgid "PAL-N+? Uruguay" msgstr "PAL-N+? Uruguay" #: channels.c:85 gatos-conf.cpp:537 msgid "PAL-combN Argentina" msgstr "PAL-combN Argentine" #: xatitv.cpp:2537 msgid "Play" msgstr "Joue" #: xatitv.cpp:2658 msgid "Please Be Patient" msgstr "Patientez SVP" #: gatos-conf.cpp:407 msgid "RAM on Card" msgstr "RAM sur la Carte" #: gatos-conf.cpp:552 msgid "Rage PRO interface" msgstr "Interface Rage PRO" #: xatitv.cpp:2535 msgid "Rec" msgstr "Enr" #: gatos-conf.cpp:550 msgid "Register type A" msgstr "Registre type A" #: gatos-conf.cpp:551 msgid "Register type B" msgstr "Registre type B" #: gatos-conf.cpp:553 msgid "Register type LG" msgstr "Registre type LG" #: xatitv.cpp:2550 msgid "Remove" msgstr "Retire" #: xatitv.cpp:2645 msgid "Rescan Channels" msgstr "Rescrute Canaux" #: xatitv.cpp:506 msgid "S-Video Input" msgstr "Entrée S-Video" #: xatitv.cpp:2516 msgid "SAP" msgstr "SAP" #: channels.c:91 gatos-conf.cpp:543 msgid "SECAM-B+G Greece, Morocco" msgstr "SECAM-B+G Grèce, Morocco" #: channels.c:89 gatos-conf.cpp:541 msgid "SECAM-B+G Italy" msgstr "SECAM-B+G Italie" #: channels.c:93 gatos-conf.cpp:545 msgid "SECAM-D+K Russia, Vietnam" msgstr "SECAM-D+K Russie, Viêtnam" #: channels.c:95 gatos-conf.cpp:547 msgid "SECAM-K1 Togo, Niger, Congo" msgstr "SECAM-K1 Togo, Niger, Congo" #. SECAM #: channels.c:87 gatos-conf.cpp:539 msgid "SECAM-L France" msgstr "SECAM-L France" #: xatitv.cpp:2461 msgid "SV" msgstr "SV" #: xatitv.cpp:2576 msgid "Sat: " msgstr "Sat:" #: xatitv.cpp:2510 msgid "Saturation: " msgstr "Saturation: " #: gatos-conf.cpp:479 msgid "Save & Quit" msgstr "Sauve & Quitte" #: xatitv.cpp:2596 msgid "Save Window Size" msgstr "Sauve Taille Fenêtre" #: xatitv.cpp:2527 msgid "Scan" msgstr "Scrute" #: xatitv.cpp:2654 msgid "Scanning For Channels" msgstr "Scrute Les Canaux" #: gatos-conf.cpp:472 xatitv.cpp:2583 msgid "Select Television Type" msgstr "Sélectionnez le Type" #: xatitv.cpp:2580 msgid "Set to Default" msgstr "Par Défaut" #: xatitv.cpp:2448 msgid "Setup" msgstr "Config" #: xatitv.cpp:2533 msgid "Snap" msgstr "Cliché" #: xatitv.cpp:2513 msgid "Stereo" msgstr "Stéréo" #: xatitv.cpp:1425 msgid "Stereo/SAP:\\r /" msgstr "Stéréo/SAP:\\r /" #: xatitv.cpp:1417 msgid "Stereo/SAP:\\r /SAP" msgstr "Stéréo/SAP:\\r /SAP" #: xatitv.cpp:1422 msgid "Stereo/SAP:\\rST/" msgstr "Stéréo/SAP:\\rST/" #: xatitv.cpp:1414 msgid "Stereo/SAP:\\rST/SAP" msgstr "Stéréo/SAP:\\rST/SAP" #: xatitv.cpp:2539 msgid "Stop" msgstr "Stop" #: xatitv.cpp:2459 msgid "TV" msgstr "TV" #: xatitv.cpp:2631 #, c-format msgid "Test Var #%d%c" msgstr "Teste Var #%d%c" #: xatitv.cpp:2641 msgid "Text1" msgstr "Texte1" #: xatitv.cpp:2641 msgid "Text2" msgstr "Texte2" #: atitv.c:191 msgid "USAGE: atitv [options] [[options] ]...\n" msgstr "UTILISATION: atitv [options] [[options] ]...\n" #: gatos-conf.cpp:655 gatos-conf.cpp:757 gatos-conf.cpp:834 gatos-conf.cpp:880 #: gatos-conf.cpp:885 #, c-format msgid "Unable to open %s\n" msgstr "Ne peut pas ouvrir %s\n" #: gatos-conf.cpp:836 #, c-format msgid "Unable to open %s or %s\n" msgstr "Ne peut pas ouvrir %s ou %s\n" #: gatos-conf.cpp:565 gatos-conf.cpp:569 #, c-format msgid "Unable to save %s\n" msgstr "Ne peut pas sauver %s\n" #: gatos-conf.cpp:904 msgid "Usage: gatos-conf [options]\n" msgstr "Utilisation: gatos-conf [options]\n" #: xatitv.cpp:2622 msgid "Use DGA/VM" msgstr "Utilise DGA/VM" #: xatitv.cpp:2605 msgid "Use Desktop Mode" msgstr "Utilise Mode Bureau" #: xatitv.cpp:2614 msgid "Use Sensitive SCAN" msgstr "Utilise SCAN Sensitif" #: gatos-conf.cpp:227 #, c-format msgid "Video RAM available for X: %dkb" msgstr "RAM Vidéo disponible pour X: %dko" #: xatitv.cpp:2559 msgid "Vol: " msgstr "Vol: " #: xatitv.cpp:1358 msgid "Volume" msgstr "Volume" #: xatitv.cpp:2469 msgid "Volume: " msgstr "Volume: " #: atitv.c:50 #, c-format msgid "atitv - gatos %s\n" msgstr "atitv - gatos %s\n" #: gatos-conf.cpp:136 msgid "gatos-conf: this program must be run as root.\n" msgstr "gatos-conf: ce programme doit être exécuté en tand que root.\n" #: xatitv.cpp:358 msgid "" "xatitv doesn't work with remote display, use --force-display to override.\n" msgstr "" "xatitv ne peut fonctionner avec un affichage déporté, utilisez " "--force-display pour passer outre.\n" #: xutils.c:919 msgid "xatitv: Bad IBTK library version." msgstr "xatitv: Mauvaise version de la bibliothèque IBTK." #: xatitv.cpp:393 msgid "xatitv: gatos_init()" msgstr "xatitv: gartos_init()" #: xatitv.cpp:414 msgid "xatitv: gatos_setcolorkey()" msgstr "xatitv: gatos_setcolorkey()" gatos-0.0.5/po/fr/atisplit.po0100644002411700123110000000142207027767314014524 0ustar bayleasr# atisplit fr. # Copyright (C) 1999 Free Software Foundation, Inc. # Daniel Caujolle-Bert , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gatos 0.0.5\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: 1999-11-06 21:45+CEST\n" "Last-Translator: Daniel Caujolle-Bert \n" "Language-Team: Daniel Caujolle-Bert \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: atisplit.c:99 atisplit.c:106 #, c-format msgid "atisplit:opening file \"%s\":" msgstr "atisplit:ouverture du fichier \"%s\":" #: atisplit.c:56 atisplit.c:121 #, c-format msgid "atisplit:writing to file \"%s\":" msgstr "atisplit:écris dans le fichier \"%s\":" gatos-0.0.5/po/fr/atitogif.po0100644002411700123110000000152407027767314014504 0ustar bayleasr# atitogif fr. # Copyright (C) 1999 Free Software Foundation, Inc. # Daniel Caujolle-Bert , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gatos 0.0.5\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: 1999-11-06 21:45+CEST\n" "Last-Translator: Daniel Caujolle-Bert \n" "Language-Team: Daniel Caujolle-Bert \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: atitogif.c:62 atitogif.c:69 msgid "fork() failed" msgstr "fork() a échoué" #: atitogif.c:49 msgid "open(/dev/null) failed" msgstr "open(/dev/null) a échoué" #: atitogif.c:57 msgid "open(outfile) failed" msgstr "open(fichier_de_sortie) a échoué" #: atitogif.c:59 atitogif.c:60 msgid "pipe() failed" msgstr "pipe() a échoué" gatos-0.0.5/po/fr/atitojpg.po0100644002411700123110000000147007027767314014517 0ustar bayleasr# atitojpg fr. # Copyright (C) 1999 Free Software Foundation, Inc. # Daniel Caujolle-Bert , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gatos 0.0.5\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: 1999-11-06 21:45+CEST\n" "Last-Translator: Daniel Caujolle-Bert \n" "Language-Team: Daniel Caujolle-Bert \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: atitojpg.c:59 msgid "fork() failed" msgstr "fork() a échoué" #: atitojpg.c:47 msgid "open(/dev/null) failed" msgstr "open(/dev/null) a échoué" #: atitojpg.c:55 msgid "open(outfile) failed" msgstr "open(fichier_de_sortie) a échoué" #: atitojpg.c:57 msgid "pipe() failed" msgstr "pipe() a échoué" gatos-0.0.5/po/fr/atitoppm.po0100644002411700123110000000111507027767314014527 0ustar bayleasr# atitoppm fr. # Copyright (C) 1999 Free Software Foundation, Inc. # Daniel Caujolle-Bert , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gatos 0.0.5\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: 1999-11-06 21:45+CEST\n" "Last-Translator: Daniel Caujolle-Bert \n" "Language-Team: Daniel Caujolle-Bert \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: atitoppm.c:45 msgid "fopen() failed" msgstr "fopen() a échoué" gatos-0.0.5/po/fr/yuvsum.po0100644002411700123110000000111107027767314014236 0ustar bayleasr# yuvsum fr. # Copyright (C) 1999 Free Software Foundation, Inc. # Daniel Caujolle-Bert , 1999. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: gatos 0.0.5\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: 1999-11-06 21:45+CEST\n" "Last-Translator: Daniel Caujolle-Bert \n" "Language-Team: Daniel Caujolle-Bert \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: yuvsum.c:73 msgid "fopen() failed" msgstr "fopen() a échoué" gatos-0.0.5/po/fr/gatos.gmo0100644002411700123110000002715307030251715014150 0ustar bayleasrÞ•²¬ï< ø  @)Aj¬C¿B+F$r4—Ì+ìF$f‹0ªÛ?ù<9v†—ž£§¬°¿Ó×Úàä é'÷(:Oh q | ‰•˜ ¤¨« Æ Ôâò! )6;+Q}¥ ®¹ÍÔ Ù æ !( Jkˆ#§#Ëï (GZ_gyŽ”§C¸ü0FL#Q(u1ž/Ð 0  =K R\v•«(Çð2Jay–­ÆÞøý .2BRcj zˆŒ¬Â"â % 2>OTj–›¢³ÇØìñô :J]v‰ ¦±ÂÕõû .JL!—¹Î êö  @M\ªK¿B ,N&{F¢#é/ = KD 0 #Á 0å !M4!A‚!Ä!Õ!ç!î!ó!÷!ü!""+"/"2"9"@"E"-U" ƒ"‘"©"Ä"à" é" ó"ÿ"######.&# U# c#q#‚#‘#¢#³# »#Æ#Ì#:ã#$>$ F$ P$\$r${$ $*Œ$*·$+â$*%9%'T%+|%+¨%Ô%ô% &3&G&M&U&m&ƒ&‹&¡&e²&'+'<'O'e'k' p'%‘'1·'/é' ($'( L(Y( a(k(…(¤( »(,Ü( ))5)K)d){)”)³)Ê)ã)û)* *(*9*L*P*`*p**ˆ*˜*§*«*Ê*á*"+$+;+>+ C+P+_+t+{++ ¢+­+´+»+Â+Ó+ç+ø+ ,,,$,+,B2,u,Œ,©,"À,ã,ò,-!->-D-K-T-=f-b¤-1.9.O.+±,¤ªšEF&Y{O*°CgUqAzZ"h©Š$\ XeRw¦Np@jc)ƒIˆ¬%WŽ D…}riB›H¨«-^`‹7!'4[n_vy;l1 €žoJu¢§k’9:0 –2GT †‡¥œ 6t¯MŒ”|Ÿ‰mVL?3S#~d/.Qx=—®˜5 8•‘P£f²“­‚><™„¡Kbsa]( Commands: For Example: Options: options: ex: gatos-conf -X /usr/local/etc/XF86Config then change to channel 11 and record 10 seconds to "f2.yuv" to "pic.ppm" -This will change to channel 10, record 10 seconds to "f1.yuv" -This will change to the SVHS connector and capture one frame --help: Display this help text. --version: Get version info. -X: Set pathname of XF86Config file. -c : Set channel. -h --help: Get help (this message). -h, -m : Specify which input to use (Composite, SVHS or TV). -s : Set capture size. -v : Set volume. atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv atitv -m SVHS snap pic.ppm rec : record yuv file for n seconds to filename f. snap : capture a single ppm frame to filename f. %s << problem!!, and %s found. -pre%d16Mb2Mb32Mb4Mb600kb for NTSC864kb for PAL/SECAM8Mb>>AbortAddAdv.Always On TopAutodetect Autodetect video formatAutohideBad ButtonPress! Bad Slider Pressed! Bad Testbutton Pressed! Bright: BrightnessBrightness: Buffer sizeCCCC ModeCC1CC2CVCan't make backup file %s Caption:\rCC1Caption:\rCC2Caption:\rERRORCaption:\rNoneCaption:\rTEXT1Caption:\rTEXT2CaptureChannel %d%cColdComposite-Video InputConfigfile not found - Running gatos-conf. Continuing execution of xatitv.Contr: ContrastContrast: Convert to StandardDeleteDoneEdit ChannelError: -c switch needs 1 option Error: -m switch needs 1 option Error: -s switch needs 2 options Error: -v switch needs 1 option Error: No such channel "%s" Error: No such mux input "%s" Error: rec command needs 2 options Error: snap command needs 1 option Error: unknown command "%s" Error: unknown option "%s" Expected IBTK version %d.%d.%dFixed Aspect RatioFullGamma: Gatos autodectionGatos will Probe RAMHue: I2C mode selectionIBTK version %s If prompted for a password, Enter root password to run gatos-conf. Input:\rCompositeInput:\rS-VideoInput:\rTV signalMPP/ImpacTV interfaceMixerMuteNTSC Japanese TV AntennaNTSC Japanese TV Cable (CATV)NTSC North/South American Cable (CATV)NTSC North/South American TV AntennaNew ChannelNone None/Other Standard (Old Method)Not ConnectedOptionOverclockPAL-B AustraliaPAL-B Europe AntennaPAL-B+G ItalyPAL-B+G New ZealandPAL-B+G/H/I Many (Europe and others)PAL-B/G CablePAL-D/K ChinaPAL-D/K+? KoreaPAL-D/K+G RomaniaPAL-I AngolaPAL-I IrelandPAL-I South AfricaPAL-M BrazilPAL-N ParaguayPAL-N+? UruguayPAL-combN ArgentinaPlayPlease Be PatientRAM on CardRage PRO interfaceRecRegister type ARegister type BRegister type LGRemoveRescan ChannelsS-Video InputSAPSECAM-B+G Greece, MoroccoSECAM-B+G ItalySECAM-D+K Russia, VietnamSECAM-K1 Togo, Niger, CongoSECAM-L FranceSVSat: Saturation: Save & QuitSave Window SizeScanScanning For ChannelsSelect Television TypeSet to DefaultSetupSnapStereoStereo/SAP:\r /Stereo/SAP:\r /SAPStereo/SAP:\rST/Stereo/SAP:\rST/SAPStopTVTest Var #%d%cText1Text2USAGE: atitv [options] [[options] ]... Unable to open %s Unable to open %s or %s Unable to save %s Usage: gatos-conf [options] Use DGA/VMUse Desktop ModeUse Sensitive SCANVideo RAM available for X: %dkbVol: VolumeVolume: atitv - gatos %s gatos-conf: this program must be run as root. xatitv doesn't work with remote display, use --force-display to override. xatitv: Bad IBTK library version.xatitv: gatos_init()xatitv: gatos_setcolorkey() Commandes Par Exemple: Options: options: ex: gatos-conf -X /usr/local/etc/XF86Config puis passeras sur le canal 11 et enregistrera 10 secondes dans "f2.yuv" dans "pic.ppm" -Ceci passeras sur le canal 10, enregistrera 10 secondes dans "f1.yuv" -Ceci passeras sur le connecteur SVHS et captureras une trame --help: Affiche ce texte d'aide. --version: Affiche la version. -X: Définie le chemin et le nom du fichier XF86Config. -c : Défini le canal. -h --help: Affiche l'aide (ce message). -h, -m : Spécifie quelle entrée utiliser (Composite, SVHS ou TV). -s : Définie la taille de capture. -v : Règle le volume. atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv atitv -m SVHS snap pic.ppm rec : enregistre un fichier yuv de n secondes dans le fichier f. snap : capture une seule trame ppm dans le fichier f. %s << problème!!, et %s trouvée. -pre%d16Mo2Mo32Mo4Mo600ko pour le NTSC864ko pour le PAL/SECAM8Mo>>AnnuleAjouteSup.Toujours DevantAutodétection Autodétection du format videoMasquage AutoMauvais Bouton Pressé! Mauvais Ascenseur Pressé! Mauvais BoutonTest Pressé! Brill.: BrillanceBrillance: Taille du bufferCCMode CCCC1CC2CVNe peut pas créér le fichier de sauvegarde %s Caption:\rCC1Caption:\rCC2Caption:\rERREURCaption:\AucunCaption:\rTEXTE1Caption:\rTEXTE2CaptureCanal %d%cFroidEntrée Vidéo-CompositeFichier de configuration non trouvé - Exécute gatos-conf. Continue l'exécution de xatitv.Contr: ContrasteContraste: Convertir au StandardSupprimeFinEditer CanalErreur: le paramètre -c requière 1 option Erreur: le paramètre -m requière 1 option Erreur: le paramètre -s requière 2 options Erreur: le paramètre -v requière 1 option Erreur: Pas de canal "%s" Erreur: Aucun connecteur d'entrée "%s" Erreur: la commande rec requière 2 options Erreur: la commande snap requière 1 option Erreur: commande inconnue "%s" Erreur: option inconnue "%s" Version attendue d'IBTK %d.%d.%dRatio d'Aspect FixePleinGamma: Autodétection par GatosGatos trouvera la RAMNuance:Sélection du mode I2CIBTK version %s Si un prompt pour un mot de passe apparait, entrez le mot de passe du root pour exécuter gatos-conf. Entrée:\rCompositeEntrée:\rS-VideoEntrée:\rSignal TVInterface MPP/ImpacTVMixerMuetNTSC Japon TV AntenneNTSC Japon TV Cable (CATV)NTSC Amérique du Nord/Sub Cable (CATV)NTSC Amérique du Nord/Sub TV AntenneNouveau CanalAucun Aucun/Autre StandardPas ConnectéOptionsOverclockPAL-B AustraliePAL-B Europe AntennePAL-B+G ItaliePAL-B+G Nouvelle ZélandePAL-B+G/H/I Plusieurs (Europe et autres)PAL-B/G CablePAL-D/K ChinePAL-D/K+? KoréePAL-D/K+G RoumaniePAL-I AngolaPAL-I IrelandePAL-I Afrique du SudPAL-M BrézilPAL-N ParaguayPAL-N+? UruguayPAL-combN ArgentineJouePatientez SVPRAM sur la CarteInterface Rage PROEnrRegistre type ARegistre type BRegistre type LGRetireRescrute CanauxEntrée S-VideoSAPSECAM-B+G Grèce, MoroccoSECAM-B+G ItalieSECAM-D+K Russie, ViêtnamSECAM-K1 Togo, Niger, CongoSECAM-L FranceSVSat:Saturation: Sauve & QuitteSauve Taille FenêtreScruteScrute Les CanauxSélectionnez le TypePar DéfautConfigClichéStéréoStéréo/SAP:\r /Stéréo/SAP:\r /SAPStéréo/SAP:\rST/Stéréo/SAP:\rST/SAPStopTVTeste Var #%d%cTexte1Texte2UTILISATION: atitv [options] [[options] ]... Ne peut pas ouvrir %s Ne peut pas ouvrir %s ou %s Ne peut pas sauver %s Utilisation: gatos-conf [options] Utilise DGA/VMUtilise Mode BureauUtilise SCAN SensitifRAM Vidéo disponible pour X: %dkoVol: VolumeVolume: atitv - gatos %s gatos-conf: ce programme doit être exécuté en tand que root. xatitv ne peut fonctionner avec un affichage déporté, utilisez --force-display pour passer outre. xatitv: Mauvaise version de la bibliothèque IBTK.xatitv: gartos_init()xatitv: gatos_setcolorkey()gatos-0.0.5/po/fr/atisplit.gmo0100644002411700123110000000032407030251715014653 0ustar bayleasrÞ•,<Pl#‹$¯atisplit:opening file "%s":atisplit:writing to file "%s":atisplit:ouverture du fichier "%s":atisplit:écris dans le fichier "%s":gatos-0.0.5/po/fr/atitogif.gmo0100644002411700123110000000042207030251715014627 0ustar bayleasrÞ•<\ p~• ª¸È áfork() failedopen(/dev/null) failedopen(outfile) failedpipe() failedfork() a échouéopen(/dev/null) a échouéopen(fichier_de_sortie) a échouépipe() a échouégatos-0.0.5/po/fr/atitojpg.gmo0100644002411700123110000000042207030251715014642 0ustar bayleasrÞ•<\ p~• ª¸È áfork() failedopen(/dev/null) failedopen(outfile) failedpipe() failedfork() a échouéopen(/dev/null) a échouéopen(fichier_de_sortie) a échouépipe() a échouégatos-0.0.5/po/fr/atitoppm.gmo0100644002411700123110000000012007030251715014651 0ustar bayleasrÞ•$,0?fopen() failedfopen() a échouégatos-0.0.5/po/fr/yuvsum.gmo0100644002411700123110000000012007030251715014364 0ustar bayleasrÞ•$,0?fopen() failedfopen() a échouégatos-0.0.5/po/model/0042755002411700123110000000000007030251717013017 5ustar bayleasrgatos-0.0.5/po/model/Makefile.in0100644002411700123110000001617207030251717015066 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ GMOFILES = gatos.gmo atisplit.gmo atitogif.gmo atitojpg.gmo atitoppm.gmo yuvsum.gmo POFILES = $(GMOFILES:.gmo=.po) LANG = model localedir = $(datadir)/locale EXTRA_DIST = $(POFILES) SUFFIXES = .po .gmo mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../../config.h CONFIG_CLEAN_FILES = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .gmo .po $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/model/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = po/model distdir: $(DISTFILES) @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 $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook 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-data-local install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-local uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-local install-data-am install-data install-am install \ uninstall-local uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean all: all-$(USE_NLS) install-data-local: install-$(USE_NLS) .po.gmo: @file=`echo $* | sed 's,.*/,,'`.gmo; \ echo $(GMSGFMT) -o $$file $< ;\ rm -f $$file && $(GMSGFMT) -o $$file $< all-yes: $(GMOFILES) all-no: install-yes: all @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$cat $$dir/$$name; \ echo "installing $$cat as $$dir/$$name"; \ done install-no: uninstall-local: @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ rm -f $$cat $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done dist-hook: $(GMOFILES) cp $(GMOFILES) $(distdir) clean-gmo: -rm -f $(GMOFILES) mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f $(GMOFILES) Makefile.in ############################################################################### # 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: gatos-0.0.5/po/model/Makefile.am0100644002411700123110000000300207011544303015034 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## ## This has to be set. The rest should be reusable GMOFILES = gatos.gmo atisplit.gmo atitogif.gmo atitojpg.gmo \ atitoppm.gmo yuvsum.gmo POFILES = $(GMOFILES:.gmo=.po) LANG = model localedir = $(datadir)/locale EXTRA_DIST = $(POFILES) all: all-$(USE_NLS) install-data-local: install-$(USE_NLS) SUFFIXES = .po .gmo .po.gmo: @file=`echo $* | sed 's,.*/,,'`.gmo; \ echo $(GMSGFMT) -o $$file $< ;\ rm -f $$file && $(GMSGFMT) -o $$file $< all-yes: $(GMOFILES) all-no: install-yes: all @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$cat $$dir/$$name; \ echo "installing $$cat as $$dir/$$name"; \ done install-no: uninstall-local: @catalogs='$(GMOFILES)'; \ for cat in $$catalogs; do \ destdir=$(localedir); \ name=`echo $$cat | sed -e 's/\.gmo/\.mo/'` \ dir=$$destdir/$(LANG)/LC_MESSAGES; \ rm -f $$cat $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done dist-hook: $(GMOFILES) cp $(GMOFILES) $(distdir) clean-gmo: -rm -f $(GMOFILES) mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f $(GMOFILES) Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/po/model/gatos.po0100644002411700123110000002773607027767315014522 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitv.c:200 msgid "" "\n" "Commands:\n" msgstr "" "\n" "MODEL\n" #. printf(_(" tvout [on|off]: Turn tv-out signal on/off [not yet functional].\n")); #: atitv.c:204 msgid "" "\n" "For Example:\n" msgstr "" #: atitv.c:192 msgid "" "\n" "Options:\n" msgstr "" #: gatos-conf.cpp:905 msgid "" "\n" "options:\n" msgstr "" #: gatos-conf.cpp:907 msgid " ex: gatos-conf -X /usr/local/etc/XF86Config\n" msgstr "" #: atitv.c:207 msgid " then change to channel 11 and record 10 seconds to \"f2.yuv\"\n" msgstr "" #: atitv.c:210 msgid " to \"pic.ppm\"\n" msgstr "" #: atitv.c:206 msgid " -This will change to channel 10, record 10 seconds to \"f1.yuv\"\n" msgstr "" #: atitv.c:209 msgid " -This will change to the SVHS connector and capture one frame\n" msgstr "" #: gatos-conf.cpp:909 msgid " --help: Display this help text.\n" msgstr "" #: atitv.c:194 msgid " --version: Get version info.\n" msgstr "" #: gatos-conf.cpp:906 msgid " -X: Set pathname of XF86Config file.\n" msgstr "" #: atitv.c:198 msgid " -c : Set channel.\n" msgstr "" #: atitv.c:193 msgid " -h --help: Get help (this message).\n" msgstr "" #: gatos-conf.cpp:908 msgid " -h,\n" msgstr "" #. printf(_(" -l : Specify which mixer line ATI card is connected to.\n")); #: atitv.c:196 msgid " -m : Specify which input to use (Composite, SVHS or TV).\n" msgstr "" #: atitv.c:199 msgid " -s : Set capture size.\n" msgstr "" #: atitv.c:197 msgid " -v : Set volume.\n" msgstr "" #: atitv.c:205 msgid " atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv\n" msgstr "" #: atitv.c:208 msgid " atitv -m SVHS snap pic.ppm\n" msgstr "" #: atitv.c:201 msgid " rec : record yuv file for n seconds to filename f.\n" msgstr "" #: atitv.c:202 msgid " snap : capture a single ppm frame to filename f.\n" msgstr "" #: gatos-conf.cpp:230 #, c-format msgid "%s << problem!!" msgstr "" #: xutils.c:922 #, c-format msgid ", and %s found.\n" msgstr "" #: xutils.c:921 #, c-format msgid "-pre%d" msgstr "" #: gatos-conf.cpp:411 msgid "16Mb" msgstr "" #: gatos-conf.cpp:408 msgid "2Mb" msgstr "" #: gatos-conf.cpp:412 msgid "32Mb" msgstr "" #: gatos-conf.cpp:409 msgid "4Mb" msgstr "" #: gatos-conf.cpp:435 msgid "600kb for NTSC" msgstr "" #: gatos-conf.cpp:436 msgid "864kb for PAL/SECAM" msgstr "" #: gatos-conf.cpp:410 msgid "8Mb" msgstr "" #: gatos-conf.cpp:437 msgid ">>" msgstr "" #: gatos-conf.cpp:481 msgid "Abort" msgstr "" #: xatitv.cpp:2548 msgid "Add" msgstr "" #: xatitv.cpp:2450 msgid "Adv." msgstr "" #: xatitv.cpp:2602 msgid "Always On Top" msgstr "" #. None #: gatos-conf.cpp:497 msgid "Autodetect Autodetect video format" msgstr "" #: xatitv.cpp:2610 msgid "Autohide" msgstr "" #: xatitv.cpp:1043 xatitv.cpp:1879 xatitv.cpp:2050 msgid "Bad ButtonPress!\n" msgstr "" #: xatitv.cpp:1080 xatitv.cpp:1095 msgid "Bad Slider Pressed!\n" msgstr "" #: xatitv.cpp:1153 msgid "Bad Testbutton Pressed!\n" msgstr "" #: xatitv.cpp:2564 msgid "Bright: " msgstr "" #: xatitv.cpp:1363 msgid "Brightness" msgstr "" #: xatitv.cpp:2501 msgid "Brightness: " msgstr "" #: gatos-conf.cpp:434 msgid "Buffer size" msgstr "" #: xatitv.cpp:2480 msgid "CC" msgstr "" #: xatitv.cpp:2640 msgid "CC Mode" msgstr "" #: xatitv.cpp:2641 msgid "CC1" msgstr "" #: xatitv.cpp:2641 msgid "CC2" msgstr "" #: xatitv.cpp:2460 msgid "CV" msgstr "" #: gatos-conf.cpp:672 gatos-conf.cpp:853 #, c-format msgid "Can't make backup file %s\n" msgstr "" #: xatitv.cpp:1394 msgid "Caption:\\rCC1" msgstr "" #: xatitv.cpp:1397 msgid "Caption:\\rCC2" msgstr "" #: xatitv.cpp:1406 msgid "Caption:\\rERROR" msgstr "" #: xatitv.cpp:1386 xatitv.cpp:1391 msgid "Caption:\\rNone" msgstr "" #: xatitv.cpp:1400 msgid "Caption:\\rTEXT1" msgstr "" #: xatitv.cpp:1403 msgid "Caption:\\rTEXT2" msgstr "" #: xatitv.cpp:2453 msgid "Capture" msgstr "" #: xatitv.cpp:2125 xatitv.cpp:2153 xatitv.cpp:2160 #, c-format msgid "Channel %d%c" msgstr "" #: xatitv.cpp:2521 msgid "Cold" msgstr "" #: xatitv.cpp:507 msgid "Composite-Video Input" msgstr "" #: xatitv.cpp:379 msgid "Configfile not found - Running gatos-conf.\n" msgstr "" #: xatitv.cpp:389 msgid "Continuing execution of xatitv." msgstr "" #: xatitv.cpp:2568 msgid "Contr: " msgstr "" #: xatitv.cpp:1368 msgid "Contrast" msgstr "" #: xatitv.cpp:2504 msgid "Contrast: " msgstr "" #: xatitv.cpp:2647 msgid "Convert to Standard" msgstr "" #: xatitv.cpp:2530 msgid "Delete" msgstr "" #: xatitv.cpp:2651 xatitv.cpp:2659 msgid "Done" msgstr "" #: xatitv.cpp:2456 msgid "Edit Channel" msgstr "" #: atitv.c:100 msgid "Error: -c switch needs 1 option\n" msgstr "" #: atitv.c:65 msgid "Error: -m switch needs 1 option\n" msgstr "" #: atitv.c:92 msgid "Error: -s switch needs 2 options\n" msgstr "" #: atitv.c:83 msgid "Error: -v switch needs 1 option\n" msgstr "" #: atitv.c:110 #, c-format msgid "Error: No such channel \"%s\"\n" msgstr "" #: atitv.c:74 #, c-format msgid "Error: No such mux input \"%s\"\n" msgstr "" #: atitv.c:123 msgid "Error: rec command needs 2 options\n" msgstr "" #: atitv.c:137 msgid "Error: snap command needs 1 option\n" msgstr "" #: atitv.c:181 #, c-format msgid "Error: unknown command \"%s\"\n" msgstr "" #: atitv.c:52 atitv.c:59 #, c-format msgid "Error: unknown option \"%s\"\n" msgstr "" #: xutils.c:920 #, c-format msgid "Expected IBTK version %d.%d.%d" msgstr "" #: xatitv.cpp:2599 msgid "Fixed Aspect Ratio" msgstr "" #: xatitv.cpp:2519 msgid "Full" msgstr "" #: xatitv.cpp:2524 msgid "Gamma: " msgstr "" #: gatos-conf.cpp:549 msgid "Gatos autodection" msgstr "" #: gatos-conf.cpp:429 msgid "Gatos will Probe RAM" msgstr "" #: xatitv.cpp:2507 xatitv.cpp:2572 msgid "Hue: " msgstr "" #: gatos-conf.cpp:466 msgid "I2C mode selection" msgstr "" #: xatitv.cpp:374 #, c-format msgid "IBTK version %s\n" msgstr "" #: xatitv.cpp:382 msgid "If prompted for a password, Enter root password to run gatos-conf.\n" msgstr "" #: xatitv.cpp:1377 msgid "Input:\\rComposite" msgstr "" #: xatitv.cpp:1374 msgid "Input:\\rS-Video" msgstr "" #: xatitv.cpp:1380 msgid "Input:\\rTV signal" msgstr "" #: gatos-conf.cpp:554 msgid "MPP/ImpacTV interface" msgstr "" #: xatitv.cpp:2589 msgid "Mixer" msgstr "" #: xatitv.cpp:2473 msgid "Mute" msgstr "" #: channels.c:51 gatos-conf.cpp:503 msgid "NTSC Japanese TV Antenna" msgstr "" #: channels.c:53 gatos-conf.cpp:505 msgid "NTSC Japanese TV Cable (CATV)" msgstr "" #: channels.c:49 gatos-conf.cpp:501 msgid "NTSC North/South American Cable (CATV)" msgstr "" #. NTSC #: channels.c:47 gatos-conf.cpp:499 msgid "NTSC North/South American TV Antenna" msgstr "" #: xatitv.cpp:1974 msgid "New Channel" msgstr "" #. None #: channels.c:45 msgid "None None/Other Standard (Old Method)" msgstr "" #: xatitv.cpp:508 msgid "Not Connected" msgstr "" #: xatitv.cpp:2595 msgid "Option" msgstr "" #: xatitv.cpp:2617 msgid "Overclock" msgstr "" #: channels.c:59 gatos-conf.cpp:511 msgid "PAL-B Australia" msgstr "" #: channels.c:57 gatos-conf.cpp:509 msgid "PAL-B Europe Antenna" msgstr "" #: channels.c:63 gatos-conf.cpp:515 msgid "PAL-B+G Italy" msgstr "" #: channels.c:61 gatos-conf.cpp:513 msgid "PAL-B+G New Zealand" msgstr "" #: channels.c:71 gatos-conf.cpp:523 msgid "PAL-B+G/H/I Many (Europe and others)" msgstr "" #. PAL #: channels.c:55 gatos-conf.cpp:507 msgid "PAL-B/G Cable" msgstr "" #: channels.c:73 gatos-conf.cpp:525 msgid "PAL-D/K China" msgstr "" #: channels.c:77 gatos-conf.cpp:529 msgid "PAL-D/K+? Korea" msgstr "" #: channels.c:75 gatos-conf.cpp:527 msgid "PAL-D/K+G Romania" msgstr "" #: channels.c:69 gatos-conf.cpp:521 msgid "PAL-I Angola" msgstr "" #: channels.c:65 gatos-conf.cpp:517 msgid "PAL-I Ireland" msgstr "" #: channels.c:67 gatos-conf.cpp:519 msgid "PAL-I South Africa" msgstr "" #: channels.c:79 gatos-conf.cpp:531 msgid "PAL-M Brazil" msgstr "" #: channels.c:81 gatos-conf.cpp:533 msgid "PAL-N Paraguay" msgstr "" #: channels.c:83 gatos-conf.cpp:535 msgid "PAL-N+? Uruguay" msgstr "" #: channels.c:85 gatos-conf.cpp:537 msgid "PAL-combN Argentina" msgstr "" #: xatitv.cpp:2537 msgid "Play" msgstr "" #: xatitv.cpp:2658 msgid "Please Be Patient" msgstr "" #: gatos-conf.cpp:407 msgid "RAM on Card" msgstr "" #: gatos-conf.cpp:552 msgid "Rage PRO interface" msgstr "" #: xatitv.cpp:2535 msgid "Rec" msgstr "" #: gatos-conf.cpp:550 msgid "Register type A" msgstr "" #: gatos-conf.cpp:551 msgid "Register type B" msgstr "" #: gatos-conf.cpp:553 msgid "Register type LG" msgstr "" #: xatitv.cpp:2550 msgid "Remove" msgstr "" #: xatitv.cpp:2645 msgid "Rescan Channels" msgstr "" #: xatitv.cpp:506 msgid "S-Video Input" msgstr "" #: xatitv.cpp:2516 msgid "SAP" msgstr "" #: channels.c:91 gatos-conf.cpp:543 msgid "SECAM-B+G Greece, Morocco" msgstr "" #: channels.c:89 gatos-conf.cpp:541 msgid "SECAM-B+G Italy" msgstr "" #: channels.c:93 gatos-conf.cpp:545 msgid "SECAM-D+K Russia, Vietnam" msgstr "" #: channels.c:95 gatos-conf.cpp:547 msgid "SECAM-K1 Togo, Niger, Congo" msgstr "" #. SECAM #: channels.c:87 gatos-conf.cpp:539 msgid "SECAM-L France" msgstr "" #: xatitv.cpp:2461 msgid "SV" msgstr "" #: xatitv.cpp:2576 msgid "Sat: " msgstr "" #: xatitv.cpp:2510 msgid "Saturation: " msgstr "" #: gatos-conf.cpp:479 msgid "Save & Quit" msgstr "" #: xatitv.cpp:2596 msgid "Save Window Size" msgstr "" #: xatitv.cpp:2527 msgid "Scan" msgstr "" #: xatitv.cpp:2654 msgid "Scanning For Channels" msgstr "" #: gatos-conf.cpp:472 xatitv.cpp:2583 msgid "Select Television Type" msgstr "" #: xatitv.cpp:2580 msgid "Set to Default" msgstr "" #: xatitv.cpp:2448 msgid "Setup" msgstr "" #: xatitv.cpp:2533 msgid "Snap" msgstr "" #: xatitv.cpp:2513 msgid "Stereo" msgstr "" #: xatitv.cpp:1425 msgid "Stereo/SAP:\\r /" msgstr "" #: xatitv.cpp:1417 msgid "Stereo/SAP:\\r /SAP" msgstr "" #: xatitv.cpp:1422 msgid "Stereo/SAP:\\rST/" msgstr "" #: xatitv.cpp:1414 msgid "Stereo/SAP:\\rST/SAP" msgstr "" #: xatitv.cpp:2539 msgid "Stop" msgstr "" #: xatitv.cpp:2459 msgid "TV" msgstr "" #: xatitv.cpp:2631 #, c-format msgid "Test Var #%d%c" msgstr "" #: xatitv.cpp:2641 msgid "Text1" msgstr "" #: xatitv.cpp:2641 msgid "Text2" msgstr "" #: atitv.c:191 msgid "USAGE: atitv [options] [[options] ]...\n" msgstr "" #: gatos-conf.cpp:655 gatos-conf.cpp:757 gatos-conf.cpp:834 gatos-conf.cpp:880 #: gatos-conf.cpp:885 #, c-format msgid "Unable to open %s\n" msgstr "" #: gatos-conf.cpp:836 #, c-format msgid "Unable to open %s or %s\n" msgstr "" #: gatos-conf.cpp:565 gatos-conf.cpp:569 #, c-format msgid "Unable to save %s\n" msgstr "" #: gatos-conf.cpp:904 msgid "Usage: gatos-conf [options]\n" msgstr "" #: xatitv.cpp:2622 msgid "Use DGA/VM" msgstr "" #: xatitv.cpp:2605 msgid "Use Desktop Mode" msgstr "" #: xatitv.cpp:2614 msgid "Use Sensitive SCAN" msgstr "" #: gatos-conf.cpp:227 #, c-format msgid "Video RAM available for X: %dkb" msgstr "" #: xatitv.cpp:2559 msgid "Vol: " msgstr "" #: xatitv.cpp:1358 msgid "Volume" msgstr "" #: xatitv.cpp:2469 msgid "Volume: " msgstr "" #: atitv.c:50 #, c-format msgid "atitv - gatos %s\n" msgstr "" #: gatos-conf.cpp:136 msgid "gatos-conf: this program must be run as root.\n" msgstr "" #: xatitv.cpp:358 msgid "" "xatitv doesn't work with remote display, use --force-display to override.\n" msgstr "" #: xutils.c:919 msgid "xatitv: Bad IBTK library version." msgstr "" #: xatitv.cpp:393 msgid "xatitv: gatos_init()" msgstr "" #: xatitv.cpp:414 msgid "xatitv: gatos_setcolorkey()" msgstr "" gatos-0.0.5/po/model/atisplit.po0100644002411700123110000000123007027767315015213 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atisplit.c:99 atisplit.c:106 #, c-format msgid "atisplit:opening file \"%s\":" msgstr "MODEL" #: atisplit.c:56 atisplit.c:121 #, c-format msgid "atisplit:writing to file \"%s\":" msgstr "" gatos-0.0.5/po/model/atitogif.po0100644002411700123110000000131707027767315015176 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitogif.c:62 atitogif.c:69 msgid "fork() failed" msgstr "MODEL" #: atitogif.c:49 msgid "open(/dev/null) failed" msgstr "" #: atitogif.c:57 msgid "open(outfile) failed" msgstr "" #: atitogif.c:59 atitogif.c:60 msgid "pipe() failed" msgstr "" gatos-0.0.5/po/model/atitojpg.po0100644002411700123110000000126307027767315015211 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitojpg.c:59 msgid "fork() failed" msgstr "MODEL" #: atitojpg.c:47 msgid "open(/dev/null) failed" msgstr "" #: atitojpg.c:55 msgid "open(outfile) failed" msgstr "" #: atitojpg.c:57 msgid "pipe() failed" msgstr "" gatos-0.0.5/po/model/atitoppm.po0100644002411700123110000000101607027767315015221 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: atitoppm.c:45 msgid "fopen() failed" msgstr "MODEL" gatos-0.0.5/po/model/yuvsum.po0100644002411700123110000000101407027767315014732 0ustar bayleasr# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 1999-12-21 22:19+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" #: yuvsum.c:73 msgid "fopen() failed" msgstr "MODEL" gatos-0.0.5/po/model/gatos.gmo0100644002411700123110000000010407030251717014626 0ustar bayleasrÞ•$, 0< Commands: MODEL gatos-0.0.5/po/model/atisplit.gmo0100644002411700123110000000012207030251717015342 0ustar bayleasrÞ•$,0Latisplit:opening file "%s":MODELgatos-0.0.5/po/model/atitogif.gmo0100644002411700123110000000010407030251717015317 0ustar bayleasrÞ•$, 0>fork() failedMODELgatos-0.0.5/po/model/atitojpg.gmo0100644002411700123110000000010407030251717015332 0ustar bayleasrÞ•$, 0>fork() failedMODELgatos-0.0.5/po/model/atitoppm.gmo0100644002411700123110000000010507030251717015347 0ustar bayleasrÞ•$,0?fopen() failedMODELgatos-0.0.5/po/model/yuvsum.gmo0100644002411700123110000000010507030251717015062 0ustar bayleasrÞ•$,0?fopen() failedMODELgatos-0.0.5/src/0042755002411700123110000000000007030251717012070 5ustar bayleasrgatos-0.0.5/src/Makefile.am0100644002411700123110000002012707027741522014125 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## ## ## Options for automake ## AUTOMAKE_OPTIONS = no-dependencies foreign ## ## C and C++ optimization flags ## C_OPT = -O CXX_OPT = -O DBG = -g ## ## C and C++ flags ## CFLAGS = -Wall -pipe $(C_OPT) $(DBG) CXXFLAGS = -Wall -pipe $(CXX_OPT) ## ## C and C ++ compiler ## CC = @CC@ CXX = @CXX@ INCLUDES = -I.. -I. @INTLDIR@ -I/usr/local/include -I$(X_X11_INC) ## ## Raw, hashing and X stuff ## RAW_FLAGS = @RAW_OUTPUT@ HASH_CHARS = @HASH_CHARS@ XEXTLIBS = @XEXTLIBS@ XEXTFLAGS = @XEXTFLAGS@ X_X11_LIB = @X_X11_LIB@ X_X11_INC = @X_X11_INC@ MATH_LIB = -lm ## ## Extra FLAGS ## if WITH_OSSEMU NETBSD_OSS = -lossaudio endif NETBSD_EXTRA = @NETBSD_EXTRA@ NOPADS = @NOPADS@ ## ## Curses stuff ## if HAS_CURSES CURSDEF = -DCC_CURSES CURSFIL = ccshow.c CURSOBJ = ccshow.o CURSLIB = @CURSES_LIBS@ endif ## ## Delay stuff ## if WITH_KERNEL_DELAY DELAYDEFS = -DUSE_DELAY_S DELAYOBJ = delay.lo DELAYSFIL = delay.S DELAYINC = delay.h LINKAGEINC = linkage.h endif ## ## Intl stuff ## INTLLIBS = @INTLLIBS@ XGETTEXT = @XGETTEXT@ ## ## IPC Stuff ## USE_SHM = @USE_SHM@ USE_IPC = @USE_IPC@ ## ## Define many options ## DEFS = $(DELAYDEFS) $(XEXTFLAGS) $(HASH_CHARS) $(CURSDEF) \ $(RAW_FLAGS) $(USE_SHM) $(USE_IPC) \ -DLIBGATOS_PATH=\"$(libdir)/libgatos.a\" \ -DGATOS_CONF=\"$(bindir)/gatos-conf\" \ -DCONFIGFILE=\"$(sysconfdir)/gatos.conf\" \ -DGATOS_LOCALEDIR=\"$(datadir)/locale\" ## ## These files MUST be present in the distribution ## EXTRA_DIST = ccshow.c cp850-8x16 iso01mod-8x16 xutils.c atiregs.h ## ## Binaries program that will be install ## bin_PROGRAMS = atisplit atitogif atitojpg atitoppm atitv \ gatos-conf scanpci xatitv yuvsum ## ## Binary program that will NOT be install ## noinst_PROGRAMS = bin2c ############################################################################### ## ## Atisplit program ## atisplit_SOURCES = \ atisplit.c \ i18n.h atisplit_DEPENDENCIES = $(INTLLIBS) atisplit_LDADD = $(INTLLIBS) ## ## Atitogif program ## atitogif_SOURCES = \ atitogif.c \ i18n.h atitogif_DEPENDENCIES = $(INTLLIBS) atitogif_LDADD = $(INTLLIBS) ## ## Atitojpg program ## atitojpg_SOURCES = \ atitojpg.c \ i18n.h atitojpg_DEPENDENCIES = $(INTLLIBS) atitojpg_LDADD = $(INTLLIBS) ## ## Atitoppm program ## atitoppm_SOURCES = \ atitoppm.c \ i18n.h atitoppm_DEPENDENCIES = $(INTLLIBS) atitoppm_LDADD = $(INTLLIBS) ## ## Atitv program ## atitv_SOURCES = \ atitv.c \ gatos.h \ i18n.h \ sound.h atitv_DEPENDENCIES = $(INTLLIBS) libgatos.la atitv_LDADD = libgatos.la $(INTLLIBS) $(NETBSD_OSS) $(NETBSD_EXTRA) $(MATH_LIB) ## ## Gatos-conf program ## gatos_conf_SOURCES = \ channels.h \ freq.h \ i18n.h \ gatos-conf.cpp \ xutils.h gatos_conf_DEPENDENCIES = cp850_8x16.inc iso01mod_8x16.inc xutils.o $(INTLLIBS) gatos_conf_LDADD = xutils.o -L/usr/local/lib -libtk $(INTLLIBS) \ $(X_LIBS) $(X_X11_LIB) $(XEXTLIBS) ## ## Scanpci program ## scanpci_SOURCES = \ scanpci.c ## ## Xatitv program ## xatitv_SOURCES = \ cc.h \ channels.h \ $(CURSFIL) \ freq.h \ gatos.h \ i18n.h \ sound.h \ xatitv.cpp \ xutils.h xatitv_DEPENDENCIES = cp850_8x16.inc iso01mod_8x16.inc $(CURSOBJ) \ xutils.o $(INTLLIBS) libgatos.la xatitv_LDADD = xutils.o "-dlopen" libgatos.la -L/usr/local/lib -libtk \ $(INTLLIBS) $(X_LIBS) $(X_X11_LIB) $(XEXTLIBS) \ $(CURSLIB) $(NETBSD_OSS) $(NETBSD_EXTRA) $(MATH_LIB) ## ## Yuvsum program ## yuvsum_SOURCES = \ yuvsum.c \ i18n.h yuvsum_DEPENDENCIES = $(INTLLIBS) yuvsum_LDADD = $(INTLLIBS) ## ## Bin2c program ## bin2c_SOURCES = \ bin2c.c ############################################################################### ## ## Gatos library ## lib_LTLIBRARIES = libgatos.la libgatos_la_SOURCES = \ ati.c \ atim64.c \ atir128.c \ board.c \ bogo.c \ bt829.c \ cc.c \ channels.c \ $(DELAYSFIL) \ fi12xx.c \ gatos.c \ i2c.c \ ipc.c \ pci.c \ saa5281.c \ sound.c \ tvout.c libgatos_la_DEPENDENCIES = $(DELAYOBJ) bogo.lo $(INTLLIBS) libgatos_la_LDFLAGS = -version-info $(GATOS_MAJOR_VERSION):$(GATOS_SUB_VERSION):$(GATOS_MINOR_VERSION) include_HEADERS =\ ati.h \ atim64.h \ atir128.h \ atiregs.h \ board.h \ bogo.h \ bt829.h \ cc.h \ ccshow.h \ channels.h \ $(DELAYINC) \ $(LINKAGEINC) \ fi12xx.h \ freq.h \ gatos.h \ i18n.h \ i2c.h \ ipc.h \ m64regs.h \ pci.h \ r128regs.h \ saa5281.h \ sound.h \ tvout.h \ version.h \ xutils.h ############################################################################### ## ## ## $(INTLLIBS): cd ../intl && $(MAKE) all cp850_8x16.inc: bin2c cp850-8x16 ./bin2c cp850-8x16 cp850_8x16 > cp850_8x16.inc iso01mod_8x16.inc: bin2c iso01mod-8x16 ./bin2c iso01mod-8x16 iso01mod_8x16 > iso01mod_8x16.inc ## ## Never optimize or get_bogomips() will crash. ## bogo.lo: bogo.c $(CC) -Wall -pipe -O0 $(DBG) -I.. @INTLDIR@ -fomit-frame-pointer -finline-functions $(NOPADS) -c bogo.c -o bogo.lo delay.lo: delay.S $(CC) -D__KERNEL__ -D__ASSEMBLY__ -traditional -c delay.S -o delay.lo scanpci: scanpci.c $(CC) -o scanpci scanpci.c ## ## Extract messages strings from c an cpp files and put them ## into the ../po directory ## messages: $(XGETTEXT) --default-domain=atisplit --add-comments --keyword=_ \ --keyword=N_ -s atisplit.c \ && mv atisplit.po ../po/atisplit.pot $(XGETTEXT) --default-domain=atitogif --add-comments --keyword=_ \ --keyword=N_ -s atitogif.c \ && mv atitogif.po ../po/atitogif.pot $(XGETTEXT) --default-domain=atitojpg --add-comments --keyword=_ \ --keyword=N_ -s atitojpg.c \ && mv atitojpg.po ../po/atitojpg.pot $(XGETTEXT) --default-domain=atitoppm --add-comments --keyword=_ \ --keyword=N_ -s atitoppm.c \ && mv atitoppm.po ../po/atitoppm.pot $(XGETTEXT) --default-domain=yuvsum --add-comments --keyword=_ \ --keyword=N_ -s yuvsum.c \ && mv yuvsum.po ../po/yuvsum.pot $(XGETTEXT) --default-domain=gatos --add-comments --keyword=_ \ --keyword=N_ -C -s atitv.c ati.c atim64.c atir128.c \ board.c bogo.c bt829.c cc.c ccshow.c channels.c \ fi12xx.c gatos.c gatos-conf.cpp i2c.c ipc.c \ pci.c saa5281.c sound.c tvout.c xatitv.cpp xutils.c \ && mv gatos.po ../po/gatos.pot ## ## Hardcoded install-bin section due of SUID of xatitv and atitv ## install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; \ for p in $$list; do \ if test -f $$p; then \ if test "$$p" = "atitv" -o \ "$$p" = "xatitv"; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s -o root -m 04755 $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s -o root -m 04755 $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ fi; \ else :; \ fi; \ done ## ## Install header files (default=/usr/local/include/gatos) ## install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir)/gatos @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)/gatos/$$p"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/gatos/$$p; \ done ## ## Remove them ## uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) list='$(include_HEADERS)'; for p in $$list; do \ rm -f $(DESTDIR)$(includedir)/gatos/$$p; \ done clean-generic: -rm -f cp850_8x16.inc iso01mod_8x16.inc mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/src/Makefile.in0100644002411700123110000004777607030250640014147 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ l = @l@ AUTOMAKE_OPTIONS = no-dependencies foreign C_OPT = -O CXX_OPT = -O DBG = -g CFLAGS = -Wall -pipe $(C_OPT) $(DBG) CXXFLAGS = -Wall -pipe $(CXX_OPT) CC = @CC@ CXX = @CXX@ INCLUDES = -I.. -I. @INTLDIR@ -I/usr/local/include -I$(X_X11_INC) RAW_FLAGS = @RAW_OUTPUT@ HASH_CHARS = @HASH_CHARS@ XEXTLIBS = @XEXTLIBS@ XEXTFLAGS = @XEXTFLAGS@ X_X11_LIB = @X_X11_LIB@ X_X11_INC = @X_X11_INC@ MATH_LIB = -lm @WITH_OSSEMU_TRUE@NETBSD_OSS = -lossaudio NETBSD_EXTRA = @NETBSD_EXTRA@ NOPADS = @NOPADS@ @HAS_CURSES_TRUE@CURSDEF = -DCC_CURSES @HAS_CURSES_TRUE@CURSFIL = ccshow.c @HAS_CURSES_TRUE@CURSOBJ = ccshow.o @HAS_CURSES_TRUE@CURSLIB = @CURSES_LIBS@ @WITH_KERNEL_DELAY_TRUE@DELAYDEFS = -DUSE_DELAY_S @WITH_KERNEL_DELAY_TRUE@DELAYOBJ = delay.lo @WITH_KERNEL_DELAY_TRUE@DELAYSFIL = delay.S @WITH_KERNEL_DELAY_TRUE@DELAYINC = delay.h @WITH_KERNEL_DELAY_TRUE@LINKAGEINC = linkage.h INTLLIBS = @INTLLIBS@ XGETTEXT = @XGETTEXT@ USE_SHM = @USE_SHM@ USE_IPC = @USE_IPC@ DEFS = $(DELAYDEFS) $(XEXTFLAGS) $(HASH_CHARS) $(CURSDEF) $(RAW_FLAGS) $(USE_SHM) $(USE_IPC) -DLIBGATOS_PATH=\"$(libdir)/libgatos.a\" -DGATOS_CONF=\"$(bindir)/gatos-conf\" -DCONFIGFILE=\"$(sysconfdir)/gatos.conf\" -DGATOS_LOCALEDIR=\"$(datadir)/locale\" EXTRA_DIST = ccshow.c cp850-8x16 iso01mod-8x16 xutils.c atiregs.h bin_PROGRAMS = atisplit atitogif atitojpg atitoppm atitv gatos-conf scanpci xatitv yuvsum noinst_PROGRAMS = bin2c ############################################################################### atisplit_SOURCES = atisplit.c i18n.h atisplit_DEPENDENCIES = $(INTLLIBS) atisplit_LDADD = $(INTLLIBS) atitogif_SOURCES = atitogif.c i18n.h atitogif_DEPENDENCIES = $(INTLLIBS) atitogif_LDADD = $(INTLLIBS) atitojpg_SOURCES = atitojpg.c i18n.h atitojpg_DEPENDENCIES = $(INTLLIBS) atitojpg_LDADD = $(INTLLIBS) atitoppm_SOURCES = atitoppm.c i18n.h atitoppm_DEPENDENCIES = $(INTLLIBS) atitoppm_LDADD = $(INTLLIBS) atitv_SOURCES = atitv.c gatos.h i18n.h sound.h atitv_DEPENDENCIES = $(INTLLIBS) libgatos.la atitv_LDADD = libgatos.la $(INTLLIBS) $(NETBSD_OSS) $(NETBSD_EXTRA) $(MATH_LIB) gatos_conf_SOURCES = channels.h freq.h i18n.h gatos-conf.cpp xutils.h gatos_conf_DEPENDENCIES = cp850_8x16.inc iso01mod_8x16.inc xutils.o $(INTLLIBS) gatos_conf_LDADD = xutils.o -L/usr/local/lib -libtk $(INTLLIBS) $(X_LIBS) $(X_X11_LIB) $(XEXTLIBS) scanpci_SOURCES = scanpci.c xatitv_SOURCES = cc.h channels.h $(CURSFIL) freq.h gatos.h i18n.h sound.h xatitv.cpp xutils.h xatitv_DEPENDENCIES = cp850_8x16.inc iso01mod_8x16.inc $(CURSOBJ) xutils.o $(INTLLIBS) libgatos.la xatitv_LDADD = xutils.o "-dlopen" libgatos.la -L/usr/local/lib -libtk $(INTLLIBS) $(X_LIBS) $(X_X11_LIB) $(XEXTLIBS) $(CURSLIB) $(NETBSD_OSS) $(NETBSD_EXTRA) $(MATH_LIB) yuvsum_SOURCES = yuvsum.c i18n.h yuvsum_DEPENDENCIES = $(INTLLIBS) yuvsum_LDADD = $(INTLLIBS) bin2c_SOURCES = bin2c.c ############################################################################### lib_LTLIBRARIES = libgatos.la libgatos_la_SOURCES = ati.c atim64.c atir128.c board.c bogo.c bt829.c cc.c channels.c $(DELAYSFIL) fi12xx.c gatos.c i2c.c ipc.c pci.c saa5281.c sound.c tvout.c libgatos_la_DEPENDENCIES = $(DELAYOBJ) bogo.lo $(INTLLIBS) libgatos_la_LDFLAGS = -version-info $(GATOS_MAJOR_VERSION):$(GATOS_SUB_VERSION):$(GATOS_MINOR_VERSION) include_HEADERS = ati.h atim64.h atir128.h atiregs.h board.h bogo.h bt829.h cc.h ccshow.h channels.h $(DELAYINC) $(LINKAGEINC) fi12xx.h freq.h gatos.h i18n.h i2c.h ipc.h m64regs.h pci.h r128regs.h saa5281.h sound.h tvout.h version.h xutils.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = version.h LTLIBRARIES = $(lib_LTLIBRARIES) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ libgatos_la_LIBADD = @WITH_KERNEL_DELAY_TRUE@libgatos_la_OBJECTS = ati.lo atim64.lo \ @WITH_KERNEL_DELAY_TRUE@atir128.lo board.lo bogo.lo bt829.lo cc.lo \ @WITH_KERNEL_DELAY_TRUE@channels.lo delay.lo fi12xx.lo gatos.lo i2c.lo \ @WITH_KERNEL_DELAY_TRUE@ipc.lo pci.lo saa5281.lo sound.lo tvout.lo @WITH_KERNEL_DELAY_FALSE@libgatos_la_OBJECTS = ati.lo atim64.lo \ @WITH_KERNEL_DELAY_FALSE@atir128.lo board.lo bogo.lo bt829.lo cc.lo \ @WITH_KERNEL_DELAY_FALSE@channels.lo fi12xx.lo gatos.lo i2c.lo ipc.lo \ @WITH_KERNEL_DELAY_FALSE@pci.lo saa5281.lo sound.lo tvout.lo PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) atisplit_OBJECTS = atisplit.o atisplit_LDFLAGS = atitogif_OBJECTS = atitogif.o atitogif_LDFLAGS = atitojpg_OBJECTS = atitojpg.o atitojpg_LDFLAGS = atitoppm_OBJECTS = atitoppm.o atitoppm_LDFLAGS = atitv_OBJECTS = atitv.o atitv_LDFLAGS = gatos_conf_OBJECTS = gatos-conf.o gatos_conf_LDFLAGS = scanpci_OBJECTS = scanpci.o scanpci_LDADD = $(LDADD) scanpci_DEPENDENCIES = scanpci_LDFLAGS = @HAS_CURSES_FALSE@xatitv_OBJECTS = xatitv.o @HAS_CURSES_TRUE@xatitv_OBJECTS = ccshow.o xatitv.o xatitv_LDFLAGS = yuvsum_OBJECTS = yuvsum.o yuvsum_LDFLAGS = bin2c_OBJECTS = bin2c.o bin2c_LDADD = $(LDADD) bin2c_DEPENDENCIES = bin2c_LDFLAGS = CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ HEADERS = $(include_HEADERS) DIST_COMMON = Makefile.am Makefile.in version.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(libgatos_la_SOURCES) $(atisplit_SOURCES) $(atitogif_SOURCES) $(atitojpg_SOURCES) $(atitoppm_SOURCES) $(atitv_SOURCES) $(gatos_conf_SOURCES) $(scanpci_SOURCES) $(xatitv_SOURCES) $(yuvsum_SOURCES) $(bin2c_SOURCES) OBJECTS = $(libgatos_la_OBJECTS) $(atisplit_OBJECTS) $(atitogif_OBJECTS) $(atitojpg_OBJECTS) $(atitoppm_OBJECTS) $(atitv_OBJECTS) $(gatos_conf_OBJECTS) $(scanpci_OBJECTS) $(xatitv_OBJECTS) $(yuvsum_OBJECTS) $(bin2c_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .cpp .lo .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 cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status version.h: $(top_builddir)/config.status version.h.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) distclean-libLTLIBRARIES: maintainer-clean-libLTLIBRARIES: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done .c.o: $(COMPILE) -c $< .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: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: libgatos.la: $(libgatos_la_OBJECTS) $(libgatos_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libgatos_la_LDFLAGS) $(libgatos_la_OBJECTS) $(libgatos_la_LIBADD) $(LIBS) mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: atisplit: $(atisplit_OBJECTS) $(atisplit_DEPENDENCIES) @rm -f atisplit $(LINK) $(atisplit_LDFLAGS) $(atisplit_OBJECTS) $(atisplit_LDADD) $(LIBS) atitogif: $(atitogif_OBJECTS) $(atitogif_DEPENDENCIES) @rm -f atitogif $(LINK) $(atitogif_LDFLAGS) $(atitogif_OBJECTS) $(atitogif_LDADD) $(LIBS) atitojpg: $(atitojpg_OBJECTS) $(atitojpg_DEPENDENCIES) @rm -f atitojpg $(LINK) $(atitojpg_LDFLAGS) $(atitojpg_OBJECTS) $(atitojpg_LDADD) $(LIBS) atitoppm: $(atitoppm_OBJECTS) $(atitoppm_DEPENDENCIES) @rm -f atitoppm $(LINK) $(atitoppm_LDFLAGS) $(atitoppm_OBJECTS) $(atitoppm_LDADD) $(LIBS) atitv: $(atitv_OBJECTS) $(atitv_DEPENDENCIES) @rm -f atitv $(LINK) $(atitv_LDFLAGS) $(atitv_OBJECTS) $(atitv_LDADD) $(LIBS) gatos-conf: $(gatos_conf_OBJECTS) $(gatos_conf_DEPENDENCIES) @rm -f gatos-conf $(CXXLINK) $(gatos_conf_LDFLAGS) $(gatos_conf_OBJECTS) $(gatos_conf_LDADD) $(LIBS) xatitv: $(xatitv_OBJECTS) $(xatitv_DEPENDENCIES) @rm -f xatitv $(CXXLINK) $(xatitv_LDFLAGS) $(xatitv_OBJECTS) $(xatitv_LDADD) $(LIBS) yuvsum: $(yuvsum_OBJECTS) $(yuvsum_DEPENDENCIES) @rm -f yuvsum $(LINK) $(yuvsum_LDFLAGS) $(yuvsum_OBJECTS) $(yuvsum_LDADD) $(LIBS) bin2c: $(bin2c_OBJECTS) $(bin2c_DEPENDENCIES) @rm -f bin2c $(LINK) $(bin2c_LDFLAGS) $(bin2c_OBJECTS) $(bin2c_LDADD) $(LIBS) .cpp.o: $(CXXCOMPILE) -c $< .cpp.lo: $(LTCXXCOMPILE) -c $< 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) @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-libLTLIBRARIES install-binPROGRAMS 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-libLTLIBRARIES uninstall-binPROGRAMS \ uninstall-includeHEADERS uninstall: uninstall-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \ $(DESTDIR)$(includedir) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-binPROGRAMS \ mostlyclean-noinstPROGRAMS mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-libLTLIBRARIES clean-compile clean-libtool \ clean-binPROGRAMS clean-noinstPROGRAMS clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-libLTLIBRARIES distclean-compile \ distclean-libtool distclean-binPROGRAMS \ distclean-noinstPROGRAMS distclean-tags \ distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-binPROGRAMS \ maintainer-clean-noinstPROGRAMS 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-am .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ distclean-compile clean-compile maintainer-clean-compile \ mostlyclean-libtool distclean-libtool clean-libtool \ maintainer-clean-libtool mostlyclean-binPROGRAMS distclean-binPROGRAMS \ clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ install-binPROGRAMS mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ uninstall-includeHEADERS install-includeHEADERS tags 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 \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean ############################################################################### $(INTLLIBS): cd ../intl && $(MAKE) all cp850_8x16.inc: bin2c cp850-8x16 ./bin2c cp850-8x16 cp850_8x16 > cp850_8x16.inc iso01mod_8x16.inc: bin2c iso01mod-8x16 ./bin2c iso01mod-8x16 iso01mod_8x16 > iso01mod_8x16.inc bogo.lo: bogo.c $(CC) -Wall -pipe -O0 $(DBG) -I.. @INTLDIR@ -fomit-frame-pointer -finline-functions $(NOPADS) -c bogo.c -o bogo.lo delay.lo: delay.S $(CC) -D__KERNEL__ -D__ASSEMBLY__ -traditional -c delay.S -o delay.lo scanpci: scanpci.c $(CC) -o scanpci scanpci.c messages: $(XGETTEXT) --default-domain=atisplit --add-comments --keyword=_ \ --keyword=N_ -s atisplit.c \ && mv atisplit.po ../po/atisplit.pot $(XGETTEXT) --default-domain=atitogif --add-comments --keyword=_ \ --keyword=N_ -s atitogif.c \ && mv atitogif.po ../po/atitogif.pot $(XGETTEXT) --default-domain=atitojpg --add-comments --keyword=_ \ --keyword=N_ -s atitojpg.c \ && mv atitojpg.po ../po/atitojpg.pot $(XGETTEXT) --default-domain=atitoppm --add-comments --keyword=_ \ --keyword=N_ -s atitoppm.c \ && mv atitoppm.po ../po/atitoppm.pot $(XGETTEXT) --default-domain=yuvsum --add-comments --keyword=_ \ --keyword=N_ -s yuvsum.c \ && mv yuvsum.po ../po/yuvsum.pot $(XGETTEXT) --default-domain=gatos --add-comments --keyword=_ \ --keyword=N_ -C -s atitv.c ati.c atim64.c atir128.c \ board.c bogo.c bt829.c cc.c ccshow.c channels.c \ fi12xx.c gatos.c gatos-conf.cpp i2c.c ipc.c \ pci.c saa5281.c sound.c tvout.c xatitv.cpp xutils.c \ && mv gatos.po ../po/gatos.pot install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; \ for p in $$list; do \ if test -f $$p; then \ if test "$$p" = "atitv" -o \ "$$p" = "xatitv"; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s -o root -m 04755 $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s -o root -m 04755 $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) -s $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ fi; \ else :; \ fi; \ done install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir)/gatos @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)/gatos/$$p"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/gatos/$$p; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) list='$(include_HEADERS)'; for p in $$list; do \ rm -f $(DESTDIR)$(includedir)/gatos/$$p; \ done clean-generic: -rm -f cp850_8x16.inc iso01mod_8x16.inc mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/src/version.h.in0100644002411700123110000000231207005052501014314 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_VERSION_H #define GATOS_VERSION_H 1 #ifdef __cplusplus extern "C" { #endif #define GATOS_MAJOR_VERSION @GATOS_MAJOR_VERSION@ #define GATOS_MINOR_VERSION @GATOS_MINOR_VERSION@ #define GATOS_SUB_VERSION @GATOS_SUB_VERSION@ #define GATOS_VERSION_STRING "@GATOS_VERSION@" #define IBTK_REQUIRED_VERSION "@IBTK_REQUIRED_VERSION@" #ifdef __cplusplus } #endif #endif gatos-0.0.5/src/ati.c0100644002411700123110000001045507026175441013015 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_ATI_C 1 #include "gatos.h" #include "ati.h" #include "atim64.h" #include "atir128.h" #include #include #include #include #include #include #include #include #include /* Private global vars */ static int m64=0, r128=0 ; /* Mach64 or Rage128 ? */ /* ------------------------------------------------------------------------ */ /* Initialization routines */ int ati_inita(void) { char *ident=gatos.aticard[gatos.cardidx].ident ; /* Determine if chip is Mach64 or Rage128 */ /* This is a round-about way of doing it, will clean up later /ØAA */ if (!strncmp(ident,"Mach64",6)) m64 = 1 ; if (!strncmp(ident,"Rage128",7)) r128 = 1 ; if (m64+r128 != 1) RETURN(ENODEV) ; /* m64_inita() will fill out m64 part of struct ati */ ati.r128 = r128 ; /* Initialize chip */ if (m64) return m64_inita() ; else return r128_inita() ; } int ati_initb(void) { if (m64) return m64_initb() ; else return r128_initb() ; } /* ------------------------------------------------------------------------ */ /* Public routines */ /* Overlay Window Colorkeying */ int ati_setcolorkey(void) { if (m64) return m64_setcolorkey() ; else return r128_setcolorkey() ; } /* Enable/display video capture to capture buffers */ void ati_enable_capture(int enable) { if (m64) m64_enable_capture(enable) ; else r128_enable_capture(enable) ; } /* Enable/disable video display in Overlay Window */ void ati_enable_video(int enable) { if (m64) m64_enable_video(enable) ; else r128_enable_video(enable) ; } /* Capture Buffer Mode */ void ati_buffer_mode(void) { if (m64) m64_buffer_mode() ; else r128_buffer_mode() ; } /* ------------------------------------------------------------------------ */ /* Size in pixels of incoming video stream (full frame) */ int ati_setcaptsize(void) { if (m64) return m64_setcaptsize() ; else return r128_setcaptsize() ; } /* ------------------------------------------------------------------------ */ int ati_pollscreen(int sig) { if (m64) return m64_pollscreen(sig) ; else return r128_pollscreen(sig) ; } /* ------------------------------------------------------------------------ */ /* Size and position of Overlay Scaler window */ void ati_setgeometry(void) { if (m64) m64_setgeometry() ; else r128_setgeometry() ; } /* ------------------------------------------------------------------------ */ /* Note: * Gamma and Red Temp correction only affects * video displayed in the Overlay Scaler window. * Data in the capture buffers is not affected. */ /* Overlay Scaler window gamma correction */ int ati_setgamma(void) { if (m64) return m64_setgamma() ; else return r128_setgamma() ; } /* Overlay Scaler window red color temp (cold=9800K or warm=6500K) */ int ati_setcold(void) { if (m64) return m64_setcold() ; else return r128_setcold() ; } /* ------------------------------------------------------------------------ */ /* Capture and playback routines */ void ati_rgbcapture(unsigned char *buf) { if (m64) m64_rgbcapture(buf) ; else r128_rgbcapture(buf) ; } void ati_capture(FILE *file, int wait) { if (m64) m64_capture(file,wait) ; else r128_capture(file,wait) ; } void ati_playback(FILE *file, int wait) { if (m64) m64_playback(file,wait) ; else r128_playback(file,wait) ; } /* ------------------------------------------------------------------------ */ /* Debug and report routines */ void ati_dumpregs(void) { if (m64) m64_dumpregs() ; else r128_dumpregs() ; } gatos-0.0.5/src/atim64.c0100644002411700123110000006634307027471327013356 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_ATIM64_C 1 /* Define to 0 for normal operation, define to 1 for * display of capture buffers in upper left corner */ #define VISIBLE_BUFFERS 0 #if VISIBLE_BUFFERS #define BUF0 0 #define BUF1 0 #define BYTESTRIDE (gatos.xdim*stride) #define PIXELSTRIDE ((gatos.xdim*stride)>>1) #else #define BUF0 gatos.buffer0 #define BUF1 gatos.buffer1 #define BYTESTRIDE (gatos.xcapt+gatos.xcapt) #define PIXELSTRIDE (gatos.xcapt) #endif #include "gatos.h" #include "ati.h" #include "atim64.h" #include "m64regs.h" #include #include #include #include #include #include #include #include #include /* Private global vars */ static u32 scale_cntl=DISABLE_M64_VIDEO ; static int stride=0 ; /* FrameBuffer pixel stride (bytes per pixel) */ static u32 save_off_pitch=0, save_h_total_disp=0, save_v_total_disp=0 ; static u8 ecp_div=0 ; static int firstpoll=1 ; #if 0 static int atishow=0 ; #endif /* ------------------------------------------------------------------------ */ /* Initialization routines */ int m64_inita(void) { u32 id=CONFIG_CHIP_ID ; int d, v, f, m ; /* Both chip register apertures enabled (chip in use by X server) ? */ if (id == 0xFFFFFFFF || VIDEO_FORMAT == 0xFFFFFFFF) RETURN(ENXIO) ; /* Chip Class must be 0x00 (VGA device) */ if (id & 0x00FF0000) RETURN(ENODEV) ; /* Check the FrameBuffer address */ if ( ((CONFIG_CNTL<<18) & 0xFFC00000) != gatos.fbaddr ) RETURN(EINVAL) ; /* ATI chip device id and chip revision */ d = gatos.ati.deviceid = id & 0x0000FFFF ; /* Device ID */ v = gatos.ati.revision = (id & 0x07000000) >> 24 ; /* Chip Version */ f = (id & 0x38000000) >> 27 ; /* Chip Foundry */ m = (id & 0xC0000000) >> 30 ; /* Chip Version Minor */ /* Set detailed ATI chip ID flags (struct ati) */ m64_chipid(d,v,f,m) ; /* Older chips w/o video capture and overlay scaler */ if (ati.gx || ati.cx || ati.ct || ati.et) RETURN(ENOSYS) ; /* Amount of Video RAM in kilobytes */ gatos.videoram = MEM_CNTL & 15 ; if (gatos.videoram < 8) gatos.videoram = 512*(gatos.videoram+1) ; else if (gatos.videoram < 12) gatos.videoram = 1024*(gatos.videoram-3) ; else gatos.videoram = 2048*(gatos.videoram-7) ; RETURN0 ; } int m64_initb(void) { int regs=0 ; /* Place video capture buffers at top of video memory, reserve * * 4kb for registers in framebuffer (only if 8MB videomem) */ if (gatos.regaddr == 0xFFFFFFFF && gatos.videoram == 8192) regs = 4 ; gatos.captbufsize = (gatos.buffermem - regs) >> 1 ; gatos.buffer0 = 1024*(gatos.videoram - regs) - 1024*gatos.captbufsize ; gatos.buffer1 = gatos.buffer0 - 1024*gatos.captbufsize ; /* Initial ATI register programming */ scale_cntl = ENABLE_M64_VIDEO ; TRIG_CNTL = 0x00000000 ; OVERLAY_SCALE_CNTL = DISABLE_M64_VIDEO ; CAPTURE_BUF0_OFFSET = BUF0 ; CAPTURE_BUF1_OFFSET = BUF1 ; OVERLAY_VIDEO_CLR = 0x00000000 ; OVERLAY_VIDEO_MSK = 0x00000000 ; OVERLAY_KEY_CNTL = 0x00000050 ; SCALER_COLOR_CNTL = 0x00101000 ; SCALER_H_COEFF0 = 0x00002000 ; SCALER_H_COEFF1 = 0x0D06200D ; SCALER_H_COEFF2 = 0x0D0A1C0D ; SCALER_H_COEFF3 = 0x0C0E1A0C ; SCALER_H_COEFF4 = 0x0C14140C ; VIDEO_FORMAT = 0x000B000B ; ati_setcolorkey() ; ati_pollscreen(0) ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Set detailed ATI chip ID flags */ static int m64_chipid(int d, int v, int f, int m) { int match=0, vfm=(v<<8)|(f<<4)|m, vm=(v<<4)|m ; memset(&ati,0,sizeof(ati)) ; /* Clear all flags first */ switch (d) { /* Chip type (ID) */ case 0x00D7: ati.gx = 1 ; /* (GX) */ switch (v) { case 0: ati.gx_c = match = 1 ; break ; case 1: ati.gx_d = match = 1 ; break ; case 2: ati.gx_e = match = 1 ; break ; case 3: default: ati.gx_f = match = 1 ; break ; } break ; case 0x0057: ati.cx = match = 1 ; break ; /* (CX) */ case 0x4354: ati.ct = match = 1 ; break ; /* CT */ case 0x4554: ati.et = match = 1 ; break ; /* ET */ case 0x4C54: ati.lt = match = 1 ; break ; /* LT */ /* VT */ case 0x5654: /* VT */ case 0x5655: /* VU */ ati.vt = 1 ; switch (vfm) { case 0x010: ati.vt_a3n1 = match = 1 ; break ; case 0x000: ati.vt_a3s1 = match = 1 ; break ; case 0x011: ati.vt_a4n1 = match = 1 ; break ; case 0x001: ati.vt_a4s1 = match = 1 ; break ; case 0x100: ati.vt_b1s1 = match = 1 ; break ; case 0x230: ati.vt_b2u1 = match = 1 ; break ; case 0x231: ati.vt_b2u2 = match = 1 ; break ; case 0x232: ati.vt_b2u3 = match = 1 ; break ; } if (match && v>0) ati.doesvtb = 1 ; break ; /* GT */ case 0x4754: /* GT */ case 0x4755: /* GU */ ati.gt = 1 ; switch (vfm) { case 0x000: if (d==0x4754) ati.gt_a2s1 = match = 1 ; break ; case 0x100: if (d==0x4754) ati.gt_b1s1 = match = 1 ; break ; case 0x101: if (d==0x4754) ati.gt_b1s2 = match = 1 ; break ; case 0x230: ati.gt_b2u1 = match = 1 ; break ; case 0x231: ati.gt_b2u2 = match = 1 ; break ; case 0x232: ati.gt_b2u3 = match = 1 ; break ; default: break ; } if (match && v>0) ati.doesvtb = 1 ; break ; /* Rage IIC */ case 0x4756: /* GV */ case 0x475A: /* GZ */ case 0x4757: /* GW */ case 0x4759: /* GY */ case 0x5656: /* VV */ case 0x5657: /* VW */ ati.gt = 1 ; switch (vm) { case 0x20: switch (d) { case 0x4756: ati.gv_b3u1 = match = 1 ; break ; case 0x475A: ati.gz_b3u1 = match = 1 ; break ; case 0x4757: ati.gw_b3u1 = match = 1 ; break ; case 0x4759: ati.gy_b3u1 = match = 1 ; break ; case 0x5656: ati.vv_b3u1 = match = ati.vt = 1 ; ati.gt = 0 ; break ; case 0x5657: ati.vw_b3u1 = match = ati.vt = 1 ; ati.gt = 0 ; break ; } ati.gt2c = ati.gt2c_b3u1 = ati.doesvtb = 1 ; break ; case 0x21: switch (d) { case 0x4756: ati.gv_b3u2 = match = 1 ; break ; case 0x475A: ati.gz_b3u2 = match = 1 ; break ; case 0x4757: ati.gw_b3u2 = match = 1 ; break ; case 0x4759: ati.gy_b3u2 = match = 1 ; break ; case 0x5656: ati.vv_b3u2 = match = ati.vt = 1 ; ati.gt = 0 ; break ; case 0x5657: ati.vw_b3u2 = match = ati.vt = 1 ; ati.gt = 0 ; break ; } ati.gt2c = ati.gt2c_b3u2 = ati.doesvtb = 1 ; break ; default: break ; } break ; /* Rage LT */ case 0x4C47: /* LG */ ati.lg = match = ati.lg_a1s1 = ati.doesvtb = 1 ; break ; /* Rage LT PRO (LT-C) */ case 0x4C44: /* LD */ case 0x4C49: /* LI */ case 0x4C50: /* LP */ case 0x4C51: /* LQ */ case 0x4C42: /* LB */ ati.lt_c = ati.doesltc = ati.doesgtc = 1 ; switch (vm) { case 0x00: switch (d) { case 0x4C44: ati.ld_c1u1 = match = 1 ; break ; case 0x4C49: ati.li_c1u1 = match = 1 ; break ; case 0x4C50: ati.lp_c1u1 = match = 1 ; break ; case 0x4C51: ati.lq_c1u1 = match = 1 ; break ; case 0x4C42: ati.lb_c1u1 = match = 1 ; break ; } ati.lt_c1u1 = 1 ; break ; case 0x41: switch (d) { case 0x4C44: ati.ld_c2u1 = match = 1 ; break ; case 0x4C49: ati.li_c2u1 = match = 1 ; break ; case 0x4C50: ati.lp_c2u1 = match = 1 ; break ; case 0x4C51: ati.lq_c2u1 = match = 1 ; break ; case 0x4C42: ati.lb_c2u1 = match = 1 ; break ; } ati.lt_c2u1 = 1 ; break ; case 0x42: switch (d) { case 0x4C44: ati.ld_c2u2 = match = 1 ; break ; case 0x4C49: ati.li_c2u2 = match = 1 ; break ; case 0x4C50: ati.lp_c2u2 = match = 1 ; break ; case 0x4C51: ati.lq_c2u2 = match = 1 ; break ; case 0x4C42: ati.lb_c2u2 = match = 1 ; break ; } ati.lt_c2u2 = 1 ; break ; case 0x43: switch (d) { case 0x4C44: ati.ld_c2u3 = match = 1 ; break ; case 0x4C49: ati.li_c2u3 = match = 1 ; break ; case 0x4C50: ati.lp_c2u3 = match = 1 ; break ; case 0x4C51: ati.lq_c2u3 = match = 1 ; break ; case 0x4C42: ati.lb_c2u3 = match = 1 ; break ; } ati.lt_c2u3 = 1 ; break ; default: ati.lt_c2u3 = ati.lb_c2u3 = 1 ; break ; } break ; /* Rage Mobility */ case 0x4C4D: /* LM */ case 0x4C52: /* LR */ ati.lt_c = ati.doesltc = ati.doesgtc = 1 ; switch (vm) { case 0x40: switch (d) { case 0x4C4D: ati.lm_a1t1 = match = 1 ; break ; case 0x4C52: ati.lr_a1t1 = match = 1 ; break ; } ati.ltm = 1 ; break ; default: break ; } break ; /* Rage XL/XC */ case 0x474D: /* GM */ case 0x474E: /* GN */ case 0x474F: /* GO */ /*case 0x4750: The Mach64 GP is also a GT_C ?!? * GP */ case 0x4752: /* GR */ case 0x4753: /* GS */ ati.lt_c = ati.ltm = ati.doesltc = ati.doesgtc = 1 ; switch (vm) { case 0x40: switch (d) { case 0x474D: ati.gm_a1t1 = match = 1 ; break ; case 0x474E: ati.gn_a1t1 = match = 1 ; break ; case 0x474F: ati.go_a1t1 = match = 1 ; break ; /*case 0x4750: ati.gp_a1t1 = match = 1 ; break ; => GT_C below */ case 0x4752: ati.gr_a1t1 = match = 1 ; break ; case 0x4753: ati.gs_a1t1 = match = 1 ; break ; ati.xlxc = 1 ; break ; } default: break ; } break ; /* GT_C */ case 0x4750: /* The Mach64 GP is also a Rage XL/XC ?!? * GP */ ati.lt_c = ati.ltm = ati.doesltc = ati.doesgtc = 1 ; if (vm==0x40) ati.gp_a1t1 = ati.xlxc = match = 1 ; case 0x4744: /* GD */ case 0x4749: /* GI */ case 0x4751: /* GQ */ case 0x4742: /* GB */ ati.gt = ati.gt_c = ati.doesgtc = 1 ; switch (vfm) { case 0x330: switch (d) { case 0x4744: ati.gd_c1u1 = match = 1 ; break ; case 0x4750: ati.gp_c1u1 = match = 1 ; break ; case 0x4749: ati.gi_c1u1 = match = 1 ; break ; case 0x4742: ati.gb_c1u1 = match = 1 ; break ; } ati.gt_c1u1 = 1 ; break ; case 0x331: switch (d) { case 0x4744: ati.gd_c1u2 = match = 1 ; break ; case 0x4750: ati.gp_c1u2 = match = 1 ; break ; case 0x4749: ati.gi_c1u2 = match = 1 ; break ; case 0x4742: ati.gb_c1u2 = match = 1 ; break ; } ati.gt_c1u2 = 1 ; break ; case 0x430: switch (d) { case 0x4744: ati.gd_c2u1 = match = 1 ; break ; case 0x4750: ati.gp_c2u1 = match = 1 ; break ; case 0x4749: ati.gi_c2u1 = match = 1 ; break ; case 0x4742: ati.gb_c2u1 = match = 1 ; break ; case 0x4751: ati.gq_c2u1 = match = 1 ; break ; } ati.gt_c2u1 = 1 ; break ; default: if (vm!=0x41) break ; switch (d) { case 0x4744: ati.gd_c2u2 = match = 1 ; break ; case 0x4750: ati.gp_c2u2 = match = 1 ; break ; case 0x4749: ati.gi_c2u2 = match = 1 ; break ; case 0x4742: ati.gb_c2u2 = match = 1 ; break ; case 0x4751: ati.gq_c2u2 = match = 1 ; break ; } ati.gt_c2u2 = 1 ; break ; } break ; default: break ; } /* Select latest if no exact match */ if (!match) { ati.gt = ati.gt_c = ati.gb_c2u2 = ati.gt_c2u2 = ati.doesgtc = 1 ; } return match ; } /* ------------------------------------------------------------------------ */ /* Public routines */ /* Overlay Window Colorkeying */ int m64_setcolorkey(void) { if ((CRTC_GEN_CNTL & 0x01000000)) /* Extended mode */ switch ((CRTC_GEN_CNTL & 0x00000700) >> 8) { case 1: OVERLAY_GRAPHICS_MSK = 0x0000000F ; stride = 1 ; break ; case 2: OVERLAY_GRAPHICS_MSK = 0x000000FF ; stride = 1 ; break ; case 3: OVERLAY_GRAPHICS_MSK = 0x00007FFF ; stride = 2 ; break ; case 4: OVERLAY_GRAPHICS_MSK = 0x0000FFFF ; stride = 2 ; break ; case 5: OVERLAY_GRAPHICS_MSK = 0x00FFFFFF ; stride = 4 ; break ; case 6: OVERLAY_GRAPHICS_MSK = 0x00FFFFFF ; stride = 4 ; break ; default: RETURN(ENODEV) ; break ; } else { /* VGA mode: assume 8bpp */ OVERLAY_GRAPHICS_MSK = 0x000000FF ; stride = 1 ; } OVERLAY_GRAPHICS_CLR = gatos.colorkey ; RETURN0 ; } /* Enable/display video capture to capture buffers */ void m64_enable_capture(int enable) { CAPTURE_CONFIG = (enable) ? ENABLE_M64_CAPTURE : 0x00000000L ; } /* Enable/disable video display in Overlay Window */ void m64_enable_video(int enable) { if (!enable) { OVERLAY_EXCLUSIVE_HORZ = OVERLAY_EXCLUSIVE_VERT = 0x00000000 ; } OVERLAY_SCALE_CNTL = (enable) ? scale_cntl : DISABLE_M64_VIDEO ; } /* Capture Buffer Mode */ void m64_buffer_mode(void) { /* TODO: Single/double buffer, field/frame capture */ } /* ------------------------------------------------------------------------ */ /* Size in pixels of incoming video stream (full frame) */ int m64_setcaptsize(void) { int v=0 ; if (gatos.xcapt > hactive[gatos.hcaptmax]) RETURN(EOVERFLOW) ; if (gatos.ycapt > vactive[gatos.vcaptmax]) RETURN(EOVERFLOW) ; /* NTSC, PAL or SECAM ? */ switch (gatos.format) { case 1: case 2: case 4: /* NTSC */ v = 23 ; if (gatos.xcapt > 640) RETURN(EINVAL) ; if (gatos.ycapt > 480) RETURN(EINVAL) ; if (gatos.ycapt <= 360) v = 22 ; if (gatos.ycapt <= 240) v = 21 ; if (gatos.ycapt <= 120) v = 20 ; if (gatos.ycapt <= 60) v = 19 ; break ; case 3: case 5: case 7: /* PAL */ v = 24 ; if (gatos.xcapt > 768) RETURN(EINVAL) ; if (gatos.ycapt > 576) RETURN(EINVAL) ; if (gatos.ycapt <= 432) v = 23 ; if (gatos.ycapt <= 288) v = 21 ; if (gatos.ycapt <= 144) v = 19 ; if (gatos.ycapt <= 72) v = 18 ; break ; case 6: /* SECAM */ v = 25 ; if (gatos.xcapt > 768) RETURN(EINVAL) ; if (gatos.ycapt > 576) RETURN(EINVAL) ; if (gatos.ycapt <= 432) v = 24 ; if (gatos.ycapt <= 288) v = 22 ; if (gatos.ycapt <= 144) v = 20 ; if (gatos.ycapt <= 72) v = 19 ; break ; default: RETURN(EINVAL) ; } #if defined(GATOSBUTTONS) && GATOSBUTTONS >= 1 v += gatosbuttons[0] ; #endif OVERLAY_SCALE_CNTL = DISABLE_M64_VIDEO ; SCALER_BUF_PITCH = PIXELSTRIDE ; CAPTURE_X_WIDTH = XY(2*gatos.xcapt,0) ; CAPTURE_START_END = XY(v-1+(gatos.ycapt>>1),v) ; TRIG_CNTL = 0x80000000 ; if (gatos.video) OVERLAY_SCALE_CNTL = scale_cntl ; RETURN0 ; } /* ------------------------------------------------------------------------ */ int m64_pollscreen(int sig) { u8 pll_vclk_cntl, pll_ref_div, vclk_post_div, vclk_fb_div, save ; u32 disp, pitch ; int i ; /* Return if called from signal handler and nothing changed */ if ( sig && (CRTC_OFF_PITCH == save_off_pitch) && (CRTC_H_TOTAL_DISP == save_h_total_disp) && (CRTC_V_TOTAL_DISP == save_v_total_disp) ) return 0 ; /* Remember new values for next time */ save_off_pitch = CRTC_OFF_PITCH ; save_h_total_disp = CRTC_H_TOTAL_DISP ; save_v_total_disp = CRTC_V_TOTAL_DISP ; /* Get monitor dotclock, check for Overlay Scaler clock limit */ save = CLOCK_CNTL1 ; i = CLOCK_CNTL0 & 3 ; CLOCK_CNTL1 = 2<<2 ; pll_ref_div = CLOCK_CNTL2 ; CLOCK_CNTL1 = 5<<2 ; pll_vclk_cntl = CLOCK_CNTL2 ; CLOCK_CNTL1 = 6<<2 ; vclk_post_div = (CLOCK_CNTL2>>(i+i)) & 3 ; CLOCK_CNTL1 = (7+i)<<2 ; vclk_fb_div = CLOCK_CNTL2 ; gatos.dotclock = 2.0*gatos.refclock*vclk_fb_div / (pll_ref_div*(1<2) ecp_div = 2 ; /* Force a scaler clock factor of 1 if refclock * * is unknown (VCLK_SRC not PLLVCLK) /ØAA */ if ((pll_vclk_cntl & 0x03) != 0x03) gatos.dotclock = ecp_div = 0 ; if ((pll_vclk_cntl & 0x30) != ecp_div<<4) { CLOCK_CNTL1 = (5<<2)|2 ; CLOCK_CNTL2 = (pll_vclk_cntl&0xCF) | (ecp_div<<4) ; } /* Restore PLL Register Index */ CLOCK_CNTL1 = save ; /* Screen (monitor) dimensions */ if ((CRTC_GEN_CNTL & 0x01000000)) { /* Extended mode */ gatos.xdim = (CRTC_H_TOTAL_DISP>>16) + 1 ; gatos.xdim *= 8 ; gatos.ydim = (CRTC_V_TOTAL_DISP>>16) + 1 ; } else { /* VGA mode */ /* TODO: decode VGA registers */ gatos.xdim = 1280 ; gatos.ydim = 1024 ; } /* Desktop panning */ disp = 8 * (CRTC_OFF_PITCH & 0x000FFFFF) / stride ; pitch = 8 * ((CRTC_OFF_PITCH & 0xFFC00000) >> 22) ; gatos.ypan = disp/pitch ; gatos.xpan = disp - pitch*gatos.ypan ; /* Tell user about the new values */ if (GATOSASYNC || (VERBOSE && firstpoll)) fprintf(stderr, "%s Screen %dx%d+%d+%d, Dotclock %f MHz, Scaler Clock Factor %d\n", (firstpoll)?"==>":"***", gatos.xdim, gatos.ydim, gatos.xpan, gatos.ypan, gatos.dotclock, 1<= gatos.xdim || y0 >= gatos.ydim) return ; /* Number of pixels outside screen: * x1=left, x2=right, y1=top, y2=bottom */ x1 = -x0 ; x2 = x0+xs-gatos.xdim ; if (x1<0) x1 = 0 ; if (x2<0) x2 = 0 ; y1 = -y0 ; y2 = y0+ys-gatos.ydim ; if (y1<0) y1 = 0 ; if (y2<0) y2 = 0 ; /* Size and position of on-screen part of window */ xs -= x1+x2 ; if (x0<0) x0 = 0 ; ys -= y1+y2 ; if (y0<0) y0 = 0 ; /* Video scaling factors */ xc = gatos.xcapt*xs/gatos.xsize ; xscale = xc*xss*(1<>3) + 1 ; h2 = (x0+xs)>>3 ; h3 = (gatos.xdim-8*h2)>>3 ; OVERLAY_EXCLUSIVE_HORZ = 0x00000000 ; if (gatos.visibility==0 && !atishow && (h2-h1)>=8) { OVERLAY_EXCLUSIVE_VERT = XY(y0+ys-1,y0) ; OVERLAY_EXCLUSIVE_HORZ = 0x80000000 | XYZ(h3,h2,h1) ; } #endif /* Program the chip */ SCALER_BUF0_OFFSET = BUF0+offset ; SCALER_BUF1_OFFSET = BUF1+offset ; SCALER_HEIGHT_WIDTH = XY((int)(xc*xsf),((int)(yc*ysf))>>1) ; OVERLAY_SCALE_INC = XY(xscale,yscale<<((CRTC_GEN_CNTL&2)==2)) ; OVERLAY_Y_X_START = XY(x0,y0) | 0x80000000 ; OVERLAY_Y_X_END = XY(x0+xs-1,y0+ys-1) ; if (gatos.video) OVERLAY_SCALE_CNTL = scale_cntl ; } /* ------------------------------------------------------------------------ */ /* Note: * Gamma and Red Temp correction only affects * video displayed in the Overlay Scaler window. * Data in the capture buffers is not affected. */ /* Overlay Scaler window gamma correction */ int m64_setgamma(void) { scale_cntl = ENABLE_M64_VIDEO ; if (gatos.video) OVERLAY_SCALE_CNTL = scale_cntl ; RETURN0 ; } /* Overlay Scaler window red color temp (cold=9800K or warm=6500K) */ int m64_setcold(void) { scale_cntl = ENABLE_M64_VIDEO ; if (gatos.video) OVERLAY_SCALE_CNTL = scale_cntl ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Capture and playback routines */ void m64_rgbcapture(unsigned char *rgb) { unsigned char *buf0, *buf1; volatile unsigned char *abuf0=ATIFB+CAPTURE_BUF0_OFFSET, *abuf1=ATIFB+CAPTURE_BUF1_OFFSET ; unsigned char buf[4]; int i, j, y, cr, cb, r, g, b ; buf0 = (unsigned char*)malloc(PIXELSTRIDE*gatos.ycapt); buf1 = (unsigned char*)malloc(PIXELSTRIDE*gatos.ycapt); memcpy(buf0, (char*)abuf0, PIXELSTRIDE*gatos.ycapt); memcpy(buf1, (char*)abuf1, PIXELSTRIDE*gatos.ycapt); /* Capture (no sync to data arrival; requires kernel support :-( */ for ( i=0 ; i>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; } for ( j=0 ; j>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; } } free(buf0); free(buf1); } void m64_capture(FILE *file, int wait) { volatile void *buf0=ATIFB+CAPTURE_BUF0_OFFSET, *buf1=ATIFB+CAPTURE_BUF1_OFFSET ; int i ; /* Capture (no sync to data arrival; requires kernel support :-( */ while (1) { fprintf(file,"%3d %3d\n",gatos.xcapt,gatos.ycapt) ; for ( i=0 ; i>1) #else #define BUF0 gatos.buffer0 #define BUF1 gatos.buffer1 #define BYTESTRIDE (gatos.xcapt+gatos.xcapt) #define PIXELSTRIDE (gatos.xcapt) #endif #include "gatos.h" #include "ati.h" #include "atir128.h" #include "r128regs.h" #include #include #include #include #include #include #include #include #include #include /* Private global vars */ static u32 scale_cntl=DISABLE_R128_VIDEO ; static int stride=0 ; /* FrameBuffer pixel stride (bytes per pixel) */ static u32 save_offset=0, save_h_total_disp=0, save_v_total_disp=0 ; static u8 ecp_div=0 ; static int firstpoll=1 ; #if 0 static int atishow=0 ; #endif static int step_by=2; /* ------------------------------------------------------------------------ */ /* Initialization routines */ void r128_ResetEngine(void) { fprintf(stderr,"Resetting r128 engine.. Aiee !\n"); } void r128_WaitForFifo(int entries) { time_t t; if(entries>64)entries=64; t=time(NULL); while((R128_GUI_STAT & 0xfff)1){ r128_ResetEngine(); } usleep(10); } } int r128_inita(void) { u16 id=R128_DEVICE_ID ; u8 rev=R128_REVISION_ID ; int d, v, m ; /* Chip register aperture enabled (chip in use by X server) ? */ if (id == 0xFFFF) RETURN(ENXIO) ; /* Check the FrameBuffer address */ if ( (R128_CONFIG_APER_0_BASE & 0xFC000000) != gatos.fbaddr ) RETURN(EINVAL) ; /* ATI chip device id and chip revision */ d = gatos.ati.deviceid = id ; /* Device ID */ v = gatos.ati.revision = (rev & 0xF0) >> 4 ; /* Chip Version */ m = (rev & 0x0F) ; /* Chip Version Minor */ /* Amount of Video RAM in kilobytes */ gatos.videoram = R128_CONFIG_MEMSIZE >> 10 ; R128_VIDEOMUX_CNTL=0x50781; RETURN0 ; } int r128_initb(void) { /* Place video capture buffers at top of video memory */ // hack - we need twice as many ram for weave gatos.buffermem *= 2 ; gatos.captbufsize = (gatos.buffermem) >> 1 ; gatos.buffer0 = 1024*(gatos.videoram) - 1024*gatos.captbufsize ; gatos.buffer1 = gatos.buffer0 - 1024*gatos.captbufsize ; r128_WaitForFifo(64) ; CAP0_BUF0_OFFSET = BUF0 ; CAP0_BUF0_EVEN_OFFSET = BUF0+2*gatos.xcapt ; CAP0_BUF1_OFFSET = BUF1 ; CAP0_BUF1_EVEN_OFFSET = BUF1-2*gatos.xcapt ; CAP0_ONESHOT_BUF_OFFSET = BUF0 ; /* Initial ATI register programming */ scale_cntl = ENABLE_R128_VIDEO ; CAP0_TRIG_CNTL = 0x00000000L ; OV0_SCALE_CNTL = DISABLE_R128_VIDEO ; OV0_VIDEO_KEY_CLR = 0x00000000L ; OV0_VIDEO_KEY_MSK = 0x00000000L ; OV0_KEY_CNTL = 0x00000050L ; /* ??? */ OV0_FILTER_CNTL = 0x0000000FL ; //OV0_AUTO_FLIP_CNTRL = 0x00040000L; OV0_COLOUR_CNTL = 0x00101000L ; //OV0_COLOUR_CNTL = 0x00FFFFFFL ; OV0_FOUR_TAP_COEF_0 = 0x00002000L ; OV0_FOUR_TAP_COEF_1 = 0x0D06200DL ; OV0_FOUR_TAP_COEF_2 = 0x0D0A1C0DL ; OV0_FOUR_TAP_COEF_3 = 0x0C0E1A0CL ; OV0_FOUR_TAP_COEF_4 = 0x0C14140CL ; /* Suspicious (No it isn't, ATI sample code says do this /ØAA) */ /* we need 1 just in case bit 0 has been unset */ R128_VIDEOMUX_CNTL |= 2 | 1; CAP0_PORT_MODE_CNTL = 0 ; CAP0_BUF_PITCH = BYTESTRIDE ; CAP0_H_WINDOW = BYTESTRIDE<<16 ; OV0_VID_BUF0_BASE_ADRS = CAP0_BUF1_EVEN_OFFSET & (~3) ; OV0_VID_BUF1_BASE_ADRS = ( CAP0_BUF1_EVEN_OFFSET & (~3) ) | 1 ; OV0_VID_BUF2_BASE_ADRS = ( CAP0_BUF1_EVEN_OFFSET & (~3) ) | 1 ; OV0_VID_BUF3_BASE_ADRS = gatos.buffer1 & (~3) ; OV0_VID_BUF4_BASE_ADRS = (gatos.buffer1 & (~3) ) | 1 ; OV0_VID_BUF5_BASE_ADRS = (gatos.buffer1 & (~3) ) | 1 ; // OV0_VID_BUF_PITCH0_VALUE = BYTESTRIDE<<1 ; // OV0_VID_BUF_PITCH1_VALUE = BYTESTRIDE<<1 ; OV0_VID_BUF_PITCH0_VALUE = PIXELSTRIDE<<2 ; OV0_VID_BUF_PITCH1_VALUE = PIXELSTRIDE<<2 ; step_by=2; OV0_STEP_BY = 2 | (2<<8) ; //OV0_DEINTERLACE_PATTERN=0x20000000 | (3 | (3 << 2) | (3 <<4)); OV0_DEINTERLACE_PATTERN = 1 ; //CAP0_V_WINDOW =(( v-1+(gatos.ycapt>>1)) <<16 )| (v) ; //CAP0_TRIG_CNTL = 0x00000011L ; CAP0_DEBUG=0; #if 0 VIDEO_FORMAT = 0x000B000BL ; #endif ati_setcolorkey() ; ati_pollscreen(0) ; RETURN0 ; } void stream_enable(int enable) { R128_CLOCK_CNTL_INDEX0 = (FCP_CNTL & 0x1F) | 0x80 ; if (enable) { R128_CLOCK_CNTL_DATA = 0x101 ; CAP0_TRIG_CNTL = 0x00000011L ; } else { CAP0_TRIG_CNTL = 0x00000000L ; R128_CLOCK_CNTL_DATA = 0x404 ; } } /* ------------------------------------------------------------------------ */ /* Public routines */ /* Overlay Window Colorkeying */ int r128_setcolorkey(void) { if ((R128_CRTC_GEN_CNTL & 0x01000000L)) /* Extended mode */ switch ((R128_CRTC_GEN_CNTL & 0x00000700L) >> 8) { case 1: OV0_GRAPHICS_KEY_MSK = 0x0000000FL ; stride = 1 ; break ; case 2: OV0_GRAPHICS_KEY_MSK = 0x000000FFL ; stride = 1 ; break ; case 3: OV0_GRAPHICS_KEY_MSK = 0x00007FFFL ; stride = 2 ; break ; case 4: OV0_GRAPHICS_KEY_MSK = 0x0000FFFFL ; stride = 2 ; break ; case 5: OV0_GRAPHICS_KEY_MSK = 0x00FFFFFFL ; stride = 4 ; break ; case 6: OV0_GRAPHICS_KEY_MSK = 0x00FFFFFFL ; stride = 4 ; break ; default: RETURN(ENODEV) ; break ; } else { /* VGA mode: assume 8bpp */ OV0_GRAPHICS_KEY_MSK = 0x000000FFL ; stride = 1 ; } OV0_GRAPHICS_KEY_CLR = gatos.colorkey ; RETURN0 ; } /* Enable/display video capture to capture buffers */ void r128_enable_capture(int enable) { CAP0_CONFIG = (enable) ? ENABLE_R128_CAPTURE : 0x00000000L ; } /* Enable/disable video display in Overlay Window */ void r128_enable_video(int enable) { if (!enable) { OV0_EXCLUSIVE_HORZ = OV0_EXCLUSIVE_VERT = 0x00000000 ; } OV0_SCALE_CNTL = (enable) ? scale_cntl : DISABLE_R128_VIDEO ; if(enable){ // OV0_SCALE_CNTL|=0x80000000L; // OV0_REG_LOAD_CNTL&=~1; CAP0_CONFIG=ENABLE_R128_CAPTURE; CAP0_TRIG_CNTL = 0x00000011L ; } stream_enable(enable); } /* Capture Buffer Mode */ void r128_buffer_mode(void) { /* TODO: Single/double buffer, field/frame capture */ } /* ------------------------------------------------------------------------ */ /* Size in pixels of incoming video stream (full frame) */ int r128_setcaptsize(void) { int v=0 ; // *** Have to come up with a better way to do this --ISG // if (gatos.xcapt > hactive[gatos.hcaptmax]) RETURN(EOVERFLOW) ; // if (gatos.ycapt > vactive[gatos.vcaptmax]) RETURN(EOVERFLOW) ; /* NTSC, PAL or SECAM ? */ switch (gatos.format) { case 1: case 2: case 4: /* NTSC */ v = 23 ; // *** Have to come up with a better way to do this --ISG // if (gatos.xcapt > 640) RETURN(EINVAL) ; // if (gatos.ycapt > 480) RETURN(EINVAL) ; if (gatos.ycapt <= 360) v = 22 ; if (gatos.ycapt <= 240) v = 21 ; if (gatos.ycapt <= 120) v = 20 ; if (gatos.ycapt <= 60) v = 19 ; break ; case 3: case 5: case 7: /* PAL */ v = 24 ; if (gatos.xcapt > 768) RETURN(EINVAL) ; if (gatos.ycapt > 576) RETURN(EINVAL) ; if (gatos.ycapt <= 432) v = 23 ; if (gatos.ycapt <= 288) v = 21 ; if (gatos.ycapt <= 144) v = 19 ; if (gatos.ycapt <= 72) v = 18 ; break ; case 6: /* SECAM */ v = 25 ; if (gatos.xcapt > 768) RETURN(EINVAL) ; if (gatos.ycapt > 576) RETURN(EINVAL) ; if (gatos.ycapt <= 432) v = 24 ; if (gatos.ycapt <= 288) v = 22 ; if (gatos.ycapt <= 144) v = 20 ; if (gatos.ycapt <= 72) v = 19 ; break ; default: RETURN(EINVAL) ; } #if defined(GATOSBUTTONS) && GATOSBUTTONS >= 1 v += gatosbuttons[0] ; #endif OV0_SCALE_CNTL = DISABLE_R128_VIDEO ; CAP0_BUF_PITCH = 2*2*gatos.xcapt ; CAP0_H_WINDOW = (2*gatos.xcapt)<<16 ; CAP0_V_WINDOW = (( v-1+(gatos.ycapt>>1)) <<16 )| (v) ; /* we only know what capture size actually is here */ OV0_VID_BUF_PITCH0_VALUE = PIXELSTRIDE*2*2 ; OV0_VID_BUF_PITCH1_VALUE = PIXELSTRIDE*2*2 ; CAP0_BUF0_EVEN_OFFSET = BUF0+2*gatos.xcapt ; CAP0_BUF1_EVEN_OFFSET = BUF1-2*gatos.xcapt ; OV0_VID_BUF0_BASE_ADRS = CAP0_BUF0_OFFSET & (~3) ; OV0_VID_BUF1_BASE_ADRS = ( CAP0_BUF0_EVEN_OFFSET & (~3) ) | 1 ; OV0_VID_BUF2_BASE_ADRS = ( CAP0_BUF0_EVEN_OFFSET & (~3) ) | 1 ; OV0_VID_BUF3_BASE_ADRS = CAP0_BUF1_EVEN_OFFSET & (~3) ; OV0_VID_BUF4_BASE_ADRS = ( CAP0_BUF1_OFFSET & (~3) ) | 1 ; OV0_VID_BUF5_BASE_ADRS = ( CAP0_BUF1_OFFSET & (~3) ) | 1 ; // OV0_VID_BUF3_BASE_ADRS = gatos.buffer1 & (~3) ; // OV0_VID_BUF4_BASE_ADRS = (gatos.buffer1 & (~3) ) | 1 ; // OV0_VID_BUF5_BASE_ADRS = (gatos.buffer1 & (~3) ) | 1 ; OV0_P1_X_START_END=(gatos.xcapt+0)|(0<<16); //OV0_P1_X_START_END=0; // disable for debugging OV0_P3_X_START_END= // this register is redundant OV0_P2_X_START_END=((gatos.xcapt>>1)+1)|(1<<16); CAP0_TRIG_CNTL = 0x00000011L ; if (gatos.video) OV0_SCALE_CNTL = scale_cntl ; RETURN0 ; } /* ------------------------------------------------------------------------ */ int r128_pollscreen(int sig) { u32 vclk_ecp_cntl, pll_ref_div, vclk_post_div, vclk_fb_div ; u32 disp, pitch ; int i ; u8 save ; /* Return if called from signal handler and nothing changed */ if ( sig && ((R128_CRTC_OFFSET&0x01FFFFFFL) == save_offset) && (R128_CRTC_H_TOTAL_DISP == save_h_total_disp) && (R128_CRTC_V_TOTAL_DISP == save_v_total_disp) ) return 0 ; /* Remember new values for next time */ save_offset = R128_CRTC_OFFSET ; save_h_total_disp = R128_CRTC_H_TOTAL_DISP ; save_v_total_disp = R128_CRTC_V_TOTAL_DISP ; /* Get monitor dotclock, check for Overlay Scaler clock limit */ save = R128_CLOCK_CNTL_INDEX0 ; i = R128_CLOCK_CNTL_INDEX1 & 3 ; R128_CLOCK_CNTL_INDEX0 = 3 ; pll_ref_div = R128_CLOCK_CNTL_DATA & 0x000003FFL ; R128_CLOCK_CNTL_INDEX0 = 8 ; vclk_ecp_cntl = R128_CLOCK_CNTL_DATA ; R128_CLOCK_CNTL_INDEX0 = 4+i ; vclk_fb_div = R128_CLOCK_CNTL_DATA & 0x000007FFL ; vclk_post_div = (R128_CLOCK_CNTL_DATA & 0x00070000L) >> 16 ; gatos.dotclock = /* 2.0* */ gatos.refclock*vclk_fb_div / (pll_ref_div*(1<2) ecp_div = 2 ; /* Force a scaler clock factor of 1 if refclock * * is unknown (VCLK_SRC not PLLVCLK) /ØAA */ if ((vclk_ecp_cntl & 0x00000003L) != 0x00000003L) gatos.dotclock = ecp_div = 0 ; if ((vclk_ecp_cntl & 0x00000300L) != ecp_div<<8) { R128_CLOCK_CNTL_INDEX0 = 0x88 ; R128_CLOCK_CNTL_DATA = (vclk_ecp_cntl&0xFFFFFCFFL) | (ecp_div<<8) ; } /* Restore PLL Register Index */ R128_CLOCK_CNTL_INDEX0 = save ; /* Screen (monitor) dimensions */ if ((R128_CRTC_GEN_CNTL & 0x01000000L)) { /* Extended mode */ gatos.xdim = (R128_CRTC_H_TOTAL_DISP>>16) + 1 ; gatos.xdim *= 8 ; gatos.ydim = (R128_CRTC_V_TOTAL_DISP>>16) + 1 ; } else { /* VGA mode */ /* TODO: decode VGA registers */ gatos.xdim = 1280 ; gatos.ydim = 1024 ; } /* Desktop panning */ disp = (R128_CRTC_OFFSET & 0x01FFFFFFL) / stride ; pitch = 8 * (R128_CRTC_PITCH & 0x000003FFL) ; gatos.ypan = disp/pitch ; gatos.xpan = disp - pitch*gatos.ypan ; /* printf("%d,%d (%d,%d)\n", disp, pitch, gatos.xpan, gatos.ypan); */ /* Tell user about the new values */ if (GATOSASYNC || (VERBOSE && firstpoll)) fprintf(stderr, "%s Screen %dx%d+%d+%d, Dotclock %f MHz, Scaler Clock Factor %d\n", (firstpoll)?"==>":"***", gatos.xdim, gatos.ydim, gatos.xpan, gatos.ypan, gatos.dotclock, 1<= gatos.xdim || y0 >= gatos.ydim) return ; /* Number of pixels outside screen: * x1=left, x2=right, y1=top, y2=bottom */ x1 = -x0 ; x2 = x0+xs-gatos.xdim ; if (x1<0) x1 = 0 ; if (x2<0) x2 = 0 ; y1 = -y0 ; y2 = y0+ys-gatos.ydim ; if (y1<0) y1 = 0 ; if (y2<0) y2 = 0 ; /* Size and position of on-screen part of window */ xs -= x1+x2 ; if (x0<0) x0 = 0 ; ys -= y1+y2 ; if (y0<0) y0 = 0 ; /* Video scaling factors */ xc = gatos.xcapt*xs/gatos.xsize ; xscale = xc*xss*(1<>3) + 1 ; h2 = (x0+xs)>>3 ; h3 = (gatos.xdim-8*h2)>>3 ; OVERLAY_EXCLUSIVE_HORZ = 0x00000000 ; if (gatos.visibility==0 && !atishow && (h2-h1)>=8) { OV0_EXCLUSIVE_VERT = XY(y0+ys-1,y0) ; OV0_EXCLUSIVE_HORZ = 0x80000000 | XYZ(h3,h2,h1) ; } #endif #if 0 /* Program the chip */ SCALER_BUF0_OFFSET = gatos.buffer0+offset ; SCALER_BUF1_OFFSET = gatos.buffer1+offset ; SCALER_HEIGHT_WIDTH = XY((int)(xc*xsf),((int)(yc*ysf))>>1) ; OV0_H_INC = xscale | (xscale << 16); /* ??? */ OV0_V_INC = yscale << ( 7 + ((R128_CRTC_GEN_CNTL&2)==2) ) ; /* ??? */ #endif OV0_H_INC = (xscale/step_by) | ((xscale_color/step_by) << 16); /* ??? */ OV0_V_INC = yscale << ( 8 + ((R128_CRTC_GEN_CNTL&2)==2) ) ; /* ??? */ //OV0_H_INC = (1<<12) | ((1<<12)<<16) ; /* ??? */ //OV0_V_INC = (1<<12)<<8 ; /* ??? */ //OV0_P1_BLANK_LINES_AT_TOP = (((int)(xc*xsf)-1)<<16) | 0x0FFF ; //OV0_P23_BLANK_LINES_AT_TOP = (((int)(xc*xsf/2)-1)<<16) | 0x0FFF ; OV0_Y_X_START = XY(x0,y0) ; OV0_Y_X_END = XY(x0+xs-1,y0+ys-1) ; /* set up offset (for zoom) */ OV0_VID_BUF0_BASE_ADRS = (CAP0_BUF0_OFFSET +offset) & (~3) ; OV0_VID_BUF1_BASE_ADRS = ( (CAP0_BUF0_EVEN_OFFSET+offset) & (~3) ) | 1 ; OV0_VID_BUF2_BASE_ADRS = ( (CAP0_BUF0_EVEN_OFFSET+offset) & (~3) ) | 1 ; OV0_VID_BUF3_BASE_ADRS = (CAP0_BUF1_EVEN_OFFSET+offset) & (~3) ; OV0_VID_BUF4_BASE_ADRS = ( (CAP0_BUF1_OFFSET+offset) & (~3) ) | 1 ; OV0_VID_BUF5_BASE_ADRS = ( (CAP0_BUF1_OFFSET+offset) & (~3) ) | 1 ; OV0_P1_X_START_END=(gatos.xcapt+0)|((offset & 3)<<16); //OV0_P1_X_START_END=0; // disable for debugging OV0_P3_X_START_END= // this register is redundant OV0_P2_X_START_END=((gatos.xcapt)+0)|((offset & 3)<<16); //OV0_P3_X_START_END= // disable for debugging //OV0_P2_X_START_END=0; OV0_P1_H_ACCUM_INIT=0x20000000 | (0); OV0_P23_H_ACCUM_INIT=0x20000000 | (0); OV0_P1_BLANK_LINES_AT_TOP = (((gatos.ycapt)-1) <<16) | 0xFFF ; OV0_P23_BLANK_LINES_AT_TOP = (((gatos.ycapt)-1) <<16) | 0xFFF ; port = 0 ; /* which port to use 0 , 1 -hardware, 2 - software */ OV0_AUTO_FLIP_CNTRL = (port<<8)|(1<<6)|(0) ; tmp = OV0_AUTO_FLIP_CNTRL ; OV0_AUTO_FLIP_CNTRL = (port<<8)|(0<<6)|(0) ; OV0_TEST = 0 ; if (gatos.video) OV0_SCALE_CNTL = scale_cntl ; } /* ------------------------------------------------------------------------ */ /* Note: * Gamma and Red Temp correction only affects * video displayed in the Overlay Scaler window. * Data in the capture buffers is not affected. */ /* Overlay Scaler window gamma correction */ int r128_setgamma(void) { scale_cntl = ENABLE_R128_VIDEO ; if (gatos.video) OV0_SCALE_CNTL = scale_cntl ; RETURN0 ; } /* Overlay Scaler window red color temp (cold=9800K or warm=6500K) */ int r128_setcold(void) { scale_cntl = ENABLE_R128_VIDEO ; if (gatos.video) OV0_SCALE_CNTL = scale_cntl ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Capture and playback routines */ void r128_rgbcapture(unsigned char *rgb) { unsigned char *buf0, *buf1; volatile unsigned char *abuf0=ATIFB+CAP0_BUF0_OFFSET, *abuf1=ATIFB+CAP0_BUF1_OFFSET ; unsigned char buf[4]; int i, j, y, cr, cb, r, g, b ; buf0 = (unsigned char*)malloc(PIXELSTRIDE*gatos.ycapt*2); buf1 = (unsigned char*)malloc(PIXELSTRIDE*gatos.ycapt*2); memcpy(buf0, (char*)abuf0, PIXELSTRIDE*gatos.ycapt*2); memcpy(buf1, (char*)abuf1, PIXELSTRIDE*gatos.ycapt*2); /* Capture (no sync to data arrival; requires kernel support :-( */ for ( i=0 ; i<(gatos.ycapt*2) ; i+=4 ) { for ( j=0 ; j>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; y = buf[3] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; } for ( j=0 ; j>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; y = buf[3] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *rgb++ = LIMIT(r, 0, 255) ; *rgb++ = LIMIT(g, 0, 255) ; *rgb++ = LIMIT(b, 0, 255) ; } } free(buf0); free(buf1); } void r128_capture(FILE *file, int wait) { volatile void *buf0=ATIFB+CAP0_BUF0_OFFSET, *buf1=ATIFB+CAP0_BUF1_OFFSET ; int i ; /* Capture (no sync to data arrival; requires kernel support :-( */ while (1) { fprintf(file,"%3d %3d\n",gatos.xcapt,gatos.ycapt*2) ; for ( i=0 ; i<(gatos.ycapt*2) ; i+=2 ) { fwrite((void*)(buf0+i*PIXELSTRIDE),2,gatos.xcapt,file) ; fwrite((void*)(buf1+i*PIXELSTRIDE),2,gatos.xcapt,file) ; } fflush(file) ; if (gatos.stop) break ; if (wait) usleep(wait) ; } } void r128_playback(FILE *file, int wait) { int i, h, v, c, xsave=gatos.xcapt, ysave=gatos.ycapt, res ; char buf[9] ; volatile void *buf0=ATIFB+CAP0_BUF0_OFFSET, *buf1=ATIFB+CAP0_BUF1_OFFSET ; c = (CAP0_CONFIG) ? 1 : 0; gatos_enable_capture(0); /* Playback (no sync; requires kernel support :-( */ while ( fread(buf,1,8,file) == 8 ) { res = sscanf(buf,"%3d %3d\n",&h,&v) ; h /= 2; if (h!=gatos.xcapt || v!=gatos.ycapt) { gatos_setcapturesize(gatos.xcapt,gatos.ycapt) ; gatos_setgeometry(gatos.xsize,gatos.ysize,gatos.xpos,gatos.ypos) ; } for ( i=0 ; i<(gatos.ycapt*2) ; i+=2 ) { fread((void*)(buf0+i*PIXELSTRIDE),2,gatos.xcapt,file) ; fread((void*)(buf1+i*PIXELSTRIDE),2,gatos.xcapt,file) ; } if (gatos.stop) break ; if (wait) usleep(wait) ; } if (gatos.xcapt!=xsave || gatos.ycapt!=ysave) { gatos_setcapturesize(xsave,ysave) ; gatos_setgeometry(gatos.xsize,gatos.ysize,gatos.xpos,gatos.ypos) ; } /* Done */ gatos_enable_capture(c); } /* ------------------------------------------------------------------------ */ /* Debug and report routines */ #define DUMPREG(MEMADDR,NAME) \ fprintf(stderr,"%s: %-26s (%s) = 0x%08X\n", \ gatos.ati.ident,#NAME,MEMADDR,NAME) void r128_dumpregs(void) { int i ; u8 tmp ; DUMPREG("MMR_0008",R128_CLOCK_CNTL_INDEX) ; DUMPREG("MMR_000C",R128_CLOCK_CNTL_DATA) ; DUMPREG("MMR_0050",R128_CRTC_GEN_CNTL) ; DUMPREG("MMR_0070",R128_MPP_TB_ADDR) ; DUMPREG("MMR_0074",R128_MPP_TB_DATA) ; DUMPREG("MMR_0078",R128_MPP_GP_ADDR) ; DUMPREG("MMR_007C",R128_MPP_GP_DATA) ; DUMPREG("MMR_0088",R128_MPP_GP_ALT_REG_ADDR) ; DUMPREG("MMR_008C",R128_MPP_GP_ALT_REG_DATA) ; DUMPREG("MMR_0090",R128_I2C_CNTL_0) ; DUMPREG("MMR_0094",R128_I2C_CNTL_1) ; DUMPREG("MMR_0098",R128_I2C_DATA) ; DUMPREG("MMR_00F8",R128_CONFIG_MEMSIZE) ; DUMPREG("MMR_0100",R128_CONFIG_APER_0_BASE) ; DUMPREG("MMR_0194",R128_AMCGPIO_MASK) ; DUMPREG("MMR_0198",R128_MDGPIO_MASK) ; DUMPREG("MMR_01A0",R128_AMCGPIO_A_REG) ; DUMPREG("MMR_01A4",R128_AMCGPIO_Y_REG) ; DUMPREG("MMR_01A8",R128_AMCGPIO_EN_REG) ; DUMPREG("MMR_01AC",R128_MDGPIO_A_REG) ; DUMPREG("MMR_01B0",R128_MDGPIO_EN_REG) ; DUMPREG("MMR_01B4",R128_MDGPIO_Y_REG) ; DUMPREG("MMR_01C0",R128_MPP_TB_CONFIG) ; DUMPREG("MMR_01C4",R128_MPP_TB_STROBE_SEQ) ; DUMPREG("MMR_01C8",R128_MPP_GP_CONFIG) ; DUMPREG("MMR_01CC",R128_MPP_GP_STROBE_SEQ) ; DUMPREG("MMR_0200",R128_CRTC_H_TOTAL_DISP) ; DUMPREG("MMR_0204",R128_CRTC_H_SYNC_STRT_WID) ; DUMPREG("MMR_0208",R128_CRTC_V_TOTAL_DISP) ; DUMPREG("MMR_020C",R128_CRTC_V_SYNC_STRT_WID) ; DUMPREG("MMR_0224",R128_CRTC_OFFSET) ; DUMPREG("MMR_022C",R128_CRTC_PITCH) ; DUMPREG("MMR_0190",R128_VIDEOMUX_CNTL) ; DUMPREG("MMR_0400",OV0_Y_X_START) ; DUMPREG("MMR_0404",OV0_Y_X_END) ; DUMPREG("MMR_0408",OV0_EXCLUSIVE_HORZ) ; DUMPREG("MMR_040C",OV0_EXCLUSIVE_VERT) ; DUMPREG("MMR_0410",OV0_REG_LOAD_CNTL) ; DUMPREG("MMR_0420",OV0_SCALE_CNTL) ; DUMPREG("MMR_0424",OV0_V_INC) ; DUMPREG("MMR_0428",OV0_P1_V_ACCUM_INIT) ; DUMPREG("MMR_042C",OV0_P23_V_ACCUM_INIT) ; DUMPREG("MMR_0430",OV0_P1_BLANK_LINES_AT_TOP) ; DUMPREG("MMR_0434",OV0_P23_BLANK_LINES_AT_TOP) ; DUMPREG("MMR_0440",OV0_VID_BUF0_BASE_ADRS) ; DUMPREG("MMR_0444",OV0_VID_BUF1_BASE_ADRS) ; DUMPREG("MMR_0448",OV0_VID_BUF2_BASE_ADRS) ; DUMPREG("MMR_044C",OV0_VID_BUF3_BASE_ADRS) ; DUMPREG("MMR_0450",OV0_VID_BUF4_BASE_ADRS) ; DUMPREG("MMR_0454",OV0_VID_BUF5_BASE_ADRS) ; DUMPREG("MMR_0460",OV0_VID_BUF_PITCH0_VALUE) ; DUMPREG("MMR_0464",OV0_VID_BUF_PITCH1_VALUE) ; DUMPREG("MMR_0470",OV0_AUTO_FLIP_CNTRL) ; DUMPREG("MMR_0474",OV0_DEINTERLACE_PATTERN) ; DUMPREG("MMR_0480",OV0_H_INC) ; DUMPREG("MMR_0484",OV0_STEP_BY) ; DUMPREG("MMR_0488",OV0_P1_H_ACCUM_INIT) ; DUMPREG("MMR_048C",OV0_P23_H_ACCUM_INIT) ; DUMPREG("MMR_0494",OV0_P1_X_START_END) ; DUMPREG("MMR_0498",OV0_P2_X_START_END) ; DUMPREG("MMR_049C",OV0_P3_X_START_END) ; DUMPREG("MMR_04A0",OV0_FILTER_CNTL) ; DUMPREG("MMR_04B0",OV0_FOUR_TAP_COEF_0) ; DUMPREG("MMR_04B4",OV0_FOUR_TAP_COEF_1) ; DUMPREG("MMR_04B8",OV0_FOUR_TAP_COEF_2) ; DUMPREG("MMR_04BC",OV0_FOUR_TAP_COEF_3) ; DUMPREG("MMR_04C0",OV0_FOUR_TAP_COEF_4) ; DUMPREG("MMR_04E0",OV0_COLOUR_CNTL) ; DUMPREG("MMR_04E4",OV0_VIDEO_KEY_CLR) ; DUMPREG("MMR_04E8",OV0_VIDEO_KEY_MSK) ; DUMPREG("MMR_04EC",OV0_GRAPHICS_KEY_CLR) ; DUMPREG("MMR_04F0",OV0_GRAPHICS_KEY_MSK) ; DUMPREG("MMR_04F4",OV0_KEY_CNTL) ; DUMPREG("MMR_04F8",OV0_TEST) ; DUMPREG("MMR_0900",VID_BUFFER_CONTROL) ; DUMPREG("MMR_0908",CAP_INT_CNTL) ; DUMPREG("MMR_090C",CAP_INT_STATUS) ; DUMPREG("MMR_0920",CAP0_BUF0_OFFSET) ; DUMPREG("MMR_0924",CAP0_BUF1_OFFSET) ; DUMPREG("MMR_0928",CAP0_BUF0_EVEN_OFFSET) ; DUMPREG("MMR_092C",CAP0_BUF1_EVEN_OFFSET) ; DUMPREG("MMR_0930",CAP0_BUF_PITCH) ; DUMPREG("MMR_0934",CAP0_V_WINDOW) ; DUMPREG("MMR_0938",CAP0_H_WINDOW) ; DUMPREG("MMR_093C",CAP0_VBI_ODD_OFFSET) ; DUMPREG("MMR_0940",CAP0_VBI_EVEN_OFFSET) ; DUMPREG("MMR_0944",CAP0_VBI_V_WINDOW) ; DUMPREG("MMR_0948",CAP0_VBI_H_WINDOW) ; DUMPREG("MMR_094C",CAP0_PORT_MODE_CNTL) ; DUMPREG("MMR_0950",CAP0_TRIG_CNTL) ; DUMPREG("MMR_0954",CAP0_DEBUG) ; DUMPREG("MMR_0958",CAP0_CONFIG) ; DUMPREG("MMR_095C",CAP0_ANC_ODD_OFFSET) ; DUMPREG("MMR_0960",CAP0_ANC_EVEN_OFFSET) ; DUMPREG("MMR_0964",CAP0_ANC_H_WINDOW) ; DUMPREG("MMR_0968",CAP0_VIDEO_SYNC_TEST) ; DUMPREG("MMR_096C",CAP0_ONESHOT_BUF_OFFSET) ; DUMPREG("MMR_0970",CAP0_BUF_STATUS) ; DUMPREG("MMR_0978",CAP0_DWNSC_XRATIO) ; DUMPREG("MMR_097C",CAP0_XSHARPNESS) ; DUMPREG("MMR_0990",CAP1_BUF0_OFFSET) ; DUMPREG("MMR_0994",CAP1_BUF1_OFFSET) ; DUMPREG("MMR_0998",CAP1_BUF0_EVEN_OFFSET) ; DUMPREG("MMR_099C",CAP1_BUF1_EVEN_OFFSET) ; DUMPREG("MMR_09A0",CAP1_BUF_PITCH) ; DUMPREG("MMR_09A4",CAP1_V_WINDOW) ; DUMPREG("MMR_09A8",CAP1_H_WINDOW) ; DUMPREG("MMR_09AC",CAP1_VBI_ODD_OFFSET) ; DUMPREG("MMR_09B0",CAP1_VBI_EVEN_OFFSET) ; DUMPREG("MMR_09B4",CAP1_VBI_V_WINDOW) ; DUMPREG("MMR_09B8",CAP1_VBI_H_WINDOW) ; DUMPREG("MMR_09BC",CAP1_PORT_MODE_CNTL) ; DUMPREG("MMR_09C0",CAP1_TRIG_CNTL) ; DUMPREG("MMR_09C4",CAP1_DEBUG) ; DUMPREG("MMR_09C8",CAP1_CONFIG) ; DUMPREG("MMR_09CC",CAP1_ANC_ODD_OFFSET) ; DUMPREG("MMR_09D0",CAP1_ANC_EVEN_OFFSET) ; DUMPREG("MMR_09D4",CAP1_ANC_H_WINDOW) ; DUMPREG("MMR_09D8",CAP1_VIDEO_SYNC_TEST) ; DUMPREG("MMR_09DC",CAP1_ONESHOT_BUF_OFFSET) ; DUMPREG("MMR_09E0",CAP1_BUF_STATUS) ; DUMPREG("MMR_09E8",CAP1_DWNSC_XRATIO) ; DUMPREG("MMR_09EC",CAP1_XSHARPNESS) ; DUMPREG("MMR_0F02",R128_DEVICE_ID) ; DUMPREG("MMR_0F08",R128_REVISION_ID) ; tmp = R128_CLOCK_CNTL_INDEX0 ; for ( i=0 ; i<20 ; i++ ) { if (i%4==0) fprintf(stderr,"%s: PLL[%02X..%02X] =",gatos.ati.ident,i,i+3) ; R128_CLOCK_CNTL_INDEX0 = i ; fprintf(stderr," %08X",R128_CLOCK_CNTL_DATA) ; if ((i+1)%4==0) fprintf(stderr,"\n") ; } R128_CLOCK_CNTL_INDEX0 = tmp ; } gatos-0.0.5/src/board.c0100644002411700123110000002560507027151612013325 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_BOARD_C 1 #include "gatos.h" #include "board.h" #include "m64regs.h" #include "r128regs.h" #include "i2c.h" #include "bt829.h" #include "fi12xx.h" #include #include #include #define AUDIOCHIP(ADDR,CHIP,IDENT,NAME) \ gatos.##CHIP##.addr = 0xFF ; if (i2c_device(ADDR)) { \ gatos.##CHIP##.addr = ADDR ; i2c_register(ADDR,IDENT,NAME) ; } \ has_##CHIP = (gatos.##CHIP##.addr != 0xFF) /* Private global vars */ static int has_tda8425=0, has_tda9850=0, has_tda9851=0, has_msp3410=0 ; static int tda8425reg[9], tda9850reg[11] ; static char *idents[CARDTYPES+1] = { NULL, "ST.ALONE", "INTEGRATED", "EXTPOD", "AIW", "AIWPRO", "AIW128", "NEC", "INTEL" } ; static char *names[CARDTYPES+1] = { NULL, "Stand-Alone", "Integrated", "External POD", "All-In-Wonder", "All-In-Wonder Pro", "All-In-Wonder 128", "NEC", "Intel" } ; /* ------------------------------------------------------------------------ */ /* Initialization routine */ int board_init(void) { u8 sum=0, data[16] ; int i, j ; char name[64] ; u8 *ptr ; ptr = (ati.r128) ? gatos.aticard[gatos.cardidx].r128mminfo : gatos.aticard[gatos.cardidx].m64mminfo ; /* Identify Capture Board */ gatos.cardtype = board_identify(&gatos.board.addr,&gatos.boardinfo) ; snprintf(name,sizeof(name),"%s Capture Board",names[gatos.cardtype]) ; /* Register Capture Board */ if (gatos.board.addr == 0xFF) { if (VERBOSE) { printf("%s\n",name) ; fflush(stdout) ; } /* Low four bits in first byte of both M64 and * * R128 BIOS MultiMedia Table is tuner type */ if (*ptr&0x0F) gatos.tunertype = (*ptr<=MAXTUNERTYPE) ? *ptr : 0 ; } else { i2c_register(gatos.board.addr,idents[gatos.cardtype],name) ; board_setbyte() ; /* Enable Capture Board */ gatos.tunertype = gatos.boardinfo & 0x0F ; if (gatos.tunertype==15 && *ptr<=MAXTUNERTYPE) gatos.tunertype = *ptr ; if (gatos.tunertype>MAXTUNERTYPE) gatos.tunertype = 0 ; } /* I2C EEPROM */ gatos.eeprom.addr = 0xFF ; if (i2c_device(0xA8)) { data[0] = 0x00 ; i2c_write(0xA8,data,1) ; for ( i=0 ; i<8 ; i++ ) { i2c_readn(0xA8,data,16) ; for ( j=0 ; j<16 ; j++ ) sum ^= data[j] ; } /* EEPROM data not valid if checksum error, so ignore it */ if (sum) i2c_register(0xA8,"EEPROM","EEPROM (IGNORED)") ; else { i2c_register(0xA8,"EEPROM",NULL) ; gatos.eeprom.addr = 0xA8 ; } } /* Audio chips */ AUDIOCHIP(0x82,tda8425,"TDA8425","TDA8425 Stereo Audio Processor") ; AUDIOCHIP(0xB4,tda9850,"TDA9850","TDA9850 BTSC Stereo+SAP Audio Processor") ; AUDIOCHIP(0xB6,tda9851,"TDA9851","TDA9851 BTSC Economic Stereo Audio Processor") ; AUDIOCHIP(0x80,msp3410,"MSP3410","MSP3410 Multi-Sound Audio Processor") ; for ( i=0 ; i<9 ; i++ ) { tda8425reg[i] = -1 ; } for ( i=0 ; i<11 ; i++ ) { tda9850reg[i] = -1 ; } /* FIXME /ØAA */ if (has_tda8425 || has_tda9850 || has_msp3410) gatos.stereo = 1 ; board_setbyte() ; board_setaudio() ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Public routines */ int board_setfm(void) { board_setbyte() ; RETURN0 ; } int board_setmux(void) { board_setaudio() ; board_setbyte() ; RETURN0 ; } int board_setvol(int v) { board_setaudio() ; RETURN0 ; } int board_setmute(void) { board_setaudio() ; board_setbyte() ; RETURN0 ; } int board_setstereo(void) { board_setaudio() ; board_setbyte() ; RETURN0 ; } int board_setsap(void) { board_setaudio() ; board_setbyte() ; RETURN0 ; } int board_hasvol(void) { return has_tda8425 || has_tda9850 || has_msp3410 ; } int board_hasstereo(void) { return has_tda8425 || has_tda9850 || has_msp3410 ; } int board_hassap(void) { return has_tda9850 || has_msp3410 ; } int board_isstereo(void){ if (gatos.board.addr == 0xFF) return 0 ; return !(i2c_read(gatos.board.addr)&0x20) ; } /* ------------------------------------------------------------------------ */ /* Private routines */ static u8 board_identify(u8 *addr, u8 *info) { u8 *ptr ; ptr = (ati.r128) ? gatos.aticard[gatos.cardidx].r128mminfo : gatos.aticard[gatos.cardidx].m64mminfo ; /* Stand-alone cards */ *addr = 0x70 ; *info = 0xFF ; i2c_write(*addr,info,1) ; if ((*info=i2c_read(*addr)) != 0xFF && !gatos.nosa) return CARD_STAND_ALONE ; *addr = 0x40 ; *info = 0xFF ; i2c_write(*addr,info,1) ; if ((*info=i2c_read(*addr)) != 0xFF && !gatos.nosa) return CARD_STAND_ALONE ; *addr = 0x78 ; *info = 0xFF ; i2c_write(*addr,info,1) ; if ((*info=i2c_read(*addr)) != 0xFF && !gatos.nosa) return CARD_NEC ; /* All-In-Wonder, All-In-Wonder Pro or All-In-Wonder 128 */ *addr = 0x76 ; *info = 0x7F ; i2c_write(*addr,info,1) ; *info = i2c_read(*addr) ; if ( (*ptr != 0xFF && *ptr&0x0F) || *info != 0xFF || gatos.i2c_mode==5 ) { if (*info == 0xFF) *addr = 0xFF ; if (*ptr != 0xFF && *ptr&0x0F && *(ptr+4) == 1) return CARD_INTEL_BOARD ; switch (gatos.ati.deviceid) { case 0x5245: case 0x5246: case 0x524B: case 0x524C: return CARD_ALL_IN_WONDER_128 ; case 0x4742: case 0x4744: case 0x4749: case 0x4750: case 0x4751: return CARD_ALL_IN_WONDER_PRO ; default: if (*addr == 0xFF) { if (!(gatos.debug&GATOSQUIET)) fprintf(stderr, "GATOS: Warning: All-In-Wonder Board Control not detected\n") ; *addr = 0x76 ; *info = i2c_read(*addr) ; } return CARD_ALL_IN_WONDER ; } } /* External POD cards */ *addr = 0x72 ; if ( (*info=i2c_read(*addr)) != 0xFF ) return CARD_EXTERNAL_POD ; *addr = 0x42 ; if ( (*info=i2c_read(*addr)) != 0xFF ) return CARD_EXTERNAL_POD ; /* Integrated card ? */ *addr = 0xFF ; *info = 0xFF ; return CARD_INTEGRATED ; } /* Board info/control byte: * 0x80: bt829: 0:enable 1:disable * 0x40: sound: 0:tuner 1:video * 0x20: 0:stereo 1:mono (R/O?) * 0x10: 0:mute 1:unmute * 0x0F: Tuner type (R/O) */ static int board_setbyte(void) { u8 info ; u32 tmp ; if (ati.r128) { /* Which Rage128 register controls audio enable ? */ /* answer - none */ if(gatos.mux==2 && (gatos.audio)) i2c_writereg8(gatos.bt829.addr,0x3f,1); /* other values should control other channels - check later */ else i2c_writereg8(gatos.bt829.addr,0x3f,0); } else { tmp = EXT_DAC_REGS & 0xFFFFFFFC ; if (!gatos.audio) tmp |= 0x2 ; else if (gatos.mux==2) tmp |= 0x1 ; EXT_DAC_REGS = tmp ; } if (gatos.board.addr == 0x76) { /* All-In-Wonder */ info = 0x2F; /* TV-Tuner */ if(gatos.audio) info |= 0x10 ; /* Mute */ if(gatos.mux!=2) info |= 0x40 ; /* Line-In */ i2c_write(gatos.board.addr,&info,1) ; } else if (gatos.board.addr != 0xFF) { /* ATI-TV ISA Card */ info = 0x2F; /* TV-Tuner */ if(!gatos.audio) info |= 0x50 ; /* Mute */ else if(gatos.fm) info |= 0x10 ; /* FM-Tuner */ else if(gatos.mux!=2) info |= 0x40 ; /* Line-In */ i2c_write(gatos.board.addr,&info,1) ; } RETURN0 ; } static int board_setaudio(void) { u8 tmp, data[5] ; if (has_tda8425) { tmp = (gatos.mute) ? 0xC0 : 0xFC ; TDA8425(0x00,tmp) ; TDA8425(0x01,tmp) ; TDA8425(0x02,0xF6) ; TDA8425(0x03,0xF6) ; tmp = 0xC0 | ((!gatos.audio)<<5) | (gatos.mux==2) | ((gatos.stereo) ? 0x1E : (gatos.sap) ? 0x02 : 0x04) ; TDA8425(0x08,tmp) ; } if (has_tda9850) { if (gatos.eeprom.addr != 0xFF) { /* Is this really necessary ? /ØAA */ data[0] = 0x00 ; i2c_write(gatos.eeprom.addr,data,1) ; i2c_readn(gatos.eeprom.addr,data,5) ; if (!memcmp(data,"ATI",3)) { TDA9850(0x08,data[3]&0x1F) ; TDA9850(0x08,(data[4]&0x1F)|0x80) ; } } if (gatos.mux == 2) { TDA9850(0x04,0x0F) ; TDA9850(0x05,0x0F) ; TDA9850(0x07,0x07) ; TDA9850(0x08,0x00) ; TDA9850(0x09,0x00) ; TDA9850(0x0A,0x03) ; } else { TDA9850(0x04,0x07) ; TDA9850(0x05,0x07) ; TDA9850(0x06,0x40) ; TDA9850(0x07,0x07) ; TDA9850(0x08,0x10) ; TDA9850(0x09,0x10) ; TDA9850(0x0A,0x03) ; } TDA9850(0x06,(gatos.stereo<<6)|(gatos.sap<<7)) ; } if (has_tda9851) { data[0] = (BTREAD(P_IO)&0xFC) | (gatos.mux==2) ; BTWRITE(P_IO,data[0]) ; data[0] = (i2c_read(gatos.tda9851.addr) & 0x01) | 0x04 ; i2c_write(gatos.tda9851.addr,data,1) ; } if (has_msp3410) { /* ??? */ } RETURN0 ; } #if 0 /* NIY */ static int MSP3410(u8 sub, u16 reg, u16 val) { u8 data[5] = {sub,reg>>8,reg&0xFF,val>>8,val&0xFF} ; i2c_write(gatos.msp3410.addr,data,5) ; RETURN0 ; } #endif static u16 MSP3410get(u8 sub, u16 reg) { int val=0 ; /* TODO: I2C 16bit read routine (routines below not exported) i2c_start() ; i2c_sendbyte(gatos.msp3410.addr) ; i2c_sendbyte(sub) ; i2c_sendbyte(reg>>8) ; i2c_sendbyte(reg&0xFF) ; i2c_start() ; i2c_sendbyte(gatos.msp3410.addr) ; val = i2c_readbyte(0) << 16 ; val += i2c_readbyte(1) ; i2c_stop() ; */ return val ; } /* ------------------------------------------------------------------------ */ /* Debug and report routines */ #define DUMPREG \ if (gatos.board.addr!=0xFF) fprintf(stderr,"%s: %-4s = 0x%02X\n", \ i2c_ident(gatos.board.addr),"INFO",i2c_read(gatos.board.addr)) #define DUMP8425(REG) \ fprintf(stderr,"%s: 0x%02X = 0x%02X\n", \ i2c_ident(gatos.tda8425.addr),REG,tda8425reg[REG]) #define DUMP9850(REG) \ fprintf(stderr,"%s: 0x%02X = 0x%02X\n", \ i2c_ident(gatos.tda9850.addr),REG,tda9850reg[REG]) #define DUMP9851 \ fprintf(stderr,"%s: %-4s = 0x%02X\n", \ i2c_ident(gatos.tda9851.addr),"STAT",i2c_read(gatos.tda9851.addr)) #define DUMP3410(REG) \ fprintf(stderr,"%s: 0x%04X = 0x%04X\n", \ i2c_ident(gatos.tda9850.addr),REG,MSP3410get(0x13,REG)) #include #include #include void board_dumpregs(void) { DUMPREG ; if (has_tda8425) { /* TDA8425 registers cannot be */ DUMP8425(0x00) ; /* read, so we have to cheat :-( */ DUMP8425(0x01) ; DUMP8425(0x02) ; DUMP8425(0x03) ; DUMP8425(0x08) ; } if (has_tda9850) { /* TDA9850 registers cannot be */ DUMP9850(0x04) ; /* read, so we have to cheat :-( */ DUMP9850(0x05) ; DUMP9850(0x06) ; DUMP9850(0x07) ; DUMP9850(0x08) ; DUMP9850(0x09) ; DUMP9850(0x0A) ; } if (has_tda9851) DUMP9851 ; if (has_msp3410) { DUMP3410(0x0000) ; DUMP3410(0x0006) ; DUMP3410(0x0007) ; } } gatos-0.0.5/src/bogo.c0100644002411700123110000000561007012403440013147 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ /* * NOTE: * * Based on code Linux kernel code in init/main.c and * linux-2.2.12/arch/i386/lib/delay.c * * Based on bogo-1.3 by Jeff Tranter (Jeff_Tranter@Mitel.COM) * * Modified by Daniel Caujolle-Bert for Gatos. * - Use the delay from linux kernel 2.2 now, and * control the returned value to avoid 0 BogoMips. */ #include "gatos.h" #include #include #define gout(FMT,ARGS...) printf(FMT,##ARGS) ; fflush(stdout) /* ------------------------------------------------------------------------ */ /* Private routine */ /* * From Linux kernel 2.2.12 */ #if defined (__NetBSD__) static void __inline__ delay(unsigned long loops) { int d0; __asm__ ( "\tjmp 1f\n" ".align 15\n" "1:\tjmp 2f\n" ".align 15\n" "2:\tdecl %0\n\tjns 2b" :"=&a" (d0) :"0" (loops)); } #else static void __inline__ delay(unsigned long loops) { int d0; __asm__ ( "\tjmp 1f\n" ".align 16\n" "1:\tjmp 2f\n" ".align 16\n" "2:\tdecl %0\n\tjns 2b" :"=&a" (d0) :"0" (loops)); } #endif /* ------------------------------------------------------------------------ */ /* Public routine */ /* * Return the *magic* bogomips value */ unsigned long get_bogomips(void) { unsigned long loops_per_sec = 1; unsigned long ticks; int bogocrash = 1; if(VERBOSE) gout("Calibrating delay loop"); while((loops_per_sec <<= 1)) { if(VERBOSE) gout("."); ticks = clock(); delay(loops_per_sec); ticks = clock() - ticks; if(ticks >= CLOCKS_PER_SEC) { loops_per_sec = ((loops_per_sec / ticks) * CLOCKS_PER_SEC)/500000; /* Never return 0 */ if(loops_per_sec > 0) { if(VERBOSE) gout("done\n"); return loops_per_sec; } else { bogocrash++; if(bogocrash < 10) { loops_per_sec = 1; } else { if(VERBOSE) gout("done\n"); return 2000; } } } } /* If failed, return an arbitrary value */ if(VERBOSE) gout(" FAILED!!\n"); return 2000; } gatos-0.0.5/src/bt829.c0100644002411700123110000002234306776115741013117 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_BT829_C 1 #include "gatos.h" #include "bt829.h" #include "i2c.h" #include #include #include /* Private global vars */ static int xtsel=0, htotal=0, vtotal=0, ldec=1, cbsense=0 ; static u16 adelay=0, bdelay=0, hdelay=0, vdelay=22 ; static u16 luma=0, sat_u=0, sat_v=0 ; /* ------------------------------------------------------------------------ */ /* Initialization routines */ int bt829_init(void) { int has88=i2c_device(0x88), has8A=i2c_device(0x8A) ; gatos.bt829.addr = 0xFF ; switch (gatos.cardtype) { case CARD_STAND_ALONE: case CARD_NEC: if (has8A) bt829_register(0x8A,0,0) ; if (has88) bt829_register(0x88,1,0) ; break ; case CARD_INTEGRATED: if (has88 && has8A) { if (has8A) bt829_register(0x8A,0,1) ; if (has88) bt829_register(0x88,1,0) ; } else { if (has8A) bt829_register(0x8A,1,1) ; if (has88) bt829_register(0x88,1,0) ; } break ; case CARD_EXTERNAL_POD: case CARD_ALL_IN_WONDER: if (has88 && has8A) { if (has88) bt829_register(0x88,0,0) ; if (has8A) bt829_register(0x8A,1,0) ; } else { if (has88) bt829_register(0x88,1,0) ; if (has8A) bt829_register(0x8A,1,0) ; } break ; case CARD_INTEL_BOARD: case CARD_ALL_IN_WONDER_PRO: case CARD_ALL_IN_WONDER_128: if (has88) bt829_register(0x88,0,1) ; if (has8A) bt829_register(0x8A,1,1) ; break ; } if (gatos.bt829.addr == 0xFF) RETURN(ENODEV) ; RETURN0 ; } int bt829_setformat(void) { /* NTSC, PAL or SECAM ? */ switch (gatos.format) { case 2: case 4: /* NTSC */ if (gatos.bt829.deviceid <= BT819) RETURN(EINVAL) ; case 1: /* NTSC */ adelay = 104 ; bdelay = 93 ; xtsel = 1 ; vdelay = 22 ; htotal = 754 ; vtotal = 480 ; break ; case 5: case 7: /* PAL */ if (gatos.bt829.deviceid <= BT819) RETURN(EINVAL) ; case 3: /* PAL */ vdelay = (gatos.tunertype==5) ? 34 : 22 ; adelay = 127 ; bdelay = 114 ; xtsel = 2 ; htotal = 888 ; vtotal = 576 ; break ; case 6: /* SECAM */ if (gatos.bt829.deviceid <= BT819) RETURN(EINVAL) ; adelay = 127 ; bdelay = 160 ; xtsel = 2 ; vdelay = 34 ; htotal = 888 ; vtotal = 576 ; break ; } /* Program the Bt829 */ bt829_iform() ; BTWRITE(TDEC,0x00) ; BTWRITE(VDELAY_LO,L(vdelay)) ; BTWRITE(OFORM,0x0A) ; BTWRITE(ADELAY,adelay) ; BTWRITE(BDELAY,bdelay) ; BTWRITE(ADC,0x82) ; if (gatos.bt829.deviceid >= BT827) { BTWRITE(SCLOOP,(gatos.format==6)?0x10:0x00) ; BTWRITE(WC_UP,0xCF) ; bt829_setCC() ; BTWRITE(WC_DN,0x7F) ; BTWRITE(P_IO,0x00) ; } bt829_setmux() ; bt829_setbrightness() ; bt829_setcontrast() ; bt829_setsaturation() ; bt829_sethue() ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Public routines */ int bt829_setmux(void) { bt829_ctrl() ; return bt829_iform() ; } int bt829_setbrightness(void) { int b = gatos.brightness + gatos.channelinfo[gatos.channel].mod_brightness; b = 127*(b-100)/100 ; b = LIMIT(b,-128,127) ; BTWRITE(BRIGHT,b) ; RETURN0 ; } int bt829_setcontrast(void) { int c = gatos.contrast + gatos.channelinfo[gatos.channel].mod_contrast; c = 216*c/100 ; luma = LIMIT(c,0,511) ; bt829_ctrl() ; BTWRITE(CONTRAST_LO,L(luma)) ; RETURN0 ; } int bt829_setsaturation(void) { int s = gatos.saturation + gatos.channelinfo[gatos.channel].mod_saturation; s = LIMIT(s, -100, 100); sat_u = 254*s/100 ; sat_v = 180*s/100 ; bt829_ctrl() ; BTWRITE(SAT_U_LO,L(sat_u)) ; BTWRITE(SAT_V_LO,L(sat_v)) ; RETURN0 ; } int bt829_sethue(void) { int h = gatos.hue + gatos.channelinfo[gatos.channel].mod_hue; h = 128*h/90 ; h = LIMIT(h,-128,127) ; BTWRITE(HUE,h) ; RETURN0 ; } int bt829_setcaptsize(void) { u16 hscale, vscale ; u8 yci=0x60, vfilt=0 ; /* NTSC, PAL or SECAM ? */ switch (gatos.format) { case 1: case 2: case 4: /* NTSC */ hdelay = gatos.xcapt*135/754 ; if (gatos.xcapt <= 240) vfilt = 1 ; if (gatos.xcapt <= 120) vfilt = 2 ; if (gatos.xcapt <= 60) vfilt = 3 ; break ; case 3: case 5: case 6: case 7: /* PAL/SECAM */ hdelay = gatos.xcapt*176/768 ; if (gatos.xcapt <= 384) vfilt = 1 ; if (gatos.xcapt <= 192) vfilt = 2 ; if (gatos.xcapt <= 96) vfilt = 3 ; break ; default: RETURN(EINVAL) ; } ldec = (gatos.xcapt > 384) ; cbsense = hdelay & 1 ; hscale = 4096*htotal/gatos.xcapt-4096 ; vscale = (0x10000 - (512*vtotal/gatos.ycapt-512)) & 0x1FFF ; bt829_crop() ; bt829_ctrl() ; BTWRITE(VACTIVE_LO,L(vtotal)) ; BTWRITE(HDELAY_LO,L(hdelay)) ; BTWRITE(HACTIVE_LO,L(gatos.xcapt)) ; BTWRITE(HSCALE_HI,H(hscale)) ; BTWRITE(HSCALE_LO,L(hscale)) ; BTWRITE(VSCALE_HI,H(vscale)|yci) ; BTWRITE(VSCALE_LO,L(vscale)) ; if (gatos.bt829.deviceid >= BT827) BTWRITE(VTC,0x18|vfilt) ; RETURN0 ; } int bt829_setCC() { if (gatos.bt829.deviceid < BT827) { gatos.CCmode = 0; RETURN(EINVAL) ; } if (gatos.CCmode == 0) { /* Powering off circuitry */ BTWRITE(CC_STATUS,0x00); RETURN0 ; } /* 0x40 is activate to set the CCVALID line. Not required yet */ BTWRITE(CC_STATUS,(gatos.CCmode<<4)|0x40); /* we write to STATUS to reset the CCVALID flag */ BTWRITE(STATUS,0x00); RETURN0 ; } int bt829_getCCdata(struct CCdata *data) { u8 status; data->num_valid=0; /* wait for buffer to be half full (means 8/16 bytes) * either 4 (one of CC/EDS) or 2 (both CC/EDS) frames */ if(!(BTREAD(STATUS)&0x04)) RETURN0; /* could comment this line */ for(;data->num_validnum_valid++) { status=BTREAD(CC_STATUS); if(!(status&0x04)) break; data->data[data->num_valid]= BTREAD(CC_DATA)&0x7f; /* stripped high bit (parity) */ data->status[data->num_valid]= (CCS_EDS*((status&0x02)>>1)) | (CCS_HIGH*(status&0x01)) | (CCS_OVER*((status&0x08)>>3)) | (CCS_PAR*((status&0x80)>>7)) ; } BTWRITE(STATUS,0x00); /* Reset CCVALID status bit */ RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Debug and report routines */ #define DUMPREG(REG) \ fprintf(stderr,"%s: %-12s (0x%02X) = 0x%02X\n", \ i2c_ident(gatos.bt829.addr),#REG,REG,BTREAD(REG)) void bt829_dumpregs(void) { DUMPREG(STATUS) ; DUMPREG(IFORM) ; DUMPREG(TDEC) ; DUMPREG(CROP) ; DUMPREG(VDELAY_LO) ; DUMPREG(VACTIVE_LO) ; DUMPREG(HDELAY_LO) ; DUMPREG(HACTIVE_LO) ; DUMPREG(HSCALE_HI) ; DUMPREG(HSCALE_LO) ; DUMPREG(BRIGHT) ; DUMPREG(CONTROL) ; DUMPREG(CONTRAST_LO) ; DUMPREG(SAT_U_LO) ; DUMPREG(SAT_V_LO) ; DUMPREG(HUE) ; if (gatos.bt829.deviceid >= BT827) { DUMPREG(SCLOOP) ; DUMPREG(WC_UP) ; } DUMPREG(OFORM) ; DUMPREG(VSCALE_HI) ; DUMPREG(VSCALE_LO) ; DUMPREG(TEST) ; DUMPREG(VPOLE) ; DUMPREG(IDCODE) ; DUMPREG(ADELAY) ; DUMPREG(BDELAY) ; DUMPREG(ADC) ; if (gatos.bt829.deviceid >= BT827) { DUMPREG(VTC) ; DUMPREG(CC_STATUS) ; DUMPREG(CC_DATA) ; DUMPREG(WC_DN) ; DUMPREG(P_IO) ; } } /* ------------------------------------------------------------------------ */ /* Private routines */ static int bt829_register(u8 addr, int use, int vpole) { char *ident, name[64] ; gatos.bt829.addr = addr ; BTWRITE(SRESET,0x00) ; BTWRITE(VPOLE,vpole<<7) ; /* Chip device id, chip revision and chip ident string */ gatos.bt829.deviceid = BTREAD(IDCODE) ; gatos.bt829.revision = gatos.bt829.deviceid & 0x0F ; gatos.bt829.deviceid = (gatos.bt829.deviceid & 0xF0) >> 4 ; switch (gatos.bt829.deviceid) { case BT815: ident = "Bt815A" ; break ; case BT817: ident = "Bt817A" ; break ; case BT819: ident = "Bt819A" ; break ; case BT827: ident = "Bt827A/B" ; break ; case BT829: ident = "Bt829A/B" ; break ; default: gatos.bt829.addr = 0xFF ; RETURN(ENODEV) ; break ; } snprintf(name,sizeof(name), "%s Video Decoder, Revision %d%s",ident,gatos.bt829.revision, (use)?"":" DISABLED") ; if (!use) gatos.bt829.addr = 0xFF ; i2c_register(addr,ident,name) ; RETURN0 ; } static int bt829_crop(void) { BTWRITE(CROP,(H(vdelay)<<6)+(H(vtotal)<<4)+(H(hdelay)<<2)+H(gatos.xcapt)) ; RETURN0 ; } static int bt829_ctrl(void) { BTWRITE(CONTROL,((gatos.mux==3)?0xC0:0x00)+ (ldec<<5)+(cbsense<<4)+(H(luma)<<2)+(H(sat_u)<<1)+H(sat_v)) ; RETURN0 ; } static int bt829_iform(void) { BTWRITE(IFORM,(gatos.mux<<5)|(xtsel<<3)|gatos.format) ; RETURN0 ; } gatos-0.0.5/src/cc.c0100644002411700123110000005146006765053731012634 0ustar bayleasr/**************************************************************************\ Closed Captionning decoding Initial version by Chrisitan Lupien (lupien@physics.utoronto.ca) This is part of the Gatos project: gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ //#define CCTEST #ifdef CCTEST #include #endif #include "gatos.h" #include "cc.h" /* Display area is 15 row by 32 CC_COLUMNS starts on line 43 and ends on line 237 on interlaced display (195 lines long. Note full height is 21 to 262, first line is 1 and the frame is 525 including blanking (fields are 262.5). E.I. A full screen has 3 more lines(18 of 13 CC_ROWS each), about 1.5 above and below the 15. Overall the text should be inside 80% vertically and horizontally of the displayable area (considering 15x34). Caption mode: 4 CC_ROWS max anyhere on screen Should erase the screen when shitching channels or fields. The receiver can keep capturing and analysing captions without displaying them. Roll up mode default row is 15, column 1; turn off unused CC_ROWS. If more characters than column is received the overwrite the column 32 character or midrow code move 1 to the right backsapce move 1 to the left and erase it. backspace at col 1 is ignored */ /* Currently the display of caption is done on the tty where xatitv is started so the program cannot be run in backgound mode (it blocks if you try. Also since I am using ncurses you need to have a correctly set TERM variable. You can try a couple of different ones (linux, VT100, xterm). For modes CC1 and CC2 the program puts a blue screen (if ncurses thinks your terminal handles colors). The blue screen corresponds to the addresable size of the TV screen. Things to do: Text modes can be wrong. I guessed most of it. I guess I should remove pop, paint and roll modes handling (may be even erase screen). Some of the characters are not in iso-latin-1 so I use another character instead. The EDS data is not handled properly. (on one example I got it contained the tv show name and the channel name) To make the output use X and overlay or go in a separate window. Also needs to handle the Italic font. And a lot more .... */ /* the following are valid codes for the iso01mod-8x16 font */ #define TMSYM 0x9f #define MUSNOTE 0x9e #define BLOCK 0x88 #define SCR_MODE_NONE 0 #define SCR_MODE_ROLL 1 #define SCR_MODE_POP 2 #define SCR_MODE_PAINT 3 struct screen { int num_row; int mode; /* none, roll, pop, paint */ int roll; int clrflag; int cur_row; int cur_col; int row[CC_ROWS]; unsigned char text[CC_ROWS][CC_COLUMNS]; int attrib[CC_ROWS][CC_COLUMNS]; /* just need 4 for cc. I use a full page in Text mode so 15. No doc on text mode so this is just a try */ int dnum_row; int dcur_row; int dcur_col; int drow[4]; unsigned char dtext[4][CC_COLUMNS]; /* Display for pop mode */ int dattrib[4][CC_COLUMNS]; int cur_attrib[CC_ROWS]; } sd[4]; /* screen data for CC1,CC2,Text1,Text2 */ /* My attribute logic with a current attribute perline can be wrong, It could be that erasing by backspace a mid-line code changes the attribute */ struct edsdata eds_sd; struct ccdata ccout[4]; static int selector=-2; void cc_decode(int, int); void eds_decode(int, int); void cc_control(int, int); void cc_preamb(int low, int high); void clear_sd(unsigned char *,int *); struct ccdata * cc_get_data(void) { int i; for(i=0;i<=CC_MODE_TEXT2;i++) { ccout[i].clrflag=&(sd[i].clrflag); if(sd[i].mode!=SCR_MODE_POP) { ccout[i].num_row=sd[i].num_row; ccout[i].row=sd[i].row; ccout[i].text=sd[i].text; ccout[i].attrib=sd[i].attrib; } else { ccout[i].num_row=sd[i].dnum_row; ccout[i].row=sd[i].drow; ccout[i].text=sd[i].dtext; ccout[i].attrib=sd[i].dattrib; } } return ccout; } struct edsdata *eds_get_data(void) { return &eds_sd; } void cc_reset(void) { int i; for(i=0;i<4;i++) { sd[i].num_row=0; sd[i].dnum_row=0; sd[i].cur_row=0; sd[i].cur_col=0; sd[i].mode=SCR_MODE_NONE; sd[i].clrflag=1; } selector=-2; eds_sd.num=0; eds_sd.cur=0; for(i=0;iTM */ if(c==0x35) return 0xa2; /* cents sign */ if(c==0x36) return 0xa3; /* Pounds Sterling sign */ if(c==0x37) return MUSNOTE; /* should be a musical note, is inverted !*/; if(c==0x38) return 0xe0; /* grave a or A */ if(c==0x39) return CC_INVSPACE; /* transparent space */ if(c==0x3a) return 0xe8; /* grave e or E */ if(c==0x3b) return 0xe2; /* circumflex a or A*/ if(c==0x3c) return 0xea; /* circumflex e or E*/ if(c==0x3d) return 0xee; /* circumflex i or I*/ if(c==0x3e) return 0xf4; /* circumflex o or O*/ if(c==0x3f) return 0xfb; /* circumflex u or U*/ return CC_BAD; } if((c<0x20)||(c>0x7f)) return CC_BAD; if(c==0x23) return '#'; /* pound (number) sign; 0x23 is # in ascii */ if(c==0x2a) return 0xe1; /* accute a or A */ if(c==0x5c) return 0xe9; /* accute e or E */ if(c==0x5e) return 0xed; /* accute i or I */ if(c==0x5f) return 0xf3; /* accute o or O */ if(c==0x60) return 0xfa; /* accute u or U */ /* 0x61 to 0x7b (a-z) can be replaced by A-Z */ if(c==0x7b) return 0xe7; /* c cedilla or C */ if(c==0x7c) return 0xf7; /* division sign */ if(c==0x7d) return 0xd1; /* N tilde */ if(c==0x7e) return 0xf1; /* n tilde or N*/ if(c==0x7f) return BLOCK; /* solid block */ return c; } void set12(int is2) { int flag=0; if(selector<0) {flag=1; selector=0;} if(selector>=(CC_MODE_TEXT1)) selector=CC_MODE_TEXT1+is2; else selector=CC_MODE_CC1+is2; if(flag) selector-=2; } void setText(int isT) { int is2; if(selector<0) selector+=2; is2=selector&0x01; if(isT) selector=CC_MODE_TEXT1+is2; else selector=CC_MODE_CC1+is2; } void cc_char(char code) { int col=sd[selector].cur_col-1; int row=sd[selector].cur_row-1; if(selector<0) return; if(sd[selector].num_row==0) return; sd[selector].text[row][col]=code; sd[selector].attrib[row][col]=sd[selector].cur_attrib[row]|CC_ATTR_NEWCHAR; if(col<(CC_COLUMNS-1)) sd[selector].cur_col++; } void eds_decode(int low, int high) { int dat[2]={low,high}; int i; #if defined (CCTEST) && defined (EDSTEST) printf("%c%c",(char)low,(char)high); return; #endif for(i=0;i<2;i++) { if(dat[i]!=0) { eds_sd.num++; eds_sd.buf[eds_sd.cur]=dat[i]; eds_sd.cur++; if(eds_sd.cur>=EDS_BUFMAX) eds_sd.cur=0; } } } void cc_decode(int low, int high) { static int plow,phigh; /* check for codes */ #if defined (CCTEST) && !defined (EDSTEST) printf("%c%c",(char)low,(char)high); return; #endif if((low>=0x10)&&(low<=0x1f)) { if((high<0x20)||(high>0x7f)) { /* invalid control, hope for the repeat to work! */ plow=phigh=0; return; } if((high==phigh)&&(low=plow)) { /* repeated code, do nothing */ plow=phigh=0; return; } /* looks like a valid code, do it */ plow=low; phigh=high; cc_control(low,high); return; } if((low==0xff)&&(high==phigh)) { /* repeat code partially failed, skip it anyway */ plow=phigh=0; return; } /* otherwise we just decode them as single char, parity errors are replaced by CC_BAD char */ plow=phigh=0; if(low>0x0f) cc_char(cfilter(low,0)); /* check for an invalid low byte, write the high anyway */ if(high>=0x20) { /* the documentation does not mention what to do if a char has valid parity but is below 0x20 so I decide to skip it. I could also just print a CC_BAD. */ cc_char(cfilter(high,0)); } } #define EXCH(A,T,B) T=A;A=B;B=T; void sw_fields(struct screen * data) { int tmpint; unsigned char tmpchar; int row,col; EXCH(data->num_row,tmpint,data->dnum_row) EXCH(data->cur_row,tmpint,data->dcur_row) EXCH(data->cur_col,tmpint,data->dcur_col) for(row=0;row<4;row++) { EXCH(data->row[row],tmpint,data->drow[row]) for(col=0;colattrib[row][col],tmpint,data->dattrib[row][col]) EXCH(data->text[row][col],tmpchar,data->dtext[row][col]) } } } void cp_fields(struct screen * data) { int row,col; data->dnum_row=data->num_row; data->dcur_row=data->cur_row; data->dcur_col=data->cur_col; for(row=0;row<4;row++) { data->drow[row]=data->row[row]; for(col=0;coldattrib[row][col]=data->attrib[row][col]; data->dtext[row][col]=data->text[row][col]; } } } void rollit(void) { int row; int col; int roll=sd[selector].roll; int num=sd[selector].num_row; int delta; struct screen *data=&(sd[selector]); if(numrow[row-delta-1]=data->row[row]; for(col=0;colattrib[row-delta-1][col]=data->attrib[row][col]; data->text[row-delta-1][col]=data->text[row][col]; } } num=roll; sd[selector].num_row=num; } sd[selector].cur_row=num; num--; sd[selector].row[num]=sd[selector].row[num-1]; for(row=0;row=0x40)&&(high<=0x4e)) {cc_preamb(low,high); return; } if((high>=0x50)&&(high<=0x5f)) {cc_preamb(low,high); return; } if((high>=0x60)&&(high<=0x6e)) {cc_preamb(low,high); return; } if((high>=0x70)&&(high<=0x7f)) {cc_preamb(low,high); return; } if((low==0x11)||(low==0x19)) { /* Alternate code, color, underline, italics attribute*/ if(high>0x3f) return; /*invalid code: skip it */ set12(low==0x19); /* color as highest priority, italics next highest, flash has lowest */ if(high>=0x30) { /* Alternate code */ cc_char(cfilter(high,1)); return; } if(high<=0x2d) { /* color, underline */ if(selector<0) return; if(sd[selector].num_row==0) return; sd[selector].cur_attrib[sd[selector].cur_row-1]=((high-0x20)<<3); cc_char(' '); /* Mid-Row codes are spacing */ return; } if(high==0x2e) { /* italics, no underline */ if(selector<0) return; if(sd[selector].num_row==0) return; cur_attrib=sd[selector].cur_attrib[sd[selector].cur_row-1]; sd[selector].cur_attrib[sd[selector].cur_row-1]= (cur_attrib&0xf8)|CC_ATTR_ITALICS; cc_char(' '); /* Mid-Row codes are spacing */ return; } if(high==0x2f) { /* italics, underline */ if(selector<0) return; if(sd[selector].num_row==0) return; cur_attrib=sd[selector].cur_attrib[sd[selector].cur_row-1]; sd[selector].cur_attrib[sd[selector].cur_row-1]= (cur_attrib&0xf8)|CC_ATTR_ITALICS|CC_ATTR_UNDERLINE; cc_char(' '); /* Mid-Row codes are spacing */ return; } } if((low==0x14)||(low==0x1c)) { /* Misc codes */ if((high<0x20)||(high>0x2f)) return; /* invalid code; skip it */ set12(low==0x1c); if(high==0x20) { /* resume caption loading pop */ setText(0); if(sd[selector].mode!=SCR_MODE_POP) { sd[selector].mode=SCR_MODE_POP; cp_fields(&(sd[selector])); } return; } if(high==0x21) { /* Backspace */ if(selector<0) return; if(sd[selector].num_row==0) return; if(sd[selector].cur_col<=1) return; sd[selector].cur_col--; cc_char(CC_INVSPACE); return; } if(high==0x22) return; /* Reserved (formerly Alarm Off). */ if(high==0x23) return; /* Reserved (formerly Alarm On). */ if(high==0x24) { /* Delete to end of Row */ if(selector<0) return; if(sd[selector].num_row==0) return; row=sd[selector].cur_row-1; for(col=sd[selector].cur_col-1; col=0x25)&&(high<=0x27)) { /* Rool-Up Caption high-0x25+2 CC_ROWS */ setText(0); if(sd[selector].mode!=SCR_MODE_ROLL) { sd[selector].mode=SCR_MODE_ROLL; sd[selector].num_row=1; sd[selector].clrflag=1; sd[selector].dnum_row=0; sd[selector].cur_row=1; sd[selector].cur_col=1; sd[selector].cur_attrib[0]=0; sd[selector].row[0]=15; clear_sd(sd[selector].text[0],sd[selector].attrib[0]); } num=high-0x25+2; if(numrow[row-delta]=data->row[row]; for(col=0;colattrib[row-delta][col]=data->attrib[row][col]; data->text[row-delta][col]=data->text[row][col]; data->row[row-delta]=data->row[row]; } } data->cur_row=num; } sd[selector].roll=num; if(tmp==selector) sd[selector].cur_col=1; return; } if(high==0x28) { /* Flash On */ if(selector<0) return; if(sd[selector].num_row==0) return; row=sd[selector].cur_row-1; sd[selector].cur_attrib[row]|=CC_ATTR_FLASH; cc_char(' '); return; } if(high==0x29) { /* Resume Direct Captioning paint */ setText(0); if(sd[selector].mode!=SCR_MODE_PAINT) { if(sd[selector].mode==SCR_MODE_POP) { sw_fields(&(sd[selector])); } sd[selector].mode=SCR_MODE_PAINT; } return; } if(high==0x2a) { /* Text restart */ setText(1); if(sd[selector].num_row==0) { sd[selector].num_row=1; sd[selector].cur_row=1; sd[selector].cur_col=1; sd[selector].cur_attrib[0]=0; sd[selector].row[0]=CC_ROWS; sd[selector].roll=CC_ROWS; } clear_sd(sd[selector].text[sd[selector].cur_row-1], sd[selector].attrib[sd[selector].cur_row-1]); return; } if(high==0x2b) { /* Resume Text display */ setText(1); if(sd[selector].num_row==0) { sd[selector].num_row=1; sd[selector].cur_row=1; sd[selector].cur_col=1; sd[selector].cur_attrib[0]=0; clear_sd(sd[selector].text[0],sd[selector].attrib[0]); sd[selector].row[0]=CC_ROWS; sd[selector].roll=CC_ROWS; } return; } if(high==0x2c) { /* Erase Displayed memory */ if(selector<0) return; if(sd[selector].mode==SCR_MODE_POP) { sd[selector].dnum_row=0; sd[selector].dcur_row=0; sd[selector].dcur_col=0; } else { sd[selector].num_row=0; sd[selector].cur_row=0; sd[selector].cur_col=0; } sd[selector].clrflag=1; return; } if(high==0x2d) { /* Carriage return */ if(selector<0) return; if((sd[selector].mode!=SCR_MODE_ROLL)&&(selector<=(CC_MODE_CC2))) return; rollit(); sd[selector].clrflag=1; return; } if(high==0x2e) { /* Erase non-displayed memory */ if(selector<0) return; if(sd[selector].mode==SCR_MODE_POP) { sd[selector].num_row=0; sd[selector].cur_row=0; sd[selector].cur_col=0; } return; } if(high==0x2f) { /* End of caption, flip memories */ setText(0); if(sd[selector].mode!=SCR_MODE_POP) { sd[selector].mode=SCR_MODE_POP; cp_fields(&(sd[selector])); } else { sd[selector].clrflag=1; sw_fields(&(sd[selector])); } return; } } if((low==0x17)||(low==0x1f)) { /* Tab offsets */ if((high>=0x21)&&(high<=0x23)) return; /* invalid code; skip it */ set12(low==0x1f); if(selector<0) return; if(sd[selector].num_row==0) return; col=(sd[selector].cur_col+=high-0x20); if(col>CC_COLUMNS) sd[selector].cur_col=CC_COLUMNS; return; } } void clear_sd(unsigned char *text,int *attrib){ int i; for(i=0;i=0x18)); if(selector<0) return; low-= 0x10+secf*0x08; low= ((low<<1)|(high>=0x60)); if(high&0x10) { /* Not attribute but column indent */ cur_col=1+2*(high&0x0f); colf=1; } else { high&=0x0f; if(high<=0x4d) cur_attrib=((high&0x0f)<<3); else cur_attrib=CC_ATTR_ITALICS; } /* now lets handle the row code, It is in low and is not a linear relation */ if(low==0) cur_row=11; /* row 11 */ else if(low<=5) cur_row=low-1; /* CC_ROWS 1 to 4 */ else if(low<=9) cur_row=low+6; /* CC_ROWS 12 to 15 */ else cur_row=low-5; /* CC_ROWS 5 to 10 */ if(selector<=(CC_MODE_CC2)) { if(sd[selector].mode==SCR_MODE_ROLL) { delta=sd[selector].row[sd[selector].cur_row-1]-cur_row; if(delta!=0) { sd[selector].clrflag=1; for(row=sd[selector].num_row-1;row>=0;row--) sd[selector].row[row]-=delta; } } else { /* we do the more complicated ones: POP and PAINT */ /* first check if it exists already */ for(row=0;rowattrib[row-1][col]=data->attrib[row][col]; data->text[row-1][col]=data->text[row][col]; data->row[row-1]=data->row[row]; } sd[selector].num_row--; } sd[selector].num_row++; row=sd[selector].cur_row=sd[selector].num_row; row--; clear_sd(sd[selector].text[row],sd[selector].attrib[row]); sd[selector].cur_attrib[row]=0; sd[selector].row[row]=cur_row; sd[selector].cur_col=1; } } } if(colf) sd[selector].cur_col=cur_col; else sd[selector].cur_attrib[sd[selector].cur_row-1]=cur_attrib; } /* may be a color atttribute removes the indent or vice versa */ gatos-0.0.5/src/channels.c0100644002411700123110000001377507030011472014027 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_CHANNELS_C 1 #include "freq.h" #include "gatos.h" #include "channels.h" #include #include #include int chan_init(void) { int ctr; gatos.numchannels = 0; for(ctr=0; ctr= MAX_CHANNELS) { /* Fixme: Proper Error!! */ printf("Channel overflow!\n"); exit(1); } gatos.channelinfo[gatos.numchannels].frequency = f; snprintf(gatos.channelinfo[gatos.numchannels].name, sizeof(gatos.channelinfo[gatos.numchannels].name), "%s", n); chan_clearflag(gatos.numchannels, CHANNEL_SKIP); if(CHANNELMGMT) printf("Added channel %d (%f), \"%s\"\n", gatos.numchannels, f, n); return gatos.numchannels++; } int chan_setname(int c, char *n) { snprintf(gatos.channelinfo[c].name,sizeof(gatos.channelinfo[c].name), "%s", n); return 0; } char *chan_name(int c) { return gatos.channelinfo[c].name; } double chan_setfreq(int c, double f) { gatos.channelinfo[c].frequency = f; if(c==gatos.channel) gatos_settuner(gatos.channelinfo[c].frequency); return gatos.channelinfo[c].frequency; } double chan_freq(int c) { return gatos.channelinfo[c].frequency; } int chan_volume(int c) { return gatos.channelinfo[c].mod_volume; } int chan_setvolume(int c, int v) { gatos.channelinfo[c].mod_volume = v; if(c==gatos.channel) gatos_setvolume(gatos.volume); return 0; } int chan_brightness(int c) { return gatos.channelinfo[c].mod_brightness; } int chan_setbrightness(int c, int v) { gatos.channelinfo[c].mod_brightness = v; if(c==gatos.channel) gatos_setbrightness(gatos.brightness); return 0; } int chan_contrast(int c) { return gatos.channelinfo[c].mod_contrast; } int chan_setcontrast(int c, int v) { gatos.channelinfo[c].mod_contrast = v; if(c==gatos.channel) gatos_setcontrast(gatos.contrast); return 0; } int chan_hue(int c) { return gatos.channelinfo[c].mod_hue; } int chan_sethue(int c, int v) { gatos.channelinfo[c].mod_hue = v; if(c==gatos.channel) gatos_sethue(gatos.hue); return 0; } int chan_saturation(int c) { return gatos.channelinfo[c].mod_saturation; } int chan_setsaturation(int c, int v) { gatos.channelinfo[c].mod_saturation = v; if(c==gatos.channel) gatos_setsaturation(gatos.saturation); return 0; } int chan_setflag(int c, int f) { gatos.channelinfo[c].flags = f; return 0; } int chan_setflags(int c, int f) { gatos.channelinfo[c].flags |= f; return 0; } int chan_clearflag(int c, int f) { gatos.channelinfo[c].flags &= (~f); return 0; } int chan_flag(int c, int f) { return (gatos.channelinfo[c].flags & f); } int chan_flags(int c) { return gatos.channelinfo[c].flags; } gatos-0.0.5/src/delay.S0100644002411700123110000000053707012403440013302 0ustar bayleasr#include "linkage.h" /* * BogoMips loop. Non-inlined because various x86's have so wildly * varying results depending on the exact alignment. */ #if defined (__NetBSD__) ENTRY(__do_delay) jmp 1f .align 15 1: jmp 2f .align 15 2: decl %eax jns 2b ret #else ENTRY(__do_delay) jmp 1f .align 16 1: jmp 2f .align 16 2: decl %eax jns 2b ret #endif gatos-0.0.5/src/fi12xx.c0100644002411700123110000002255607030216325013356 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_FI12XX_C 1 #include "gatos.h" #include "fi12xx.h" #include "board.h" #include "bt829.h" #include "i2c.h" #include #include #include #include #include #include #include /* Private global vars */ static u32 tunerK=0, minK=0, maxK=0 ; static struct { int type ; char *vendor ; char *ident ; char *system ; } tuners[MAXTUNERTYPE+1] = { { 0, NULL, NULL, NULL }, { 1, "Philips", "FI1236", "NTSC M/N" }, { 2, "Philips", "FI1236J", "NTSC Japan" }, { 3, "Philips", "FI1216MK2", "PAL B/G" }, { 4, "Philips", "FI1246", "PAL I" }, { 5, "Philips", "FI1216MF", "PAL B/G, SECAM L/L'" }, { 6, "Philips", "FI1236MK2", "NTSC M/N" }, { 7, "Philips", "FI1256", "SECAM D/K" }, { 8, "Samsung", "TCPN7082PC27A", "NTSC M/N" }, { 9, "Philips", "FI1216MK2(EXT)", "PAL B/G" }, { 10, "Philips", "FI1246MK2(EXT)", "PAL I" }, { 11, "Philips", "FI1216MF(EXT)", "PAL B/G, SECAM L/L'" }, { 12, "Philips", "FI1236MK2(EXT)", "NTSC M/N" }, { 13, "Temic", "FN5AL", "PAL I/B/G/DK, SECAM DK" }, { 14, NULL, NULL, NULL }, { 15, NULL, NULL, NULL }, { 16, "Alps", "TSBH5", "NTSC M/N" }, { 17, "Alps", "TSC??", "NTSC M/N" }, { 18, "Alps", "TSCH5", "NTSC M/N with FM" } } ; /* ------------------------------------------------------------------------ */ /* Initialization routine */ int fi12xx_init(void) { gatos.fi12xx.addr = 0xFF ; switch (gatos.cardtype) { case CARD_STAND_ALONE: case CARD_NEC: if (i2c_device(0xC6)) fi12xx_register(0xC6,0) ; if (i2c_device(0xC0)) fi12xx_register(0xC0,1) ; break ; case CARD_INTEGRATED: case CARD_EXTERNAL_POD: case CARD_ALL_IN_WONDER: case CARD_ALL_IN_WONDER_PRO: case CARD_ALL_IN_WONDER_128: case CARD_INTEL_BOARD: if (i2c_device(0xC0)) fi12xx_register(0xC0,0) ; if (i2c_device(0xC6)) fi12xx_register(0xC6,1) ; break ; } if (gatos.fi12xx.addr == 0xFF) RETURN(ENODEV) ; RETURN0 ; } void fi12xx_setformat(void) { /* NTSC, PAL or SECAM ? */ switch (gatos.format) { case 1: case 2: case 4: /* NTSC */ gatos.minfreq = 55.25 ; gatos.Fpc = 45.75 ; gatos.maxfreq = 801.25 ; gatos.ntsc = 1 ; break ; case 3: case 5: case 7: /* PAL */ /* PAL-D/K Fpc: ATI == 38.9, officially == 38.00 ? */ gatos.minfreq = 48.25 ; gatos.Fpc = 38.90 ; gatos.maxfreq = 855.25 ; gatos.pal = 1 ; break ; case 6: /* SECAM */ /* SECAM-L1 Fpc: ATI == 33.95, officially == 32.70 ? */ gatos.minfreq = 47.75 ; gatos.Fpc = 38.90 ; gatos.maxfreq = 855.25 ; gatos.secam = 1 ; break ; } minK = FREQ2K(gatos.minfreq) ; maxK = FREQ2K(gatos.maxfreq) ; } /* ------------------------------------------------------------------------ */ /* Public routines */ /* Tune to frequency */ int fi12xx_tune(void) { u32 K ; int i ; u8 band, data[4] ; K = FREQ2K(gatos.freq) ; band = fi12xx_band(gatos.freq) ; gatos.freq = K2FREQ(K) ; i = (K>tunerK) ? 0 : 2 ; tunerK = K ; data[i+0] = (K>>8) & 0x7F ; data[i+1] = K & 0xFF ; data[2-i] = 0x8E ; data[3-i] = band ; i2c_write(gatos.fi12xx.addr,data,sizeof(data)) ; RETURN0 ; } /* Channel scanner */ double fi12xx_scan(double start, double end, int (*addchan)(double, char*), int (*progress)(double)) { double freq ; int state=4, volume, ctr ; char name[16] ; u8 band, data[4], fi, bt, btmask=0xC0 ; u32 K, maxK ; if (gatos.usr1pid) kill(gatos.usr1pid,SIGSTOP) ; volume = gatos.volume ; if (volume) gatos_setvolume(0) ; if (start == gatos.minfreq) start -= 0.25 ; if (end == gatos.maxfreq) end += 0.25 ; tunerK = K = FREQ2K(start) ; maxK = FREQ2K(end) ; if (gatos.senscan) btmask = 0x80 ; for ( ; tunerK<=maxK ; tunerK++ ) { freq = K2FREQ(tunerK) ; band = fi12xx_band(freq) ; if (progress && progress(freq)) { if (gatos.usr1pid) kill(gatos.usr1pid,SIGCONT) ; if (volume) gatos_setvolume(volume) ; return freq ; } data[0] = (tunerK>>8) & 0x7F ; data[1] = tunerK & 0xFF ; data[2] = 0xCE ; data[3] = band ; i2c_write(gatos.fi12xx.addr,data,sizeof(data)) ; usleep(10000) ; fi = FISTATUS&7 ; state = (state == 2 && fi <= 2) ? 5 : fi ; if (fi >= 2) K = tunerK ; if (state != 5) continue ; bt = BTREAD(STATUS)>>7 ; if (!bt) continue ; freq = K2FREQ(K) ; band = fi12xx_band(freq) ; data[2] = (K>>8) & 0x7F ; data[3] = K & 0xFF ; data[0] = 0xCE ; data[1] = band ; i2c_write(gatos.fi12xx.addr,data,sizeof(data)) ; usleep(20000) ; fi = FISTATUS ; bt = BTREAD(STATUS) ; if ( (fi&0x40) != 0x40 || (bt&btmask) != btmask ) continue ; if (addchan) { for ( ctr=0 ; ctrgatos.channelinfo[ctr].frequency); ctr++ ) ; if (ctr>=gatos.numchannels || (gatos.channelinfo[ctr].flags & CHANNEL_SKIP)) { snprintf(name,sizeof(name),"%.3f MHz",freq) ; addchan(freq,name) ; } } } if (gatos.usr1pid) kill(gatos.usr1pid,SIGCONT) ; if (volume) gatos_setvolume(volume) ; return 0.0 ; } /* ------------------------------------------------------------------------ */ /* Private routines */ static u8 fi12xx_band(double freq) { int system=0 ; switch (gatos.tunertype) { case 1: case 2: case 12: /* NTSC M/N and NTSC Japan */ if (freq <= 160.00) return 0xA2 ; if (freq <= 451.25) return 0x94 ; if (freq <= 463.25) return 0x34 ; return 0x31 ; case 3: case 4: case 9: case 10: /* PAL B/G and PAL I */ if (freq <= 140.25) return 0xA2 ; if (freq <= 168.25) return 0xA4 ; if (freq <= 447.25) return 0x94 ; return 0x31 ; case 6: /* NTSC M/N Mk2 */ if (freq <= 160.00) return 0xA0 ; if (freq <= 454.00) return 0x90 ; return 0x30 ; case 7: /* SECAM D/K */ if (freq <= 168.25) return 0xA0 ; if (freq <= 455.25) return 0x90 ; return 0x30 ; case 5: case 11: /* PAL B/G, SECAM L/L' */ if (gatos.pal) system = 1 ; if (gatos.secam == 2) system = 2 ; if (gatos.secam == 1) system = 3 ; if (freq <= 168.25) return 0xA0+system ; if (freq <= 447.25) return 0x90+system ; return 0x30+system ; case 8: /* NTSC M/N (Samsung) */ if (gatos.cardtype == CARD_NEC) { if (freq <= 160.00) return 0xA0 ; if (freq <= 454.00) return 0x90 ; return 0x30 ; } else if ((gatos.cardtype == CARD_EXTERNAL_POD && gatos.boardrev == 3) || (gatos.cardtype == CARD_STAND_ALONE && gatos.boardrev == 0)) { if (freq <= 157.25) return 0xA2 ; if (freq <= 451.25) return 0x94 ; if (freq <= 463.25) return 0x34 ; return 0x31 ; } else { if (freq <= 127.25) return 0x01 ; if (freq <= 361.25) return 0x02 ; return 0x08 ; } case 13: /* PAL I/B/G/DK, SECAM D/K */ if (0/*SECAM D/K*/) { if (freq <= 168.25) return 0xA0 ; if (freq <= 455.25) return 0x90 ; return 0x30 ; } else if (0/*PAL D/K*/) { return 0x00 ; } else { /* PAL B/G or PAL I */ if (freq <= 140.25) return 0xA2 ; if (freq <= 168.25) return 0xA4 ; if (freq <= 447.25) return 0x94 ; return 0x31 ; } case 16: case 17: /* NTSC M/N */ if (freq <= 130.00) return 0x14 ; if (freq <= 364.00) return 0x12 ; return 0x11 ; case 18: /* NTSC M/N with FM */ /* TODO: FM (how?) /ØAA */ if (freq <= 130.00) return 0x14 ; if (freq <= 364.00) return 0x12 ; return 0x11 ; default: return 0x00 ; } } static int fi12xx_register(u8 addr, int use) { char *ident, name[64] ; gatos.fi12xx.deviceid = 0 ; gatos.fi12xx.revision = 0 ; if (gatos.tunertype) { ident = tuners[gatos.tunertype].ident ; if (ident==NULL) ident="Unknown" ; snprintf(name,sizeof(name),"%s Tuner Module (%s %s)%s", tuners[gatos.tunertype].system, tuners[gatos.tunertype].vendor, ident, (use)?"":" UNUSED") ; } else { ident = "Tuner" ; snprintf(name,sizeof(name),"Tuner Module") ; } if (use) gatos.fi12xx.addr = addr ; i2c_register(addr,ident,name) ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Debug and report routines */ #define DUMPREG \ fprintf(stderr,"%s: %-6s = 0x%02X\n", \ i2c_ident(gatos.fi12xx.addr),"STATUS",FISTATUS) void fi12xx_dumpregs(void) { DUMPREG ; } gatos-0.0.5/src/gatos.c0100644002411700123110000012465207027750062013361 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_GATOS_C 1 #include "gatos.h" #include "channels.h" #include "pci.h" #include "i2c.h" #include "ati.h" #include "tvout.h" #include "board.h" #include "bogo.h" #include "bt829.h" #include "fi12xx.h" #include "sound.h" #include "saa5281.h" #include "version.h" #ifdef USE_IPC #include "ipc.h" #endif #include #include #include #include #include #include #include #include #include #ifdef USE_SHM #include #include #endif #ifdef USE_IPC #include #include #endif #define MAXLEVELS 10 /* Private global vars */ static int init=0, debug=0, nosa=0, err=0 ; static char *pciaddr=NULL ; static char *gatoscalls[MAXLEVELS+1] ; /* ------------------------------------------------------------------------ */ #define SUBCALL(FUNC) \ gatos_enter(#FUNC,"") ; err = FUNC() ; gatos_leave(err) ; \ if (err) { fprintf(stderr,"GATOS: %s failed: %s\n", \ #FUNC,strerror(err)) ; RETURN(err) ; } #define INSANE(VAR) { \ fprintf(stderr,"%s value '%d' invalid",#VAR,gatos.##VAR) ; \ RETURN(EINVAL) ; } #define FUNC0(TYPE,NAME,FMT,VAR) \ TYPE NAME(void) { \ if (GATOSCALL) { \ fprintf(stderr,"GATOS: %s() = ",#NAME) ; \ fprintf(stderr,FMT,VAR) ; fprintf(stderr,"\n") ; } \ return VAR ; } #define FUNC1(TYPE,NAME,T1,A1,F1,FMT,VAR) \ TYPE NAME(T1 A1) { \ if (GATOSCALL) { \ fprintf(stderr,"GATOS: %s(",#NAME) ; \ fprintf(stderr,F1,A1) ; \ fprintf(stderr,") = ") ; \ fprintf(stderr,FMT,VAR) ; fprintf(stderr,"\n") ; } \ return VAR ; } #define gerr(FMT,ARGS...) fprintf(stderr,FMT,##ARGS) #define gout(FMT,ARGS...) printf(FMT,##ARGS) ; fflush(stdout) /* ------------------------------------------------------------------------ */ void gatos_enter(char *func, char *fmt, ...) { int i ; va_list args ; fflush(stdout) ; if (GATOSCALL && gatos.pending) fprintf(stderr,"\n") ; gatos.level++ ; gatos.pending = 0 ; if (gatos.level>MAXLEVELS) { /* This should not happen */ if (!(gatos.debug&GATOSQUIET)) fprintf(stderr,"GATOS: gatos_enter(): Fatal: MAXLEVELS exceeded\n") ; exit(1) ; } gatoscalls[gatos.level] = func ; if (!GATOSCALL) return ; gatos.pending = 1 ; fprintf(stderr,"GATOS:") ; for ( i=0 ; i FrameBuffer @ 0x%08X, Registers @ 0x%08X", gatos.fbaddr, (gatos.regaddr==0xFFFFFFFF) ? gatos.fbaddr+0x007FF800 : gatos.regaddr) ; if (gatos.biosaddr != 0xFFFFFFFF) { gout(", BIOS @ 0x%08X",gatos.biosaddr) ; } gout("\n==> RefClock %f MHz",gatos.refclock) ; gout(", Max Scaler Clock %.0f MHz",gatos.ati.dotclock) ; gout(", Max Scaler Width %d\n",gatos.ati.width) ; } /* Card not found ? */ if (gatos.cardidx == -1) { fprintf(stderr,"GATOS: No ATI PCI/AGP Card @ %s\n",gatos.pciaddr) ; RETURN(EINVAL) ; } /* Sanity check */ if (gatos.fbaddr == 0xFFFFFFFF) { fprintf(stderr,"GATOS: FrameBuffer Aperture not mapped\n") ; RETURN(ENXIO) ; } if ( !(gatos.fbaddr & 0xFFC00000) || (gatos.fbaddr & 0x003FFFFF) ) INSANE(fbaddr) ; if (gatos.regaddr != 0xFFFFFFFF && (!(gatos.regaddr & 0xFFFFF000) || (gatos.regaddr & 0x00000FFF)) ) INSANE(regaddr) ; if ( (gatos.buffermem < 300) || (gatos.buffermem > 2048) ) INSANE(buffermem) ; /* Memory map ATI FrameBuffer Aperture */ if ( (int) (ATIFB = (u8*) mmap(0,0x01000000,PROT_READ|PROT_WRITE,MAP_SHARED, gatos.memfd,gatos.fbaddr)) == -1 ) { perror("GATOS: mmap() failed") ; RETURN(errno) ; } /* Memory map ATI Mach64 or Rage128 Register Aperture: * * Mach64 driver uses MEM_[01], Rage128 driver uses MMR */ if (gatos.regaddr == 0xFFFFFFFF) MMR = (u8*)(ATIFB+0x007FF800) ; else if ( (int) (MMR = (u8*) mmap(0,8192,PROT_READ|PROT_WRITE,MAP_SHARED, gatos.memfd,gatos.regaddr)) == -1 ) { perror("GATOS: mmap() failed") ; RETURN(errno) ; } MEM_0 = ((u32*)MMR)+256 ; MEM_1 = (u32*)MMR ; /* Setuid(root) privileges no longer needed; give them up for good :-) */ uid = getuid() ; euid = geteuid() ; if (euid != uid && setuid(uid)) { perror("setuid() failed") ; exit(0) ; } /* Initalize ATI chip */ SUBCALL(ati_inita) ; /* Amount of Video RAM (autodetected from chip register) */ if (VERBOSE) { gout("==> %d kilobytes of Video RAM\n",gatos.videoram) ; } /* BIOS MultiMedia Table (remove when R128 driver is working /ØAA) */ if (VERBOSE) { gout("==> %s BIOS MultiMedia Table:",(ati.r128)?"Rage128":"Mach64") ; if (ati.r128) { for ( i=0 ; i<12 ; i++ ) { gout(" %02X",gatos.aticard[gatos.cardidx].r128mminfo[i]) ; } gout("\n==> Rage128 BIOS TV Out Table: ") ; for ( i=0 ; i<12 ; i++ ) { gout(" %02X",gatos.aticard[gatos.cardidx].r128tvinfo[i]) ; } } else for ( i=0 ; i<5 ; i++ ) { gout(" %02X",gatos.aticard[gatos.cardidx].m64mminfo[i]) ; } gout("\n") ; } /* Initalize ImpacTV chip */ /* Tvout not ported to Rage128 yet /ØAA */ if (!ati.r128) { SUBCALL(tvout_init) ; } /* CPU BogoMIPS value, used by delay.S or i2c_delay() */ if ( (file=fopen("/proc/cpuinfo","r")) != NULL ) { while (fgets(buf,sizeof(buf)-1,file)) { if (strncmp(buf,"bogomips",8)) continue ; bufp = buf ; while (*bufp && (*bufp != ':') && (*bufp != '\n')) bufp++ ; if (*bufp != ':') continue ; bufp++ ; while (*bufp == ' ') bufp++ ; gatos.bogomips = (int) (atof(bufp)+0.5) ; break ; } fclose(file) ; } else { /* Use the new way to get the BogoMips value, * useful for unices that doesn't have /proc/cpuinfo. */ gatos.bogomips = get_bogomips() ; } if (VERBOSE) gout("CPU speed is %d BogoMIPS\n",gatos.bogomips) ; #ifdef USE_DELAY_S /* Used by delay.S */ loops_per_sec = gatos.bogomips * 500000 ; #endif /* Initialize I2C Driver */ SUBCALL(i2c_init) ; if (VERBOSE && gatos.bugfix_mppread) { gout("I2C: MPP read bugfix value is 0x%02X\n",gatos.bugfix_mppread) ; } RETURN(0) ; } int gatos_initb(void) { struct sigaction act ; gatos_enter("gatos_initb","") ; /* Finish ATI chip initialization */ SUBCALL(ati_initb) ; /* Initalize I2C dependant submodules */ SUBCALL(board_init) ; SUBCALL(bt829_init) ; SUBCALL(fi12xx_init) ; SUBCALL(sound_init) ; SUBCALL(saa5281_init) ; /* Remaining submodules */ SUBCALL(chan_init) ; /* Load ~/.gatosrc */ snprintf(gatos.statename, sizeof(gatos.statename), "%s/.gatosrc", getenv("HOME")) ; if (gatos_loadstate(gatos.statename)) { /* It failed, use format from gatos.conf */ if (gatos.format) gatos_setformat(gatos.format) ; else switch (gatos.tunertype) { /* ... or derive it from tuner type */ case 2: gatos_setformat(2) ; break ; /* NTSC Japan */ case 3: case 4: gatos_setformat(3) ; break ; /* PAL */ case 5: case 7: gatos_setformat(6) ; break ; /* SECAM */ case 1: case 6: case 8: case 12: case 0x12: default:/* NTSC M/N */ gatos_setformat(1) ; break ; } } /* We're initialized */ init = 1 ; /* Desktop panning and mode change support (hackish, but it works ;-) */ act.sa_flags = 0 ; #if defined(__linux__) act.sa_restorer = NULL ; #endif sigemptyset(&act.sa_mask) ; act.sa_handler = &gatos_pollscreen ; sigaction(SIGUSR1, &act, NULL) ; if ( (gatos.usr1pid=fork()) == -1) { gerr("Warning: Desktop panning and Modechange support disabled:\n") ; gerr("Warning: Fork() failed: %s\n",strerror(errno)) ; gatos.usr1pid = 0 ; RETURN(0) ; } if (gatos.usr1pid) RETURN(0) ; /* Child process, sends approx. 50 SIGUSR1's per sec. */ /* Note: Surround *all* sleep() and usleep() calls with stop (SIGSTOP) * * and restart (SIGCONT) of this child process, or the u?sleep() * * can end prematurely with EINTR (interrupted system call). /ØAA */ close(0) ; close(1) ; close(2) ; while (1) { usleep(10000) ; if (kill(getppid(),SIGUSR1)) exit(0) ; } exit(0) ; } /* ------------------------------------------------------------------------ */ int gatos_terminate(void) { gatos_enter("gatos_terminate","") ; if (!init) RETURN(0) ; gatos_enable_sound(0) ; gatos_enable_video(0) ; gatos_enable_capture(0) ; gatos_setCC(0) ; sound_restore() ; gatos_savestate(gatos.statename) ; if (gatos.usr1pid) kill(gatos.usr1pid,SIGKILL) ; init = 0 ; #ifdef USE_SHM /* Crazy Split Crap */ if(shbuf[1] == getpid()) { shbuf[1]=0; shbuf[0] &= (~GATOS_WRITE_BUFFER); } if(shbuf[2] == getpid()) { shbuf[2]=0; shbuf[0] &= (~GATOS_OVERLAY); } if(shbuf[3] == getpid()) { shbuf[3]=0; shbuf[0] &= (~GATOS_TUNER); } if(shbuf[4] == getpid()) { shbuf[4]=0; shbuf[0] &= (~GATOS_TVOUT); } if(!shbuf[0]) { shmctl(shmid, IPC_RMID, 0); printf("Shared memory segment marked for deletion\n"); } #endif #ifdef USE_IPC ipc_delete_message(); #endif RETURN(0) ; } /* ------------------------------------------------------------------------ */ static int ival(char *name, char **str, int min, int max) { char *tok = strsep(str," \t\n"), *endp ; int value = strtol(tok,&endp,0) ; if (*tok==0 || *endp!=0) gerr("gatos: Invalid value '%s' for '%s'.\n",tok,name) ; if (value < min) { gerr( "gatos: %s value '%d' too low, setting to %d.\n",name,value,min) ; value = min ; } if (value > max) { gerr( "gatos: %s value '%d' too high, setting to %d.\n",name,value,min) ; value = max ; } return value ; } static char *sval(char *name, char **str, char *min, char *max) { char *tok, *buf ; if (**str == '\'') { (*str)++ ; tok = strsep(str,"'\n") ; } else { tok = strsep(str,"\n") ; buf = tok+strlen(tok)-1 ; while (buf >= tok && index(" \t",*buf)) *buf-- = 0 ; } buf = malloc(strlen(tok)+1) ; if (buf) strcpy(buf,tok) ; return buf ; } #define TOKEN(NAME,VAR,FUNC,MIN,MAX) \ if (!strcmp(tok,NAME)) { VAR = FUNC(tok,&bufp,MIN,MAX) ; continue ; } int gatos_configfile(void) { FILE *file ; char buf[256], *tok, *bufp, *endp ; int instr, dummy ; gatos_enter("gatos_configfile","") ; if ((file=fopen(CONFIGFILE,"r")) == NULL) { perror("fopen(config) failed") ; RETURN(errno) ; } while (fgets(buf,sizeof(buf)-1,file)) { bufp = buf ; while (index(" \t",*bufp)) bufp++ ; endp = bufp+strlen(bufp) ; if (!index(buf,'\n')) { *endp++ = '\n' ; *endp = 0 ; } instr = 0 ; tok = bufp ; while (tok < endp) { tok += strcspn(tok,(instr)?"'":"'#") ; if (*tok == '\'') { tok++ ; instr = 1-instr ; continue ; } if (*tok == '#') { *tok++ = '\n' ; *tok = 0 ; endp = tok ; break ; } } tok = strsep(&bufp," \t\n") ; while (index(" \t",*bufp)) bufp++ ; if (*bufp=='\n') { gerr("gatos: Missing token after '%s'.\n",tok) ; continue ; } TOKEN("videoram",dummy,ival,2048,32768) ; TOKEN("buffermem",gatos.buffermem,ival,300,2048) ; TOKEN("format",gatos.format,ival,1,7) ; TOKEN("i2c_mode",gatos.i2c_mode,ival,1,5) ; TOKEN("pciaddr",gatos.pciaddr,sval,"","") ; } fclose(file) ; RETURN(0) ; } /* ------------------------------------------------------------------------ */ int gatos_loadstate(char *value) { FILE *cfg ; char buf[256], *ln = buf ; gatos_enter("gatos_loadstate","\"%s\"",value) ; for(gatos.esn=0; gatos.esn<256; gatos.esn++) gatos.extrastring[gatos.esn] = NULL; gatos.esn = 0; cfg = fopen(value, "r") ; if (cfg != NULL) { int *var = NULL ; ln = fgets(buf, 256, cfg) ; while (ln != NULL) { if (!strncmp(ln, "ALLCHANNELS", 11)) { char *freqstr, *descstr ; int ch, vol, br, cnt, hue, sat, flg ; ln = fgets(buf, 256, cfg) ; while(ln != NULL && strncmp("EOF", ln, 3)) { freqstr = ln ; while(*ln == ' ' || *ln == '\t') ++ln ; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; *ln = 0 ; ++ln ; vol = strtol(ln, &ln, 10) ; br = strtol(ln, &ln, 10) ; cnt = strtol(ln, &ln, 10) ; hue = strtol(ln, &ln, 10) ; sat = strtol(ln, &ln, 10) ; flg = strtol(ln, &ln, 10) ; while (*ln == ' ' || *ln == '\t') ++ln ; descstr = ln ; while (*ln != '\n' && *ln != 0) ln++ ; *ln = 0 ; ch = chan_addchan(strtod(freqstr, NULL), descstr) ; chan_setflags(ch, flg) ; chan_setvolume(ch, vol) ; chan_setbrightness(ch, br) ; chan_setcontrast(ch, cnt) ; chan_sethue(ch, hue) ; chan_setsaturation(ch, sat) ; ln = fgets(buf, 256, cfg) ; } } else if(!strncmp(ln, "Mute=", 5)) var = &gatos.mute ; else if(!strncmp(ln, "SAP=", 4)) var = &gatos.sap ; else if(!strncmp(ln, "Stereo=", 7)) var = &gatos.stereo ; else if(!strncmp(ln, "Format=", 7)) var = &gatos.format ; else if(!strncmp(ln, "TVType=", 7)) var = &gatos.tvtype ; else if(!strncmp(ln, "Brightness=", 11)) var = &gatos.brightness ; else if(!strncmp(ln, "Hue=", 4)) var = &gatos.hue ; else if(!strncmp(ln, "Saturation=", 7)) var = &gatos.saturation ; else if(!strncmp(ln, "Cold=", 5)) var = &gatos.cold ; else if(!strncmp(ln, "Gamma=", 6)) var = &gatos.gamma ; else if(!strncmp(ln, "Volume=", 7)) var = &gatos.volume ; else if(!strncmp(ln, "Mixer=", 6)) var = &gatos.mixerdev ; else if(!strncmp(ln, "Input=", 6)) var = &gatos.mux ; else if(!strncmp(ln, "Channel=", 8)) var = &gatos.channel ; else if(!strncmp(ln, "Contrast=", 8)) var = &gatos.contrast ; /* Don't want to save this */ /* it'll prevent sound from working if it gets fixed! -ISG */ /* else if(!strncmp(ln, "AudioType=", 10)) var = &gatos.audiotype ; */ /* audiotype: 0-none, 1-soundcard, 2-board, 3-both */ else if(!strncmp(ln, "Overclock=", 10)) var = &gatos.overclock ; else if(!strncmp(ln, "Sensitive=", 10)) var = &gatos.senscan ; else { if(ln[strlen(ln)-1] == '\n') ln[strlen(ln)-1] = 0; gatos.extrastring[gatos.esn] = (char*)malloc(strlen(ln)+1); strcpy(gatos.extrastring[gatos.esn], ln); /* printf("Unclaimed String in ~/.gatosrc = \"%s\"\n", gatos.extrastring[gatos.esn]); */ ++gatos.esn; } if (var != NULL) { char *chr=ln ; while (*chr != '=' && *chr != 0 && *chr != '\n') ++chr ; if (*chr != 0 && *chr != '\n') chr++ ; if (chr != 0) *var = strtol(chr, NULL, 10) ; var = NULL ; } ln = fgets(buf, 256, cfg) ; } fclose(cfg) ; gatos_setformat(gatos.format) ; gatos_setmux(gatos.mux) ; gatos_setmute(gatos.mute) ; gatos_setsap(gatos.sap) ; gatos_setstereo(gatos.stereo) ; gatos_setbrightness(gatos.brightness) ; gatos_setcontrast(gatos.contrast) ; gatos_setsaturation(gatos.saturation) ; gatos_sethue(gatos.hue) ; gatos_setcold(gatos.cold) ; gatos_setgamma(gatos.gamma) ; gatos_setmixer(gatos.mixerdev) ; gatos_setvolume(gatos.volume) ; gatos_setchan(gatos.channel) ; gatos_setoverclock(gatos.overclock) ; RETURN(0) ; } else { if (!(gatos.debug&GATOSQUIET)) gerr( "WARNING: No ~/.gatosrc file, using default setup.\n"); RETURN(ENOENT) ; } } int gatos_getintvalue(char *n, int *v) { int ctr; for(ctr=0; ctr= m) { fprintf(stderr, "String token \"%s\" to large!\n", gatos.extrastring[ctr]); return -1; } strcpy(v, &gatos.extrastring[ctr][strlen(n)]); return 0; } } return -1; } int gatos_setintvalue(char *n, int v) { int ctr; for(ctr=0; ctr 7) ) RETURN(EINVAL) ; gatos.format = value ; switch (gatos.format) { case 1: case 2: case 4: /* NTSC */ gatos.minfreq = 55.25 ; gatos.maxfreq = 801.25 ; hactive = hactive_ntsc ; vactive = vactive_ntsc ; break ; case 3: case 5: case 7: /* PAL */ gatos.minfreq = 48.25 ; gatos.maxfreq = 855.25 ; hactive = hactive_pal ; vactive = vactive_pal ; break ; case 6: /* SECAM */ gatos.minfreq = 47.75 ; gatos.maxfreq = 855.25 ; hactive = hactive_pal ; vactive = vactive_pal ; break ; default: RETURN(EINVAL) ; } /* Choose maximum capture geometry that will fit in capture buffers */ /* Also limit horizontal capture size to ATI chip limit */ i = sizeof(capturesizes)/sizeof(char*) - 1 ; while (i && (hactive[i]*vactive[i] > m)) i-- ; while (i && (hactive[i] > gatos.ati.width)) i-- ; gatos.hcaptidx = gatos.hcaptmax = i ; h = hactive[i] ; i = sizeof(capturesizes)/sizeof(char*) - 1 ; while (i && (h*vactive[i] > m)) i-- ; gatos.vcaptidx = gatos.vcaptmax = i ; v = vactive[i] ; /* Set default capture geometry to max */ gatos.xcapt = h ; gatos.ycapt = v ; gatos.xend = h ; gatos.yend = v ; gatos.xstart = 0 ; gatos.ystart = 0 ; /* Default window size is same */ if (!gatos.xsize && !gatos.ysize) { gatos.xsize = gatos.xcapt ; gatos.ysize = gatos.ycapt ; } /* Program the chips */ SUBCALL(bt829_setformat) ; fi12xx_setformat() ; gatos_setcapturesize(gatos.xcapt,gatos.ycapt) ; if (gatos.donegeometry) gatos_setgeometry(gatos.xsize,gatos.ysize,gatos.xpos,gatos.ypos) ; RETURN(0) ; } FUNC0(int,gatos_mux,"%d",gatos.mux) int gatos_setmux(int value) { gatos_enter("gatos_setmux","%d",value) ; if (gatos.pid) RETURN(EBUSY) ; gatos.mux = LIMIT(value,0,3) ; bt829_setmux() ; board_setmux() ; RETURN(0) ; } FUNC0(u32,gatos_colorkey,"%d",gatos.colorkey) int gatos_setcolorkey(u32 value) { gatos_enter("gatos_setcolorkey","0x%08X",value) ; gatos.colorkey = value ; err = ati_setcolorkey() ; RETURN(err) ; } void gatos_pollscreen(int sig) { if (ati_pollscreen(sig)) { ati_setgeometry() ; gatos_setmapped(gatos.mapped) ; } } int gatos_setsubgeometry(int xs, int ys, int xe, int ye) { gatos_enter("gatos_setsubgeometry","%d,%d,%d,%d",xs,ys,xe,ye) ; if(abs(xs-xe)>15 && abs(ys-ye)>9) { gatos.xstart = xs ; gatos.ystart = ys ; gatos.xend = xe ; gatos.yend = ye ; gatos.donegeometry = 1 ; ati_setgeometry() ; } RETURN(0) ; } int gatos_setgeometry(int xs, int ys, int x0, int y0) { gatos_enter("gatos_setgeometry","%d,%d,%d,%d",xs,ys,x0,y0) ; gatos.xsize = xs ; gatos.ysize = ys ; gatos.xpos = x0 ; gatos.ypos = y0 ; gatos.donegeometry = 1 ; ati_setgeometry() ; RETURN(0) ; } int gatos_setcapturesize(int xc, int yc) { gatos_enter("gatos_setcapturesize","%d,%d",xc,yc) ; if (gatos.pid) RETURN(EBUSY) ; gatos.xcapt = xc ; gatos.ycapt = yc ; gatos.xend = xc ; gatos.yend = yc ; gatos.xstart = 0 ; gatos.ystart = 0 ; SUBCALL(ati_setcaptsize) ; SUBCALL(bt829_setcaptsize) ; if (gatos.donegeometry) gatos_setgeometry(gatos.xsize,gatos.ysize,gatos.xpos,gatos.ypos) ; RETURN(0) ; } FUNC0(int,gatos_xcaptmax,"%d",hactive[gatos.hcaptmax]) ; FUNC0(int,gatos_ycaptmax,"%d",vactive[gatos.vcaptmax]) ; FUNC0(int,gatos_xcaptmin,"%d",hactive[0]) ; FUNC0(int,gatos_ycaptmin,"%d",vactive[0]) ; FUNC0(int,gatos_xcapt,"%d",gatos.xcapt) ; FUNC0(int,gatos_ycapt,"%d",gatos.ycapt) ; FUNC0(int,gatos_xdim,"%d",gatos.xdim) ; FUNC0(int,gatos_ydim,"%d",gatos.ydim) ; int gatos_enable_capture(int value) { gatos_enter("gatos_enable_capture","%d",value) ; if (gatos.pid) RETURN(EBUSY) ; ati_enable_capture(value) ; RETURN(0) ; } int gatos_enable_video(int value) { gatos_enter("gatos_enable_video","%d",value) ; gatos.video = value ; ati_enable_video(gatos.mapped && gatos.video && (gatos.visibility!=2)) ; RETURN(0) ; } int gatos_enable_sound(int value) { gatos_enter("gatos_enable_sound","%d",value) ; gatos.audio = value ; board_setmute() ; RETURN(0) ; } int gatos_setmapped(int value) { gatos_enter("gatos_setmapped","%d",value) ; gatos.mapped = value ; ati_enable_video(gatos.mapped && gatos.video && (gatos.visibility!=2)) ; RETURN(0) ; } int gatos_setvisibility(int state) { gatos_enter("gatos_setvisibility","%d",state) ; gatos.visibility = state ; ati_enable_video(gatos.mapped && gatos.video && (gatos.visibility!=2)) ; ati_setgeometry() ; RETURN(0) ; } /* ------------------------------------------------------------------------ */ FUNC0(int,gatos_mute,"%d",gatos.mute) int gatos_setmute(int value) { int v ; gatos_enter("gatos_setmute","%d",value) ; gatos.mute = value ; v = (gatos.mute) ? 0 : gatos.volume ; if(!v) sound_setvol(0) ; else gatos_setvolume(v) ; board_setmute() ; RETURN(0) ; } FUNC0(int,gatos_volume,"%d",gatos.volume) int gatos_setvolume(int value) { int v ; gatos_enter("gatos_setvolume","%d",value) ; gatos.volume = LIMIT(value,0,100) ; v = (gatos.mute) ? 0 : LIMIT(gatos.volume + gatos.channelinfo[gatos.channel].mod_volume,0,100) ; sound_setvol(v) ; board_setvol(v) ; RETURN(0) ; } FUNC0(int,gatos_stereo,"%d",gatos.stereo) int gatos_setstereo(int value) { gatos_enter("gatos_setstereo","%d",value) ; gatos.stereo = value ; board_setstereo() ; RETURN(0) ; } FUNC0(int,gatos_sap,"%d",gatos.sap) int gatos_setsap(int value) { gatos_enter("gatos_setsap","%d",value) ; gatos.sap = value ; board_setsap() ; RETURN(0) ; } /* ------------------------------------------------------------------------ */ FUNC0(double,gatos_minfreq,"%.3f",gatos.minfreq) FUNC0(double,gatos_maxfreq,"%.3f",gatos.maxfreq) FUNC0(double,gatos_tuner,"%.3f",gatos.freq) int gatos_settuner(double value) { int mute=gatos.audio ; gatos_enter("gatos_settuner","%.3f",value) ; if (gatos.pid) RETURN(EBUSY) ; if (gatos.usr1pid) kill(gatos.usr1pid,SIGSTOP) ; gatos.freq = value ; gatos.tuned = 1 ; gatos.audio = 0 ; sound_setvol(0) ; fi12xx_tune() ; usleep(100000) ; gatos.audio = mute ; sound_setvol(gatos.volume) ; board_setmute() ; if (gatos.usr1pid) kill(gatos.usr1pid,SIGCONT) ; RETURN(0) ; } double gatos_scan(double min, double max, int (*addchan)(double, char*), int (*progress)(double)) { return fi12xx_scan(min,max,addchan,progress) ; } /* ------------------------------------------------------------------------ */ FUNC0(int,gatos_brightness,"%d",gatos.brightness) int gatos_setbrightness(int value) { gatos_enter("gatos_setbrightness","%d",value) ; gatos.brightness = LIMIT(value,0,200) ; err = bt829_setbrightness() ; RETURN(err) ; } FUNC0(int,gatos_contrast,"%d",gatos.contrast) int gatos_setcontrast(int value) { gatos_enter("gatos_setcontrast","%d",value) ; gatos.contrast = LIMIT(value,0,200) ; err = bt829_setcontrast() ; RETURN(err) ; } FUNC0(int,gatos_saturation,"%d",gatos.saturation) int gatos_setsaturation(int value) { gatos_enter("gatos_setsaturation","%d",value) ; gatos.saturation = LIMIT(value,0,200) ; err = bt829_setsaturation() ; RETURN(err) ; } FUNC0(int,gatos_hue,"%d",gatos.hue) int gatos_sethue(int value) { gatos_enter("gatos_sethue","%d",value) ; gatos.hue = LIMIT(value,-90,90) ; err = bt829_sethue() ; RETURN(err) ; } FUNC0(int,gatos_gamma,"%d",gatos.gamma) int gatos_setgamma(int value) { gatos_enter("gatos_setgamma","%d",value) ; gatos.gamma = LIMIT(value,0,3) ; err = ati_setgamma() ; RETURN(err) ; } FUNC0(int,gatos_cold,"%d",gatos.cold) int gatos_setcold(int value) { gatos_enter("gatos_setcold","%d",value) ; gatos.cold = LIMIT(value,0,1) ; err = ati_setcold() ; RETURN(err) ; } int gatos_setsoundmixer(int value) { gatos_enter("gatos_setsoundmixer","%d",value) ; #ifdef NEWSOUNDMIXER gatos_setmixer(gatos_mixernum[value]); #else gatos_setmixer(value); #endif /* NEWSOUNDMIXER */ RETURN(0) ; } #ifdef NEWSOUNDMIXER FUNC0(int,gatos_mixer,"%d",gatos_filtmix(gatos.mixerdev)) #else FUNC0(int,gatos_mixer,"%d",gatos.mixerdev) #endif /* NEWSOUNDMIXER */ int gatos_setmixer(int value) { gatos_enter("gatos_setmixer","%d",value) ; if (sound_setmixer(value)) { perror("GATOS: no mixer available") ; gatos.audiotype &= DISABLE_MIXER ; } gatos_setvolume(gatos.volume) ; RETURN(0) ; } int gatos_nummixers() { if (GATOSCALL) gerr("GATOS: gatos_nummixers()\n"); return(sound_nummixers()); } char* gatos_mixername(int value) { if (GATOSCALL) gerr("GATOS: gatos_mixername(%d)\n",value) ; return(sound_mixername(value)); } char** gatos_mixernames() { if (GATOSCALL) gerr("GATOS: gatos_mixernames()\n"); return(sound_mixernames()); } char** gatos_mixerlabels() { if (GATOSCALL) gerr("GATOS: gatos_mixerlabels()\n"); return(sound_mixerlabels()); } #ifdef NEWSOUNDMIXER int gatos_filtmix(int value) { if (GATOSCALL) gerr("GATOS: gatos_filtmix()\n"); return(sound_getfiltnummixer(value)); } #endif /* NEWSOUNDMIXER */ /* ------------------------------------------------------------------------ */ FUNC0(int,gatos_CC,"%d",gatos.CCmode) int gatos_setCC(int value) { gatos_enter("gatos_setCC","%d",value) ; gatos.CCmode = LIMIT(value,0,3) ; err = bt829_setCC() ; RETURN(err) ; } int gatos_getCCdata(struct CCdata *data) { gatos_enter("gatos_getCCmode","%p",data) ; if(data==NULL) { err=EINVAL; RETURN(err); } if(gatos.CCmode == 0) { data->num_valid=0; err=EPERM; RETURN(err); } err = bt829_getCCdata(data) ; RETURN(err) ; } /* ------------------------------------------------------------------------ */ static FILE *file ; static struct sigaction act ; static void gatos_stopchild(int sig) { gatos.stop = 1 ; } #if 0 /* NIY */ static void gatos_sigchild(int sig) { /* TODO: Restore state */ } #endif int gatos_stop(void) { gatos_enter("gatos_stop","") ; if (!gatos.pid) RETURN(ECHILD) ; kill(gatos.pid,SIGUSR1) ; gatos.pid = 0 ; RETURN(0) ; } int gatos_rgbcapture(unsigned char *buf) { gatos_enter("gatos_rgbcapture","\"%p\"", buf); ati_rgbcapture(buf); RETURN(0); } int gatos_capture(char *name, int wait) { gatos_enter("gatos_capture","\"%s\",%d",name,wait) ; if (gatos.pid) RETURN(EBUSY) ; gatos.stop = 0 ; if ( (file = fopen(name,"a") ) == NULL) RETURN(errno) ; if (wait<0) gatos.stop = 1 ; /* No child process, only one frame */ else { if ((gatos.pid = fork())) RETURN(0) ; if (errno) RETURN(errno) ; /* Child process from here */ act.sa_flags = 0 ; #if defined(__linux__) act.sa_restorer = NULL ; #endif sigemptyset(&act.sa_mask) ; act.sa_handler = &gatos_stopchild ; sigaction(SIGUSR1, &act, NULL) ; } /* Child process here if wait>=0 */ ati_capture(file,wait) ; fclose(file) ; if (wait>=0) exit(0) ; else RETURN(0) ; } int gatos_playback(char *name, int wait) { gatos_enter("gatos_playback","\"%s\",%d",name,wait) ; if (gatos.pid) RETURN(EBUSY) ; gatos.stop = 0 ; if ( (file = fopen(name,"r") ) == NULL) { #ifdef USE_IPC ipc_send_message("PLAYBACK-NOFILE"); #endif RETURN(errno) ; } /* TODO: Save state */ if ((gatos.pid = fork())) RETURN(0) ; if (errno) { #ifdef USE_IPC ipc_send_message("PLAYBACK-TERMINATED"); #endif RETURN(errno) ; } /* Child process from here */ act.sa_flags = 0 ; #if defined(__linux__) act.sa_restorer = NULL ; #endif sigemptyset(&act.sa_mask) ; act.sa_handler = &gatos_stopchild ; sigaction(SIGUSR1, &act, NULL) ; ati_playback(file,wait) ; fclose(file) ; #ifdef USE_IPC ipc_send_message("PLAYBACK-TERMINATED"); #endif exit(0) ; return 0 ; } int gatos_disablechan(int c) { chan_setflag(c, CHANNEL_SKIP); return 0; } int gatos_enablechan(int c) { chan_clearflag(c, CHANNEL_SKIP); return 0; } int gatos_chanenabled(int c) { return (!chan_flag(c, CHANNEL_SKIP)); } int gatos_delchan(int c) { chan_delchan(c); return 0; } void gatos_clearchans() { chan_clearchans() ; } int gatos_addchan(double f, char *n) { if (GATOSCALL) gerr("GATOS: gatos_addchan(%.3f,\"%s\")\n",f,n) ; if (f < gatos.minfreq) f = 0.0 ; if (f > gatos.maxfreq) f = gatos.maxfreq ; return chan_addchan(f,n) ; } FUNC0(int,gatos_numchans,"%d",gatos.numchannels) double gatos_chanfreq(int c) { if (GATOSCALL) gerr("GATOS: gatos_chanfreq(%d) = %.3f\n", c,gatos.channelinfo[c].frequency) ; return gatos.channelinfo[c].frequency ; } int gatos_setchanfreq(int c, double f) { if (GATOSCALL) gerr("GATOS: gatos_setchanfreq(%d,%f)\n",c,f) ; if (f < gatos.minfreq) f = 0.0 ; if (f > gatos.maxfreq) f = gatos.maxfreq ; return chan_setfreq(c, f) ; } FUNC1(char*,gatos_channame,int,c,"%d","\"%s\"",gatos.channelinfo[c].name) FUNC1(int,gatos_chanvolume,int,c,"%d","%d",gatos.channelinfo[c].mod_volume) int gatos_setchanvolume(int c, int v) { if (GATOSCALL) gerr("GATOS: gatos_setchanvolume(%d,%d)\n",c,v) ; return chan_setvolume(c, v) ; } int gatos_chanbrightness(int c) { return chan_brightness(c) ; } int gatos_setchanbrightness(int c, int v) { if (GATOSCALL) gerr("GATOS: gatos_setchanbrightness(%d,%d)\n",c,v) ; return chan_setbrightness(c, v) ; } int gatos_chancontrast(int c) { return chan_contrast(c) ; } int gatos_setchancontrast(int c, int v) { if (GATOSCALL) gerr("GATOS: gatos_setchancontrast(%d,%d)\n",c,v) ; return chan_setcontrast(c, v) ; } int gatos_chanhue(int c) { return chan_hue(c) ; } int gatos_setchanhue(int c, int v) { if (GATOSCALL) gerr("GATOS: gatos_setchanhue(%d,%d)\n",c,v) ; return chan_sethue(c, v) ; } int gatos_chansaturation(int c) { return chan_saturation(c) ; } int gatos_setchansaturation(int c, int v) { if (GATOSCALL) gerr("GATOS: gatos_setchansaturation(%d,%d)\n",c,v) ; return chan_setsaturation(c, v) ; } int gatos_setchanname(int c, char *n) { if (GATOSCALL) gerr("GATOS: gatos_setchanname(%d,\"%s\")\n",c,n) ; return chan_setname(c, n) ; } FUNC0(int,gatos_channel,"%d",gatos.channel) int gatos_setchan(int c) { int v; v = gatos_volume(); gatos_setvolume(0); if (GATOSCALL) gerr("GATOS: gatos_setchan(%d)\n",c) ; if (c >= gatos.numchannels) c = gatos.numchannels-1 ; if (c < 0) c = 0 ; gatos.channel = c ; if(gatos.channelinfo[c].frequency >= gatos.minfreq && gatos.channelinfo[c].frequency <= gatos.maxfreq) gatos_settuner(gatos.channelinfo[c].frequency) ; gatos_setvolume(v); return 0 ; } double gatos_chanscan(int (*progress)(double)) { return fi12xx_scan(gatos.minfreq,gatos.maxfreq,&gatos_addchan,progress) ; } /* ------------------------------------------------------------------------ */ #ifdef GATOSBUTTONS int gatos_testbutton(int button) { return gatosbuttons[button] ; } int gatos_settestbutton(int button, int value) { gatosbuttons[button] = value ; switch (button) { case 0: ati_setcaptsize() ; break ; default: break ; } return 0 ; } #endif void gatos_debug1(void) { int d=gatos.debug ; gerr("GATOS: Chip Register Dump follows:\n") ; ati_dumpregs() ; /*tvout_dumpregs() ;*/ gatos.debug &= ~4 ; board_dumpregs() ; bt829_dumpregs() ; fi12xx_dumpregs() ; tvout_dumpregs() ; gerr("GATOS: End of Register Dump\n") ; gatos.debug = d ; } void gatos_debug2(void) { gerr("GATOS: I2C Bus Info follows:\n") ; i2c_info() ; gerr("GATOS: End of I2C Bus Info\n") ; } void gatos_debug3(void) {} void gatos_debug4(void) {} int gatos_setcaptidx(int h, int v) { gatos_enter("gatos_setcaptidx","%d,%d",h,v) ; gatos.hcaptidx = LIMIT(h,0,gatos.hcaptmax) ; gatos.vcaptidx = LIMIT(v,0,gatos.vcaptmax) ; gatos_setcapturesize(hactive[gatos.hcaptidx],vactive[gatos.vcaptidx]) ; RETURN(0) ; } FUNC0(int,gatos_tvout,"%d",gatos.tvout) int gatos_settvout(int value) { gatos_enter("gatos_settvout","%d",value) ; gatos.tvout = value ; /*TVO_CNTL = (gatos.tvout) ? 0x8000000 : 0x00000000 ;*/ if(gatos.tvout) RETURN(tvout_start()) ; else RETURN(tvout_reset()) ; } int gatos_ismonitor(void) { return tvout_monitor() ; } FUNC0(int,gatos_overclock,"%d",gatos.overclock) int gatos_setoverclock(int value) { gatos_enter("gatos_setoverclock","%d",value) ; gatos.overclock = value ; gatos_pollscreen(0) ; RETURN(0) ; } FUNC0(int,gatos_senscan,"%d",gatos.senscan) int gatos_setsenscan(int value) { gatos_enter("gatos_setsenscan","%d",value) ; gatos.senscan = value ; RETURN(0) ; } FUNC0(int,gatos_fm,"%d",gatos.fm) int gatos_setfm(int value) { gatos_enter("gatos_setfm","%d",value) ; gatos.fm = (value&0x1) ; board_setfm() ; RETURN(0) ; } FUNC0(int,gatos_audiotype,"%d",gatos.audiotype) FUNC0(int,gatos_tvtype,"%d",gatos.tvtype) int gatos_settvtype(int value) { gatos_enter("gatos_tvtype","%d",value) ; gatos.tvtype = value ; RETURN(0) ; } FUNC0(int,gatos_xstart,"%d",gatos.xstart) FUNC0(int,gatos_ystart,"%d",gatos.ystart) FUNC0(int,gatos_xend,"%d",gatos.xend) FUNC0(int,gatos_yend,"%d",gatos.yend) gatos-0.0.5/src/i2c.c0100644002411700123110000004213507007052502012704 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_I2C_C 1 #include "gatos.h" #include "i2c.h" #include "ati.h" #include "m64regs.h" #include "r128regs.h" #include "tvout.h" #include #include #include #include #include #include #include /* Desired I2C Bus Clock Frequency for the Rage128 Hardware I2C Driver */ /* For some reason, it only works for f <= ~80kHz /ØAA */ #define R128_CLOCK_FREQ 80000.0 /* 7.5kHz .. 100kHz */ /* Private global vars */ /* Values used by high level routines */ static int active=0 ; static u8 R128_M, R128_N, r128_time ; static char *i2cident[128], *i2cname[128] ; static char* drivertype[MAXI2CDRIVER+1] = { "R128", "A", "B", "C", "LG", "TB" } ; static char* drivername[MAXI2CDRIVER+1] = { "Rage 128 Hardware", "DAC+GEN_TEST Register", "GP_IO Register", "Rage PRO", "GP_IO Register", "ImpacTV" } ; /* Function pointers used by low level functions */ static struct { void (*scldir)(int) ; void (*setscl)(int) ; int (*getscl)(void) ; void (*sdadir)(int) ; void (*setsda)(int) ; int (*getsda)(void) ; } driver[MAXI2CDRIVER+1] = { { NULL, NULL, NULL, NULL, NULL, NULL }, /* Rage128 H/W Driver */ { ®_scldir, ®_setscl, ®_getscl, /* A (DAC+GEN_TEST) */ ®_sdadir, ®_setsda, ®_getsda }, { ®_scldir, ®_setscl, ®_getscl, /* B (GP_IO Register) */ ®_sdadir, ®_setsda, ®_getsda }, { &pro_scldir, &pro_setscl, &pro_getscl, /* C (Rage PRO) */ &pro_sdadir, &pro_setsda, &pro_getsda }, { ®_scldir, ®_setscl, ®_getscl, /* LG (GP_IO Register) */ ®_sdadir, ®_setsda, ®_getsda }, { &itv_scldir, &itv_setscl, &itv_getscl, /* TB (ImpacTV) */ &itv_sdadir, &itv_setsda, &itv_getsda }}, *i2c=&driver[0] ; /* Register pointers, bitmasks and values used by lowlevel routines */ static volatile u32 *sclreg=NULL, *sdareg=NULL ; static u32 scldir=0, sdadir=0, sclset=0, sdaset=0, sdaget=0 ; static u32 i2c_cntl_0=0 ; static u8 tv_i2c_cntl=0x00 ; /* ------------------------------------------------------------------------ */ /* Initialization routine */ int i2c_init(void) { /* Mach64 trymodes: Try all known drivers (bits 1..MAXI2CDRIVER all set) */ int i, found=0, trymodes=(1<<(MAXI2CDRIVER+1))-2 ; #ifndef USE_DELAY_S if (gatos.bogomips) i2c_ddelay = gatos.bogomips/8 ; else RETURN(EINVAL) ; #endif /* Rage128: Hardware I2C driver only (I2C bus lines not available to S/W), * Mach64: Software I2C driver (I2C buslines controlled by driver) */ if (ati.r128) { /* Rage128; only one driver type available */ gatos.i2c_mode = 0 ; if (i2c_init_hw()) RETURN(ENODEV) ; } else { /* Some Mach64 variant; figure out which ... */ /* If i2c_mode not set in gatos.conf, choose * default based on ATI chip ID and BIOS data. */ if (!gatos.i2c_mode) { if ( ati.vt_a3n1 || ati.vt_a3s1 || ati.gt_a2s1 || ati.vt_a4n1 || ati.vt_a4s1 ) gatos.i2c_mode = 1 ; else if ( ati.lg_a1s1 || ati.lt ) gatos.i2c_mode = 4 ; else if ( ati.doesvtb || ati.gt_c1u1 || ati.gt_c1u2 || ati.gt2c ) gatos.i2c_mode = 2 ; else if (ati.lt_c) gatos.i2c_mode = 3 ; else if ( ati.gt_c2u1 || ati.gt_c2u2 ) if ( ati.gp_c2u1 || ati.gq_c2u1 || ati.gp_c2u2 || ati.gq_c2u2 ) gatos.i2c_mode = 2 ; else gatos.i2c_mode = 3 ; else if ( ati.gp_c2u1 || ati.gq_c2u1 || ati.gp_c2u2 || ati.gq_c2u2 ) gatos.i2c_mode = 2 ; else gatos.i2c_mode = 3 ; } if (gatos.i2c_mode == 2 && gatos.aticard[gatos.cardidx].m64i2cinfo != 0xFFFF) gatos.i2c_mode = 5 ; /* Try all known Mach64 I2C bus drivers, start with * * driver chosen by user or by "logic" above ... */ while (trymodes && !found) { while ((gatos.i2c_mode nm) break ; R128_M = R128_N - 1 ; r128_time = 2*R128_N ; R128_I2C_CNTL_1 = (r128_time<<24) | I2C_SEL | I2C_EN ; R128_I2C_CNTL_0_0 = I2C_DONE | I2C_NACK | I2C_HALT | I2C_SOFT_RST | I2C_DRIVE_EN | I2C_DRIVE_SEL ; break ; case 1: sclreg = DAC_CNTL_PTR ; sdareg = GEN_TEST_CNTL_PTR ; sclset = 0x01000000 ; sdaset = 0x00000001 ; sdaget = 0x00000008 ; scldir = 0x08000000 ; sdadir = 0x00000020 ; save1 = DAC_CNTL ; save2 = GEN_TEST_CNTL ; save3 = GP_IO ; *sdareg |= 0x00000010 ; save4 = CRTC_H_TOTAL_DISP ; GP_IO &= 0x7FFFFFFF ; CRTC_H_TOTAL_DISP = save4 ; /*save4 = VMC_CONFIG ; VMC_CONFIG &= 0x7FFFFFFF ;*/ break ; case 2: sclreg = sdareg = GP_IO_PTR ; save1 = GP_IO ; sclset = 0x00000800 ; sdaset = sdaget = 0x00000010 ; scldir = 0x08000000 ; sdadir = 0x00100000 ; break ; case 3: save1 = I2C_CNTL_0 ; save2 = I2C_CNTL_1 ; I2C_CNTL_1 = 0x00400000 ; if (I2C_CNTL_1!=0x00400000) RETURN(ENODEV) ; i2c_cntl_0 = 0x0000C000 ; I2C_CNTL_0 = i2c_cntl_0|0x00040000 ; break ; case 4: sclreg = sdareg = GP_IO_PTR ; save1 = GP_IO ; sclset = 0x00000400 ; sdaset = sdaget = 0x00001000 ; scldir = 0x04000000 ; sdadir = 0x10000000 ; break ; case 5: if (!tvout_present()) RETURN(ENODEV) ; tvout_write32(TV_I2C_CNTL,0x00005500|tv_i2c_cntl) ; break ; default: RETURN(ENODEV) ; } /* Try driver by polling for tuner modules */ ok = i2c_device(0xC0) + i2c_device(0xC2) + i2c_device(0xC4) + i2c_device(0xC6) ; /* Success if 1-3 tuners detected */ if ((ok != 0) && (ok != 4)) RETURN0 ; /* Driver failed: SCL and/or SDA line(s) stuck (low or high), or * * manipulated ATI chip pins not connected to on-card I2C bus. */ i2c = &driver[0] ; switch (gatos.i2c_mode) { case 0: R128_I2C_CNTL_1 = 0x00000000L ; break ; case 1: DAC_CNTL = save1 ; GEN_TEST_CNTL = save2 ; GP_IO = save3 ; /*VMC_CONFIG = save4 ;*/ break ; case 2: GP_IO = save1 ; break ; case 3: I2C_CNTL_0 = save1 ; I2C_CNTL_1 = save2 ; break ; case 4: GP_IO = save1 ; break ; case 5: break ; default: RETURN(ENODEV) ; } RETURN(ENODEV) ; } /* ------------------------------------------------------------------------ */ /* High-level (API) routines */ u8 i2c_read(u8 addr) { int nack=0 ; u8 data ; if (ati.r128) { r128_reset() ; R128_I2C_DATA = addr|1 ; nack = r128_go(1,1,I2C_RECEIVE) ; data = (nack) ? 0xFF : R128_I2C_DATA ; if (I2CTRAFFIC) fprintf(stderr,"I2C: < %02X%c =%02X- >\n", addr, nack?'-':'+', data) ; } else { i2c_start() ; i2c_sendbyte(addr|1) ; data = i2c_readbyte(1) ; i2c_stop() ; } return data ; } int i2c_readn(u8 addr, u8 *data, int count) { int nack=0 ; if (ati.r128) { r128_reset() ; R128_I2C_DATA = addr|1 ; nack = r128_go(1,count,I2C_RECEIVE) ; if (I2CTRAFFIC) fprintf(stderr,"I2C: < %02X%c", addr, nack?'-':'+') ; while (count > 0) { --count ; *data = (nack) ? 0xFF : R128_I2C_DATA ; ++data ; if (I2CTRAFFIC) fprintf(stderr," =%02X%c", *data, count?'+':'-') ; } if (I2CTRAFFIC) fprintf(stderr," >\n") ; } else { i2c_start() ; i2c_sendbyte(addr|1) ; while (count > 0) { --count ; *data = i2c_readbyte((count!=0)) ; ++data ; } i2c_stop() ; } return 0 ; } int i2c_write(u8 addr, u8 *data, int count) { int nack=-1, c=count ; if (ati.r128) { r128_reset() ; R128_I2C_DATA = addr ; while (c > 0) { --c ; R128_I2C_DATA = *data ; ++data ; } data -= count ; nack = r128_go(1,count,0) ; if (I2CTRAFFIC) { fprintf(stderr,"I2C: < %02X%c", addr, nack?'-':'+') ; while (count > 0) { --count ; fprintf(stderr," %02X%c", *data++, (count&&!nack)?'+':'-') ; } fprintf(stderr," >\n") ; } } else { i2c_start() ; i2c_sendbyte(addr) ; while (count > 0) { nack = i2c_sendbyte(*data) ; ++data ; --count ; } i2c_stop() ; } return nack ? -1 : 0 ; } u8 i2c_readreg8(u8 addr, u8 reg) { u8 data ; if (ati.r128) { i2c_write(addr,®,1) ; data = i2c_read(addr) ; } else { i2c_start() ; i2c_sendbyte(addr) ; i2c_sendbyte(reg) ; i2c_start() ; i2c_sendbyte(addr|1) ; data = i2c_readbyte(1) ; i2c_stop() ; } return data ; } int i2c_writereg8(u8 addr, u8 reg, u8 value) { u8 data[2] ; data[0] = reg ; data[1] = value ; i2c_write(addr,data,2) ; return 0 ; } int i2c_device(u8 addr) { int nack=0 ; if (ati.r128) { r128_reset() ; R128_I2C_DATA = addr|1 ; nack = r128_go(0,1,0) ; if (I2CTRAFFIC) fprintf(stderr,"I2C: < %02X%c >\n", addr, nack?'-':'+') ; } else { i2c_start() ; nack = i2c_sendbyte(addr) ; i2c_stop() ; } return !nack ; } /* ------------------------------------------------------------------------ */ /* Low-level Routines for Mach64 Software Drivers */ #ifndef USE_DELAY_S /* delay n microseconds */ void i2c_delay(u32 n) { while (n > 0) { volatile int x = i2c_ddelay ; while (x > 0) --x ; --n ; } } #endif static void i2c_start(void) { if (I2CTRAFFIC) fprintf(stderr,(active) ? " <" : "I2C: <") ; active = 1 ; i2c->scldir(1) ; i2c->sdadir(1) ; i2c->setsda(1) ; i2c->setscl(1) ; i2c->setsda(0) ; i2c->setscl(0) ; } static void i2c_stop(void) { active = 0 ; i2c->sdadir(1) ; i2c->setscl(0) ; i2c->setsda(0) ; i2c->setscl(1) ; i2c->setsda(1) ; i2c->scldir(0) ; i2c->sdadir(0) ; if (I2CTRAFFIC) fprintf(stderr," >\n") ; } static u8 i2c_readbyte(int last) { int i ; u8 data=0 ; i2c->sdadir(0) ; for ( i=7 ; i>=0 ; i-- ) { i2c->setscl(1) ; if (i2c->getsda()) data |= (1<setscl(0) ; } i2c->sdadir(1) ; i2c->setsda(last) ; i2c->setscl(1) ; i2c->setscl(0) ; i2c->sdadir(0) ; if (I2CTRAFFIC) fprintf(stderr," =%02X%c", data, last?'-':'+') ; return data ; } static int i2c_sendbyte(u8 data) { int nack, i ; i2c->sdadir(1) ; for ( i=7 ; i>=0 ; i-- ) { i2c->setscl(0) ; i2c->setsda(data&(1<setscl(1) ; } i2c->setscl(0) ; i2c->sdadir(0) ; i2c->setsda(1) ; i2c->setscl(1) ; nack = (i2c->getsda()) ? 1 : 0 ; i2c->setscl(0) ; if (I2CTRAFFIC) fprintf(stderr," %02X%c", data, nack?'-':'+') ; return nack ; } /* ------------------------------------------------------------------------ */ /* Hardware routines for I2C mode R128 (Rage 128 Hardware Driver) */ static int r128_wait_ack(void) { int nack=0, n1=0, n2=0 ; while (n1++ < 10 && (R128_I2C_CNTL_0_1 & (I2C_GO>>8))) usleep(1) ; while (n2++ < 10 && !nack) { nack = R128_I2C_CNTL_0_0 & (I2C_DONE|I2C_NACK|I2C_HALT) ; if (!nack) usleep(1) ; } return (nack != I2C_DONE) ; } static void r128_reset(void) { R128_I2C_CNTL_0 = I2C_SOFT_RST | I2C_HALT | I2C_NACK | I2C_DONE ; } static int r128_go(int naddr, int ndata, u32 flags) { R128_I2C_CNTL_1 = (r128_time<<24) | I2C_EN | I2C_SEL | (naddr<<8) | ndata ; R128_I2C_CNTL_0 = (R128_N<<24) | (R128_M<<16) | I2C_GO | I2C_START | I2C_STOP | I2C_DRIVE_EN | flags ; return r128_wait_ack() ; } /* ------------------------------------------------------------------------ */ /* Hardware routines for I2C modes A, B and LG (DAC+GEN_TEST or GP_IO) */ static void reg_scldir(int set) { if (set) *sclreg |= scldir ; else *sclreg &= ~scldir ; } static void reg_sdadir(int set) { if (set) *sdareg |= sdadir ; else *sdareg &= ~sdadir ; } static void reg_setscl(int set) { if (set) *sclreg |= sclset ; else *sclreg &= ~sclset ; I2C_SLEEP ; } static void reg_setsda(int set) { if (set) *sdareg |= sdaset ; else *sdareg &= ~sdaset ; I2C_SLEEP ; } static int reg_getscl(void) { return (*sclreg & sclset) ; } static int reg_getsda(void) { return (*sdareg & sdaget) ; } /* ------------------------------------------------------------------------ */ /* Hardware routines for I2C mode C (Rage PRO) */ static void pro_scldir(int set) { } static void pro_sdadir(int set) { } static void pro_setscl(int set) { if (set) i2c_cntl_0 |= 0x00004000 ; else i2c_cntl_0 &= ~0x00004000 ; I2C_CNTL_0 = i2c_cntl_0 ; I2C_SLEEP ; } static void pro_setsda(int set) { if (set) i2c_cntl_0 |= 0x00008000 ; else i2c_cntl_0 &= ~0x00008000 ; I2C_CNTL_0 = i2c_cntl_0 ; I2C_SLEEP ; } static int pro_getscl(void) { return (I2C_CNTL_0 & 0x00004000) ; } static int pro_getsda(void) { return (I2C_CNTL_0 & 0x00008000) ; } /* ------------------------------------------------------------------------ */ /* Hardware routines for I2C mode TB (ImpacTV) */ static void itv_scldir(int set) { if (set) tv_i2c_cntl |= 0x01 ; else tv_i2c_cntl &= ~0x01 ; tvout_write_i2c_cntl8(tv_i2c_cntl) ; I2C_SLEEP ; } static void itv_sdadir(int set) { if (set) tv_i2c_cntl |= 0x10 ; else tv_i2c_cntl &= ~0x10 ; tvout_write_i2c_cntl8(tv_i2c_cntl) ; I2C_SLEEP ; } static void itv_setsda(int set) { if (set) tv_i2c_cntl |= 0x20 ; else tv_i2c_cntl &= ~0x20 ; tvout_write_i2c_cntl8(tv_i2c_cntl) ; I2C_SLEEP ; } static void itv_setscl(int set) { if (set) tv_i2c_cntl |= 0x02 ; else tv_i2c_cntl &= ~0x02 ; tvout_write_i2c_cntl8(tv_i2c_cntl) ; I2C_SLEEP ; } static int itv_getscl(void) { return (tvout_read_i2c_cntl8() & 0x04) ; } static int itv_getsda(void) { return (tvout_read_i2c_cntl8() & 0x40) ; } /* ------------------------------------------------------------------------ */ /* Debug and info routines */ static volatile int N=0, N1=0, N2=0, loop=0 ; static char str[12] ; #define SECS 2 static void i2c_alarm(int sig) { if (loop) ((N1) ? N2 : N1) = N ; if (N2) loop = 0 ; } char* i2c_ident(u8 addr) { if (i2cident[addr>>1]) return i2cident[addr>>1] ; snprintf(str,sizeof(str),"UNKN @ 0x%02X",addr) ; return str ; } char* i2c_name(u8 addr) { if (i2cname[addr>>1]) return i2cname[addr>>1] ; snprintf(str,sizeof(str),"UNKN @ 0x%02X",addr) ; return str ; } void i2c_info(void) { int i, d=gatos.debug ; struct sigaction act, oldact ; struct itimerval it ; gatos.debug &= ~4 ; for ( i=0 ; i<256 ; i+=2 ) if (i2c_device(i)) if (!i2cident[i>>1]) i2c_register(i,"UNKN","Unclaimed Device") ; else fprintf(stderr,"I2C unit @ 0x%02X: %s\n",i,i2cname[i>>1]) ; else if (i2cident[i>>1]) fprintf(stderr, "I2C unit @ 0x%02X: %s DISAPPEARED\n",i,i2cname[i>>1]) ; /* The Rage128 driver uses usleep(), which uses the itimer ... /ØAA */ if (ati.r128) return ; fprintf(stderr,"I2C clock frequency is ... ") ; it.it_value.tv_sec = 0 ; it.it_interval.tv_sec = SECS ; it.it_value.tv_usec = 10000 ; it.it_interval.tv_usec = 0 ; act.sa_flags = 0 ; #if defined(__linux__) act.sa_restorer = NULL ; #endif sigemptyset(&act.sa_mask) ; act.sa_handler = &i2c_alarm ; sigaction(SIGVTALRM,&act,&oldact) ; setitimer(ITIMER_VIRTUAL,&it,NULL) ; N1 = N2 = 0 ; loop = 1 ; if (!ati.r128) i2c_start() ; for ( N=0 ; loop ; N++ ) if (ati.r128) i2c_device(gatos.bt829.addr) ; else i2c_sendbyte(0xFF) ; it.it_value.tv_sec = it.it_interval.tv_sec = 0 ; it.it_value.tv_usec = it.it_interval.tv_usec = 0 ; setitimer(ITIMER_VIRTUAL,&it,NULL) ; sigaction(SIGVTALRM,&oldact,NULL) ; if (!ati.r128) i2c_stop() ; N = N2-N1 ; fprintf(stderr,"%.1f kHz\n", 9.0*N/(1000.0*SECS)) ; gatos.debug = d ; } void i2c_register(u8 addr, char *ident, char *name) { if (!name) name = ident ; i2cident[addr>>1] = (char*) malloc(8+strlen(ident)) ; i2cname[addr>>1] = (char*) malloc(1+strlen(name)) ; if (i2cident[addr>>1]) snprintf(i2cident[addr>>1],8+strlen(ident),"%s @ 0x%02X",ident,addr) ; if (i2cname[addr>>1]) strcpy(i2cname[addr>>1],name) ; if (VERBOSE) printf("I2C unit @ 0x%02X: %s\n",addr,name) ; } gatos-0.0.5/src/ipc.c0100644002411700123110000000535407024026355013012 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_IPC_C 1 #include #include #include #include #include #include #include "gatos.h" #include "ipc.h" static int msgqueue_id; /* ------------------------------------------------------------------------ */ int ipc_init_message(void) { key_t key; key = ftok(LIBGATOS_PATH, 'm'); if((msgqueue_id = msgget(key, IPC_CREAT|0666)) == -1) { if(VERBOSE) { fprintf(stderr, "Can't create message queue.\n"); fflush(stderr); } return(0); } else { if(VERBOSE) { fprintf(stderr, "Message queue created.\n"); fflush(stderr); } } return(1); } /* ------------------------------------------------------------------------ */ int ipc_send_message(char *message) { struct gatosmsgbuf qbuf; qbuf.mtype = 1; strcpy(qbuf.mtext, message); if((msgsnd(msgqueue_id, (struct msgbuf *)&qbuf, strlen(qbuf.mtext)+1, 0)) == -1) { return(0); } return(1); } /* ----------------------------------------------------------------------- */ int ipc_receive_message(char *message) { struct gatosmsgbuf qbuf; int retval; qbuf.mtype = 1; if((retval = msgrcv(msgqueue_id, (struct gatosmsgbuf *)&qbuf, 80, 1, 0)) == -1 ) { message = "NOMESSAGE"; return(0); } strcpy(message, qbuf.mtext); return(1); } /* ------------------------------------------------------------------------ */ int ipc_delete_message(void){ int retval; if((retval = msgctl(msgqueue_id, IPC_RMID, 0)) == -1) { if(VERBOSE) { fprintf(stderr, "Can't close message queue.\n"); fflush(stderr); } return(0); } else { if(VERBOSE) { fprintf(stderr, "Message queue closed.\n"); fflush(stderr); } } return(1); } /* ------------------------------------------------------------------------ */ gatos-0.0.5/src/pci.c0100644002411700123110000022424307002562135013007 0ustar bayleasr/* XFree86 3.3.3 scanpci.c, modified for GATOS by Øyvind Aabling. */ #include "gatos.h" #include "pci.h" #include #include #include #include /* $XConsortium: scanpci.c /main/25 1996/10/27 11:48:40 kaleb $ */ /* * name: scanpci.c * * purpose: This program will scan for and print details of * devices on the PCI bus. * author: Robin Cutshaw (robin@xfree86.org) * * supported O/S's: SVR4, UnixWare, SCO, Solaris, * FreeBSD, NetBSD, 386BSD, BSDI BSD/386, * Linux, Mach/386, ISC * DOS (WATCOM 9.5 compiler) * * compiling: [g]cc scanpci.c -o scanpci * for SVR4 (not Solaris), UnixWare use: * [g]cc -DSVR4 scanpci.c -o scanpci * for DOS, watcom 9.5: * wcc386p -zq -omaxet -7 -4s -s -w3 -d2 name.c * and link with PharLap or other dos extender for exe * */ /* $XFree86: xc/programs/Xserver/hw/xfree86/etc/scanpci.c,v 3.34.2.17 1998/11/10 11:55:40 dawes Exp $ */ /* * Copyright 1995 by Robin Cutshaw * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #if defined(__SVR4) #if !defined(SVR4) #define SVR4 #endif #endif #ifdef __EMX__ #define INCL_DOSFILEMGR #include #endif #include #include #if defined(SVR4) #if defined(sun) #ifndef __EXTENSIONS__ #define __EXTENSIONS__ #endif #endif #include #include #if defined(NCR) #define __STDC #include #undef __STDC #else #include #endif #if defined(__SUNPRO_C) || defined(sun) || defined(__sun) #include #else #include #endif #include #endif #if defined(__FreeBSD__) || defined(__386BSD__) #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__NetBSD__) #include #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__bsdi__) #include #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(SCO) || defined(ISC) #ifndef ISC #include #endif #include #include #include #include #include #include #include #endif #if defined(Lynx_22) #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__WATCOMC__) #include void outl(unsigned port, unsigned data); #pragma aux outl = "out dx, eax" parm [dx] [eax]; void outb(unsigned port, unsigned data); #pragma aux outb = "out dx, al" parm [dx] [eax]; unsigned inl(unsigned port); #pragma aux inl = "in eax, dx" parm [dx]; unsigned inb(unsigned port); #pragma aux inb = "xor eax,eax" "in al, dx" parm [dx]; #else /* __WATCOMC__ */ #if defined(__GNUC__) #if !defined(__alpha__) && !defined(__powerpc__) #if defined(GCCUSESGAS) #define OUTB_GCC "outb %0,%1" #define OUTL_GCC "outl %0,%1" #define INB_GCC "inb %1,%0" #define INL_GCC "inl %1,%0" #else #define OUTB_GCC "out%B0 (%1)" #define OUTL_GCC "out%L0 (%1)" #define INB_GCC "in%B0 (%1)" #define INL_GCC "in%L0 (%1)" #endif /* GCCUSESGAS */ static void outb(unsigned short port, unsigned char val) { __asm__ __volatile__(OUTB_GCC : :"a" (val), "d" (port)); } static void outl(unsigned short port, unsigned long val) { __asm__ __volatile__(OUTL_GCC : :"a" (val), "d" (port)); } static unsigned char inb(unsigned short port) { unsigned char ret; __asm__ __volatile__(INB_GCC : "=a" (ret) : "d" (port)); return ret; } static unsigned long inl(unsigned short port) { unsigned long ret; __asm__ __volatile__(INL_GCC : "=a" (ret) : "d" (port)); return ret; } #endif /* !defined(__alpha__) && !defined(__powerpc__) */ #else /* __GNUC__ */ #if defined(__STDC__) && (__STDC__ == 1) # if !defined(NCR) # define asm __asm # endif #endif #if defined(__SUNPRO_C) /* * This section is a gross hack in if you tell anyone that I wrote it, * I'll deny it. :-) * The leave/ret instructions are the big hack to leave %eax alone on return. */ unsigned char inb(int port) { asm(" movl 8(%esp),%edx"); asm(" subl %eax,%eax"); asm(" inb (%dx)"); asm(" leave"); asm(" ret"); } unsigned short inw(int port) { asm(" movl 8(%esp),%edx"); asm(" subl %eax,%eax"); asm(" inw (%dx)"); asm(" leave"); asm(" ret"); } unsigned long inl(int port) { asm(" movl 8(%esp),%edx"); asm(" inl (%dx)"); asm(" leave"); asm(" ret"); } void outb(int port, unsigned char value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outb (%dx)"); } void outw(int port, unsigned short value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outw (%dx)"); } void outl(int port, unsigned long value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outl (%dx)"); } #else #if defined(SVR4) # if !defined(__USLC__) # define __USLC__ # endif #endif #ifndef SCO325 # include #else # include "scoasm.h" #endif #endif /* SUNPRO_C */ #endif /* __GNUC__ */ #endif /* __WATCOMC__ */ #if defined(__GLIBC__) && __GLIBC__ >= 2 #if defined(linux) #include #endif #endif #if defined(__alpha__) #if defined(linux) #include #define BUS(tag) (((tag)>>16)&0xff) #define DFN(tag) (((tag)>>8)&0xff) int pciconfig_read( unsigned char bus, unsigned char dfn, unsigned char off, unsigned char len, void * buf) { return syscall(__NR_pciconfig_read, bus, dfn, off, len, buf); } int pciconfig_write( unsigned char bus, unsigned char dfn, unsigned char off, unsigned char len, void * buf) { return syscall(__NR_pciconfig_write, bus, dfn, off, len, buf); } #else Generate compiler error - scanpci unsupported on non-linux alpha platforms #endif /* linux */ #endif /* __alpha__ */ #if defined(Lynx) && defined(__powerpc__) /* let's mimick the Linux Alpha stuff for LynxOS so we don't have * to change too much code */ #include unsigned char *pciConfBase; static __inline__ unsigned long swapl(unsigned long val) { unsigned char *p = (unsigned char *)&val; return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0)); } #define BUS(tag) (((tag)>>16)&0xff) #define DFN(tag) (((tag)>>8)&0xff) #define PCIBIOS_DEVICE_NOT_FOUND 0x86 #define PCIBIOS_SUCCESSFUL 0x00 int pciconfig_read( unsigned char bus, unsigned char dev, unsigned char offset, int len, /* unused, alway 4 */ unsigned long *val) { unsigned long _val; unsigned long *ptr; dev >>= 3; if (bus || dev >= 16) { *val = 0xFFFFFFFF; return PCIBIOS_DEVICE_NOT_FOUND; } else { ptr = (unsigned long *)(pciConfBase + ((1<>= 3; _val = swapl(val); if (bus || dev >= 16) { return PCIBIOS_DEVICE_NOT_FOUND; } else { ptr = (unsigned long *)(pciConfBase + ((1< 0) { pcr._pcibuses[pcr._pcinumbus++] = pcr._secondary_bus_number; } break; case PCI_CLASS_BRIDGE: if ( ++hostbridges > 1) { pcr._pcibuses[pcr._pcinumbus] = pcr._pcinumbus; pcr._pcinumbus++; } break; default: break; } if((func==0) && ((pcr._header_type & PCI_MULTIFUNC_DEV) == 0)) { /* not a multi function device */ func = 8; } else { func++; } if (idx++ >= MAX_PCI_DEVICES) continue; identify_card(&pcr, verbose); } while( func < 8 ); } } while (++pcr._pcibusidx < pcr._pcinumbus); } #if !defined(__alpha__) && !defined(__powerpc__) /* Now try pci config 2 probe (deprecated) */ if ((pcr._configtype == 2) || do_mode2_scan) { outb(PCI_MODE2_ENABLE_REG, 0xF1); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ /*printf("\nPCI probing configuration type 2\n");*/ pcr._pcibuses[0] = 0; pcr._pcinumbus = 1; pcr._pcibusidx = 0; idx = 0; do { for (pcr._ioaddr = 0xC000; pcr._ioaddr < 0xD000; pcr._ioaddr += 0x0100){ outb(PCI_MODE2_FORWARD_REG, pcr._pcibuses[pcr._pcibusidx]); /* bus 0 for now */ pcr._device_vendor = inl(pcr._ioaddr); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ if ((pcr._vendor == 0xFFFF) || (pcr._device == 0xFFFF)) continue; if ((pcr._vendor == 0xF0F0) || (pcr._device == 0xF0F0)) continue; /* catch ASUS P55TP4XE motherboards */ /*printf("\npci bus 0x%x slot at 0x%04x, vendor 0x%04x device 0x%04x\n", pcr._pcibuses[pcr._pcibusidx], pcr._ioaddr, pcr._vendor, pcr._device);*/ pcibus = pcr._pcibuses[pcr._pcibusidx] ; pcicard = pcr._ioaddr ; pcifunc = 0 ; outb(PCI_MODE2_FORWARD_REG, pcr._pcibuses[pcr._pcibusidx]); /* bus 0 for now */ pcr._status_command = inl(pcr._ioaddr + 0x04); pcr._class_revision = inl(pcr._ioaddr + 0x08); pcr._bist_header_latency_cache = inl(pcr._ioaddr + 0x0C); pcr._base0 = inl(pcr._ioaddr + 0x10); pcr._base1 = inl(pcr._ioaddr + 0x14); pcr._base2 = inl(pcr._ioaddr + 0x18); pcr._base3 = inl(pcr._ioaddr + 0x1C); pcr._base4 = inl(pcr._ioaddr + 0x20); pcr._base5 = inl(pcr._ioaddr + 0x24); pcr._baserom = inl(pcr._ioaddr + 0x30); pcr._max_min_ipin_iline = inl(pcr._ioaddr + 0x3C); pcr._user_config = inl(pcr._ioaddr + 0x40); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ /* check for pci-pci bridges (currently we only know Digital) */ if ((pcr._vendor == 0x1011) && (pcr._device == 0x0001)) if (pcr._secondary_bus_number > 0) pcr._pcibuses[pcr._pcinumbus++] = pcr._secondary_bus_number; if (idx++ >= MAX_PCI_DEVICES) continue; identify_card(&pcr, verbose); } } while (++pcr._pcibusidx < pcr._pcinumbus); outb(PCI_MODE2_ENABLE_REG, 0x00); } #endif /* __alpha__ */ disable_os_io(); return 0 ; } void identify_card(struct pci_config_reg *pcr, int verbose) { int i = 0, j = 0, foundit = 0; while (pvd[i].vendorname != (char *)NULL) { if (pvd[i].vendor_id == pcr->_vendor) { j = 0; /*printf(" %s ", pvd[i].vendorname);*/ while (pvd[i].device[j].devicename != (char *)NULL) { if (pvd[i].device[j].device_id == pcr->_device) { /*printf("%s", pvd[i].device[j].devicename);*/ foundit = 1; break; } j++; } } if (foundit) break; i++; } if (!foundit) /*printf(" Device unknown\n")*/; else { /*printf("\n");*/ if (verbose) { if (pvd[i].device[j].print_func != (void (*)())NULL) { pcidev = &pvd[i].device[j] ; pvd[i].device[j].print_func(pcr); return; } } } /*if (verbose) { if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); if (pcr->_base0) printf(" BASE0 0x%08x addr 0x%08x %s\n", pcr->_base0, pcr->_base0 & (pcr->_base0 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base0 & 0x1 ? "I/O" : "MEM"); if (pcr->_base1) printf(" BASE1 0x%08x addr 0x%08x %s\n", pcr->_base1, pcr->_base1 & (pcr->_base1 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base1 & 0x1 ? "I/O" : "MEM"); if (pcr->_base2) printf(" BASE2 0x%08x addr 0x%08x %s\n", pcr->_base2, pcr->_base2 & (pcr->_base2 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base2 & 0x1 ? "I/O" : "MEM"); if (pcr->_base3) printf(" BASE3 0x%08x addr 0x%08x %s\n", pcr->_base3, pcr->_base3 & (pcr->_base3 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base3 & 0x1 ? "I/O" : "MEM"); if (pcr->_base4) printf(" BASE4 0x%08x addr 0x%08x %s\n", pcr->_base4, pcr->_base4 & (pcr->_base4 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base4 & 0x1 ? "I/O" : "MEM"); if (pcr->_base5) printf(" BASE5 0x%08x addr 0x%08x %s\n", pcr->_base5, pcr->_base5 & (pcr->_base5 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base5 & 0x1 ? "I/O" : "MEM"); if (pcr->_baserom) printf(" BASEROM 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); if (pcr->_user_config) printf(" BYTE_0 0x%02x BYTE_1 0x%02x BYTE_2 0x%02x BYTE_3 0x%02x\n", pcr->_user_config_0, pcr->_user_config_1, pcr->_user_config_2, pcr->_user_config_3); }*/ } void mach64(struct pci_config_reg *pcr) { /*unsigned long sparse_io = 0;*/ u32 fbaddr=0xFFFFFFFF, regaddr=0xFFFFFFFF, biosaddr=0xFFFFFFFF ; u16 refclock=1432 ; double refclockd ; int m64=0, r128=0 ; #if !defined(__alpha__) && !defined(__powerpc__) int biosmapped=pcr->_baserom&0x1 ; unsigned long config_cmd ; u8 *biosptr, *romtable, *ptr ; #endif if (gatos.aticards >= ATICARDSMAX) return ; if (pcr->_base0) fbaddr = pcr->_base0 & ((pcr->_base0&0x1) ? 0xFFFFFFFC : 0xFFFFFFF0) ; if (pcr->_base2) regaddr = pcr->_base2 & ((pcr->_base2&0x1) ? 0xFFFFFFFC : 0xFFFFFFF0) ; biosaddr = (pcr->_baserom) ? pcr->_baserom & 0xFFFF8000 : 0x000C0000 ; /* 0x000C0000 will only work for the primary VGA card /ØAA */ snprintf(gatos.aticard[gatos.aticards].pciaddr, sizeof(gatos.aticard[gatos.aticards].pciaddr), "%d:%d:%d",pcibus,pcicard,pcifunc) ; gatos.aticard[gatos.aticards].busnum = pcibus ; gatos.aticard[gatos.aticards].cardnum = pcicard ; gatos.aticard[gatos.aticards].func = pcifunc ; gatos.aticard[gatos.aticards].vendorid = pcr->_vendor ; gatos.aticard[gatos.aticards].deviceid = pcr->_device ; gatos.aticard[gatos.aticards].fbaddr = fbaddr ; gatos.aticard[gatos.aticards].regaddr = regaddr ; gatos.aticard[gatos.aticards].biosaddr = biosaddr ; gatos.aticard[gatos.aticards].dotclock = pcidev->ati.maxdotclock ; gatos.aticard[gatos.aticards].width = pcidev->ati.maxhcapt ; gatos.aticard[gatos.aticards].ident = pcidev->devicename ; gatos.aticard[gatos.aticards].bus = pcidev->ati.bus ; gatos.aticard[gatos.aticards].name = pcidev->ati.name ; /* Mach64 or Rage128 ? */ if (!strncmp(pcidev->devicename,"Mach64",6)) m64 = 1 ; if (!strncmp(pcidev->devicename,"Rage128",7)) r128 = 1 ; if (m64+r128 != 1) return ; /* Until I figure out why the Rage128 won't enable the * * PCI BIOS (maybe there's a chip register ?) /ØAA */ if (r128) biosaddr = 0x000C0000 ; /* Default values if BIOS mapping fails */ memset(gatos.aticard[gatos.aticards].m64mminfo,0,5) ; memset(gatos.aticard[gatos.aticards].r128tvinfo,0,12) ; memset(gatos.aticard[gatos.aticards].r128mminfo,0,12) ; gatos.aticard[gatos.aticards].m64i2cinfo = 0xFFFF ; #if !defined(__alpha__) && !defined(__powerpc__) /* Assume PCI configuration type 1 */ config_cmd = PCI_EN | (pcibus<<16) | (pcicard<<11) | (pcifunc<<8) ; /* Set card PCI BIOS decode-enable bit */ if (pcr->_baserom && !biosmapped) { outl(PCI_MODE1_ADDRESS_REG, config_cmd | 0x30) ; outl(PCI_MODE1_DATA_REG,pcr->_baserom|0x00000001) ; } /* Memory map BIOS */ if ( (int) (biosptr = (u8*) mmap(0,65536,PROT_READ,MAP_SHARED, gatos.memfd,biosaddr)) == -1 ) { fprintf(stderr,"GATOS: Warning: mmap(0x%08X) failed: %s\n", biosaddr,strerror(errno)) ; return ; } /* Get BIOS info used in gatos.c, board.c and i2c.c */ /* Mach64 BIOS info */ if (m64 && *(biosptr+0) == 0x55 && *(biosptr+1) == 0xAA) { ptr = biosptr + 0x48 ; romtable = biosptr + *((u16*)ptr) ; ptr = romtable + 0x30 ; ptr = biosptr + *((u16*)ptr) ; if (!((u32)ptr)&1) gatos.aticard[gatos.aticards].m64i2cinfo = *((u16*)ptr) ; ptr = romtable + 0x46 ; ptr = biosptr + *((u16*)ptr) ; memcpy(gatos.aticard[gatos.aticards].m64mminfo,ptr,5) ; ptr = romtable + 0x10 ; ptr = biosptr + *((u16*)ptr) + 0x08 ; refclock = *((u16*)ptr) ; } /* Rage128 BIOS info */ if (r128 && *(biosptr+0) == 0x55 && *(biosptr+1) == 0xAA) { ptr = biosptr + 0x48 ; romtable = biosptr + *((u16*)ptr) ; ptr = romtable + 0x32 ; ptr = biosptr + *((u16*)ptr) ; if (ptr != biosptr) memcpy(gatos.aticard[gatos.aticards].r128tvinfo,ptr,12) ; ptr = romtable + 0x38 ; ptr = biosptr + *((u16*)ptr) ; if (ptr != biosptr) memcpy(gatos.aticard[gatos.aticards].r128mminfo,ptr,12) ; ptr = romtable + 0x30 ; ptr = biosptr + *((u16*)ptr) + 0x0E ; refclock = *((u16*)ptr) ; } /* Clear card PCI BIOS decode-enable bit */ if (pcr->_baserom && !biosmapped) { outl(PCI_MODE1_ADDRESS_REG, config_cmd | 0x30) ; outl(PCI_MODE1_DATA_REG,pcr->_baserom&0xFFFFFFFE) ; } /* Unmap BIOS */ if (munmap(biosptr,65536) == -1) { perror("GATOS: Warning: munmap() failed") ; return ; } #endif /* Reference clock crystal frequency */ switch (refclock) { case 1432: refclockd = 14.31818 ; break ; case 2700: refclockd = 27.0 ; break ; case 2864: refclockd = 28.63636 ; break ; case 2950: refclockd = 29.498928713 ; break ; default: refclockd = ((double)refclock)/100.0 ; break ; } gatos.aticard[gatos.aticards].refclock = refclockd ; /* Finished with this card */ gatos.aticards++ ; /* if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); if (pcr->_base0) printf(" APBASE 0x%08x addr 0x%08x\n", pcr->_base0, pcr->_base0 & (pcr->_base0 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0)); if (pcr->_base1) printf(" BLOCKIO 0x%08x addr 0x%08x\n", pcr->_base1, pcr->_base1 & (pcr->_base1 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0)); if (pcr->_base2) printf(" REGBASE 0x%08x addr 0x%08x\n", pcr->_base2, pcr->_base2 & (pcr->_base2 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0)); if (pcr->_baserom) printf(" BASEROM 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); switch (pcr->_user_config_0 & 0x03) { case 0: sparse_io = 0x2ec; break; case 1: sparse_io = 0x1cc; break; case 2: sparse_io = 0x1c8; break; } printf(" SPARSEIO 0x%03x %s %s\n", sparse_io, pcr->_user_config_0 & 0x04 ? "Block IO enabled" : "Sparse IO enabled", pcr->_user_config_0 & 0x08 ? "Disable 0x46E8" : "Enable 0x46E8"); */ } void print_i128(struct pci_config_reg *pcr) { /* if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); printf(" MW0_AD 0x%08x addr 0x%08x %spre-fetchable\n", pcr->_base0, pcr->_base0 & 0xFFC00000, pcr->_base0 & 0x8 ? "" : "not-"); printf(" MW1_AD 0x%08x addr 0x%08x %spre-fetchable\n", pcr->_base1, pcr->_base1 & 0xFFC00000, pcr->_base1 & 0x8 ? "" : "not-"); printf(" XYW_AD(A) 0x%08x addr 0x%08x\n", pcr->_base2, pcr->_base2 & 0xFFC00000); printf(" XYW_AD(B) 0x%08x addr 0x%08x\n", pcr->_base3, pcr->_base3 & 0xFFC00000); printf(" RBASE_G 0x%08x addr 0x%08x\n", pcr->_base4, pcr->_base4 & 0xFFFF0000); printf(" IO 0x%08x addr 0x%08x\n", pcr->_base5, pcr->_base5 & 0xFFFFFF00); printf(" RBASE_E 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); */ } void print_pcibridge(struct pci_config_reg *pcr) { /* if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); printf(" PRIBUS 0x%02x SECBUS 0x%02x SUBBUS 0x%02x SECLT 0x%02x\n", pcr->_primary_bus_number, pcr->_secondary_bus_number, pcr->_subordinate_bus_number, pcr->_secondary_latency_timer); printf(" IOBASE: 0x%02x00 IOLIM 0x%02x00 SECSTATUS 0x%04x\n", pcr->_io_base, pcr->_io_limit, pcr->_secondary_status); printf(" NOPREFETCH MEMBASE: 0x%08x MEMLIM 0x%08x\n", pcr->_mem_base, pcr->_mem_limit); printf(" PREFETCH MEMBASE: 0x%08x MEMLIM 0x%08x\n", pcr->_prefetch_mem_base, pcr->_prefetch_mem_limit); printf(" RBASE_E 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); */ } static int io_fd; #ifdef __EMX__ USHORT callgate[3] = {0,0,0}; #endif void enable_os_io() { io_fd = -1 ; #if defined(SVR4) || defined(SCO) || defined(ISC) #if defined(SI86IOPL) sysi86(SI86IOPL, 3); #else sysi86(SI86V86, V86SC_IOPL, PS_IOPL); #endif #endif #if defined(linux) iopl(3); #endif #if defined(__FreeBSD__) || defined(__386BSD__) || defined(__bsdi__) if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) { perror("/dev/console"); exit(1); } #if defined(__FreeBSD__) || defined(__386BSD__) if (ioctl(io_fd, KDENABIO, 0) < 0) { perror("ioctl(KDENABIO)"); exit(1); } #endif #if defined(__bsdi__) if (ioctl(io_fd, PCCONENABIOPL, 0) < 0) { perror("ioctl(PCCONENABIOPL)"); exit(1); } #endif #endif #if defined(__NetBSD__) #if !defined(USE_I386_IOPL) if ((io_fd = open("/dev/io", O_RDWR, 0)) < 0) { perror("/dev/io"); exit(1); } #else if (i386_iopl(1) < 0) { perror("i386_iopl"); exit(1); } #endif /* USE_I386_IOPL */ #endif /* __NetBSD__ */ #if defined(__OpenBSD__) if (i386_iopl(1) < 0) { perror("i386_iopl"); exit(1); } #endif /* __OpenBSD__ */ #if defined(MACH386) if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) { perror("/dev/iopl"); exit(1); } #endif #ifdef __EMX__ { HFILE hfd; ULONG dlen,action; APIRET rc; static char *ioDrvPath = "/dev/fastio$"; if (DosOpen((PSZ)ioDrvPath, (PHFILE)&hfd, (PULONG)&action, (ULONG)0, FILE_SYSTEM, FILE_OPEN, OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY, (ULONG)0) != 0) { fprintf(stderr,"Error opening fastio$ driver...\n"); fprintf(stderr,"Please install xf86sup.sys in config.sys!\n"); exit(42); } callgate[0] = callgate[1] = 0; /* Get callgate from driver for fast io to ports and other stuff */ rc = DosDevIOCtl(hfd, (ULONG)0x76, (ULONG)0x64, NULL, 0, NULL, (ULONG*)&callgate[2], sizeof(USHORT), &dlen); if (rc) { fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n", rc,dlen); DosClose(hfd); exit(42); } /* Calling callgate with function 13 sets IOPL for the program */ asm volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" : /*no outputs */ : /*no inputs */ : "eax","ebx","ecx","edx","cc"); DosClose(hfd); } #endif #if defined(Lynx) && defined(__powerpc__) pciConfBase = (unsigned char *) smem_create("PCI-CONF", (char *)0x80800000, 64*1024, SM_READ|SM_WRITE); if (pciConfBase == (void *) -1) exit(1); #endif } void disable_os_io() { #if defined(SVR4) || defined(SCO) || defined(ISC) #if defined(SI86IOPL) sysi86(SI86IOPL, 0); #else sysi86(SI86V86, V86SC_IOPL, 0); #endif #endif #if defined(linux) iopl(0); #endif #if defined(__FreeBSD__) || defined(__386BSD__) if (ioctl(io_fd, KDDISABIO, 0) < 0) { perror("ioctl(KDDISABIO)"); close(io_fd); exit(1); } close(io_fd); #endif #if defined(__NetBSD__) #if !defined(USE_I386_IOPL) close(io_fd); #else if (i386_iopl(0) < 0) { perror("i386_iopl"); exit(1); } #endif /* NetBSD1_1 */ #endif /* __NetBSD__ */ #if defined(__bsdi__) if (ioctl(io_fd, PCCONDISABIOPL, 0) < 0) { perror("ioctl(PCCONDISABIOPL)"); close(io_fd); exit(1); } close(io_fd); #endif #if defined(MACH386) close(io_fd); #endif #if defined(Lynx) && defined(__powerpc__) smem_create(NULL, (char *) pciConfBase, 0, SM_DETACH); smem_remove("PCI-CONF"); pciConfBase = NULL; #endif } gatos-0.0.5/src/saa5281.c0100644002411700123110000000317306765053731013331 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_SAA5281_C 1 #include "gatos.h" #include "saa5281.h" #include "i2c.h" #include #include #include /* ------------------------------------------------------------------------ */ /* Initialization routines */ int saa5281_init(void) { /* Scan I2C bus for a SAA5281 chip */ gatos.saa5281.addr = 0xFF ; if (i2c_device(0x22)) saa5281_register(0x22) ; RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Private routines */ static int saa5281_register(u8 addr) { char *ident, name[64] ; ident = "SAA5281" ; gatos.saa5281.addr = addr ; gatos.saa5281.deviceid = 0 ; gatos.saa5281.revision = 0 ; snprintf(name,sizeof(name),"%s European TeleText Decoder",ident) ; i2c_register(addr,ident,name) ; RETURN0 ; } gatos-0.0.5/src/sound.c0100644002411700123110000001241607024306264013364 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #define GATOS_SOUND_C 1 #include "gatos.h" #include "sound.h" #include "board.h" #include #include #include #include #include #include #include #include static int setmixer=0 ; /* ------------------------------------------------------------------------ */ /* Initialization routine */ /* Initialize sound, disable audio ioctl's if any errors */ int sound_init(void) { int i ; #ifdef NEWSOUNDMIXER sound_filter_mixers(); #endif /* NEWSOUNDMIXER */ if(gatos.audiotype&SNDCARD_MIXER) { /* Open mixer device */ gatos.mixerfd = open("/dev/mixer", 0) ; if(gatos.mixerfd<0) perror("GATOS: open(/dev/mixer) failed") ; /* Default to line-in */ gatos.mixerdev = -1 ; if(gatos.mixerfd>=0) #ifdef NEWSOUNDMIXER for(i=0; i=0) perror("GATOS: mixer read failed") ; gatos.audiotype &= DISABLE_MIXER ; } } if(gatos.audiotype==BRDCARD_MIXER) { gatos_setvolume(gatos.volume); } RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Public routines */ int sound_restore(void) { if(gatos.audiotype&SNDCARD_MIXER) { ioctl(gatos.mixerfd, MIXER_WRITE(gatos.mixerdev), &gatos.oldvol) ; } if(gatos.audiotype&BRDCARD_MIXER) { /*board_setvol(gatos.oldvol);*/ } RETURN0 ; } int sound_setvol(int value) { if(gatos.audiotype&SNDCARD_MIXER && setmixer) { value |= value<<8 ; if(ioctl(gatos.mixerfd, MIXER_WRITE(gatos.mixerdev), &value) == -1) { perror("GATOS: volume set failed") ; gatos.audiotype &= DISABLE_MIXER ; } } if(gatos.audiotype&BRDCARD_MIXER) { /*board_setvol(value);*/ } RETURN0 ; } int sound_setmixer(int value) { /*if (!(gatos.audiotype&SNDCARD_MIXER)) RETURN0 ; if (setmixer && (ioctl(gatos.mixerfd, MIXER_WRITE(gatos.mixerdev), &gatos.oldvol) == -1)) RETURN(errno) ;*/ #ifdef NEWSOUNDMIXER gatos.mixerdev = gatos_mixernum[sound_getfiltnummixer(value)] ; #else gatos.mixerdev = value ; #endif /* NEWSOUNDMIXER */ setmixer = 1 ; if(gatos.mixerfd>=0 && ioctl(gatos.mixerfd, MIXER_READ(gatos.mixerdev), &gatos.oldvol)) { perror("GATOS: mixer set failed") ; gatos.audiotype &= DISABLE_MIXER ; } else gatos.audiotype |= SNDCARD_MIXER; RETURN0 ; } int sound_nummixers() { /*if (!(gatos.audiotype&SNDCARD_MIXER)) RETURN0 ;*/ if(gatos.mixerfd <= 0) { RETURN0; } else { #ifdef NEWSOUNDMIXER return GATOS_MIXER_NRDEVICES; #else return SOUND_MIXER_NRDEVICES; #endif /* NEWSOUNDMIXER */ } } char* sound_mixername(int value) { #ifdef NEWSOUNDMIXER return gatos_mixer_names[value]; #else return mixer_names[value]; #endif /* NEWSOUNDMIXER */ } char** sound_mixernames() { #ifdef NEWSOUNDMIXER return gatos_mixer_names; #else return mixer_names; #endif /* NEWSOUNDMIXER */ } char** sound_mixerlabels() { #ifdef NEWSOUNDMIXER return gatos_mixer_labels; #else return mixer_labels; #endif /* NEWSOUNDMIXER */ } #ifdef NEWSOUNDMIXER /* * Mixers names filtering. */ void sound_filter_mixers(void) { int i, f, mixnum, badmix; mixnum=0; for(i=0; i #include #include #include /* MPP_CONFIG values */ #define MPPNORMAL 0x80038CB0L /* write */ #define MPPREAD 0x84038CB0L /* prefetch read */ #define MPPNORMALINC 0x80338CB0L /* write, autoincrement MPP_ADDR */ #define MPPREADINC 0x84338CB0L /* prefetch read, MPP_ADDR autoincr */ /* MPP_ADDR autoincrement wraps around after 4 adresses (2 LSB's only) */ #define MPPTRIES 100 /* See comments in mpp_wait() /ØAA */ /* Read a byte with possible bugfix correction from MPP */ #define MPPREADBYTE (MPP_DATA0 ^ gatos.bugfix_mppread) /* Private global vars */ static char *ident=NULL, *name=NULL ; static int id=0, rev=0 ; static u32 timeouts=0 ; /* Note: * ImpacTV registers are 32 bit, indexed by the 16 bit * value in MPP registers 0x0009 (MSB) and 0x0008 (LSB). * Value of indexed ImpacTV register is accessed * through MPP registers 0x0018 (LSB) to 0x001B (MSB). * tvout_read_i2c_cntl8() and tvout_write_i2c_cntl8() assumes that * the ImpacTV Register Index points to TV_I2C_CNTL (index 0x0015) * and that MPP_ADDR points to low byte of ImpacTV Register Data. * All other routines must call tvout_addr(TV_I2C_CNTL) to restore * these conditions after accessing other ImpacTV chip registers. * ØAA */ /* ------------------------------------------------------------------------ */ /* Initialization routine */ int tvout_init(void) { u8 init ; u32 save1, save2, save3 ; /* The Mach64 TV Out driver hasn't been ported to the Rage128 yet /ØAA */ if (ati.r128) RETURN0 ; /* ATI chip with MPP read bug ? */ if ( ati.gt_c2u1 || ati.gt_c2u2 ) if ( ati.gp_c2u1 || ati.gq_c2u1 || ati.gp_c2u2 || ati.gq_c2u2 ) { if (VERBOSE) { printf("TV Out: Chip with MPP read bug (correcting)\n") ; fflush(stdout) ; } gatos.bugfix_mppread = 0x81 ; } save1 = DAC_CNTL ; save2 = MPP_CONFIG ; save3 = MPP_STROBE_SEQ ; MPP_STROBE_SEQ = 0x00000383L ; DAC_CNTL &= 0xFFFFBFFFL ; /* Read ImpacTV Revision Code and Initialize value */ MPP_CONFIG = MPPREAD ; mpp_wait("tvout_init()") ; MPP_ADDR = 0x0000000AL ; init = MPPREADBYTE ; mpp_wait("tvout_init() 1") ; MPP_ADDR = 0x0000000BL ; id = MPPREADBYTE ; mpp_wait("tvout_init() 2") ; MPP_CONFIG = MPPNORMAL ; switch (id) { case IMPACTV: ident = "ImpacTV" ; rev = 1 ; break ; case IMPACTV2: case IMPACTV2M: ident = "ImpacTV2" ; rev = 2 ; break ; case IMPACTV2P: case IMPACTV2PM: ident = "ImpacTV2+" ; rev = 3 ; break ; default: break ; } switch (id) { case IMPACTV: name = "ImpacTV" ; break ; case IMPACTV2: name = "ImpacTV2 (Macrovision disabled)" ; break ; case IMPACTV2M: name = "ImpacTV2 (Macrovision enabled)" ; break ; case IMPACTV2P: name = "ImpacTV2+ (Macrovision disabled)" ; break ; case IMPACTV2PM: name = "ImpacTV2+ (Macrovision enabled)" ; break ; default: break ; } if (init != 0x00) rev = 0 ; if (rev) { if (VERBOSE) { printf("TV Out: %s\n",name) ; fflush(stdout) ; } tvout_addr(TV_I2C_CNTL) ; } else { /* Initialization failed, restore registers */ if (VERBOSE) { printf("TV Out: No ImpacTV chip (ID read was %02X)\n", id) ; fflush(stdout) ; } DAC_CNTL = save1 ; MPP_CONFIG = save2 ; MPP_STROBE_SEQ = save3 ; } /* Always return success (even if ImpacTV chip not present :-) */ RETURN0 ; } /* ------------------------------------------------------------------------ */ /* Public routines */ /* For MPP/ImpacTV I2C Driver */ int tvout_present(void) { return (rev!=0) ; } /* Read low byte of ImpacTV TV_I2C_CNTL register */ u8 tvout_read_i2c_cntl8(void) { mpp_wait("tvout_read_i2c_cntl8()") ; MPP_CONFIG = MPPREAD ; mpp_wait("tvout_read_i2c_cntl8() 1") ; return MPPREADBYTE ; } /* Write low byte of ImpacTV TV_I2C_CNTL register */ void tvout_write_i2c_cntl8(u8 data) { mpp_wait("tvout_write_i2c_cntl8()") ; MPP_CONFIG = MPPNORMAL ; MPP_DATA0 = data ; } /* Read ImpacTV register */ u32 tvout_read32(u16 addr) { u32 data ; tvout_addr(addr) ; MPP_CONFIG = MPPREADINC ; mpp_wait("tvout_read32()") ; data = MPPREADBYTE ; mpp_wait("tvout_read32() 1") ; data |= MPPREADBYTE << 8 ; mpp_wait("tvout_read32() 2") ; data |= MPPREADBYTE << 16 ; mpp_wait("tvout_read32() 3") ; data |= MPPREADBYTE << 24 ; mpp_wait("tvout_read32() 4") ; if (addr != TV_I2C_CNTL) tvout_addr(TV_I2C_CNTL) ; return data ; } /* Write to ImpacTV register */ void tvout_write32(u16 addr, u32 data) { tvout_addr(addr) ; mpp_wait("tvout_write32()") ; MPP_CONFIG = MPPNORMALINC ; MPP_DATA0 = data ; mpp_wait("tvout_write32() 1") ; MPP_DATA0 = data >> 8 ; mpp_wait("tvout_write32() 2") ; MPP_DATA0 = data >> 16 ; mpp_wait("tvout_write32() 3") ; MPP_DATA0 = data >> 24 ; mpp_wait("tvout_write32() 4") ; if (addr != TV_I2C_CNTL) tvout_addr(TV_I2C_CNTL) ; } /* ------------------------------------------------------------------------ */ /* Private routines */ /* Set ImpacTV register index and return MPP_ADDR * to 0x0018 for ImpacTV register data access. */ static void tvout_addr(u16 addr) { mpp_wait("tvout_addr()") ; MPP_CONFIG = MPPNORMALINC ; MPP_ADDR = 0x00000008L ; MPP_DATA0 = addr ; mpp_wait("tvout_addr() 1") ; MPP_DATA0 = addr>>8 ; mpp_wait("tvout_addr() 2") ; MPP_CONFIG = MPPNORMAL ; MPP_ADDR = 0x00000018L ; } /* Returns 1 if ready, 0 if MPP bus timed out (not ready) */ static int mpp_wait(char *str) { u32 tries=MPPTRIES ; /* For some reason, it's *necessary* to have *two* while() poll loops * to avoid MPP bus timeouts, but doubling MPPTRIES doesn't help ... * Maybe the code optimizer is playing tricks on us ?!? * Nah, can't be, problem is there with 'gcc -g' as well ... * Also, it seems to make no difference if MPPTRIES is 0x100 * (the official ATI value) or 1, so I've naturally chosen 1 ... /ØAA */ while (tries && (MPP_CONFIG3 & 0x40)) tries-- ; if (tries) return 1 ; // tries = MPPTRIES ; // while (tries && (MPP_CONFIG3 & 0x40)) tries-- ; if (tries) return 1 ; if (!(gatos.debug&GATOSQUIET)) fprintf(stderr,"mpp_wait(): MPP bus timeout in %s\n",str) ; timeouts++ ; return 0 ; } /* ------------------------------------------------------------------------ */ /* Debug and report routines */ #define DUMPREG(NAME) \ fprintf(stderr,"%s: %-22s (0x%04X) = 0x%08X\n", \ ident,#NAME,NAME,tvout_read32(NAME)) void tvout_dumpregs(void) { if (!rev) return ; DUMPREG(TV_MASTER_CNTL) ; DUMPREG(TV_RGB_CNTL) ; DUMPREG(TV_CLKOUT_CNTL) ; DUMPREG(TV_SYNC_CNTL) ; DUMPREG(TV_I2C_CNTL) ; DUMPREG(TV_MPP_DATA_CNTL) ; DUMPREG(TV_HTOTAL) ; DUMPREG(TV_HDISP) ; DUMPREG(TV_HSIZE) ; DUMPREG(TV_HSTART) ; DUMPREG(TV_HCOUNT) ; DUMPREG(TV_VTOTAL) ; DUMPREG(TV_VDISP) ; DUMPREG(TV_VCOUNT) ; DUMPREG(TV_FTOTAL) ; DUMPREG(TV_FCOUNT) ; DUMPREG(TV_FRESTART) ; DUMPREG(TV_HRESTART) ; DUMPREG(TV_VRESTART) ; DUMPREG(TV_SYNC_SIZE) ; DUMPREG(TV_TV_PLL_CNTL) ; DUMPREG(TV_CRT_PLL_CNTL) ; DUMPREG(TV_PLL_CNTL) ; DUMPREG(TV_PLL_TEST_CNTL) ; DUMPREG(TV_CLOCK_SEL_CNTL) ; DUMPREG(TV_FRAME_LOCK_CNTL) ; DUMPREG(TV_SYNC_LOCK_CNTL) ; DUMPREG(TV_TVO_SYNC_PAT_ACCUM) ; DUMPREG(TV_TVO_SYNC_THRESHOLD) ; DUMPREG(TV_TVO_SYNC_PAT_EXPECT) ; DUMPREG(TV_DELAY_ONE_MAP_A) ; DUMPREG(TV_DELAY_ONE_MAP_B) ; DUMPREG(TV_DELAY_ZERO_MAP_A) ; DUMPREG(TV_DELAY_ZERO_MAP_B) ; DUMPREG(TV_TVO_DATA_DELAY_A) ; DUMPREG(TV_TVO_DATA_DELAY_B) ; DUMPREG(TV_HOST_READ_DATA) ; DUMPREG(TV_HOST_WRITE_DATA) ; DUMPREG(TV_HOST_RD_WT_CNTL) ; DUMPREG(TV_VSCALER_CNTL) ; DUMPREG(TV_TIMING_CNTL) ; DUMPREG(TV_GAMMA_CNTL) ; if (rev == 2) { DUMPREG(TV_Y_FALL_CNTL) ; DUMPREG(TV_Y_RISE_CNTL) ; DUMPREG(TV_Y_SAW_TOOTH_CNTL) ; } DUMPREG(TV_MODULATOR_CNTL1) ; DUMPREG(TV_MODULATOR_CNTL2) ; DUMPREG(TV_PRE_DAC_MUX_CNTL) ; DUMPREG(TV_TV_DAC_CNTL) ; DUMPREG(TV_CRC_CNTL) ; DUMPREG(TV_VIDEO_PORT_SIG) ; if (rev == 3) { DUMPREG(TV_VBI_20BIT_CNTL) ; DUMPREG(TV_VBI_LEVEL_CNTL) ; } DUMPREG(TV_UV_ADR) ; DUMPREG(TV_FIFO_TEST_CNTL) ; /* Report then clear MPP bus timeout stats */ if (timeouts) fprintf(stderr,"Warning: %d MPP bus timeouts\n",timeouts) ; timeouts = 0 ; } /* ------------------------------------------------------------------------ */ /* Setting up tvout */ #define RefClock 28.63636 //#define RefClock 28.63 static double tvclk; int tvout_start(void) { if(!tvout_present()) RETURN(ENODEV); tvout_write32(TV_MASTER_CNTL,0); tvout_write32(TV_CLKOUT_CNTL,1); tvout_write32(TV_SYNC_CNTL,0x28); /* For NTSC, if main cloc kis RefClock MHz */ tvout_write32(TV_TV_PLL_CNTL,0x00005438); tvclk=RefClock*0x54/0x38; /* leave macro on defaults (mine are 0xD4)*/ tvout_write32(TV_PLL_CNTL,tvout_read32(TV_PLL_CNTL)|0x18); tvout_write32(TV_PLL_TEST_CNTL,0); tvout_write32(TV_FRAME_LOCK_CNTL,0xf); tvout_write32(TV_SYNC_LOCK_CNTL,0x01000000); tvout_write32(TV_HOST_RD_WT_CNTL,0); if(rev==1) tvout_write32(TV_GAMMA_CNTL,0x008D0000); else { /* Need to fill this */} tvout_write32(TV_MODULATOR_CNTL1,0x003B462C);//??? For NTSC, Phase alt=?? tvout_write32(TV_MODULATOR_CNTL2,0x00000177); //???For NTSC, Phase alt=?? if(rev==1) tvout_write32(TV_PRE_DAC_MUX_CNTL,0x0000000c); //composite only else { /* Need to fill this */} if(rev==1) tvout_write32(TV_TV_DAC_CNTL,0x113); //NTSC, PAL = 0x013 probably else { /* Need to fill this */} tvout_write32(TV_CRC_CNTL,0); tvout_write32(TV_UV_ADR,0x000000BE); // What should this be? tvout_write32(TV_FIFO_TEST_CNTL,0); if (VERBOSE) { printf("Ready to setmode!\n") ; fflush(stdout) ; } RETURN(tvout_setmode()); } static u8 olddiv, oldextdiv, tvoutflag=0,ind,oldsel,nsel; #define OVERSCAN_CLR (*(MEM_0+0x10)) #define OVERSCAN_WLR (*(MEM_0+0x11)) #define OVERSCAN_WTB (*(MEM_0+0x12)) #include int tvout_reset(void) { if(!tvout_present()) RETURN(ENODEV); if(!tvoutflag) RETURN(EPERM); OVERSCAN_CLR=0; // should have saved these OVERSCAN_WLR=0; OVERSCAN_WTB=0; TVO_CNTL=0; if(rev==1) tvout_write32(TV_PRE_DAC_MUX_CNTL,0x00000008); //composite only else { /* Need to fill this */} if(rev==1) tvout_write32(TV_TV_DAC_CNTL,0x11a); //NTSC, PAL = 0x013 probably else { /* Need to fill this */} // should probably disable something: PLL,syncs? CLOCK_CNTL= ((nsel|4)<<16)|(((5<<2)|2)<<8)|ind; CLOCK_CNTL= (oldextdiv<<16)|(((11<<2)|2)<<8)|ind; CLOCK_CNTL= (olddiv<<16)|(((6<<2)|2)<<8)|ind; CLOCK_CNTL= ((oldsel|4)<<16)|(((5<<2)|2)<<8)|ind; usleep(100000); CLOCK_CNTL= ((oldsel&~4)<<16)|(((5<<2)|2)<<8)|ind; RETURN0; } void findNM(double R, u32 *N,u32 *M,u32 htotal, u8 *hadd) { int i,n,m,h; double diff,rdiff=100.,r; for(i=1;i<256;i++) for(h=0;h<8;h++) { n=i; r=R*(htotal+h)/htotal; m=rint(n/r); if(m==0) m=1; diff=fabs(r-1.*n/m); if(diffdatad_max) datad_max=datad[i]; if(tvoutflag) RETURN(EPERM); htotal=((CRTC_H_TOTAL_DISP&0xffff)+1)*8; //assuming extra 7 is 0 hdisp=(((CRTC_H_TOTAL_DISP>>16)&0xfff)+1)*8; vtotal=(CRTC_V_TOTAL_DISP&0xffff)+1; vdisp=((CRTC_V_TOTAL_DISP>>16)&0xffff)+1; if (VERBOSE) { printf("Setmode: htotal=%i,vtotal=%i hdisp=%i,vdisp=%i\n", htotal,vtotal,hdisp,vdisp) ; fflush(stdout) ; } ind=CLOCK_CNTL0&0x3; CLOCK_CNTL1=(5<<2); oldsel=CLOCK_CNTL2; if((oldsel&0x3)!=3) { fprintf(stderr,"TVOUT: current mode is not PLLed!\n"); RETURN(EPERM);} CLOCK_CNTL1=(2<<2); RefDivider=CLOCK_CNTL2; CLOCK_CNTL1=(6<<2); olddiv=CLOCK_CNTL2; CLOCK_CNTL1=(11<<2); oldextdiv=CLOCK_CNTL2; CLOCK_CNTL1=((7+ind)<<2); FBdivider=CLOCK_CNTL2; /* I assume these chips have the extended div */ ext_div=(oldextdiv>>(4+ind))&1; post_div=(olddiv>>(2*ind))&3; post_div=1<2)||(vtotal>1000)) { fprintf(stderr,"TVOUT: current mode is not good enough!\n"); RETURN(EPERM);} if(oldclk>34) RGB888mode=0; else RGB888mode=1; tclk=(60.*1000./1001.)*vtotal*htotal*(RGB888mode?3:2)/1e6; BytDiv=floor(180./tclk); /* 180 is my guess CL*/ if(BytDiv>4) BytDiv=4; if(BytDiv<1) BytDiv=1; tclk*=BytDiv/2/RefClock; N=65; M=196; if (VERBOSE) { printf("Setmode(in findNM): tclk=%g, N=%i, M=%i, htotal=%i, hadd=%i\n", tclk,N,M,htotal,hadd) ; fflush(stdout) ; } findNM(tclk,&N,&M,htotal,&hadd); htotal+=hadd; pixclk=RefClock*N/M*2/BytDiv/(RGB888mode?3:2); if (VERBOSE) { printf("Setmode: M=%i, N=%i, hadd=%i, pixclk=%g, BytDiv=%i, RG888=%i\n", M,N,hadd,pixclk,BytDiv,RGB888mode) ; fflush(stdout) ; } no_of_phase=2*BytDiv; byte_period=1./(RefClock*N/M*2/BytDiv)*1e12; ns_per_phase=byte_period/no_of_phase; if(byte_period<12500) mid_data_eye=(byte_period-uncertainty)/3; else mid_data_eye=(byte_period-uncertainty)/2; if(mid_data_eye > datad_max) { BytDel=floor((mid_data_eye-datad_max)/ns_per_phase); for(i=0;i<8;i++) { del[i]=((mid_data_eye-datad[i])-(BytDel*ns_per_phase))/ns_per_tap; if(datad[i]>47) datad[i]=47; } if(BytDel!=0) BytDel=no_of_phase-BytDel; } else { BytDel=floor((datad_max-mid_data_eye)/ns_per_phase)+1; for(i=0;i<8;i++) { del[i]=(((BytDel*ns_per_phase)+mid_data_eye)-datad[i])/ns_per_tap; if(datad[i]>47) datad[i]=47; } if(BytDel>(no_of_phase-1)) BytDel=BytDel-no_of_phase; } tvout_write32(TV_RGB_CNTL,RGB888mode); tvout_write32(TV_HTOTAL,htotal-1); tvout_write32(TV_HDISP,hdisp-1); tvout_write32(TV_HSIZE,hdisp); tvout_write32(TV_HSTART,hdisp+12); /* ????? */ tvout_write32(TV_VTOTAL,vtotal-1); tvout_write32(TV_VDISP,vdisp-1); tvout_write32(TV_FTOTAL,1); tvout_write32(TV_FRESTART,0); tvout_write32(TV_HRESTART,hdisp+12); /* ????? */ tvout_write32(TV_VRESTART,vdisp+4); /* ????? */ tvout_write32(TV_SYNC_SIZE,hdisp+8); tvout_write32(TV_CRT_PLL_CNTL,(N<<8)|(M)); //N can be 9bits for rev>= tvout_write32(TV_CLOCK_SEL_CNTL,(BytDel<<8)|((BytDiv-1)<<2)|0x33); tvout_write32(TV_TVO_DATA_DELAY_A, (del[3]<<24)|(del[2]<<16)|(del[1]<<8)|(del[0])); tvout_write32(TV_TVO_DATA_DELAY_B, (del[7]<<24)|(del[6]<<16)|(del[5]<<8)|(del[4])); if(rev==1) { yscal=vtotal*(1<<0xe)*2/525; //This is for NTSC 525 //max vtotal for NTSC is 1049 if(yscal>0xffff) {yscal=0xffff; fprintf(stderr,"Scaling TVOUT to big!");} ythin=0; // This is max averaging!!! tvout_write32(TV_VSCALER_CNTL,((pixclk<.55*tvclk)?0x07000000:0x03000000)| (ythin<<16)|yscal);} else { /* this needs to be done !!!*/} if(rev==1) { hinc=(htotal+50)*(1<<0xc)/2730; //2730 for NTSC ~= tvclk/(525*30) // 50 is just to scale picture smaller //max (htotal+50) for NTSC is 2729 if(hinc>0xfff) {hinc=0xfff; fprintf(stderr,"Scaling TVOUT to big!");} tvout_write32(TV_TIMING_CNTL,0x00090000|hinc);} else { /* this needs to be done !!!*/} if(RGB888mode) OVERSCAN_CLR=0x00000100; else OVERSCAN_CLR=0x00000800; OVERSCAN_WLR=0x00010000; OVERSCAN_WTB=0x00020000; TVO_CNTL=0x80000008|hadd; if(RGB888mode) { nextdiv= oldextdiv|(1<<(4+ind)); ndiv=olddiv&~(3<<(2*ind)); } else { nextdiv= oldextdiv&~(1<<(4+ind)); ndiv=olddiv&~(3<<(2*ind)); ndiv|=(1<<(2*ind)); } nsel=(oldsel&0xfc)|2|8; if (VERBOSE) { printf("Setmode: olddiv=%x, ndiv=%x oldextdiv=%x, nextdiv=%x oldsel=%x, nsel=%x\n", olddiv,ndiv,oldextdiv,nextdiv,oldsel,nsel) ; fflush(stdout) ; } // RETURN(EIO); CLOCK_CNTL= ((oldsel|4)<<16)|(((5<<2)|2)<<8)|ind; CLOCK_CNTL= (nextdiv<<16)|(((11<<2)|2)<<8)|ind; CLOCK_CNTL= (ndiv<<16)|(((6<<2)|2)<<8)|ind; CLOCK_CNTL= ((nsel|4)<<16)|(((5<<2)|2)<<8)|ind; usleep(100000); CLOCK_CNTL= ((nsel&~4)<<16)|(((5<<2)|2)<<8)|ind; tvoutflag=1; RETURN(0);} int tvout_monitor(void) { /* what seems to be neede is 1001 for MON which is bits 12-15 of TV_TV_DAC_CNTL. direct access to mpp gives good result: m 8 a0 m 0x18 --> either 33 or 13 m 8 15 or setting up: m 8 a0; MON=1111 m 0x18 */ int flag=0; if(!tvout_present()) return 0; tvout_write32(TV_PRE_DAC_MUX_CNTL,0x00008004); tvout_write32(TV_TV_DAC_CNTL,0x0000f113); usleep(10000); if(tvout_read32(TV_TV_DAC_CNTL)&0x20) flag=1; tvout_write32(TV_PRE_DAC_MUX_CNTL,0x00000802); usleep(10000); if(tvout_read32(TV_TV_DAC_CNTL)&0x20) flag|=2; tvout_write32(TV_PRE_DAC_MUX_CNTL,0x00000081); usleep(10000); if(tvout_read32(TV_TV_DAC_CNTL)&0x20) flag|=4; /* enable only composite out for now... */ tvout_write32(TV_PRE_DAC_MUX_CNTL,0x0000000c); tvout_write32(TV_TV_DAC_CNTL,0x00000113); return flag; } int tvout_getdelay(void) { u32 htotal,vtotal,hsync,vsync,hoffvpitch,gencntl,daccntl; htotal=CRTC_H_TOTAL_DISP; vtotal=CRTC_V_TOTAL_DISP; hsync=(*(MEM_0+0x01)); vsync=(*(MEM_0+0x03)); hoffvpitch=CRTC_OFF_PITCH; gencntl=CRTC_GEN_CNTL; daccntl=DAC_CNTL; /* setting up 320x200 mode 24bpp?? */ CRTC_GEN_CNTL= (gencntl&0xfffff8f0)|0x0000040c; /* 4=(565) 16bit 5=(888) 24bit 6=(a888) 32bit 2=(322) if DAC_DIRECT=1 DAC_DIREAC(10=ah bit)@DAC_CNTL(31h) */ DAC_CNTL=(daccntl&0xffff7fff)|0x00008000; //Modeline "320x200@60d" 12.587 320 352 376 400 200 206 207 225 //+Hsync -Vsync doublescan CRTC_H_TOTAL_DISP=0x00270031; CRTC_V_TOTAL_DISP=0x018F01C1; (*(MEM_0+0x01))=0x0003002B; (*(MEM_0+0x03))=0x0022019B; CRTC_OFF_PITCH=0x0A000000; /* reseting the mode */ CRTC_H_TOTAL_DISP=htotal; CRTC_V_TOTAL_DISP=vtotal; (*(MEM_0+0x01))=hsync; (*(MEM_0+0x03))=vsync; CRTC_OFF_PITCH=hoffvpitch; CRTC_GEN_CNTL=gencntl; DAC_CNTL=daccntl; return 0; } gatos-0.0.5/src/atisplit.c0100644002411700123110000001044207010662536014064 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include #include "config.h" #include "i18n.h" #define LIMIT(x) (((x)<0)?0:((x)>255)?255:(x)) char s[2000]; void * do_alloc(long a,long b) { void *r; r=calloc(a,b); while(r==NULL){ r=calloc(a,b); sleep(1); } return r; } int do_write(int fd,unsigned char *data,long size) { long chunk,r,i; chunk=size; i=0; while(chunk>0){ r=write(fd,data+i,chunk); if(r<0){ fprintf(stderr,_("atisplit:writing to file \"%s\":"),s);fflush(stderr); perror("");fflush(stderr); return -1; } chunk-=r; i+=r; } return 0; } int main(int argc,char *argv[]) { int file; char *name,*name_2; unsigned char *data,*buf; struct stat st; long i; long file_ct; int fout; int h,v; long chunk; long y,x; /* int y, cr, cb, r, g, b, h, v, i, j, res, n = 0 ; FILE *file ; unsigned char rgb[3], buf[9], name[13] ; struct stat st ; */ bindtextdomain("atisplit", GATOS_LOCALEDIR); textdomain("atisplit"); if(argc>1){ name=argv[1]; }else{ name="gatos.yuv"; } if(argc>2){ name_2=argv[2]; } else { name_2="tv%06d.yuv"; } file=open(name,O_RDONLY); if(file<0){ fprintf(stderr,_("atisplit:opening file \"%s\":"),name);fflush(stderr); perror("");fflush(stderr); return -1; } fstat(file,&st); data=mmap(NULL,st.st_size,PROT_READ,MAP_SHARED,file,0); if(data==NULL){ fprintf(stderr,_("atisplit:opening file \"%s\":"),name);fflush(stderr); perror("");fflush(stderr); return -1; } i=0; file_ct=1; while(i>1; } do_write(fout,buf,h/2); } for(y=0;y>1; } do_write(fout,buf,h/2); } free(buf); i+=chunk; close(fout); printf("%s:%d:%d\n",s,h,v); file_ct++; } fflush(stdout); return 0; } /* while ( fread(buf,1,8,stdin) == 8 ) { while (1) { snprintf(name,sizeof(name),"tv%06d.ppm",++n) ; if (lstat(name,&st)) break ; } res = sscanf(buf,"%3d %3d\n",&h,&v) ; file = fopen(name,"w") ; if (!file) { perror("fopen() failed") ; exit(0) ; } fprintf(stderr,"atitoppm: %dx%d image: %s\n",h,v,name) ; fprintf(file,"P6\n%d %d\n255\n",h,v) ; for ( i=0 ; i>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; fwrite(rgb,3,1,file) ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; fwrite(rgb,3,1,file) ; } fclose(file) ; } return(0) ; */ gatos-0.0.5/src/i18n.h0100644002411700123110000000247106765053731013031 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifdef ENABLE_NLS # include # define _(String) gettext (String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else */ # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif gatos-0.0.5/src/atitogif.c0100644002411700123110000000650507010662536014046 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include #include "config.h" #include "i18n.h" #define LIMIT(x) (((x)<0)?0:((x)>255)?255:(x)) #define R1 p1[0] #define W1 p1[1] #define R2 p2[0] #define W2 p2[1] int main() { int fd0, fd1, y, cr, cb, r, g, b, h, v, i, j, res, n=0 ; unsigned char rgb[3], buf[256], name[13] ; struct stat st ; int p1[2], p2[2] ; pid_t pid1, pid2 ; bindtextdomain("atitogif", GATOS_LOCALEDIR); textdomain("atitogif"); if ((fd0=open("/dev/null",O_WRONLY)) == -1) { perror(_("open(/dev/null) failed")) ; exit(0) ; } while ( fread(buf,1,8,stdin) == 8 ) { while (1) { snprintf(name,sizeof(name),"tv%06d.gif",++n) ; if (lstat(name,&st)) break ; } if ((fd1=open(name,O_WRONLY|O_CREAT|O_TRUNC,0644)) == -1) { perror(_("open(outfile) failed")) ; exit(0) ; } if (pipe(p1)) { perror(_("pipe() failed")) ; exit(0) ; } if (pipe(p2)) { perror(_("pipe() failed")) ; exit(0) ; } if ((pid1=fork()) == -1) { perror(_("fork() failed")) ; exit(0) ; } if (!pid1) { dup2(R1,0) ; dup2(W2,1) ; dup2(fd0,2) ; close(R1) ; close(W2) ; close(fd0) ; close(W1) ; close(R2) ; close(fd1) ; execlp("ppmquant","ppmquant","256",NULL) ; exit(0) ; } if ((pid2=fork()) == -1) { perror(_("fork() failed")) ; exit(0) ; } if (!pid2) { dup2(R2,0) ; dup2(fd1,1) ; dup2(fd0,2) ; close(R2) ; close(fd1) ; close(fd0) ; close(R1) ; close(W1) ; close(W2) ; execlp("ppmtogif","ppmtogif",NULL) ; exit(0) ; } close(R1) ; close(W2) ; close(R2) ; close(fd1) ; res = sscanf(buf,"%3d %3d\n",&h,&v) ; fprintf(stderr,"atitogif: %dx%d image: %s\n",h,v,name) ; snprintf(buf,sizeof(buf),"P6\n%d %d\n255\n",h,v) ; write(W1,buf,strlen(buf)) ; for ( i=0 ; i>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; write(W1,rgb,3) ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; write(W1,rgb,3) ; } close(W1) ; waitpid(pid1,NULL,0) ; waitpid(pid2,NULL,0) ; } return(0) ; } gatos-0.0.5/src/atitojpg.c0100644002411700123110000000555307010662536014063 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include #include "config.h" #include "i18n.h" #define LIMIT(x) (((x)<0)?0:((x)>255)?255:(x)) #define R1 p1[0] #define W1 p1[1] int main() { int fd0, fd1, y, cr, cb, r, g, b, h, v, i, j, res, n=0 ; unsigned char rgb[3], buf[256], name[13] ; struct stat st ; int p1[2] ; pid_t pid1 ; bindtextdomain("atitojpg", GATOS_LOCALEDIR); textdomain("atitojpg"); if ((fd0=open("/dev/null",O_WRONLY)) == -1) { perror(_("open(/dev/null) failed")) ; exit(0) ; } while ( fread(buf,1,8,stdin) == 8 ) { while (1) { snprintf(name,sizeof(name),"tv%06d.jpg",++n) ; if (lstat(name,&st)) break ; } if ((fd1=open(name,O_WRONLY|O_CREAT|O_TRUNC,0644)) == -1) { perror(_("open(outfile) failed")) ; exit(0) ; } if (pipe(p1)) { perror(_("pipe() failed")) ; exit(0) ; } if ((pid1=fork()) == -1) { perror(_("fork() failed")) ; exit(0) ; } if (!pid1) { dup2(R1,0) ; dup2(fd1,1) ; dup2(fd0,2) ; close(R1) ; close(W1) ; close(fd0) ; close(fd1) ; execlp("cjpeg","cjpeg",NULL) ; exit(0) ; } close(R1) ; close(fd1) ; res = sscanf(buf,"%3d %3d\n",&h,&v) ; fprintf(stderr,"atitojpg: %dx%d image: %s\n",h,v,name) ; snprintf(buf,sizeof(buf),"P6\n%d %d\n255\n",h,v) ; write(W1,buf,strlen(buf)) ; for ( i=0 ; i>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; write(W1,rgb,3) ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; write(W1,rgb,3) ; } close(W1) ; waitpid(pid1,NULL,0) ; } return(0) ; } gatos-0.0.5/src/atitoppm.c0100644002411700123110000000431707010662536014074 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include "config.h" #include "i18n.h" #define LIMIT(x) (((x)<0)?0:((x)>255)?255:(x)) int main() { int y, cr, cb, r, g, b, h, v, i, j, res, n = 0 ; FILE *file ; unsigned char rgb[3], buf[9], name[13] ; struct stat st ; bindtextdomain("atitoppm", GATOS_LOCALEDIR); textdomain("atitoppm"); while ( fread(buf,1,8,stdin) == 8 ) { while (1) { snprintf(name,sizeof(name),"tv%06d.ppm",++n) ; if (lstat(name,&st)) break ; } res = sscanf(buf,"%3d %3d\n",&h,&v) ; file = fopen(name,"w") ; if (!file) { perror(_("fopen() failed")) ; exit(0) ; } fprintf(stderr,"atitoppm: %dx%d image: %s\n",h,v,name) ; fprintf(file,"P6\n%d %d\n255\n",h,v) ; for ( i=0 ; i>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; fwrite(rgb,3,1,file) ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; rgb[0] = LIMIT(r) ; rgb[1] = LIMIT(g) ; rgb[2] = LIMIT(b) ; fwrite(rgb,3,1,file) ; } fclose(file) ; } return(0) ; } gatos-0.0.5/src/atitv.c0100644002411700123110000001456107027457147013400 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include "gatos.h" #include "version.h" void PrintHelpMessage(); int main(int argc, char **argv) { int ctr; bindtextdomain(PACKAGE, GATOS_LOCALEDIR); textdomain(PACKAGE); gatos_init(GATOS_READ_BUFFER|GATOS_WRITE_BUFFER); if(argc < 2) { PrintHelpMessage(); exit(1); } for(ctr=1; ctr [[options] ]...\n")); printf(_("\nOptions:\n")); printf(_(" -h --help: Get help (this message).\n")); printf(_(" --version: Get version info.\n")); /* printf(_(" -l : Specify which mixer line ATI card is connected to.\n")); */ printf(_(" -m : Specify which input to use (Composite, SVHS or TV).\n")); printf(_(" -v : Set volume.\n")); printf(_(" -c : Set channel.\n")); printf(_(" -s : Set capture size.\n")); printf(_("\nCommands:\n")); printf(_(" rec : record yuv file for n seconds to filename f.\n")); printf(_(" snap : capture a single ppm frame to filename f.\n")); /* printf(_(" tvout [on|off]: Turn tv-out signal on/off [not yet functional].\n")); */ printf(_("\nFor Example:\n")); printf(_(" atitv -c 10 rec 10 f1.yuv -c 11 rec 10 f2.yuv\n")); printf(_(" -This will change to channel 10, record 10 seconds to \"f1.yuv\"\n")); printf(_(" then change to channel 11 and record 10 seconds to \"f2.yuv\"\n")); printf(_(" atitv -m SVHS snap pic.ppm\n")); printf(_(" -This will change to the SVHS connector and capture one frame\n")); printf(_(" to \"pic.ppm\"\n")); gatos_terminate(); exit(1); } gatos-0.0.5/src/gatos.h0100644002411700123110000003616507026175441013370 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_GATOS_H #define GATOS_GATOS_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_GATOS_C #define WHERE #else #define WHERE extern #endif #ifdef __KERNEL__ #define RETURN0 return 0 #define RETURN(VALUE) return -VALUE #else #ifdef GATOS_GATOS_C #define RETURN(VALUE) return gatos_leave(VALUE) #else #define RETURN0 return 0 #define RETURN(VALUE) return (errno = VALUE) #endif #endif #include "config.h" #include "i18n.h" #include "channels.h" #define GATOSBUTTONS 1 #define NEWSOUNDMIXER 1 /* Use new mixer filtering, undef if you * want to use the old way. * * NOTE: gatos.mixerdev always containing * the *real* mixer channel (soundcard.h). */ typedef unsigned char u8 ; typedef unsigned short u16 ; typedef unsigned int u32 ; #define LIMIT(X,A,B) ((X)<(A)) ? (A) : ((X)>(B)) ? (B) : (X) #define ATICARDSMAX 8 struct gatosaticard { u32 busnum ; u32 cardnum ; u32 func ; u32 fbaddr ; u32 regaddr ; u32 biosaddr ; u16 vendorid ; u16 deviceid ; u16 revision ; u16 m64i2cinfo ; double dotclock ; double refclock ; int width ; int bus ; char *ident ; char *name ; char pciaddr[16] ; u8 m64mminfo[5] ; u8 r128mminfo[12] ; u8 r128tvinfo[12] ; } ; struct gatosi2cchip { int deviceid ; int revision ; char* ident ; char* name ; u8 addr ; } ; struct gatosinfo { /* Vital info */ char statename[256] ; /* State file name */ int debug ; /* Verbose/debug flag */ int videoram ; /* Total amount of video RAM in kb */ int buffermem ; /* Video RAM reserved for GATOS in kb */ int bogomips ; /* CPU BogoMIPS rating */ int memfd ; /* /dev/mem filehandle */ int level ; /* gatos_enter/leave housekeeping */ int pending ; /* gatos_enter/leave housekeeping */ double refclock ; /* ATI chip refclock crystal frequency */ /* Real memory and video memory control */ u32 fbaddr ; /* FrameBuffer Aperture, */ u32 regaddr ; /* Register Aperture and */ u32 biosaddr ; /* BIOS adresses in real memory. */ u32 buffer0, buffer1 ;/* Video capture buffer offsets */ int captbufsize ; /* Max size of each capture buffer in kb */ /* Video window attributes */ u32 colorkey ; /* Color key */ int gamma, cold ; /* Gamma and red temp correction */ int xsize, ysize ; /* Size of video window */ int xpos, ypos ; /* Position of video window */ int xpan, ypan ; /* X virtual desktop panning (upper left corner) */ int video, mapped, visibility ; /* Window visibility housekeeping */ int donegeometry ; /* gatos_setgeometry called */ int xcapt, ycapt ; /* Capture buffer dimensions */ int xstart, ystart, xend, yend ; /* Cropped/zoomed subwindow position */ int hcaptidx, vcaptidx, hcaptmax, vcaptmax ; /* Monitor and X attributes */ int xdim, ydim ; /* Monitor resolution */ double dotclock ; /* Monitor pixelclock frequency in MHz */ int overclock ; /* Video source, format and attributes */ int tvout ; /* TV-Out enabled (boolean) */ int mux ; /* Video source (Bt829 MUX) */ int format ; /* Video format */ int ntsc, pal, secam ;/* Video format (boolean) */ int brightness, contrast, saturation, hue ; /* Bt829 settings */ /* Channel Management */ int channel ; int numchannels ; struct gatos_ChannelInfo channelinfo[MAX_CHANNELS] ; int tvtype ; /* Tuner */ int K ; /* Tuner PLL constant (frequency) */ int tuned ; /* Tuner frequency has been programmed */ double freq ; /* Tuner frequency in MHz */ double Fpc ; /* Video signal Picture Carrier freq in MHz */ double minfreq, maxfreq ; /* Tuner frequency range in MHz */ int senscan ; /* Use sensative channel scan */ int fm ; /* Select FM Tuner Audio, not TV Audio*/ /* I2C Driver Control */ int i2c_mode ; /* I2C Driver Number (1..5) */ u32 bugfix_mppread ; /* For TB Driver (i2cmpp.c) */ /* Misc (unsorted) */ int pid, usr1pid, stop, audio, chan ; char *extrastring[256]; int esn; /* Sound settings */ int mute, volume, stereo, sap ; int mixerfd, mixerdev, oldvol ; /* Closed captionning settings */ int CCmode; /* Chip info */ u8 boardinfo, tunertype ; /* Video board info byte and tuner type */ int cardtype, boardrev ; /* Card type and revision */ int audiotype ; /* Audio */ int nosa ; /* Disable stand-alone capture cards */ /* ATI and ImpacTV chips */ struct gatosaticard ati ; /* ATI graphics chip */ struct gatosi2cchip itv ; /* ImpacTV/2/2+ chip */ /* Video decoder, tuner and board control */ struct gatosi2cchip board ; /* PCF8574 8-bit I/O port (0x70 to 0x7E) */ struct gatosi2cchip bt829 ; /* Bt829 video decoder chip (0x88,8A) */ struct gatosi2cchip fi12xx ; /* FI12XX Tuner Module (0xC0,C2,C4,C6) */ struct gatosi2cchip eeprom ; /* EEPROM (0xA8) */ /* TeleText */ struct gatosi2cchip saa5281 ; /* SAA5281 TeleText decoder (0x22) */ /* Audio chips */ struct gatosi2cchip tda8425 ; /* TDA8425 stereo processor (0x82) */ struct gatosi2cchip tda9850 ; /* TDA9850 BTSC stereo+SAP (0xB4) */ struct gatosi2cchip tda9851 ; /* TDA9851 BTSC economic stereo (0xB6) */ struct gatosi2cchip msp3410 ; /* MSP3410 multi-sound processor (0x80) */ /* PCI info (ATI cards only) */ struct gatosaticard aticard[ATICARDSMAX] ; char *pciaddr ; /* PCI addr of ATI card to select */ int cardidx, aticards ; /* Index of selected ATI card, no. of cards */ } ; #define CC_FIFO_SIZE 16 struct CCdata { int num_valid; u8 data[CC_FIFO_SIZE]; u8 status[CC_FIFO_SIZE]; } ; /* CCdata.status bits */ #define CCS_EDS 0x01 /* Set when the data is EDS */ #define CCS_HIGH 0x02 /* Set when the data is the high byte (second byte read of word) */ #define CCS_OVER 0x04 /* Set when there was a FIFO overload before the read */ #define CCS_PAR 0x08 /* Set when there was an odd parity error */ /* Field "r128" is for Rage128, rest are Mach64 variants */ struct atiflags { /* Main chip type */ int gx:1, cx:1, ct:1, et:1, lt:1, lg:1, lt_c:1, vt:1, gt:1, r128:1 ; /* Capability flags */ int doesvtb:1, doesgtc:1, doesltc:1 ; /* Chip groups */ int lt_c1u1:1, lt_c2u1:1, lt_c2u2:1, lt_c2u3:1 ; /* lt_c */ int ltm:1, xlxc:1 ; /* lt_c */ int gt2c:1, gt_c:1 ; /* gt */ int gt2c_b3u1:1, gt2c_b3u2:1 ; /* gt & gt2c */ int gt_c1u1:1, gt_c1u2:1, gt_c2u1:1, gt_c2u2:1 ; /* gt & gt_c */ /* Specific chip asics */ int gx_c:1, gx_d:1, gx_e:1, gx_f:1 ; /* gx */ int lg_a1s1:1 ; /* lg */ /* lt_c */ int lb_c1u1:1, ld_c1u1:1, li_c1u1:1, lp_c1u1:1, lq_c1u1:1 ; /* lt_c1u1 */ int lb_c2u1:1, ld_c2u1:1, li_c2u1:1, lp_c2u1:1, lq_c2u1:1 ; /* lt_c2u1 */ int lb_c2u2:1, ld_c2u2:1, li_c2u2:1, lp_c2u2:1, lq_c2u2:1 ; /* lt_c2u2 */ int lb_c2u3:1, ld_c2u3:1, li_c2u3:1, lp_c2u3:1, lq_c2u3:1 ; /* lt_c2u3 */ int lm_a1t1:1, lr_a1t1:1 ; /* ltm */ int gm_a1t1:1, gn_a1t1:1, go_a1t1:1, gp_a1t1:1, gr_a1t1:1, gs_a1t1:1 ;/* xlxc */ /* vt */ int vt_a3n1:1, vt_a3s1:1, vt_a4n1:1, vt_a4s1:1 ; /* vt */ int vt_b1s1:1, vt_b2u1:1, vt_b2u2:1, vt_b2u3:1 ; /* vt */ /* gt */ int gt_a2s1:1, gt_b1s1:1, gt_b1s2:1 ; /* gt */ int gt_b2u1:1, gt_b2u2:1, gt_b2u3:1 ; /* gt */ /* gt & gt2c */ int gv_b3u1:1, gz_b3u1:1, gw_b3u1:1, gy_b3u1:1, vv_b3u1:1, vw_b3u1:1 ; /* gt2c_b3u1 */ int gv_b3u2:1, gz_b3u2:1, gw_b3u2:1, gy_b3u2:1, vv_b3u2:1, vw_b3u2:1 ; /* gt2c_b3u2 */ /* gt & gt_c */ int gd_c1u1:1, gp_c1u1:1, gi_c1u1:1, gb_c1u1:1 ; /* gt_c1u1 */ int gd_c1u2:1, gp_c1u2:1, gi_c1u2:1, gb_c1u2:1 ; /* gt_c1u2 */ int gd_c2u1:1, gp_c2u1:1, gi_c2u1:1, gb_c2u1:1, gq_c2u1:1 ; /* gt_c2u1 */ int gd_c2u2:1, gp_c2u2:1, gi_c2u2:1, gb_c2u2:1, gq_c2u2:1 ; /* gt_c2u2 */ } ; WHERE struct gatosinfo gatos ; WHERE struct atiflags ati ; /* ATI FrameBuffer Aperture Address */ WHERE volatile u8 *ATIFB ; /* ATI Mach64 and Rage128 Register Aperture Adresses */ WHERE volatile u32 *MEM_0, *MEM_1 ; WHERE volatile u8 *MMR ; WHERE int *hactive, *vactive ; #ifdef GATOSBUTTONS WHERE int gatosbuttons[GATOSBUTTONS] ; #endif #ifdef GATOS_GATOS_C static int hactive_pal[] = {96,192,384,576,720,768} ; static int vactive_pal[] = {72,144,288,432,540,576} ; static int hactive_ntsc[] = {80,160,320,480,600,640} ; static int vactive_ntsc[] = {60,120,240,360,450,480} ; #endif #ifdef GATOS_GATOS_C WHERE char *capturesizes[] = {"ICON", "QCIF", "CIF", "XCIF", "YCIF", "FULL"} ; #else WHERE char *capturesizes[] ; #endif #ifdef USE_DELAY_S WHERE unsigned long loops_per_sec ; #endif /* Debugging */ #define VERBOSE (gatos.debug&0x0001) #define GATOSCALL (gatos.debug&0x0002) #define I2CTRAFFIC (gatos.debug&0x0004) #define CHANNELMGMT (gatos.debug&0x0008) #define GATOSASYNC (gatos.debug&0x0010) #define GATOSQUIET 0x8000 /* Card types */ #define CARDTYPES 8 #define CARD_STAND_ALONE 1 #define CARD_INTEGRATED 2 #define CARD_EXTERNAL_POD 3 #define CARD_ALL_IN_WONDER 4 #define CARD_ALL_IN_WONDER_PRO 5 #define CARD_ALL_IN_WONDER_128 6 #define CARD_NEC 7 #define CARD_INTEL_BOARD 8 /* Audio types */ #define AUDIO_ANALOG 1 #define AUDIO_TDA8425 2 #define AUDIO_TDA9850 3 #define AUDIO_TDA9851 4 #define AUDIO_MSP3410 5 #define AUDIO_TEA5711 6 /* Mixer types */ #define NO_MIXER 0 /* No mixer available */ #define SNDCARD_MIXER 1 /* Soundcard mixer */ #define BRDCARD_MIXER 2 /* ATI card mixer */ #define BOTHCARDS_MIXER 3 /* Soundcard and ATI card mixers */ #define DISABLE_MIXER 0xFE /* Disable sound mixer support */ /* Video formats, follows Bt829 FORMAT (in IFORM register). */ #define NTSC_MN 1 /* NTSC-M/N US, many others */ #define NTSC_J 2 /* NTSC-J Japan */ #define PAL 3 /* PAL-B/G, D/K, H, I Many (Europe) */ #define PAL_M 4 /* PAL-M Brazil (NTSC-sized PAL) */ #define PAL_N 5 /* PAL-N Paraguay, Uruguay */ #define SECAM 6 /* SECAM East Europe, France, Middle East */ #define PAL_NC 7 /* PAL-Ncomb Argentina */ /* Closed Captionning mode 0 means turn circuitry off. To have both on, or them */ #define GET_CC 1 #define GET_EDS 2 /* Functions for gatos_init */ #define GATOS_TVOUT 1 #define GATOS_TUNER 2 #define GATOS_OVERLAY 4 #define GATOS_WRITE_BUFFER 8 #define GATOS_EXCLUSIVE 15 #define GATOS_READ_BUFFER 16 /* Routines that may (should!) be called before gatos_init() */ int gatos_verbosity(void) ; void gatos_setverbosity(int) ; int gatos_setpci(char*) ; /* GATOS API initialization/termination */ #ifdef GATOS_GATOS_C static void gatos_enter(char*, char*, ...) ; static int gatos_leave(int) ; #endif int gatos_init(int) ; int gatos_inita(void) ; int gatos_initb(void) ; int gatos_terminate(void) ; int gatos_configfile(void) ; int gatos_savestate(char*) ; int gatos_loadstate(char*) ; int gatos_getintvalue(char*, int*); int gatos_getstringvalue(char*, char*, int); int gatos_setintvalue(char*, int); int gatos_setstringvalue(char*, char*); /* ØAA Multi-capture board test */ int gatos_nosa(void) ; int gatos_setnosa(int) ; /* ØAA Test button stuff */ #ifdef GATOSBUTTONS int gatos_settestbutton(int, int) ; int gatos_testbutton(int) ; #endif /* */ int gatos_format(void) ; int gatos_setformat(int) ; int gatos_mux(void) ; int gatos_setmux(int) ; int gatos_tvout(void) ; int gatos_ismonitor(void) ; int gatos_settvout(int) ; /* Overlay stuff (CHANGING!) */ u32 gatos_colorkey(void) ; int gatos_setcolorkey(u32) ; void gatos_pollscreen(int) ; int gatos_setcapturesize(int, int) ; int gatos_setgeometry(int, int, int, int) ; int gatos_setsubgeometry(int, int, int, int) ; int gatos_xcaptmax(void) ; int gatos_ycaptmax(void) ; int gatos_xcaptmin(void) ; int gatos_ycaptmin(void) ; int gatos_xcapt(void) ; int gatos_ycapt(void) ; int gatos_xdim(void) ; int gatos_ydim(void) ; int gatos_xstart(void) ; int gatos_ystart(void) ; int gatos_xend(void) ; int gatos_yend(void) ; int gatos_setoverclock(int) ; int gatos_overclock(void) ; /* Closed Captioning / Teletext */ int gatos_setCC(int); int gatos_CC(void); int gatos_getCCdata(struct CCdata *); /* Audio/video enable/disable */ int gatos_enable_capture(int) ; int gatos_enable_sound(int) ; int gatos_enable_video(int) ; int gatos_setmapped(int) ; int gatos_setvisibility(int) ; /* Sound control */ int gatos_audiotype(void) ; int gatos_mixer(void) ; int gatos_setsoundmixer(int) ; int gatos_setmixer(int) ; int gatos_nummixers(void) ; char* gatos_mixername(int) ; char** gatos_mixernames(void) ; char** gatos_mixerlabels(void) ; #ifdef NEWSOUNDMIXER int gatos_filtmix(int) ; #endif /* NEWSOUNDMIXER */ int gatos_mute(void) ; int gatos_setmute(int) ; int gatos_volume(void) ; int gatos_setvolume(int) ; int gatos_stereo(void) ; int gatos_setstereo(int) ; int gatos_sap(void) ; int gatos_setsap(int) ; /* Channel management interface */ int gatos_tvtype(void) ; int gatos_settvtype(int) ; int gatos_disablechan(int) ; int gatos_enablechan(int) ; int gatos_chanenabled(int) ; int gatos_delchan(int) ; int gatos_addchan(double, char*) ; double gatos_chanscan(int(*)(double)) ; int gatos_setchan(int) ; int gatos_channel(void) ; int gatos_numchans(void) ; char* gatos_channame(int) ; int gatos_setchanname(int, char*) ; double gatos_chanfreq(int) ; int gatos_setchanfreq(int, double) ; int gatos_chanvolume(int) ; int gatos_setchanvolume(int, int) ; int gatos_chanbrightness(int) ; int gatos_setchanbrightness(int, int) ; int gatos_chancontrast(int) ; int gatos_setchancontrast(int, int) ; int gatos_chanhue(int) ; int gatos_setchanhue(int, int) ; int gatos_chansaturation(int) ; int gatos_setchansaturation(int, int) ; /* Tuner control */ double gatos_minfreq(void) ; double gatos_maxfreq(void) ; double gatos_tuner(void) ; int gatos_settuner(double) ; double gatos_scan(double, double, int(*)(double,char*), int(*)(double)) ; int gatos_senscan(void) ; int gatos_setsenscan(int) ; int gatos_fm(void) ; int gatos_setfm(int) ; /* Video control */ int gatos_brightness(void) ; int gatos_setbrightness(int) ; int gatos_contrast(void) ; int gatos_setcontrast(int) ; int gatos_saturation(void) ; int gatos_setsaturation(int) ; int gatos_hue(void) ; int gatos_sethue(int) ; int gatos_gamma(void) ; int gatos_setgamma(int) ; int gatos_cold(void) ; int gatos_setcold(int) ; /* Disk capture and playback */ #ifdef GATOS_GATOS_C static void gatos_stopchild(int) ; #if 0 /* NIY */ static void gatos_sigchild(int) ; #endif #endif int gatos_stop(void) ; int gatos_capture(char*, int) ; int gatos_playback(char*, int) ; /* Debugging */ void gatos_debug1(void) ; /* Dump Regs */ void gatos_debug2(void) ; /* I2C info */ void gatos_debug3(void) ; /* Unused */ void gatos_debug4(void) ; /* Unused */ /* */ int gatos_rgbcapture(unsigned char*) ; int gatos_setcaptidx(int, int) ; #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/sound.h0100644002411700123110000000560706776077351013414 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_SOUND_H #define GATOS_SOUND_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_SOUND_C #define WHERE #else #define WHERE extern #endif #include #if defined (__linux__) #include #include #elif defined (__NetBSD__) #include #else #include #endif #ifdef NEWSOUNDMIXER #if defined(__FreeBSD__) || defined(__NetBSD__) || LINUX_VERSION_CODE >= 0x20200 #define MIXER_FILTER_NRDEVICES 14 #define MIXER_FILTER_NAMES { \ "bass", "dig1", "dig2", "dig3", "igain", "mix", "ogain", \ "pcm", "pcm2", "phin", "phout", "rec", "synth", "treble" } #else #define MIXER_FILTER_NRDEVICES 9 #define MIXER_FILTER_NAMES { \ "bass", "igain", "mix", "ogain", "pcm", "pcm2", "rec", \ "synth", "treble" } #endif /* (__FreeBSD__) || (__NetBSD__) || LINUX_VERSION_CODE >= 0x20200 */ #define GATOS_MIXER_NRDEVICES (SOUND_MIXER_NRDEVICES - MIXER_FILTER_NRDEVICES) #endif /* NEWSOUNDMIXER */ #ifdef GATOS_SOUND_C WHERE char *mixer_names[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_NAMES ; WHERE char *mixer_labels[SOUND_MIXER_NRDEVICES] = SOUND_DEVICE_LABELS ; #ifdef NEWSOUNDMIXER char *mixer_filter_names[MIXER_FILTER_NRDEVICES] = MIXER_FILTER_NAMES ; #endif /* NEWSOUNDMIXER */ #else WHERE char *mixer_names[SOUND_MIXER_NRDEVICES] ; WHERE char *mixer_labels[SOUND_MIXER_NRDEVICES] ; #ifdef NEWSOUNDMIXER WHERE char *mixer_filter_names[MIXER_FILTER_NRDEVICES] ; #endif /* NEWSOUNDMIXER */ #endif /* GATOS_SOUND_C */ #ifdef NEWSOUNDMIXER char *gatos_mixer_names[GATOS_MIXER_NRDEVICES] ; char *gatos_mixer_labels[GATOS_MIXER_NRDEVICES]; int gatos_mixernum[GATOS_MIXER_NRDEVICES] ; #endif /* NEWSOUNDMIXER */ /* Sound function declarations */ int sound_init(void) ; int sound_restore(void) ; int sound_setvol(int) ; int sound_setmixer(int) ; int sound_nummixers() ; char* sound_mixername(int) ; char** sound_mixernames() ; char** sound_mixerlabels() ; #ifdef NEWSOUNDMIXER void sound_filter_mixers(void) ; int sound_getfiltnummixer(int) ; #endif /* NEWSOUNDMIXER */ #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/channels.h0100644002411700123110000000362406765053731014046 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_CHANNELS_H #define GATOS_CHANNELS_H 1 #ifdef __cplusplus extern "C" { #endif #define MAX_CHANNELS 512 #define MAX_CHANNEL_LEN 64 #define CHANNEL_SKIP 1 struct gatos_ChannelInfo { double frequency ; char name[MAX_CHANNEL_LEN] ; int mod_volume ; int mod_brightness ; int mod_saturation ; int mod_contrast ; int mod_hue ; int flags ; } ; int chan_init(void) ; void chan_clearchans() ; void chan_delchan(int c) ; int chan_addchan(double, char*) ; int chan_setname(int, char *) ; char* chan_name(int) ; double chan_setfreq(int, double) ; double chan_freq(int) ; int chan_volume(int) ; int chan_setvolume(int, int) ; int chan_brightness(int) ; int chan_setbrightness(int, int) ; int chan_contrast(int) ; int chan_setcontrast(int, int) ; int chan_hue(int) ; int chan_sethue(int, int) ; int chan_saturation(int) ; int chan_setsaturation(int, int) ; int chan_setflag(int, int) ; int chan_setflags(int, int) ; int chan_clearflag(int, int) ; int chan_flag(int, int) ; int chan_flags(int) ; #ifdef __cplusplus } #endif #endif gatos-0.0.5/src/freq.h0100644002411700123110000007323007027510123013171 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef FREQ_H #define FREQ_H 1 #ifdef __cplusplus extern "C" { #endif #define NUM_STANDARDS 26 typedef const double * freqlist; const double chanfreq_0[] = { /* No Standard */ 0.0 }; /********\ * NTSC * \********/ /* The following countries use, or are planning to use the NTSC(M) * for both VHF and UHF: * Antigua, Aruba, Bolivia, Canada, Chile, Colombia, Costa Rica, * Cuba, Caracas, Ecuador, Gustemala, Honduras, Japan, Mexico, * Nicuaragua, Panama, Peru, Philippines, Puerto Rico, South Korea, * USA, Venezuela. * * The following countries use, or are planning to use NTSC(M) for * only VHF broadcast system: * Belize, Bermuda, British Virgin Island, Burma, El Salvador, * Guam, Montserrat, Myanmar, Samoa, St Christopher And Nevis, * Suriname, Taiwan, Trinidad/Tobago. */ const double chanfreq_1[] = { /* NTSC-M North/South American Antenna */ /* NTSC(M) VHF North/South America */ /* 0-4 */ 0.0, 0.0, 55.25, 61.25, 67.25, /* 5-9 */ 77.25, 83.25, 175.25, 181.25, 187.25, /* 10-13 */ 193.25, 199.25, 205.25, 211.25, /* NTSC(M) UHF North/South America */ /* 14-18 */ 471.25, 477.25, 483.25, 489.25, 495.25, /* 19-23 */ 501.25, 507.25, 513.25, 519.25, 525.25, /* 24-28 */ 531.25, 537.25, 543.25, 549.25, 555.25, /* 29-33 */ 561.25, 567.25, 573.25, 579.25, 585.25, /* 34-38 */ 591.25, 597.25, 603.25, 609.25, 615.25, /* 39-43 */ 621.25, 627.25, 633.25, 639.25, 645.25, /* 44-48 */ 651.25, 657.25, 663.25, 669.25, 675.25, /* 49-53 */ 681.25, 687.25, 693.25, 699.25, 705.25, /* 54-58 */ 711.25, 717.25, 723.25, 729.25, 735.25, /* 59-63 */ 741.25, 747.25, 753.25, 759.25, 765.25, /* 64-68 */ 771.25, 777.25, 783.25, 789.25, 795.25, /* 69 */ 801.25 }; const double chanfreq_2[] = { /* NTSC-M North/South American Cable */ /* NTSC(M) Cable TV, North/South America */ /* 0-4 */ 0.0, 73.25, 55.25, 61.25, 67.25, /* 5-9 */ 77.25, 83.25, 175.25, 181.25, 187.25, /* 10-14 */ 193.25, 199.25, 205.25, 211.25, 121.25, /* 15-19 */ 127.25, 133.25, 139.25, 145.25, 151.25, /* 20-24 */ 157.25, 163.25, 169.25, 217.25, 223.25, /* 25-29 */ 229.25, 235.25, 241.25, 247.25, 253.25, /* 30-34 */ 259.25, 265.25, 271.25, 277.25, 283.25, /* 35-39 */ 289.25, 295.25, 301.25, 307.25, 313.25, /* 40-44 */ 319.25, 325.25, 331.25, 337.25, 343.25, /* 45-49 */ 349.25, 355.25, 361.25, 367.25, 373.25, /* 50-54 */ 379.25, 385.25, 391.25, 397.25, 403.25, /* 55-59 */ 409.25, 415.25, 421.25, 427.25, 433.25, /* 60-64 */ 439.25, 445.25, 451.25, 457.25, 463.25, /* 65-69 */ 469.25, 475.25, 481.25, 487.25, 493.25, /* 70-74 */ 499.25, 505.25, 511.25, 517.25, 523.25, /* 75-79 */ 529.25, 535.25, 541.25, 547.25, 553.25, /* 80-84 */ 559.25, 565.25, 571.25, 577.25, 583.25, /* 85-89 */ 589.25, 595.25, 601.25, 607.25, 613.25, /* 90-94 */ 619.25, 625.25, 631.25, 637.25, 643.25, /* 95-99 */ 91.25, 97.25, 103.25, 109.25, 115.25, /* 100-104 */ 649.25, 655.25, 661.25, 667.25, 673.25, /* 105-109 */ 679.25, 685.25, 691.25, 697.25, 703.25, /* 110-114 */ 709.25, 715.25, 721.25, 727.25, 733.25, /* 115-119 */ 739.25, 745.25, 751.25, 757.25, 763.25, /* 120-124 */ 769.25, 775.25, 781.25, 787.25, 793.25, /* 125 */ 799.25 }; const double chanfreq_3[] = { /* NTSC-M Japanese Antenna */ /* Channels 11 and 13 have same frequencies !! */ /* NTSC(M) VHF Japan */ /* 0-4 */ 0.0, 91.25, 97.25, 103.25, 171.25, /* 5-9 */ 177.25, 183.25, 189.25, 193.25, 199.25, /* 10-13 */ 205.15, 211.25, 217.25, 211.25, /* NTSC(M) UHF Japan */ /* 14-18 */ 471.25, 477.25, 483.25, 489.25, 495.25, /* 19-23 */ 501.25, 507.25, 513.25, 519.25, 525.25, /* 24-28 */ 531.25, 537.25, 543.25, 549.25, 555.25, /* 29-33 */ 561.25, 567.25, 573.25, 579.25, 585.25, /* 34-38 */ 591.25, 597.25, 603.25, 609.25, 615.25, /* 39-43 */ 621.25, 627.25, 633.25, 639.25, 645.25, /* 44-48 */ 651.25, 663.25, 669.25, 675.25, 681.25, /* 49-53 */ 687.25, 693.25, 699.25, 705.25, 711.25, /* 54-58 */ 717.25, 723.25, 729.25, 735.25, 741.25, /* 59-63 */ 747.25, 753.25, 759.25, 765.25, 765.25, /* 64-68 */ 771.25, 777.25, 783.25, 789.25, 795.25, /* 69 */ 801.25 }; const double chanfreq_4[] = { /* NTSC-M Japanese Cable */ /* NTSC(M) Cable TV, Japan */ /* 0-4 */ 0.0, 91.25, 97.25, 103.25, 171.25, /* 5-9 */ 177.25, 183.25, 189.25, 193.25, 199.25, /* 10-14 */ 205.25, 211.25, 217.25, 109.25, 115.25, /* 15-19 */ 121.25, 127.25, 133.25, 139.25, 145.25, /* 20-24 */ 151.25, 157.25, 165.25, 223.25, 231.25, /* 25-29 */ 237.25, 243.25, 249.25, 253.25, 259.25, /* 30-34 */ 265.25, 271.25, 277.25, 283.25, 289.25, /* 35-39 */ 295.25, 301.25, 307.25, 313.25, 319.25, /* 40-44 */ 325.25, 331.25, 337.25, 343.25, 349.25, /* 45-49 */ 355.25, 361.25, 367.25, 373.25, 379.25, /* 50-54 */ 385.25, 391.25, 397.25, 403.25, 409.25, /* 55-59 */ 415.25, 421.25, 427.25, 433.25, 439.25, /* 60-63 */ 445.25, 451.25, 457.25, 463.25 }; /*******\ * PAL * \*******/ /* PAL(B) is used for only VHF transmission, except for Australia. * Australia supports both VHF and UHF transmission. * * The following countries use PAL(B) for VHF transmission: * Albania, Algeria, Australia, Austria, Bahrain, Bangladesh, * Belgium, Bosnia-Herzegovina, Brunei Darussalam, Cambodia, * Cameroon, Croatia, Cyprus, Denmark, Egypt, Equatorial Guinea, * Ethiopia, Finland, Germany, Ghana, Gibraltar, Greenland, * Ireland, India, Indonesia, Israel, Italy, Jordan, Kenya, * Kuwait, Liberia, Libya, Luxembourg, Malaysia, Maldives, * Malta, Nepal, Netherlands, New Zealand, Nigeria, Norway, * Oman, Pakistan, Papua New Guinea, Portugal, Qatar, * Sao Tome and Principe, Saudi Arabia, Seychelles, Sierra Leone, * Singapore, Slovenia, Somali, Spain, Sri Lanka, Sudan, Swaziland, * Sweden, Switzerland, Syria, Thailand, Tunisia, Turkey, Uganda, * United Arab Emirates, Yemen. * * The following countries use PAL(G) for UHF transmission: * Albania, Algeria, Austria, Bahrain, Bosnia, Cambodia, Cameroon, * Crostia, Cyprus, Denmark, Egypt, Ethiopia, Equatorial Guinea, * Finland, Germania, Gilbratar, Greenland, Iceland, Israel, Italy, * Jordan, Kenya, Kuwait, Liberia, Libya, Luxembourg, Malysia, * Monaco, Mozambique, Netherlands, New Zealand, Norway, Oman, * Pakistan, Papua New Guinea, Portugal, Qatar, Romania, Sierra Leone, * Singapore, Slovenia, Somalia, Spain, Sri Lanka, Sudan, Swaziland, * Sweden, Switzerland, Syria, Thailand, Tunisia, Turkey, Yemen, * United Arab Emirates, Zambia, Zimbabwe. * * Only Belgium uses PAL(H), while Hong Kong and United Kingdom use * PAL(I) for UHF transmission. **** **** * PAL(G,H,I) * PAL(I) is used for both VHF and UHF transmission. PAL(G) and PAL(H) * are used only UHF transmission. * * The following countries use PAL(I) for VHF tansmission: * Angola, Botswana, Gambia, Guinea-Bissau, Ireland, Lesotho, * Malawi, Namibia, South Africa, Tanzania, United Kingdom, * Zanzibar. **** **** * PAL(D/K) is used for both VHF and UHF transmission. Korea and * Romania only support VHF. **** **** * PAL(M) is used for both VHF and UHF transmission. Only Brazil * use PAL(M). **** **** * PAL(N) is used for both VHF and UHF transmission. Argentina, Paraguay, * Uruguay are using PAL(N) for their broadcast TV. Uruguay only support * VHF transmission, and Argentina uses a modified PAL(N), called * "combination N". **** */ const double chanfreq_5[] = { /* PAL-B/G Cable */ /* PAL(B,G) Cable */ /* E 2-4 */ 0.0, 0.0, 48.25, 55.25, 62.25, /* E 5-9 */ 175.25, 182.25, 189.25, 196.25, 203.25, /* E 10-12 */ 210.25, 217.25, 224.25, /* S 01-03 */ 69.25, 76.25, 83.25, /* S 1-5 */ 105.25, 112.25, 119.25, 126.25, 133.25, /* S 6-10 */ 140.75, 147.75, 154.75, 161.75, 168.75, /* S 11-15 */ 231.25, 238.25, 245.25, 252.25, 259.25, /* S 16-20 */ 266.25, 273.25, 280.25, 287.25, 294.25, /* S 21-25 */ 303.25, 311.25, 319.25, 327.25, 335.25, /* S 26-30 */ 343.25, 351.25, 359.25, 367.25, 375.25, /* S 31-35 */ 383.25, 391.25, 399.25, 407.25, 415.25, /* S 36-40 */ 423.25, 431.25, 439.25, 447.25, 455.25, /* S 41 */ 463.25 }; const double chanfreq_6[] = { /* PAL-B Europe Antenna (except Italy, France, OIRT) */ /* PAL(B) VHF Europe */ /* 2-4 */ 0.0, 0.0, 48.25, 55.25, 62.25, /* 5-9 */ 175.25, 182.25, 189.25, 196.25, 203.25, /* 10-12 */ 210.25, 217.25, 224.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, /* PAL(B) UHF */ /* 21E-25E */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26E-27E */ 511.25, 519.25, /* 28-32 */ 527.25, 534.25, 541.25, 548.25, 555.25, /* 33-37 */ 562.25, 569.25, 576.25, 583.25, 590.25, /* 38-42 */ 597.25, 604.25, 611.25, 618.25, 625.25, /* 43-47 */ 632.25, 639.25, 646.25, 653.25, 660.25, /* 48-52 */ 667.25, 674.25, 681.25, 688.25, 695.25, /* 53-57 */ 702.25, 709.25, 716.25, 723.25, 730.25, /* 58-62 */ 737.25, 744.25, 751.25, 758.25, 765.25, /* 63-67 */ 772.25, 779.25, 786.25, 793.25, 800.25, /* 68-69 */ 807.25, 814.25 }; const double chanfreq_7[] = { /* PAL-B Australia Antenna */ /* PAL(B) VHF Australia */ /* 0-4 */ 46.25, 57.25, 64.25, 86.25, 95.25, /* 5,5A-8 */ 102.25, 138.25, 175.25, 182.25, 189.25, /* 9-11 */ 196.25, 209.25, 216.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, /* PAL(B) UHF */ /* 21E-25E */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26E-27E */ 511.25, 519.25, /* 28-32 */ 527.25, 534.25, 541.25, 548.25, 555.25, /* 33-37 */ 562.25, 569.25, 576.25, 583.25, 590.25, /* 38-42 */ 597.25, 604.25, 611.25, 618.25, 625.25, /* 43-47 */ 632.25, 639.25, 646.25, 653.25, 660.25, /* 48-52 */ 667.25, 674.25, 681.25, 688.25, 695.25, /* 53-57 */ 702.25, 709.25, 716.25, 723.25, 730.25, /* 58-62 */ 737.25, 744.25, 751.25, 758.25, 765.25, /* 63-67 */ 772.25, 779.25, 786.25, 793.25, 800.25, /* 68-69 */ 807.25, 814.25 }; const double chanfreq_8[] = { /* PAL-B+G New Zealand Antenna */ /* PAL(B) VHF New Zealand */ /* 1-4 */ 0.0, 45.25, 55.25, 62.25, 175.25, /* 5-9 */ 182.25, 189.25, 196.25, 203.25, 210.25, /* 10 */ 217.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_9[] = { /* PAL-B+G Italy Antenna */ /* PAL(B) VHF Italy */ /* A-E */ 53.75, 62.25, 82.25, 175.25, 183.75, /* F-H */ 192.25, 201.25, 210.25, /* H1-H2 */ 217.25, 224.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* */ 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_10[] = { /* PAL-I Ireland Antenna */ /* PAL(I) VHF Ireland */ /* A-E */ 45.75, 53.75, 61.75, 175.25, 183.25, /* F-J noI */ 191.25, 199.25, 207.25, 215.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* */ 0.0, 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_11[] = { /* PAL-I South Africa Antenna */ /* PAL(I) VHF South Africa */ /* 4 */ 0.0, 0.0, 0.0, 0.0, 175.25, /* 5-9 */ 183.25, 191.25, 199.25, 207.25, 215.25, /* 10-13 */ 223.25, 231.25, 239.25, 247.43, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_12[] = { /* PAL-I Angola Antenna */ /* PAL(I) VHF Angola */ /* 1-4 */ 0.0, 43.25, 52.25, 60.25, 175.25, /* 5-9 */ 193.25, 191.25, 199.25, 207.25, 215.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* */ 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_13[] = { /* PAL-B+G/H/I Many (Europe and others) */ /* PAL(B) VHF Europe */ /* 2-4 */ 0.0, 0.0, 48.25, 55.25, 62.25, /* 5-9 */ 175.25, 182.25, 189.25, 196.25, 203.25, /* 10-12 */ 210.25, 217.25, 224.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_14[] = { /* PAL-D/K China Antenna */ /* PAL(D/K) VHF China/Korea/Romania */ /* 1-4 */ 0.0, 49.75, 57.75, 65.75, 77.25, /* 5-9 */ 85.25, 168.25, 176.25, 184.25, 192.25, /* 10-12 */ 200.25, 208.25, 216.25, /* PAL(D/K) UHF */ /* 13-17 */ 471.25, 479.25, 487.25, 493.25, 503.25, /* 18-22 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 23-27 */ 551.25, 559.25, 607.25, 615.25, 623.25, /* 28-32 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 33-37 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 38-42 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 43-47 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 48-52 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 53-57 */ 831.25, 839.25, 847.25, 855.25, 863.25 }; const double chanfreq_15[] = { /* PAL-D/K+G Romania Antenna */ /* PAL(D/K) VHF China/Korea/Romania */ /* 1-4 */ 0.0, 49.75, 57.75, 65.75, 77.25, /* 5-9 */ 85.25, 168.25, 176.25, 184.25, 192.25, /* 10-12 */ 200.25, 208.25, 216.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, /* PAL(G,H,I) UHF */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-70 */ 831.25, 839.25, 847.25, 855.25, 863.25, /* 71-75 */ 871.25, 879.25, 887.25, 895.25, 903.25, /* 76-79 */ 911.25, 919.25, 927.25, 935.25 }; const double chanfreq_16[] = { /* PAL-D/K+? Korea Antenna */ /* PAL(D/K) VHF China/Korea/Romania */ /* 1-4 */ 0.0, 49.75, 57.75, 65.75, 77.25, /* 5-9 */ 85.25, 168.25, 176.25, 184.25, 192.25, /* 10-12 */ 200.25, 208.25, 216.25 }; const double chanfreq_17[] = { /* PAL-M Brazil Antenna */ /* PAL(M) VHF Brazil */ /* 2-4 */ 0.0, 0.0, 55.25, 61.25, 67.25, /* 5-9 */ 77.25, 83.25, 175.25, 181.25, 187.25, /* 10-13 */ 193.25, 199.25, 205.25, 211.25 }; const double chanfreq_18[] = { /* PAL-N Argentina/Paraguay/Uruguay Antenna */ /* PAL(N) VHF Argentina/Paraguay/Uruguay */ /* 2-4 */ 0.0, 0.0, 55.25, 61.25, 67.25, /* 5-9 */ 77.25, 83.25, 175.25, 181.25, 187.25, /* 10-13 */ 193.25, 199.25, 205.25, 211.25 }; const double chanfreq_19[] = { /* PAL-N+? Uruguay */ /* PAL(N) VHF Argentina/Paraguay/Uruguay */ /* 2-4 */ 0.0, 0.0, 55.25, 61.25, 67.25, /* 5-9 */ 77.25, 83.25, 175.25, 181.25, 187.25, /* 10-13 */ 193.25, 199.25, 205.25, 211.25 }; const double chanfreq_20[] = { /* PAL-combN Argentina */ /* PAL(N) VHF Argentina/Paraguay/Uruguay */ /* 2-4 */ 0.0, 0.0, 55.25, 61.25, 67.25, /* 5-9 */ 77.25, 83.25, 175.25, 181.25, 187.25, /* 10-13 */ 193.25, 199.25, 205.25, 211.25 }; /*********\ * SECAM * \*********/ /* SECAM(B) is used only for VHF transmission. * * The following countries use SECAM(B) system: * Djibouti, Iran, Iraq, Greece, Lenanon, Mali, Mauritania, Mauritius, * Morocco. **** **** * SECAM(D) * * The following countries use SECAM(D) system. SECAM(D) is used only * for VHF: * Afganistan, Armenia, Azerbaijan, Belarus, Bulgaria, Czech Republic, * Estonia, Georgia, Hungary, Kazaklhstan, Lithuania, Mogolia, * Moldova, Poland, Russia, Slovak Republic, Ukraine, Vietnam. **** **** * SECAM(G) * * The following countries use SECAM(G). SECAM(G) is used only for * UHF transmission: * Greece, Iran, Iraq, Mali, Mauritius, Morocco, Saudi Arabia. **** **** * SECAM(K) * * The following countries use SECAM(K). SECAM(K) is used only for * UHF transmission: * Armenia, Azerbaidjan, Bulgaria, Czech Republic, Estonia, Georgia, * Hungary, Kazakhstan, Lithuania, Madagascar, Moldova, Poland, * Russia, Slovak Republic, Ukraine, Vietnam. **** **** * SECAM(K1) * * The following countries use SECAM(K1). SECAM(K1) is used for both VHF * and UHF transmission unless only VHF or UHF is supported (as indicated * by V or U). * Benin, Burkina Faso, Burundi, Cape Verde, Central African Republic, * Chad, Comoros, Congo, Djibouti(V), Gabon, Madagascar(V), Niger, * Rwanda, Senegal, Togo, Zaire. **** **** * SECAM(L) * * Only France uses SECAM(L). SECAM(L) is used for both VHF and UHF * transmission. */ const double chanfreq_21[] = { /* SECAM(L) France Antenna */ /* SECAM(L) VHF France */ /* A-1 */ 47.75, 55.75, 63.75, 60.50, 176.00, /* 2-6 */ 184.00, 192.00, 200.00, 208.00, 216.00, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* */ 0.0, /* SECAM(G,H,I,K1,L) */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-69 */ 831.25, 839.25, 847.25, 855.25 }; const double chanfreq_22[] = { /* SECAM(B+G,H,I,K1,L) Italy Antenna */ /* SECAM(B) Italy */ /* A-E */ 53.75, 62.25, 82.25, 175.25, 183.75, /* F-H1 */ 192.25, 201.25, 210.25, 217.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* */ 0.0, 0.0, /* SECAM(G,H,I,K1,L) */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-69 */ 831.25, 839.25, 847.25, 855.25 }; const double chanfreq_23[] = { /* SECAM(B+G) Greece/Iran/Morocco Antenna */ /* Skip -3 */ 0.0, 0.0, 0.0, 0.0, /* SECAM(B) VHF Morocco */ /* 4-8 */ 163.25, 171.25, 179.25, 187.25, 195.25, /* 9-10 */ 203.25, 211.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* SECAM(G,H,I,K1,L) */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-69 */ 831.25, 839.25, 847.25, 855.25 }; const double chanfreq_24[] = { /* SECAM(D+K) Armenia/Russia/Vietnam Antenna */ 0.0 }; const double chanfreq_25[] = { /* SECAM(K1) Togo/Niger/Congo Antenna */ /* Skip -3 */ 0.0, 0.0, 0.0, 0.0, /* SECAM(K1) (Outre-Mer) */ /* K 4-8 */ 175.25, 183.25, 191.25, 199.25, 207.25, /* K 9 */ 215.25, /* Skip */ 0.0, 0.0, 0.0, 0.0, 0.0, /* -20 */ 0.0, 0.0, 0.0, 0.0, 0.0, /* */ 0.0, /* SECAM(G,H,I,K1,L) */ /* 21-25 */ 471.25, 479.25, 487.25, 495.25, 503.25, /* 26-30 */ 511.25, 519.25, 527.25, 535.25, 543.25, /* 31-35 */ 551.25, 559.25, 567.25, 575.25, 583.25, /* 36-40 */ 591.25, 599.25, 607.25, 615.25, 623.25, /* 41-45 */ 631.25, 639.25, 647.25, 655.25, 663.25, /* 46-50 */ 671.25, 679.25, 687.25, 695.25, 703.25, /* 51-55 */ 711.25, 719.25, 727.25, 735.25, 743.25, /* 56-60 */ 751.25, 759.25, 767.25, 775.25, 783.25, /* 61-65 */ 791.25, 799.25, 807.25, 815.25, 823.25, /* 66-69 */ 831.25, 839.25, 847.25, 855.25 }; const freqlist tvtype_chanfreq[NUM_STANDARDS] = { /* None */ chanfreq_0, chanfreq_1, /* NTSC-M North/South American Antenna */ chanfreq_2, /* NTSC-M North/South American Cable */ chanfreq_3, /* NTSC-M Japanese Antenna */ chanfreq_4, /* NTSC-M Japanese Cable */ chanfreq_5, /* PAL-B/G Cable */ chanfreq_6, /* PAL-B Europe Ant. (except Italy, France, OIRT) */ chanfreq_7, /* PAL-B Australia Antenna */ chanfreq_8, /* PAL-B+G New Zealand Antenna */ chanfreq_9, /* PAL-B+G Italy Antenna */ chanfreq_10,/* PAL-I Ireland Antenna */ chanfreq_11,/* PAL-I South Africa Antenna */ chanfreq_12,/* PAL-I Angola Antenna */ chanfreq_13,/* PAL-B+G/H/I Many (Europe and others) */ chanfreq_14,/* PAL-D/K China Antenna */ chanfreq_15,/* PAL-D/K+G Romania Antenna */ chanfreq_16,/* PAL-D/K+? Korea Antenna */ chanfreq_17,/* PAL-M Brazil Antenna */ chanfreq_18,/* PAL-N Argentina/Paraguay/Uruguay Antenna */ chanfreq_19,/* PAL-N+? Uruguay */ chanfreq_20,/* PAL-combN Argentina */ chanfreq_21,/* SECAM(L) France Antenna */ chanfreq_22,/* SECAM(B+G,H,I,K1,L) Italy Antenna */ chanfreq_23,/* SECAM(B+G) Greece/Iran/Morocco Antenna */ chanfreq_24,/* SECAM(D+K) Armenia/Russia/Vietnam Antenna */ chanfreq_25 /* SECAM(K1) Togo/Niger/Congo Antenna */ }; const int tvtype_chanmax[NUM_STANDARDS] = { /* None */ 128, 70, /* NTSC-M North/South American Antenna */ 126, /* NTSC-M North/South American Cable */ 70, /* NTSC-M Japanese Antenna */ 64, /* NTSC-M Japanese Cable */ 56, /* PAL-B/G Cable */ 70, /* PAL-B Europe Ant. (except Italy, France, OIRT) */ 70, /* PAL-B Australia Antenna */ 80, /* PAL-B+G New Zealand Antenna */ 80, /* PAL-B+G Italy Antenna */ 80, /* PAL-I Ireland Antenna */ 80, /* PAL-I South Africa Antenna */ 80, /* PAL-I Angola Antenna */ 80, /* PAL-B+G/H/I Many (Europe and others) */ 58, /* PAL-D/K China Antenna */ 80, /* PAL-D/K+G Romania Antenna */ 13, /* PAL-D/K+? Korea Antenna */ 14, /* PAL-M Brazil Antenna */ 14, /* PAL-N Argentina/Paraguay/Uruguay Antenna */ 14, /* PAL-N+? Uruguay */ 14, /* PAL-combN Argentina */ 70, /* SECAM(L) France Antenna */ 70, /* SECAM(B+G,H,I,K1,L) Italy Antenna */ 70, /* SECAM(B+G) Greece/Iran/Morocco Antenna */ 0, /* SECAM(D+K) Armenia/Russia/Vietnam Antenna */ 70 /* SECAM(K1) Togo/Niger/Congo Antenna */ }; const int tvtype_format[NUM_STANDARDS] = { /* None */ 0, 1, /* NTSC-M North/South American Antenna */ 1, /* NTSC-M North/South American Cable */ 2, /* NTSC-M Japanese Antenna */ 2, /* NTSC-M Japanese Cable */ 3, /* PAL-B/G Cable */ 3, /* PAL-B Europe Ant. (except Italy, France, OIRT) */ 3, /* PAL-B Australia Antenna */ 3, /* PAL-B+G New Zealand Antenna */ 3, /* PAL-B+G Italy Antenna */ 3, /* PAL-I Ireland Antenna */ 3, /* PAL-I South Africa Antenna */ 3, /* PAL-I Angola Antenna */ 3, /* PAL-B+G/H/I Many (Europe and others) */ 3, /* PAL-D/K China Antenna */ 3, /* PAL-D/K+G Romania Antenna */ 3, /* PAL-D/K+? Korea Antenna */ 4, /* PAL-M Brazil Antenna */ 5, /* PAL-N Argentina/Paraguay/Uruguay Antenna */ 5, /* PAL-N+? Uruguay */ 7, /* PAL-combN Argentina */ 6, /* SECAM(L) France Antenna */ 6, /* SECAM(B+G,H,I,K1,L) Italy Antenna */ 6, /* SECAM(B+G) Greece/Iran/Morocco Antenna */ 6, /* SECAM(D+K) Armenia/Russia/Vietnam Antenna */ 6 /* SECAM(K1) Togo/Niger/Congo Antenna */ }; char *tvtype_names[NUM_STANDARDS]; #ifdef __cplusplus } #endif #endif gatos-0.0.5/src/gatos-conf.cpp0100644002411700123110000006552207027320770014643 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "freq.h" #include "xutils.h" #include "version.h" #define NUM_I2C_MODES 6 /* * 5 modes + probe */ /* Default pathnames for XF86Config file */ char *xfreeconfigfile[] = { "/etc/XF86Config", "/etc/X11/XF86Config" }; static IWindow *mwin = NULL; static IListBox *formb = NULL; static ITextBox *forml = NULL; static ITextBox *buffertitle; static ISButton *bufb1 = NULL, *bufb2 = NULL, *bufb3 = NULL; static IIntBox *bufval = NULL; static ITextBox *videoramtitle; static ISButton *vramb1 = NULL, *vramb2 = NULL, *vramb3 = NULL; static ISButton *vramb4 = NULL, *vramb5 = NULL; static ISButton *ramprobedb; static ITextBox *i2cmodetitle = NULL; static IListBox *i2cmode = NULL; static IButton *quitsaveb = NULL; static IButton *quitabortb = NULL; static ITextBox *statusbar = NULL; void ResizeCB(IWindow *w, int x, int y); void tvtypeCB(IDoDad *p, IDoDad *d, int n); void i2cmodeCB(IDoDad *p, IDoDad *d, int n); void quitsaveCB(IDoDad *p, IDoDad *d, int n); void quitabortCB(IDoDad *p, IDoDad *d, int n); void KeyMappingCB(IWindow *w, XEvent *ev); void update_statusbar(void); void videoramselect(IDoDad *p, IDoDad *d, int x); void bufferselect(IDoDad *p, IDoDad *d, int x); void chbufval(IDoDad *p, IDoDad *d); void no_none_selected(IDoDad *p, IDoDad *d, int x); void videoramprobed(IDoDad *p, IDoDad *d, int x); int get_tvformat(int type); int get_tvtypeformat(int type); void updategui(void); void initgui(void); void initvar(void); void save_configfiles(void); void load_gatos_configfile(void); int save_gatos_configfile(void); void load_xfree_configfile(void); int save_xfree_configfile(void); int check_perms(void); void usage(void); int ixs, iys; // X and Y size of main window /* Some default values */ int videoramsize = 2048; int buffersize = 600; int i2cmodeselected = 0; int tvtypeselected = 0; int standardselected = 0; int ramwillprobed = 1; int xfreeline = -1; int xfree_videoramsize = 1448; //default value if gatos.conf not exist int xfree_videoram_line = -1; int display_endsection = -1; int videoramline[10]; //allow 10 video cards, because Xconfigurator // seems to put many "Device" sections char xfreeconfigname[128]; int xfree_path_overrided = 0; char *i2c_modes[NUM_I2C_MODES]; char *xfreeconf[256]; int gatos_conf_exist = -1; //remember if gatos.conf exist /* ------------------------------------------------------------------------ */ #define gerr(FMT,ARGS...) fprintf(stderr,FMT,##ARGS) /* ------------------------------------------------------------------------ */ int main(int argc, char **argv) { int i; bindtextdomain(PACKAGE, GATOS_LOCALEDIR); textdomain(PACKAGE); if(!check_perms()) { gerr(_("gatos-conf: this program must be run as root.\n")); exit(1); } for(i=1; iSetBufSize(ixs, iys); mwin->Map(); mwin->SetResizeCallback(ResizeCB); mwin->SetKeyMappingCallback(KeyMappingCB); /* Initialize some vars */ initvar(); /* Initialize buttons and lists */ initgui(); mwin->DispatchEvents(); } /* ------------------------------------------------------------------------ */ void ResizeCB(IWindow *w, int x, int y) { mwin->Resize(ixs, iys); mwin->RebuildClip(); XFlush(mwin->GetDisplay()); } /* ------------------------------------------------------------------------ */ void tvtypeCB(IDoDad *p, IDoDad *d, int n) { standardselected = n; tvtypeselected = get_tvformat(n); } /* ------------------------------------------------------------------------ */ void i2cmodeCB(IDoDad *p, IDoDad *d, int n) { i2cmodeselected = n; } /* ------------------------------------------------------------------------ */ void quitsaveCB(IDoDad *p, IDoDad *d, int n) { save_configfiles(); mwin->Close(); } /* ------------------------------------------------------------------------ */ void quitabortCB(IDoDad *p, IDoDad *d, int n) { mwin->Close(); } /* ------------------------------------------------------------------------ */ void KeyMappingCB(IWindow *w, XEvent *ev) { XRefreshKeyboardMapping(&ev->xmapping); } /* ------------------------------------------------------------------------ */ void update_statusbar(void) { int ramforx; char buf[128]; ramforx = (videoramsize - buffersize); sprintf(buf, _("Video RAM available for X: %dkb"), ramforx); if(ramforx <= 0 || ramforx >= videoramsize) { sprintf(buf, _("%s << problem!!"), buf); } /* Destroy status bar for update text !! */ if(statusbar != NULL) free(statusbar); statusbar = new ITextBox(buf, mwin, 0, (iys - 20), ixs, 20); statusbar->Show(); } /* ------------------------------------------------------------------------ */ void videoramselect(IDoDad *p, IDoDad *d, int x) { if(d == vramb1) { videoramsize = 2048; } else if(d == vramb2) { videoramsize = 4096; } else if(d == vramb3) { videoramsize = 8192; } else if(d == vramb4) { videoramsize = 16384; } else if(d == vramb5) { videoramsize = 32768; } if(d != vramb1 && vramb1->State() == 1) vramb1->Press(1, 0, 0); if(d != vramb2 && vramb2->State() == 1) vramb2->Press(1, 0, 0); if(d != vramb3 && vramb3->State() == 1) vramb3->Press(1, 0, 0); if(d != vramb4 && vramb4->State() == 1) vramb4->Press(1, 0, 0); if(d != vramb5 && vramb5->State() == 1) vramb5->Press(1, 0, 0); update_statusbar(); } /* ------------------------------------------------------------------------ */ void bufferselect(IDoDad *p, IDoDad *d, int x) { if(d == bufb1) { buffersize = 600; bufval->Disable(); } else if(d == bufb2) { buffersize = 864; bufval->Disable(); } else if(d == bufb3) { buffersize = ((IIntBox *)bufval)->GetVal(); bufval->Enable(); } if(d != bufb1 && bufb1->State() == 1) bufb1->Press(1, 0, 0); if(d != bufb2 && bufb2->State() == 1) bufb2->Press(1, 0, 0); if(d != bufb3 && bufb3->State() == 1) bufb3->Press(1, 0, 0); update_statusbar(); } /* ------------------------------------------------------------------------ */ void chbufval(IDoDad *p, IDoDad *d) { buffersize = ((IIntBox *)bufval)->GetVal(); update_statusbar(); } /* ------------------------------------------------------------------------ */ /* * Always one "button radio" must be selected. * Deselected all buttons in a "group" is avoided with this. */ void no_none_selected(IDoDad *p, IDoDad *d, int x) { if(d == vramb1 && (vramb1->State() == 0 && vramb2->State() == 0 && vramb3->State() == 0 && vramb4->State() == 0 && vramb5->State() == 0)) vramb1->Press(1, 0, 0); if(d == vramb2 && (vramb1->State() == 0 && vramb2->State() == 0 && vramb3->State() == 0 && vramb4->State() == 0 && vramb5->State() == 0)) vramb2->Press(1, 0, 0); if(d == vramb3 && (vramb1->State() == 0 && vramb2->State() == 0 && vramb3->State() == 0 && vramb4->State() == 0 && vramb5->State() == 0)) vramb3->Press(1, 0, 0); if(d == vramb4 && (vramb1->State() == 0 && vramb2->State() == 0 && vramb3->State() == 0 && vramb4->State() == 0 && vramb5->State() == 0)) vramb4->Press(1, 0, 0); if(d == vramb5 && (vramb1->State() == 0 && vramb2->State() == 0 && vramb3->State() == 0 && vramb4->State() == 0 && vramb5->State() == 0)) vramb5->Press(1, 0, 0); if(d == bufb1 && (bufb1->State() == 0 && bufb2->State() == 0 && bufb3->State() == 0)) bufb1->Press(1, 0 ,0); if(d == bufb2 && (bufb1->State() == 0 && bufb2->State() == 0 && bufb3->State() == 0)) bufb2->Press(1, 0 ,0); if(d == bufb3 && (bufb1->State() == 0 && bufb2->State() == 0 && bufb3->State() == 0)) bufb3->Press(1, 0 ,0); } /* ------------------------------------------------------------------------ */ void videoramprobed(IDoDad *p, IDoDad *d, int x) { if(d == ramprobedb && ramprobedb->State() == 1) ramwillprobed = 1; else ramwillprobed = 0; update_statusbar(); } /* ------------------------------------------------------------------------ */ int get_tvformat(int type) { return tvtype_format[type]; } /* ------------------------------------------------------------------------ */ int get_tvtypeformat(int type) { int i; for(i=0; iShow(); formb->Show(); videoramtitle->Show(); vramb1->Show(); vramb1->Show(); vramb2->Show(); vramb3->Show(); vramb4->Show(); vramb5->Show(); ramprobedb->Show(); buffertitle->Show(); bufb1->Show(); bufb2->Show(); bufb3->Show(); bufval->Show(); i2cmodetitle->Show(); i2cmode->Show(); quitsaveb->Show(); quitabortb->Show(); statusbar->Show(); mwin->RebuildClip(); XFlush(mwin->GetDisplay()); } /* ------------------------------------------------------------------------ */ void initgui(void) { int stsz = ((NUM_STANDARDS*13+6+9)/10)*10; int i2csz = ((NUM_I2C_MODES*13+6+9)/10)*10; videoramtitle = new ITextBox(_("RAM on Card"), mwin, 10, 10, 150, 20); vramb1 = new ISButton(_("2Mb"), mwin, 10, 30, 150, 20); vramb2 = new ISButton(_("4Mb"), mwin, 10, 50, 150, 20); vramb3 = new ISButton(_("8Mb"), mwin, 10, 70, 150, 20); vramb4 = new ISButton(_("16Mb"), mwin, 10, 90, 150, 20); vramb5 = new ISButton(_("32Mb"), mwin, 10, 110, 150, 20); vramb1->SetDownCallback(videoramselect); vramb1->SetUpCallback(no_none_selected); vramb2->SetDownCallback(videoramselect); vramb2->SetUpCallback(no_none_selected); vramb3->SetDownCallback(videoramselect); vramb3->SetUpCallback(no_none_selected); vramb4->SetDownCallback(videoramselect); vramb4->SetUpCallback(no_none_selected); vramb5->SetDownCallback(videoramselect); vramb5->SetUpCallback(no_none_selected); if(videoramsize == 2048 || videoramsize == 0) vramb1->Press(0, 0, 0); else if(videoramsize == 4096) vramb2->Press(0, 0, 0); else if(videoramsize == 8192) vramb3->Press(0, 0, 0); else if(videoramsize == 16384) vramb4->Press(0, 0, 0); else if(videoramsize == 32768) vramb5->Press(0, 0, 0); ramprobedb = new ISButton(_("Gatos will Probe RAM"), mwin, 10, 140, 150, 20); ramprobedb->SetDownCallback(videoramprobed); ramprobedb->SetUpCallback(videoramprobed); if(ramwillprobed) ramprobedb->Press(0, 0 ,0); buffertitle = new ITextBox(_("Buffer size"), mwin, 10, 175, 150, 20); bufb1 = new ISButton(_("600kb for NTSC"), mwin, 10, 195, 150, 20); bufb2 = new ISButton(_("864kb for PAL/SECAM"), mwin, 10, 215, 150, 20); bufb3 = new ISButton(_(">>"), mwin, 10, 235, 30, 20); bufb1->SetDownCallback(bufferselect); bufb1->SetUpCallback(no_none_selected); bufb2->SetDownCallback(bufferselect); bufb2->SetUpCallback(no_none_selected); bufb3->SetDownCallback(bufferselect); bufb3->SetUpCallback(no_none_selected); bufval = new IIntBox(0, mwin, 40, 235, 120, 20); bufval->SetMin(0); bufval->SetMax(32768); bufval->SetChangeCallback(chbufval); bufval->Disable(); if(buffersize == 600) { bufval->SetVal(buffersize); bufb1->Press(0, 0, 0); } else if(buffersize == 864) { bufval->SetVal(buffersize); bufb2->Press(0, 0, 0); } else { bufval->SetVal(buffersize); bufval->Enable(); bufb3->Press(0, 0, 0); } i2cmodetitle = new ITextBox(_("I2C mode selection"), mwin, 10, 270, 150, 20); i2cmode = new IListBox((char **)i2c_modes, NUM_I2C_MODES, mwin, 10, 290, 150, i2csz); i2cmode->SetSelCallback(i2cmodeCB); i2cmode->SetDCCallback(i2cmodeCB); i2cmode->Select(i2cmodeselected); forml = new ITextBox(_("Select Television Type"), mwin, 170, 10, 300, 20); formb = new IListBox((char **)tvtype_names, NUM_STANDARDS, mwin, 170, 30, 300, stsz); formb->SetSelCallback(tvtypeCB); formb->SetDCCallback(tvtypeCB); formb->Select(standardselected); quitsaveb = new IButton(_("Save & Quit"), mwin, 50, iys-50, 150, 20); quitsaveb->SetClickCallback(&quitsaveCB); quitabortb = new IButton(_("Abort"), mwin, ixs-200, iys-50, 150, 20); quitabortb->SetClickCallback(&quitabortCB); /* * Remember, statusbar ITextBox * is created/destroyed in update_statusbar() */ updategui(); } /* ------------------------------------------------------------------------ */ void initvar(void) { tvtype_names[0] = /* None */ _("Autodetect Autodetect video format"); tvtype_names[1] = /* NTSC */ _("NTSC North/South American TV Antenna"); tvtype_names[2] = _("NTSC North/South American Cable (CATV)"); tvtype_names[3] = _("NTSC Japanese TV Antenna"); tvtype_names[4] = _("NTSC Japanese TV Cable (CATV)"); tvtype_names[5] = /* PAL */ _("PAL-B/G Cable"); tvtype_names[6] = _("PAL-B Europe Antenna"); tvtype_names[7] = _("PAL-B Australia"); tvtype_names[8] = _("PAL-B+G New Zealand"); tvtype_names[9] = _("PAL-B+G Italy"); tvtype_names[10] = _("PAL-I Ireland"); tvtype_names[11] = _("PAL-I South Africa"); tvtype_names[12] = _("PAL-I Angola"); tvtype_names[13] = _("PAL-B+G/H/I Many (Europe and others)"); tvtype_names[14] = _("PAL-D/K China"); tvtype_names[15] = _("PAL-D/K+G Romania"); tvtype_names[16] = _("PAL-D/K+? Korea"); tvtype_names[17] = _("PAL-M Brazil"); tvtype_names[18] = _("PAL-N Paraguay"); tvtype_names[19] = _("PAL-N+? Uruguay"); tvtype_names[20] = _("PAL-combN Argentina"); tvtype_names[21] = /* SECAM */ _("SECAM-L France"); tvtype_names[22] = _("SECAM-B+G Italy"); tvtype_names[23] = _("SECAM-B+G Greece, Morocco"); tvtype_names[24] = _("SECAM-D+K Russia, Vietnam"); tvtype_names[25] = _("SECAM-K1 Togo, Niger, Congo"); i2c_modes[0] = _("Gatos autodection"); i2c_modes[1] = _("Register type A"); i2c_modes[2] = _("Register type B"); i2c_modes[3] = _("Rage PRO interface"); i2c_modes[4] = _("Register type LG"); i2c_modes[5] = _("MPP/ImpacTV interface"); load_gatos_configfile(); load_xfree_configfile(); } /* ------------------------------------------------------------------------ */ void save_configfiles() { if(!save_gatos_configfile()) { gerr(_("Unable to save %s\n"), CONFIGFILE); } if(!save_xfree_configfile()) { gerr(_("Unable to save %s\n"), xfreeconfigname); } } /* ------------------------------------------------------------------------ */ void load_gatos_configfile(void) { FILE *gatosconffile; char buf[256], *ln; /* Try to open the gatos.conf */ if((gatosconffile = fopen(CONFIGFILE, "r")) != NULL) { gatos_conf_exist = 1; ln = fgets(buf, 256, gatosconffile) ; while(ln != NULL) { if(!strncasecmp(ln, "#videoram", 9)) { while(*ln == ' ' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { videoramsize = strtol(ln, &ln, 10) ; ramwillprobed = 1; } } else if(!strncasecmp(ln, "videoram", 8)){ while(*ln == ' ' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { videoramsize = strtol(ln, &ln, 10) ; ramwillprobed = 0; } } else if(!strncasecmp(ln, "buffermem", 9)){ while(*ln == ' ' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { buffersize = strtol(ln, &ln, 10) ; } } else if(!strncasecmp(ln, "format", 6)){ while(*ln == ' ' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { tvtypeselected = strtol(ln, &ln, 10) ; while((*ln == ' ' || *ln == '\t' || *ln == '#') && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) { if(!strncasecmp(ln, "Standard", 8)){ while(*ln != ' ' && *ln != '=' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln; while((*ln == ' ' || *ln == '=' || *ln == '\t') && *ln != '\n' && *ln != 0) ++ln; while ((*ln == ' ' || *ln == ':' ) && *ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { standardselected = strtol(ln, &ln, 10) ; } } } } } else if(!strncasecmp(ln, "#i2c_mode", 9)){ while(*ln == ' ' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { i2cmodeselected = 0; } } else if(!strncasecmp(ln, "i2c_mode", 8)){ while(*ln == ' ' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { i2cmodeselected = strtol(ln, &ln, 10) ; } } ln = fgets(buf, 256, gatosconffile) ; } fclose(gatosconffile); } else { gerr(_("Unable to open %s\n"), CONFIGFILE); } } /* ------------------------------------------------------------------------ */ int save_gatos_configfile(void) { FILE *gcfg; char bck_name[256]; char strtmp[80]; /* Don't try to make a backup file if gatos.conf not exist before */ if(gatos_conf_exist == 1) { snprintf(bck_name, sizeof(bck_name), "%s.old", CONFIGFILE); /* Make a backup copy */ if(-1==rename(CONFIGFILE, bck_name)) gerr(_("Can't make backup file %s\n"), bck_name); } /* Try to open the gatos.conf */ if((gcfg = fopen(CONFIGFILE, "w")) != NULL) { fputs("# Sample config file, install as /usr/local/lib/gatos.conf\n", gcfg); fputs("# and edit/check videoram, buffermem and format.\n", gcfg); fputs("\n", gcfg); fputs("# Change to (full) amount of video RAM on your card !\n", gcfg); if(ramwillprobed == 0) { sprintf(strtmp, "videoram\t%d\t\t# Total size of video memory in kilobytes.\n", videoramsize); } else { sprintf(strtmp, "#videoram\t%d\t\t# Total size of video memory in kilobytes.\n", videoramsize); } fputs(strtmp, gcfg); fputs("\n", gcfg); fputs("# Change to amount of video RAM you've reserved for GATOS !\n", gcfg); fputs("# See also XF86Config.sample.\n", gcfg); /* check the reserved memory user defined */ if(buffersize <= 0 || buffersize >= videoramsize) { gerr("Wrong buffer size value, check your choices.\n"); buffersize = 600; } sprintf(strtmp, "buffermem\t%d\t\t# Size of reserved video memory in kilobytes.\n", buffersize); fputs(strtmp, gcfg); fputs("\n", gcfg); fputs("# TV signal format. Country\n", gcfg); fputs("#\n", gcfg); fputs("# 1 NTSC-M US and many others\n", gcfg); fputs("# 2 NTSC-Japan Japan\n", gcfg); fputs("# 3 PAL-B Many (Europe)\n", gcfg); fputs("# 3 PAL-D China\n", gcfg); fputs("# 3 PAL-G Many (Europe)\n", gcfg); fputs("# 3 PAL-H Belgium\n", gcfg); fputs("# 3 PAL-I Great Britain and others\n", gcfg); fputs("# 4 PAL-M Brazil (NTSC-like PAL format)\n", gcfg); fputs("# 5 PAL-N Paraguay, Uruguay\n", gcfg); fputs("# 6 SECAM East Europe, France, Middle East\n", gcfg); fputs("# 7 PAL-Ncomb Argentina\n", gcfg); fputs("#\n", gcfg); if(tvtypeselected == 0) { sprintf(strtmp, "#format\t\t%d\t# Standard=%d:%s.\n", tvtypeselected, standardselected, tvtype_names[standardselected]); } else { sprintf(strtmp, "format\t\t%d\t# Standard=%d:%s.\n", tvtypeselected, standardselected, tvtype_names[standardselected]); } fputs(strtmp, gcfg); fputs("\n", gcfg); fputs("# Uncomment and change if automatic I2C mode detection fails:\n", gcfg); fputs("# 1: Register type A: DAC_CNTL+GEN_TEST_CNTL Registers\n", gcfg); fputs("# 2: Register type B: GP_IO Register\n", gcfg); fputs("# 3: Rage PRO interface (I2C_CNTL_{0,1} registers)\n", gcfg); fputs("# 4: Register type LG: GP_IO Register\n", gcfg); fputs("# 5: MPP/ImpacTV interface\n", gcfg); if(i2cmodeselected == 0) { sprintf(strtmp,"#i2c_mode\t?\n"); } else { sprintf(strtmp,"i2c_mode\t%d\n", i2cmodeselected); } fputs(strtmp, gcfg); fclose(gcfg); return 1; } else { gerr(_("Unable to open %s\n"), CONFIGFILE); return -1; } return 0; } /* ------------------------------------------------------------------------ */ void load_xfree_configfile(void) { FILE *xfreeconffile; char buf[256], *ln; int endtmp = 0; int i, j, k = 0, xfreecfgfound = 0; for(i=0; i<256; i++) xfreeconf[i] = NULL; /* Now, try to open the XF86Config */ if(xfree_path_overrided) { // If XF86Config was defined by using -X parm strcpy(xfreeconfigname, xfreeconfigfile[3]); if((xfreeconffile = fopen(xfreeconfigname, "r")) != NULL) { xfreecfgfound = 1; } } else { // Try to find in defaults paths for(j=0; j<2; j++) { strcpy(xfreeconfigname, xfreeconfigfile[j]); if((xfreeconffile = fopen(xfreeconfigname, "r")) != NULL) { xfreecfgfound = 1; j = 1; } } } /* XF86Config found, good. */ if(xfreecfgfound) { xfreeline = 0; ln = fgets(buf, 256, xfreeconffile) ; while(ln != NULL) { xfreeconf[xfreeline] = (char *)malloc(strlen(ln)+1); strncpy(xfreeconf[xfreeline], ln, strlen(ln)+1); while((*ln == ' ' || *ln == '\t') && *ln != '\n' && *ln != 0) ++ln; if(!strncasecmp(ln, "VideoRam", 8)) { while((*ln == ' ' || *ln == '\t') && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln; if(*ln != '\n' && *ln != 0) ++ln; while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln ; if(*ln != '\n' && *ln != 0) { xfree_videoramsize = strtol(ln, &ln, 10) ; xfree_videoram_line = xfreeline; videoramline[k++] = xfreeline; endtmp = 1; } } else if(!strncasecmp(ln, "Section", 7)) { while (*ln != ' ' && *ln != '\t' && *ln != '\n' && *ln != 0) ++ln; while(*ln == ' ' || *ln == '\t') ++ln; if(!strncasecmp(ln, "\"Device\"", 8)) { endtmp = 1; } } else if(!strncasecmp(ln, "EndSection", 10) && endtmp == 1) { display_endsection = xfreeline; endtmp = 2; } ln = fgets(buf, 256, xfreeconffile) ; xfreeline++; } fclose(xfreeconffile); } else { if(xfree_path_overrided) gerr(_("Unable to open %s\n"), xfreeconfigfile[3]); else gerr(_("Unable to open %s or %s\n"), xfreeconfigfile[0], xfreeconfigfile[1]); } } /* ------------------------------------------------------------------------ */ int save_xfree_configfile(void) { FILE *xfcfg; char bck_name[256]; char strtmp[80]; int i, j = 0; snprintf(bck_name, sizeof(bck_name), "%s.old", xfreeconfigname); /* Make a backup copy */ if(-1==rename(xfreeconfigname, bck_name)) gerr(_("Can't make backup file %s\n"), bck_name); /* Try to open the XF86Config */ if(xfreeline != -1) { // XF86Config wasn't open/loaded if((xfcfg = fopen(xfreeconfigname, "w")) != NULL) { for(i=0; i * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ #if defined(__SVR4) #if !defined(SVR4) #define SVR4 #endif #endif #ifdef __EMX__ #define INCL_DOSFILEMGR #include #endif #include #include #if defined(SVR4) #if defined(sun) #ifndef __EXTENSIONS__ #define __EXTENSIONS__ #endif #endif #include #include #if defined(NCR) #define __STDC #include #undef __STDC #else #include #endif #if defined(__SUNPRO_C) || defined(sun) || defined(__sun) #include #else #include #endif #include #endif #if defined(__FreeBSD__) || defined(__386BSD__) #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__NetBSD__) #include #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__bsdi__) #include #include #include #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(SCO) || defined(ISC) #ifndef ISC #include #endif #include #include #include #include #include #include #include #endif #if defined(Lynx_22) #ifndef GCCUSESGAS #define GCCUSESGAS #endif #endif #if defined(__WATCOMC__) #include void outl(unsigned port, unsigned data); #pragma aux outl = "out dx, eax" parm [dx] [eax]; void outb(unsigned port, unsigned data); #pragma aux outb = "out dx, al" parm [dx] [eax]; unsigned inl(unsigned port); #pragma aux inl = "in eax, dx" parm [dx]; unsigned inb(unsigned port); #pragma aux inb = "xor eax,eax" "in al, dx" parm [dx]; #else /* __WATCOMC__ */ #if defined(__GNUC__) #if !defined(__alpha__) && !defined(__powerpc__) #if defined(GCCUSESGAS) #define OUTB_GCC "outb %0,%1" #define OUTL_GCC "outl %0,%1" #define INB_GCC "inb %1,%0" #define INL_GCC "inl %1,%0" #else #define OUTB_GCC "out%B0 (%1)" #define OUTL_GCC "out%L0 (%1)" #define INB_GCC "in%B0 (%1)" #define INL_GCC "in%L0 (%1)" #endif /* GCCUSESGAS */ static void outb(unsigned short port, unsigned char val) { __asm__ __volatile__(OUTB_GCC : :"a" (val), "d" (port)); } static void outl(unsigned short port, unsigned long val) { __asm__ __volatile__(OUTL_GCC : :"a" (val), "d" (port)); } static unsigned char inb(unsigned short port) { unsigned char ret; __asm__ __volatile__(INB_GCC : "=a" (ret) : "d" (port)); return ret; } static unsigned long inl(unsigned short port) { unsigned long ret; __asm__ __volatile__(INL_GCC : "=a" (ret) : "d" (port)); return ret; } #endif /* !defined(__alpha__) && !defined(__powerpc__) */ #else /* __GNUC__ */ #if defined(__STDC__) && (__STDC__ == 1) # if !defined(NCR) # define asm __asm # endif #endif #if defined(__SUNPRO_C) /* * This section is a gross hack in if you tell anyone that I wrote it, * I'll deny it. :-) * The leave/ret instructions are the big hack to leave %eax alone on return. */ unsigned char inb(int port) { asm(" movl 8(%esp),%edx"); asm(" subl %eax,%eax"); asm(" inb (%dx)"); asm(" leave"); asm(" ret"); } unsigned short inw(int port) { asm(" movl 8(%esp),%edx"); asm(" subl %eax,%eax"); asm(" inw (%dx)"); asm(" leave"); asm(" ret"); } unsigned long inl(int port) { asm(" movl 8(%esp),%edx"); asm(" inl (%dx)"); asm(" leave"); asm(" ret"); } void outb(int port, unsigned char value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outb (%dx)"); } void outw(int port, unsigned short value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outw (%dx)"); } void outl(int port, unsigned long value) { asm(" movl 8(%esp),%edx"); asm(" movl 12(%esp),%eax"); asm(" outl (%dx)"); } #else #if defined(SVR4) # if !defined(__USLC__) # define __USLC__ # endif #endif #ifndef SCO325 # include #else # include "scoasm.h" #endif #endif /* SUNPRO_C */ #endif /* __GNUC__ */ #endif /* __WATCOMC__ */ #if defined(__alpha__) #if defined(linux) #include #define BUS(tag) (((tag)>>16)&0xff) #define DFN(tag) (((tag)>>8)&0xff) int pciconfig_read( unsigned char bus, unsigned char dfn, unsigned char off, unsigned char len, void * buf) { return syscall(__NR_pciconfig_read, bus, dfn, off, len, buf); } int pciconfig_write( unsigned char bus, unsigned char dfn, unsigned char off, unsigned char len, void * buf) { return syscall(__NR_pciconfig_write, bus, dfn, off, len, buf); } #else Generate compiler error - scanpci unsupported on non-linux alpha platforms #endif /* linux */ #endif /* __alpha__ */ #if defined(Lynx) && defined(__powerpc__) /* let's mimick the Linux Alpha stuff for LynxOS so we don't have * to change too much code */ #include unsigned char *pciConfBase; static __inline__ unsigned long swapl(unsigned long val) { unsigned char *p = (unsigned char *)&val; return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0)); } #define BUS(tag) (((tag)>>16)&0xff) #define DFN(tag) (((tag)>>8)&0xff) #define PCIBIOS_DEVICE_NOT_FOUND 0x86 #define PCIBIOS_SUCCESSFUL 0x00 int pciconfig_read( unsigned char bus, unsigned char dev, unsigned char offset, int len, /* unused, alway 4 */ unsigned long *val) { unsigned long _val; unsigned long *ptr; dev >>= 3; if (bus || dev >= 16) { *val = 0xFFFFFFFF; return PCIBIOS_DEVICE_NOT_FOUND; } else { ptr = (unsigned long *)(pciConfBase + ((1<>= 3; _val = swapl(val); if (bus || dev >= 16) { return PCIBIOS_DEVICE_NOT_FOUND; } else { ptr = (unsigned long *)(pciConfBase + ((1< 0) { pcr._pcibuses[pcr._pcinumbus++] = pcr._secondary_bus_number; } break; case PCI_CLASS_BRIDGE: if ( ++hostbridges > 1) { pcr._pcibuses[pcr._pcinumbus] = pcr._pcinumbus; pcr._pcinumbus++; } break; default: break; } if((func==0) && ((pcr._header_type & PCI_MULTIFUNC_DEV) == 0)) { /* not a multi function device */ func = 8; } else { func++; } if (idx++ >= MAX_PCI_DEVICES) continue; identify_card(&pcr, verbose); } while( func < 8 ); } } while (++pcr._pcibusidx < pcr._pcinumbus); } #if !defined(__alpha__) && !defined(__powerpc__) /* Now try pci config 2 probe (deprecated) */ if ((pcr._configtype == 2) || do_mode2_scan) { outb(PCI_MODE2_ENABLE_REG, 0xF1); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ printf("\nPCI probing configuration type 2\n"); pcr._pcibuses[0] = 0; pcr._pcinumbus = 1; pcr._pcibusidx = 0; idx = 0; do { for (pcr._ioaddr = 0xC000; pcr._ioaddr < 0xD000; pcr._ioaddr += 0x0100){ outb(PCI_MODE2_FORWARD_REG, pcr._pcibuses[pcr._pcibusidx]); /* bus 0 for now */ pcr._device_vendor = inl(pcr._ioaddr); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ if ((pcr._vendor == 0xFFFF) || (pcr._device == 0xFFFF)) continue; if ((pcr._vendor == 0xF0F0) || (pcr._device == 0xF0F0)) continue; /* catch ASUS P55TP4XE motherboards */ printf("\npci bus 0x%x slot at 0x%04x, vendor 0x%04x device 0x%04x\n", pcr._pcibuses[pcr._pcibusidx], pcr._ioaddr, pcr._vendor, pcr._device); outb(PCI_MODE2_FORWARD_REG, pcr._pcibuses[pcr._pcibusidx]); /* bus 0 for now */ pcr._status_command = inl(pcr._ioaddr + 0x04); pcr._class_revision = inl(pcr._ioaddr + 0x08); pcr._bist_header_latency_cache = inl(pcr._ioaddr + 0x0C); pcr._base0 = inl(pcr._ioaddr + 0x10); pcr._base1 = inl(pcr._ioaddr + 0x14); pcr._base2 = inl(pcr._ioaddr + 0x18); pcr._base3 = inl(pcr._ioaddr + 0x1C); pcr._base4 = inl(pcr._ioaddr + 0x20); pcr._base5 = inl(pcr._ioaddr + 0x24); pcr._baserom = inl(pcr._ioaddr + 0x30); pcr._max_min_ipin_iline = inl(pcr._ioaddr + 0x3C); pcr._user_config = inl(pcr._ioaddr + 0x40); outb(PCI_MODE2_FORWARD_REG, 0x00); /* bus 0 for now */ /* check for pci-pci bridges (currently we only know Digital) */ if ((pcr._vendor == 0x1011) && (pcr._device == 0x0001)) if (pcr._secondary_bus_number > 0) pcr._pcibuses[pcr._pcinumbus++] = pcr._secondary_bus_number; if (idx++ >= MAX_PCI_DEVICES) continue; identify_card(&pcr, verbose); } } while (++pcr._pcibusidx < pcr._pcinumbus); outb(PCI_MODE2_ENABLE_REG, 0x00); } #endif /* __alpha__ */ disable_os_io(); } void identify_card(struct pci_config_reg *pcr, int verbose) { int i = 0, j, foundit = 0; while (pvd[i].vendorname != (char *)NULL) { if (pvd[i].vendor_id == pcr->_vendor) { j = 0; printf(" %s ", pvd[i].vendorname); while (pvd[i].device[j].devicename != (char *)NULL) { if (pvd[i].device[j].device_id == pcr->_device) { printf("%s", pvd[i].device[j].devicename); foundit = 1; break; } j++; } } if (foundit) break; i++; } if (!foundit) printf(" Device unknown\n"); else { printf("\n"); if (verbose) { if (pvd[i].device[j].print_func != (void (*)())NULL) { pvd[i].device[j].print_func(pcr); return; } } } if (verbose) { if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); if (pcr->_base0) printf(" BASE0 0x%08x addr 0x%08x %s\n", pcr->_base0, pcr->_base0 & (pcr->_base0 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base0 & 0x1 ? "I/O" : "MEM"); if (pcr->_base1) printf(" BASE1 0x%08x addr 0x%08x %s\n", pcr->_base1, pcr->_base1 & (pcr->_base1 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base1 & 0x1 ? "I/O" : "MEM"); if (pcr->_base2) printf(" BASE2 0x%08x addr 0x%08x %s\n", pcr->_base2, pcr->_base2 & (pcr->_base2 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base2 & 0x1 ? "I/O" : "MEM"); if (pcr->_base3) printf(" BASE3 0x%08x addr 0x%08x %s\n", pcr->_base3, pcr->_base3 & (pcr->_base3 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base3 & 0x1 ? "I/O" : "MEM"); if (pcr->_base4) printf(" BASE4 0x%08x addr 0x%08x %s\n", pcr->_base4, pcr->_base4 & (pcr->_base4 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base4 & 0x1 ? "I/O" : "MEM"); if (pcr->_base5) printf(" BASE5 0x%08x addr 0x%08x %s\n", pcr->_base5, pcr->_base5 & (pcr->_base5 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0), pcr->_base5 & 0x1 ? "I/O" : "MEM"); if (pcr->_baserom) printf(" BASEROM 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); if (pcr->_user_config) printf(" BYTE_0 0x%02x BYTE_1 0x%02x BYTE_2 0x%02x BYTE_3 0x%02x\n", pcr->_user_config_0, pcr->_user_config_1, pcr->_user_config_2, pcr->_user_config_3); } } void print_mach64(struct pci_config_reg *pcr) { unsigned long sparse_io = 0; if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); if (pcr->_base0) printf(" APBASE 0x%08x addr 0x%08x\n", pcr->_base0, pcr->_base0 & (pcr->_base0 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0)); if (pcr->_base1) printf(" BLOCKIO 0x%08x addr 0x%08x\n", pcr->_base1, pcr->_base1 & (pcr->_base1 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0)); if (pcr->_base2) printf(" REGBASE 0x%08x addr 0x%08x\n", pcr->_base2, pcr->_base2 & (pcr->_base2 & 0x1 ? 0xFFFFFFFC : 0xFFFFFFF0)); if (pcr->_baserom) printf(" BASEROM 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); switch (pcr->_user_config_0 & 0x03) { case 0: sparse_io = 0x2ec; break; case 1: sparse_io = 0x1cc; break; case 2: sparse_io = 0x1c8; break; } printf(" SPARSEIO 0x%03x %s %s\n", sparse_io, pcr->_user_config_0 & 0x04 ? "Block IO enabled" : "Sparse IO enabled", pcr->_user_config_0 & 0x08 ? "Disable 0x46E8" : "Enable 0x46E8"); } void print_i128(struct pci_config_reg *pcr) { if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); printf(" MW0_AD 0x%08x addr 0x%08x %spre-fetchable\n", pcr->_base0, pcr->_base0 & 0xFFC00000, pcr->_base0 & 0x8 ? "" : "not-"); printf(" MW1_AD 0x%08x addr 0x%08x %spre-fetchable\n", pcr->_base1, pcr->_base1 & 0xFFC00000, pcr->_base1 & 0x8 ? "" : "not-"); printf(" XYW_AD(A) 0x%08x addr 0x%08x\n", pcr->_base2, pcr->_base2 & 0xFFC00000); printf(" XYW_AD(B) 0x%08x addr 0x%08x\n", pcr->_base3, pcr->_base3 & 0xFFC00000); printf(" RBASE_G 0x%08x addr 0x%08x\n", pcr->_base4, pcr->_base4 & 0xFFFF0000); printf(" IO 0x%08x addr 0x%08x\n", pcr->_base5, pcr->_base5 & 0xFFFFFF00); printf(" RBASE_E 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); } void print_pcibridge(struct pci_config_reg *pcr) { if (pcr->_status_command) printf(" STATUS 0x%04x COMMAND 0x%04x\n", pcr->_status, pcr->_command); if (pcr->_class_revision) printf(" CLASS 0x%02x 0x%02x 0x%02x REVISION 0x%02x\n", pcr->_base_class, pcr->_sub_class, pcr->_prog_if, pcr->_rev_id); if (pcr->_bist_header_latency_cache) printf(" BIST 0x%02x HEADER 0x%02x LATENCY 0x%02x CACHE 0x%02x\n", pcr->_bist, pcr->_header_type, pcr->_latency_timer, pcr->_cache_line_size); printf(" PRIBUS 0x%02x SECBUS 0x%02x SUBBUS 0x%02x SECLT 0x%02x\n", pcr->_primary_bus_number, pcr->_secondary_bus_number, pcr->_subordinate_bus_number, pcr->_secondary_latency_timer); printf(" IOBASE: 0x%02x00 IOLIM 0x%02x00 SECSTATUS 0x%04x\n", pcr->_io_base, pcr->_io_limit, pcr->_secondary_status); printf(" NOPREFETCH MEMBASE: 0x%08x MEMLIM 0x%08x\n", pcr->_mem_base, pcr->_mem_limit); printf(" PREFETCH MEMBASE: 0x%08x MEMLIM 0x%08x\n", pcr->_prefetch_mem_base, pcr->_prefetch_mem_limit); printf(" RBASE_E 0x%08x addr 0x%08x %sdecode-enabled\n", pcr->_baserom, pcr->_baserom & 0xFFFF8000, pcr->_baserom & 0x1 ? "" : "not-"); if (pcr->_max_min_ipin_iline) printf(" MAX_LAT 0x%02x MIN_GNT 0x%02x INT_PIN 0x%02x INT_LINE 0x%02x\n", pcr->_max_lat, pcr->_min_gnt, pcr->_int_pin, pcr->_int_line); } static int io_fd; #ifdef __EMX__ USHORT callgate[3] = {0,0,0}; #endif void enable_os_io() { #if defined(SVR4) || defined(SCO) || defined(ISC) #if defined(SI86IOPL) sysi86(SI86IOPL, 3); #else sysi86(SI86V86, V86SC_IOPL, PS_IOPL); #endif #endif #if defined(linux) iopl(3); #endif #if defined(__FreeBSD__) || defined(__386BSD__) || defined(__bsdi__) if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) { perror("/dev/console"); exit(1); } #if defined(__FreeBSD__) || defined(__386BSD__) if (ioctl(io_fd, KDENABIO, 0) < 0) { perror("ioctl(KDENABIO)"); exit(1); } #endif #if defined(__bsdi__) if (ioctl(io_fd, PCCONENABIOPL, 0) < 0) { perror("ioctl(PCCONENABIOPL)"); exit(1); } #endif #endif #if defined(__NetBSD__) #if !defined(USE_I386_IOPL) if ((io_fd = open("/dev/io", O_RDWR, 0)) < 0) { perror("/dev/io"); exit(1); } #else if (i386_iopl(1) < 0) { perror("i386_iopl"); exit(1); } #endif /* USE_I386_IOPL */ #endif /* __NetBSD__ */ #if defined(__OpenBSD__) if (i386_iopl(1) < 0) { perror("i386_iopl"); exit(1); } #endif /* __OpenBSD__ */ #if defined(MACH386) if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) { perror("/dev/iopl"); exit(1); } #endif #ifdef __EMX__ { HFILE hfd; ULONG dlen,action; APIRET rc; static char *ioDrvPath = "/dev/fastio$"; if (DosOpen((PSZ)ioDrvPath, (PHFILE)&hfd, (PULONG)&action, (ULONG)0, FILE_SYSTEM, FILE_OPEN, OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY, (ULONG)0) != 0) { fprintf(stderr,"Error opening fastio$ driver...\n"); fprintf(stderr,"Please install xf86sup.sys in config.sys!\n"); exit(42); } callgate[0] = callgate[1] = 0; /* Get callgate from driver for fast io to ports and other stuff */ rc = DosDevIOCtl(hfd, (ULONG)0x76, (ULONG)0x64, NULL, 0, NULL, (ULONG*)&callgate[2], sizeof(USHORT), &dlen); if (rc) { fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n", rc,dlen); DosClose(hfd); exit(42); } /* Calling callgate with function 13 sets IOPL for the program */ asm volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" : /*no outputs */ : /*no inputs */ : "eax","ebx","ecx","edx","cc"); DosClose(hfd); } #endif #if defined(Lynx) && defined(__powerpc__) pciConfBase = (unsigned char *) smem_create("PCI-CONF", (char *)0x80800000, 64*1024, SM_READ|SM_WRITE); if (pciConfBase == (void *) -1) exit(1); #endif } void disable_os_io() { #if defined(SVR4) || defined(SCO) || defined(ISC) #if defined(SI86IOPL) sysi86(SI86IOPL, 0); #else sysi86(SI86V86, V86SC_IOPL, 0); #endif #endif #if defined(linux) iopl(0); #endif #if defined(__FreeBSD__) || defined(__386BSD__) if (ioctl(io_fd, KDDISABIO, 0) < 0) { perror("ioctl(KDDISABIO)"); close(io_fd); exit(1); } close(io_fd); #endif #if defined(__NetBSD__) #if !defined(USE_I386_IOPL) close(io_fd); #else if (i386_iopl(0) < 0) { perror("i386_iopl"); exit(1); } #endif /* NetBSD1_1 */ #endif /* __NetBSD__ */ #if defined(__bsdi__) if (ioctl(io_fd, PCCONDISABIOPL, 0) < 0) { perror("ioctl(PCCONDISABIOPL)"); close(io_fd); exit(1); } close(io_fd); #endif #if defined(MACH386) close(io_fd); #endif #if defined(Lynx) && defined(__powerpc__) smem_create(NULL, (char *) pciConfBase, 0, SM_DETACH); smem_remove("PCI-CONF"); pciConfBase = NULL; #endif } gatos-0.0.5/src/cc.h0100644002411700123110000000441706765053731012641 0ustar bayleasr/**************************************************************************\ Closed Captionning decoding Initial version by Chrisitan Lupien (lupien@physics.utoronto.ca) This is part of the Gatos project: gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifdef __cplusplus extern "C" { #endif #define CC_ROWS 15 #define CC_COLUMNS 32 #define CC_INVSPACE 0xa0 /* this should be the same as BLOCK both I prefer keeping it different so I can eventually count the number of CC_BAD and turn caption off if it is to high */ #define CC_BAD 0x87 #define CC_ATTR_NORMAL 0x00 #define CC_ATTR_FLASH 0x01 #define CC_ATTR_ITALICS 0x04 #define CC_ATTR_UNDERLINE 0x08 #define CC_ATTR_WHITE 0x00 #define CC_ATTR_GREEN 0x10 #define CC_ATTR_BLUE 0x20 #define CC_ATTR_CYAN 0x30 #define CC_ATTR_RED 0x40 #define CC_ATTR_YELLOW 0x50 #define CC_ATTR_MAGENTA 0x60 #define CC_ATTR_BACK 0x70 #define CC_ATTR_NEWCHAR 0x100 struct ccdata { int num_row; int *clrflag; // the display driver can clear this int *row; unsigned char (*text)[CC_COLUMNS]; int (*attrib)[CC_COLUMNS]; // the display driver can clear CC_ATTR_NEWCHAR }; #define EDS_BUFMAX 64 struct edsdata { int num; // the number of non-zero code since last reset. int cur; char buf[EDS_BUFMAX]; // fill it in a loop using cur: cyclic buffer }; void cc_hook(void); void cc_mode(int); void cc_reset(void); struct ccdata * cc_get_data(void); struct edsdata * eds_get_data(void); #define CC_MODE_CC1 0x00 #define CC_MODE_CC2 0x01 #define CC_MODE_TEXT1 0x02 #define CC_MODE_TEXT2 0x03 #ifdef __cplusplus } #endif gatos-0.0.5/src/xatitv.cpp0100644002411700123110000023320007030356226014107 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef USE_DGA #include #define private pprivate #include XF86VidModeModeInfo oldv; #endif USE_DGA #include "config.h" #include "gatos.h" #include "freq.h" #include "cc.h" #include "xutils.h" #include "version.h" #ifdef USE_IPC #include "ipc.h" #endif extern int errno; static IWindow *mwin = NULL; static Window icon; static IButton *aguib = NULL, *captguib = NULL, *chguib = NULL; static IButton *setupb = NULL; static ISButton *inp1 = NULL, *inp2 = NULL, *inp3 = NULL; static ISButton *coldb = NULL, *muteb = NULL, *stereob = NULL, *sapb = NULL; static ISButton *fullb = NULL, *deskb = NULL, *topb = NULL, *senscb = NULL; static IListBox *CCl = NULL; static IIntBox *dotb = NULL, *ahb = NULL; static ITextBox *dotl = NULL, *CCb = NULL; static ISButton *ahl = NULL, *CCt = NULL; #ifdef USE_DGA static ISButton *dgab = NULL; #endif USE_DGA static ISlider *gammas = NULL; static IRealBox *freq = NULL; static ISlider *svol = NULL, *sbr = NULL, *scnt = NULL, *shue = NULL; static ISlider *ssat = NULL; static ISlider *cvol = NULL, *cbr = NULL, *ccnt = NULL, *chue = NULL; static ISlider *csat = NULL; static IButton *scanb = NULL, *cadd = NULL, *crem = NULL, *creset = NULL; static IRealBox *cfreq = NULL; static IBox *nameb = NULL, *chnb = NULL; static IIntBox *chnum = NULL; static IButton *snapb = NULL, *recb = NULL, *stopb = NULL, *playb = NULL; static IButton *clearb = NULL; static IIntBox *xcaptb = NULL, *ycaptb = NULL; static IBox *captfl = NULL; static IListBox *formb = NULL, *mixerb = NULL; static ITextBox *forml = NULL, *optl = NULL, *mixl = NULL; static ISButton *svszb = NULL, *farb = NULL; static IButton *convertb = NULL, *rescanb = NULL, *doneb = NULL; static ITextBox *csitp1 = NULL, *csitb1 = NULL, *csitp2 = NULL, *csitb2 = NULL; static IStatBar *csisb = NULL; static IButton *cscan = NULL; #ifdef GATOSBUTTONS static IIntBox *testb[GATOSBUTTONS]; static ITextBox *testl[GATOSBUTTONS]; #endif GATOSBUTTONS #define MAXGUI 3 static double *stdfreq; static int maxstdchan=0; static int autohide = 200, useautohide = 200; static int full = 0, usedesk = 0, sdesk = 0, mapped = 0, ontop = 0; static int oldxp = 0, oldyp = 0, oldx = 0, oldy = 0, tmpfar; static int advgui=0, captgui=0, changui=0, setupgui=0, scangui=0, show=1; static int ixs, iys, svsz = 1, far = 1, lasttime; static int prevch, lprev=0, favch[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; static int ccmode = CC_MODE_CC1; static int paused = 0; static time_t ltime = 0; static struct timeval timeout; static int useCC = 0; #ifdef USE_DGA char *frame; int rowlen, bank, mem, depth, ctrx, ctry; static int usedga = 0; int fulldga = 0; #endif USE_DGA static int xcl = -1, ycl = -1; PALETTE pal; XImage *message = NULL; char *lastmessage = NULL; long lastmessagesize = -1; long lastmessage_x = -1, lastmessage_y = -1; long message_x = 10, message_y = 5; long messageon = 0; // int message_turn_gui_on = 0; // Don't want to Hide old GUI. XImage *channel = NULL; char *lastchannel = NULL; long lastchannelsize = -1; long lastchannel_x = -1, lastchannel_y = -1; long channel_x = 10, channel_y = 5; long channelon = 0; #define FIRST_MODE 0 #define MODE_VOLUME 0 #define MODE_BRIGHTNESS 1 #define MODE_CONTRAST 2 #define MODE_INPUT_SOURCE 3 #define MODE_CC 4 #define MODE_SAP 5 #define LAST_MODE 5 #define FREE_MODE (LAST_MODE+1) int message_mode = MODE_VOLUME; // char *mode_name[] = { // "Volume", // "Brightness", // "Contrast", // "Input", // "Caption", // "Sap" }; long cctexton = 0; int transparent_letters = -1; long cctext_x = 10, cctext_y = 50; long cctext_width = 1,cctext_height = 1; int cctext_repaint = 1; static long slideron = 0; /* tells whether the slider has been drawn */ static long slider_timeout = 180; long slider_x = 0, slider_y = 0; void toggleshow(void); void initgui(void); void updategui(void); void updatechgui(void); void ActivityCB(IWindow *w); void ExposeCB(IWindow *w); void ResizeCB(IWindow *w, int x, int y); void RepositionCB(IWindow *w, int x, int y); void OtherEventCB(IWindow *w, XEvent *ev); void ClickCB(IWindow *w, int, int, int); void DblClickCB(IWindow *w, int, int, int); void DragCB(IWindow *w, int, int, int); void ReleaseCB(IWindow *w, int, int, int); void KeyMappingCB(IWindow *w, XEvent *ev); void ButtonRadioReleaseCB(IWindow *w, int, int, int); void chchan(IDoDad *p, IDoDad *d); void snapcb(IDoDad *p, IDoDad *d, int); void reccb(IDoDad *p, IDoDad *d, int); void playcb(IDoDad *p, IDoDad *d, int); void stopcb(IDoDad *p, IDoDad *d, int); void clearcb(IDoDad *p, IDoDad *d, int); void chcfreq(IDoDad *p, IDoDad *d); void chfreq(IDoDad *p, IDoDad *d); void cremcb(IDoDad *p, IDoDad *d, int); void caddcb(IDoDad *p, IDoDad *d, int); void cresetcb(IDoDad *p, IDoDad *d, int); void loadstate(void); void savestate(void); void UP_CB(void); void DOWN_CB(void); void LEFT_CB(void); void RIGHT_CB(void); void deskCB(IDoDad *p, IDoDad *d, int x); void CCtCB(IDoDad *p, IDoDad *d, int x); void CCCB(IDoDad *p, IDoDad *d, int x); void ShowMessage(char *); void ShowChannel(char *); void ShowControl(void); void EraseMessage(void); void EraseChannel(void); void ShowCCStrings(void); void EraseCCStrings(void); void ShowCCText(void); void EraseCCText(void); void UniDrawRectangle(int x, int y, int width, int height, long color); void DrawSlider(long value, long maxvalue, int erase); void fullCB(IDoDad *p, IDoDad *d, int x); void dotCB(IDoDad *p, IDoDad *d); void ahCB(IDoDad *p, IDoDad *d); void ahlCB(IDoDad *p, IDoDad *d, int x); void senscCB(IDoDad *p, IDoDad *d, int x); #ifdef USE_DGA void dgaCB(IDoDad *p, IDoDad *d, int x); #endif USE_DGA void ResetAutoHide(); void visibility(XVisibilityEvent &); void OnTopAgain(int); int is_channel_enabled(void); #ifdef CC_CURSES #include "ccshow.h" #endif CC_CURSES #ifdef USE_IPC int playback_running = 0; #endif USE_IPC /* ------------------------------------------------------------------------ */ void hookfn(void) { #ifdef USE_IPC char tmpbuf[80]; if(playback_running) { if(ipc_receive_message((char *)&tmpbuf)) { if((strcmp(tmpbuf, "PLAYBACK-TERMINATED")) == 0) { gatos_stop(); stopb->Disable(); playb->Enable(); XFlush(mwin->GetDisplay()); playback_running = 0; } else if((strcmp(tmpbuf, "PLAYBACK-NOFILE")) == 0) { stopb->Disable(); playb->Enable(); XFlush(mwin->GetDisplay()); playback_running = 0; } } } #endif USE_IPC if(usedesk && sdesk) { XSetForeground(mwin->GetDisplay(), mwin->GetGC(), mwin->GetWinBGColor()); XFillRectangle(mwin->GetDisplay(), mwin->GetRootWindow(), mwin->GetGC(), 0, 0, mwin->XDeskSize(), mwin->YDeskSize()); } if(useautohide && show) { if(autohide) { --autohide; if(show && (!autohide)) { toggleshow(); XFlush(mwin->GetDisplay()); } } } if(useCC) { cc_hook(); #ifdef CC_CURSES cc_show(); #else ShowCCText(); XFlush(mwin->GetDisplay()); #endif CC_CURSES } if(slideron > 1) slideron--; if(slideron == 1) { DrawSlider(100, 100, 1); XFlush(mwin->GetDisplay()); slideron = 0; } if(channelon > 1) channelon--; if(channelon == 1) { EraseChannel(); XFlush(mwin->GetDisplay()); channelon = 0; } if(messageon > 1) messageon--; if(messageon == 1) { EraseMessage(); XFlush(mwin->GetDisplay()); messageon=0; // Don't want to hide old GUI - ISG // if(message_turn_gui_on) { // if(!show) toggleshow(); // message_turn_gui_on = 0; // XFlush(mwin->GetDisplay()); // } } #ifndef CC_CURSES if(cctexton > 1) cctexton--; if(cctexton == 1) { /* EraseCCText(); XFlush(mwin->GetDisplay()); */ cctexton = 0; } #endif CC_CURSES } /* ------------------------------------------------------------------------ */ int main(int argc, char **argv) { int i, verb = 0, chkdisp = 1; bindtextdomain(PACKAGE, GATOS_LOCALEDIR); textdomain(PACKAGE); for(i=1; iGetDisplay(), 0, (char**)&frame, &rowlen, &bank, &mem); #endif USE_DGA gatos_setverbosity(verb); if(VERBOSE) { fprintf(stderr, _("IBTK version %s\n"), IBTK_FULL_VERSION_STRING); fprintf(stderr, GetXVendorRelease(mwin->GetDisplay())); } int tmp = gatos_init(GATOS_OVERLAY|GATOS_TUNER|GATOS_WRITE_BUFFER|GATOS_READ_BUFFER); if(tmp == ENOENT) { printf(_("Configfile not found - Running gatos-conf.\n")); if(getuid()) { char buf[256]; printf(_("If prompted for a password, Enter root password to run gatos-conf.\n")); sprintf(buf, "su -c %s%c", GATOS_CONF, 0); system(buf); } else { system(GATOS_CONF); } printf(_("Continuing execution of xatitv.")); tmp = gatos_init(GATOS_OVERLAY|GATOS_TUNER|GATOS_WRITE_BUFFER|GATOS_READ_BUFFER); } if(tmp) { perror(_("xatitv: gatos_init()")); exit(1); } ixs = gatos_xcapt(); iys = gatos_ycapt(); prevch = gatos_channel(); loadstate(); mwin->SetBufSize(640, 480); // This IS correct, even for PAL --ISG mwin->Map(ixs, iys); mwin->SetUnhandledCallback(OtherEventCB); mwin->SetClickCallback(ClickCB); mwin->SetDblClickCallback(DblClickCB); mwin->SetDragCallback(DragCB); mwin->SetReleaseCallback(ReleaseCB); mwin->SetResizeCallback(ResizeCB); mwin->SetRepositionCallback(RepositionCB); mwin->SetExposeCallback(ExposeCB); mwin->SetActivityCallback(ActivityCB); mwin->SetKeyMappingCallback(KeyMappingCB); initgui(); if(gatos_setcolorkey(mwin->GetWinBGColor())) { perror(_("xatitv: gatos_setcolorkey()")); exit(1); } gatos_enable_sound(1); gatos_enable_video(1); gatos_enable_capture(1); /* createProtoImage(mwin->GetDisplay(),mwin->GetWindow()); fillPalette(mwin->GetDisplay(),mwin->GetWindow(),mwin->GetGC(),&pal); */ if(show) { show = 0; toggleshow(); } timeout.tv_sec = 0; timeout.tv_usec = 33000; /* 33 ms = one frame at for 60 HZ fields*/ mwin->RegisterHook(&hookfn, &timeout); mwin->DispatchEvents(); if(full) fullCB(fullb, fullb, 0); if(useautohide && (!autohide) && (!show)) { toggleshow(); XFlush(mwin->GetDisplay()); } savestate(); /* change 0 to 1 to get printout about hash effectiveness */ #if 0 print_xutils_stats(); #endif 0 #ifdef CC_CURSES cc_mode(-1); #endif CC_CURSES gatos_terminate(); } /* ------------------------------------------------------------------------ */ void chname(IDoDad *p, IDoDad *d) { int start = -1, ctr, done = 0, len = strlen(nameb->GetText()); if(len < 1) return; if(!strncasecmp(nameb->GetText(), gatos_channame(gatos_channel()), len)) { nameb->SetChangeCallback(NULL); nameb->SetText(chnb->GetText()); nameb->SetCurPos(nameb->CurPos(), strlen(nameb->GetText())); nameb->SetChangeCallback(chname); nameb->Redraw(); return; } for(ctr = 0; done == 0 && ctr < gatos_numchans(); ctr++) { if(!strncasecmp(nameb->GetText(), gatos_channame(ctr), len)) done = 1; /* if(done) printf("\"%s\" == \"%s\"\n", nameb->GetText(), gatos_channame(ctr)); else printf("\"%s\" != \"%s\"\n", nameb->GetText(), gatos_channame(ctr)); */ } if(nameb->CurPos() == (int)strlen(nameb->GetText())) start=nameb->CurPos(); if(done != 0) { chnum->SetVal(ctr-1); chnum->Redraw(); if(start >= 0) { nameb->SetCurPos(start, strlen(nameb->GetText())); } } } /* ------------------------------------------------------------------------ */ void chdesc(IDoDad *p, IDoDad *d) { if(gatos_mux() != 2) return; gatos_setchanname(gatos_channel(), ((IBox *)d)->GetText()); } /* ------------------------------------------------------------------------ */ void updatetextbox() { if(chnb == NULL) return; chnb->SetChangeCallback(NULL); if(gatos_mux() == 2 && gatos_numchans() < 1) { chnb->Disable(); chnum->Disable(); nameb->Disable(); return; } else if(gatos_mux() != 2) { chnb->Enable(); chnum->Disable(); nameb->Disable(); } else { chnb->Enable(); if(is_channel_enabled()) chnum->Enable(); else chnum->Disable(); nameb->Enable(); } if(gatos_mux() == 2) chnb->SetText(gatos_channame(gatos_channel())); else if(gatos_mux() == 3) chnb->SetText(_("S-Video Input")); else if(gatos_mux() == 1) chnb->SetText(_("Composite-Video Input")); else chnb->SetText(_("Not Connected")); chnb->SetChangeCallback(chdesc); chnb->Redraw(); nameb->SetChangeCallback(NULL); nameb->SetText(chnb->GetText()); nameb->SetChangeCallback(chname); nameb->Redraw(); char buf[256]; sprintf(buf, "XATITV-GATOS: %s%c", chnb->GetText(), 0); mwin->SetTitle(buf); } /* ------------------------------------------------------------------------ */ void keypress(XKeyEvent &e) { char buf[256]; KeySym key; int len; if(scangui) return; len = XLookupString(&e, buf, sizeof(buf), &key, NULL); switch(key) { case(XK_KP_Multiply): fullb->Press(0, 0, 0); break; case(XK_KP_Enter): case(XK_Return): ltime = 0; mwin->TakeFocus(NULL); break; case(XK_KP_Divide): muteb->Press(0, 0, 0); break; case(XK_quoteleft): CCt->Press(0, 0, 0); break; case(XK_less): case(XK_comma): mwin->Resize(mwin->XSize()/2, mwin->YSize()/2); break; case(XK_greater): case(XK_period): mwin->Resize(2*mwin->XSize(), 2*mwin->YSize()); break; case(XK_Print): snapcb(NULL, snapb, 0); break; case(XK_Pause): gatos_enable_capture(paused); paused = !paused; break; case(XK_Tab): #ifdef USE_DGA if(!fulldga) #endif USE_DGA toggleshow(); break; case(XK_Up): UP_CB(); break; case(XK_Down): DOWN_CB(); break; case(XK_Right): RIGHT_CB(); break; case(XK_Left): LEFT_CB(); break; case(XK_Escape): mwin->Close(); break; case(XK_KP_Add): chnum->Increment(); break; case(XK_KP_Subtract): chnum->Decrement(); break; case(XK_F1): { if(e.state & ControlMask) favch[0] = gatos_channel(); else if(favch[0] >= 0) { chnum->SetVal(favch[0]); chnum->Redraw(); } } break; case(XK_F2): { if(e.state & ControlMask) favch[1] = gatos_channel(); else if(favch[1] >= 0) { chnum->SetVal(favch[1]); chnum->Redraw(); } } break; case(XK_F3): { if(e.state & ControlMask) favch[2] = gatos_channel(); else if(favch[2] >= 0) { chnum->SetVal(favch[2]); chnum->Redraw(); } } break; case(XK_F4): { if(e.state & ControlMask) favch[3] = gatos_channel(); else if(favch[3] >= 0) { chnum->SetVal(favch[3]); chnum->Redraw(); } } break; case(XK_F5): { if(e.state & ControlMask) favch[4] = gatos_channel(); else if(favch[4] >= 0) { chnum->SetVal(favch[4]); chnum->Redraw(); } } break; case(XK_F6): { if(e.state & ControlMask) favch[5] = gatos_channel(); else if(favch[5] >= 0) { chnum->SetVal(favch[5]); chnum->Redraw(); } } break; case(XK_F7): { if(e.state & ControlMask) favch[6] = gatos_channel(); else if(favch[6] >= 0) { chnum->SetVal(favch[6]); chnum->Redraw(); } } break; case(XK_F8): { if(e.state & ControlMask) favch[7] = gatos_channel(); else if(favch[7] >= 0) { chnum->SetVal(favch[7]); chnum->Redraw(); } } break; case(XK_F9): gatos_debug1(); break; case(XK_F10): gatos_debug2(); break; case(XK_F11): gatos_debug3(); break; case(XK_F12): gatos_debug4(); break; case(XK_BackSpace): { int tmpc = gatos_channel(); chnum->SetVal(prevch); lprev = 1; prevch = tmpc; chnum->Redraw(); break; } default: { buf[len] = 0; if(buf[0] != 0 && buf[1] == 0) { switch(buf[0]) { case('0'): case('1'): case('2'): case('3'): case('4'): case('5'): case('6'): case('7'): case('8'): case('9'): { time_t ttime = time(NULL); if(ttime < ltime+2) { int v = (chnum->GetVal() * 10) + buf[0] - '0'; if(gatos_numchans() > 99 && v > gatos_numchans()) v %= 1000; else if(gatos_numchans() > 9 && v > gatos_numchans()) v %= 100; else if(v > gatos_numchans()) v %= 10; if(v > gatos_numchans()) v = gatos_numchans(); else if(v < 1) v = 1; chnum->SetVal(v); } else { chnum->SetVal(buf[0] - '0'); } ltime = ttime; // mwin->TakeFocus(chnum); chnum->Press(1,9,0); chnum->Redraw(); } break; case('<'): mwin->Resize(mwin->XSize()/2, mwin->YSize()/2); break; case('>'): mwin->Resize(2*mwin->XSize(), 2*mwin->YSize()); break; case('/'): muteb->Press(0, 0, 0); break; default: { if(show && (!setupgui)) { nameb->SetCurPos(0, strlen(nameb->GetText())); nameb->KeyDown(e); mwin->TakeFocus(nameb); nameb->Redraw(); } } break; } } // else printf(_("Pressed %.4X\n"), // XKeycodeToKeysym(mwin->GetDisplay(), e.keycode, 0)); } } } /* ------------------------------------------------------------------------ */ void DOWN_CB(void) { if(messageon) { message_mode--; if(message_mode < FIRST_MODE) message_mode = LAST_MODE; } ShowControl(); } /* ------------------------------------------------------------------------ */ void UP_CB(void) { if(messageon){ message_mode++; if(message_mode > LAST_MODE) message_mode = FIRST_MODE; } ShowControl(); } /* ------------------------------------------------------------------------ */ void RIGHT_CB(void) { if(messageon) switch(message_mode) { case MODE_VOLUME: svol->SetValue(svol->Value()+1); break; case MODE_BRIGHTNESS: if(sbr->Value() < sbr->Max()) sbr->SetValue(sbr->Value()+1); break; case MODE_CONTRAST: if(scnt->Value() < scnt->Max()) scnt->SetValue(scnt->Value()+1); break; case MODE_INPUT_SOURCE: if(gatos_mux() == 3 || gatos_mux() == 0) { inp3->Press(0, 0, 0); } else if(gatos_mux() == 1) { inp1->Press(0, 0, 0); } else { inp2->Press(0, 0, 0); } break; case MODE_SAP: sapb->Press(0, 0, 0); break; case MODE_CC: if(!useCC) ccmode = -1; ccmode++; if(ccmode >= 4) ccmode = -1; // CCCB(NULL,NULL,ccmode); if(ccmode == -1 && CCt->State()) CCt->Press(0, 0, 0); else if(ccmode >= 0 && (!CCt->State())) CCt->Press(0, 0, 0); if(ccmode >= 0) CCl->Select(ccmode); break; default: break; } ShowControl(); } /* ------------------------------------------------------------------------ */ void LEFT_CB(void) { if(messageon) switch(message_mode) { case MODE_VOLUME: svol->SetValue(svol->Value()-1); break; case MODE_BRIGHTNESS: if(sbr->Value() > sbr->Min()) sbr->SetValue(sbr->Value()-1); break; case MODE_CONTRAST: if(scnt->Value() > scnt->Min()) scnt->SetValue(scnt->Value()-1); break; case MODE_INPUT_SOURCE: if(gatos_mux() == 3 || gatos_mux() == 0) { inp2->Press(0, 0, 0); } else if(gatos_mux() == 1) { inp3->Press(0, 0, 0); } else { inp1->Press(0, 0, 0); } break; case MODE_SAP: stereob->Press(0, 0, 0); break; case MODE_CC: if(!useCC) ccmode = -1; ccmode--; if(ccmode < -1) ccmode = 3; // CCCB(NULL,NULL,ccmode); if(ccmode == -1 && CCt->State()) CCt->Press(0, 0, 0); else if(ccmode >= 0 && (!CCt->State())) CCt->Press(0, 0, 0); if(ccmode >= 0) CCl->Select(ccmode); break; default: break; } ShowControl(); } /* ------------------------------------------------------------------------ */ void ClickCB(IWindow *w, int b, int x, int y) { #ifdef USE_DGA if(!fulldga) { #endif USE_DGA if(b > 1 && (!scangui)) toggleshow(); else { xcl = x; ycl = y; } #ifdef USE_DGA } #endif USE_DGA } /* ------------------------------------------------------------------------ */ void DblClickCB(IWindow *w, int b, int x, int y) { if(b == 1) fullb->Press(0, 0, 0); } /* ------------------------------------------------------------------------ */ void DragCB(IWindow *w, int b, int x, int y) { if(xcl >= 0 && (b & Button1Mask)) { int x1, x2, y1, y2; x1 = x ? xcl; y1 = y ? ycl; if(farb->State()) { if((y2 - y1) > ((x2 - x1)*gatos_ycaptmax())/gatos_xcaptmax()) { if(ycl < y) y2 = y1+((x2 - x1)*gatos_ycaptmax())/gatos_xcaptmax(); else y1 = y2-((x2-x1)*gatos_ycaptmax())/gatos_xcaptmax(); } else { if(xcl < x) x2 = x1+((y2 - y1)*gatos_xcaptmax())/gatos_ycaptmax(); else x1 = x2-((y2 - y1)*gatos_xcaptmax())/gatos_ycaptmax(); } } XSetForeground(mwin->GetDisplay(), mwin->GetClipGC(), mwin->GetWinBGColor()); XFillRectangle(mwin->GetDisplay(), mwin->GetWindow(), mwin->GetClipGC(), 0, 0, mwin->XSize(), mwin->YSize()); XSetForeground(mwin->GetDisplay(), mwin->GetClipGC(), mwin->GetBGColor()); XDrawRectangle(mwin->GetDisplay(), mwin->GetWindow(), mwin->GetClipGC(), x1, y1, x2-x1, y2-y1); } } /* ------------------------------------------------------------------------ */ void ReleaseCB(IWindow *w, int b, int x, int y) { if(xcl >= 0) { if(x < 0) x = 0; if(y < 0) y = 0; if(x >= mwin->XSize()) x = mwin->XSize()-1; if(y >= mwin->YSize()) y = mwin->YSize()-1; int xp = gatos_xstart(), yp = gatos_ystart(); int xs = gatos_xend()-xp, ys = gatos_yend()-yp; int xb = (xcl ? x)+1, ye = (ycl >? y)+1; int x1 = xp+(xb*xs)/mwin->XSize(), y1 = yp+(yb*ys)/mwin->YSize(); int x2 = xp+(xe*xs)/mwin->XSize(), y2 = yp+(ye*ys)/mwin->YSize(); if(x1 >= x2-1 || y1 >= y2-1) { x1 = 0; y1 = 0; x2 = gatos_xcapt(); y2 = gatos_ycapt(); } else if(farb->State()) { if((y2 - y1) > ((x2 - x1)*gatos_ycaptmax())/gatos_xcaptmax()) { if(ycl < y) y2 = y1+((x2-x1)*gatos_ycaptmax())/gatos_xcaptmax(); else y1 = y2-((x2-x1)*gatos_ycaptmax())/gatos_xcaptmax(); } else { if(xcl < x) x2 = x1+((y2-y1)*gatos_xcaptmax())/gatos_ycaptmax(); else x1 = x2-((y2-y1)*gatos_xcaptmax())/gatos_ycaptmax(); } } gatos_setsubgeometry(x1, y1, x2, y2); XSetForeground(mwin->GetDisplay(), mwin->GetClipGC(), mwin->GetWinBGColor()); XFillRectangle(mwin->GetDisplay(), mwin->GetWindow(), mwin->GetClipGC(), 0, 0, mwin->XSize(), mwin->YSize()); xcl = -1; ycl = -1; } } /* ------------------------------------------------------------------------ */ void ResetAutoHide() { if(useautohide) { if((!show) && (!autohide)) toggleshow(); autohide = useautohide; } } /* ------------------------------------------------------------------------ */ void OtherEventCB(IWindow *w, XEvent *ev) { switch(ev->type) { case KeyPress: keypress(ev->xkey); break; case MapNotify: { /* mwin->Redraw(); */ mwin->RebuildClip(); cctext_repaint = 1; ShowCCText(); if(!mapped) createProtoImage(mwin->GetDisplay(), mwin->GetWindow()); if(!mapped) fillPalette(mwin->GetDisplay(), mwin->GetWindow(), mwin->GetGC(), &pal); if(!mapped && (transparent_letters < 0)) { if(get_actual_depth() == 8) transparent_letters=0; else transparent_letters = 1; } gatos_setgeometry(w->XSize(), w->YSize(), w->XPos(), w->YPos()); gatos_setmapped(1); mapped = 1; if(usedesk) { XClearWindow(mwin->GetDisplay(), mwin->GetRootWindow()); sdesk = 0; } cctext_repaint = 1; } break; case UnmapNotify: { if(!usedesk) { gatos_setmapped(0); mapped = 0; } else { XSetForeground(mwin->GetDisplay(), mwin->GetGC(), mwin->GetWinBGColor()); XFillRectangle(mwin->GetDisplay(), mwin->GetRootWindow(), mwin->GetGC(), 0, 0, mwin->XDeskSize(), mwin->YDeskSize()); gatos_setgeometry(mwin->XDeskSize(), mwin->YDeskSize(), 0, 0); sdesk = 1; } } break; case VisibilityNotify: visibility(ev->xvisibility); break; /* default: { if(desk && (!mapped)) { XSetForeground(mwin->GetDisplay(), mwin->GetGC(), mwin->GetWinBGColor()); XFillRectangle(mwin->GetDisplay(), mwin->GetRootWindow(), mwin->GetGC(), 0, 0, mwin->XDeskSize(), mwin->YDeskSize()); gatos_setgeometry(mwin->XDeskSize(), mwin->YDeskSize(), 0, 0); } }break; */ } } /* ------------------------------------------------------------------------ */ void ExposeCB(IWindow *w) { /*gatos_setgeometry(w->XSize(), w->YSize(), w->XPos(), w->YPos()); /ØAA */ } /* ------------------------------------------------------------------------ */ void ActivityCB(IWindow *w) { ResetAutoHide(); } /* ------------------------------------------------------------------------ */ void ResizeCB(IWindow *w, int x, int y) { if(usedesk && !mapped) return; if(far) { int xs = x, ys = y; if(xs != gatos.xsize && ys != gatos.ysize) { if(ys > (xs*gatos_ycaptmax())/gatos_xcaptmax()) ys = (xs*gatos_ycaptmax())/gatos_xcaptmax(); else xs = (ys*gatos_xcaptmax())/gatos_ycaptmax(); } else if(xs != gatos.xsize) { ys = (xs*gatos_ycaptmax())/gatos_xcaptmax(); } else if(ys != gatos.ysize) { xs = (ys*gatos_xcaptmax())/gatos_ycaptmax(); } if(xs != x || ys != y) mwin->Resize(xs, ys); } else gatos_setgeometry(w->XSize(), w->YSize(), w->XPos(), w->YPos()); mwin->RebuildClip(); } /* ------------------------------------------------------------------------ */ void RepositionCB(IWindow *w, int x, int y) { if(usedesk && !mapped) return; gatos_setgeometry(w->XSize(), w->YSize(), w->XPos(), w->YPos()); } /* ------------------------------------------------------------------------ */ /* Get new keyboard mapping .DCB */ void KeyMappingCB(IWindow *w, XEvent *ev) { XRefreshKeyboardMapping(&ev->xmapping); } /* ------------------------------------------------------------------------ */ void ButtonRadioReleaseCB(IDoDad *p, IDoDad *d, int x) { if(d == inp1 && (inp1->State() == 0 && inp2->State() == 0 && inp3->State() == 0)) inp1->Press(1, 0, 0); if(d == inp2 && (inp1->State() == 0 && inp2->State() == 0 && inp3->State() == 0)) inp2->Press(1, 0, 0); if(d == inp3 && (inp1->State() == 0 && inp2->State() == 0 && inp3->State() == 0)) inp3->Press(1, 0, 0); } /* ------------------------------------------------------------------------ */ void inp(IDoDad *p, IDoDad *d, int x) { int omux = gatos_mux(); if(d == inp1) { gatos_setmux(3); if(chnum != NULL) chnum->Disable(); } else if(d == inp2) { gatos_setmux(1); if(chnum != NULL) chnum->Disable(); } else if(d == inp3) { gatos_setmux(2); if(chnum != NULL) { chnum->Enable(); chchan(NULL, chnum); } } else { fprintf(stderr, _("Bad ButtonPress!\n")); exit(1); } if(d != inp1 && inp1->State() == 1) inp1->Press(1, 0, 0); if(d != inp2 && inp2->State() == 1) inp2->Press(1, 0, 0); if(d != inp3 && inp3->State() == 1) inp3->Press(1, 0, 0); updatetextbox(); if(omux != gatos_mux()) cc_reset(); } /* ------------------------------------------------------------------------ */ void chcapt(IDoDad *p, IDoDad *d) { gatos_setcapturesize(xcaptb->GetVal(), ycaptb->GetVal()); } /* ------------------------------------------------------------------------ */ void chfreq(IDoDad *p, IDoDad *d) { gatos_settuner(((IRealBox *)d)->GetVal()); } /* ------------------------------------------------------------------------ */ void chcfreq(IDoDad *p, IDoDad *d) { gatos_setchanfreq(gatos_channel(), ((IRealBox *)d)->GetVal()); } /* ------------------------------------------------------------------------ */ void csld(IDoDad *p, IDoDad *d, int x) { if(d == cvol) gatos_setchanvolume(gatos_channel(), x); else if(d == cbr) gatos_setchanbrightness(gatos_channel(), x); else if(d == ccnt) gatos_setchancontrast(gatos_channel(), x); else if(d == chue) gatos_setchanhue(gatos_channel(), x); else if(d == csat) gatos_setchansaturation(gatos_channel(), x); else { fprintf(stderr, _("Bad Slider Pressed!\n")); exit(1); } } /* ------------------------------------------------------------------------ */ void sld(IDoDad *p, IDoDad *d, int x) { if(d == svol) gatos_setvolume(x); else if(d == sbr) gatos_setbrightness(x); else if(d == scnt) gatos_setcontrast(x); else if(d == shue) gatos_sethue(x); else if(d == ssat) gatos_setsaturation(x); else if(d == gammas) gatos_setgamma(x); else { fprintf(stderr, _("Bad Slider Pressed!\n")); exit(1); } } /* ------------------------------------------------------------------------ */ #ifdef USE_DGA void dgaCB(IDoDad *p, IDoDad *d, int x) { if(full) { int tmpd = usedesk; usedesk = 0; fullb->Press( 0, 0, 0); usedesk = tmpd; } usedga = x; } #endif USE_DGA /* ------------------------------------------------------------------------ */ void senscCB(IDoDad *p, IDoDad *d, int x) { gatos_setsenscan(x); } /* ------------------------------------------------------------------------ */ void ahlCB(IDoDad *p, IDoDad *d, int x) { if(!x) { ahb->Disable(); useautohide = 0; } else { useautohide = (((IIntBox*)ahb)->GetVal())*100; ahb->Enable(); if(ahb->GetVal() <= 0) ahb->SetVal(1); } } /* ------------------------------------------------------------------------ */ void ahCB(IDoDad *p, IDoDad *d) { useautohide = (((IIntBox*)d)->GetVal())*100; autohide = useautohide; if((!useautohide) && (ahl->State())) ahl->Press(0, 0, 0); } /* ------------------------------------------------------------------------ */ void dotCB(IDoDad *p, IDoDad *d) { gatos_setoverclock(((IIntBox*)d)->GetVal()); } /* ------------------------------------------------------------------------ */ #ifdef GATOSBUTTONS void testCB(IDoDad *p, IDoDad *d) { int which; for(which = 0; which= GATOSBUTTONS) { fprintf(stderr, _("Bad Testbutton Pressed!\n")); exit(-1); } gatos_settestbutton(which, ((IIntBox*)d)->GetVal()); } #endif GATOSBUTTONS /* ------------------------------------------------------------------------ */ void deskCB(IDoDad *p, IDoDad *d, int x) { usedesk = x; if(usedesk) mwin->DisableIcon(); else mwin->EnableIcon(); } /* ------------------------------------------------------------------------ */ void CCtCB(IDoDad *p, IDoDad *d, int x) { CCCB(p, CCl, x ? ccmode : -1); } /* ------------------------------------------------------------------------ */ void CCCB(IDoDad *p, IDoDad *d, int x) { x += 1; if(!CCt->State()) x = 0; if((!useCC) && x) { useCC = 1; ccmode = x-1; if(gatos_setCC(GET_CC|GET_EDS)) { useCC = 0; ccmode = -1;} else { #ifdef CC_CURSES cc_mode(ccmode); #else EraseCCText(); XFlush(mwin->GetDisplay()); #endif CC_CURSES cc_reset(); } } else if(x) { ccmode = x-1; #ifdef CC_CURSES cc_mode(ccmode); #else EraseCCText(); XFlush(mwin->GetDisplay()); cctext_repaint = 1; ShowCCText(); #endif CC_CURSES } else { useCC = 0; gatos_setCC(0); #ifdef CC_CURSES cc_mode(-1); #else EraseCCText(); XFlush(mwin->GetDisplay()); #endif CC_CURSES } } /* ------------------------------------------------------------------------ */ void topCB(IDoDad *p, IDoDad *d, int x) { ontop = x; } /* ------------------------------------------------------------------------ */ void EraseChannel(void) { if(channel == NULL) return; UniDrawRectangle(channel_x, channel_y, channel->width, channel->height, gatos_colorkey()); XFreeImage(channel); channel = NULL; } /* ------------------------------------------------------------------------ */ void ShowChannel(char *string) { int size, window_x; // Don't want to hide old GUI. -ISG //if(show){ // toggleshow(); // channel_turn_gui_on=1; // } #ifdef USE_DGA if(usedga && full) { size = gatos_ydim(); window_x = gatos_xdim(); } else #endif USE_DGA { size = mwin->YSize(); window_x = mwin->XSize(); } size = size/10; if((channel == NULL) || (lastchannel == NULL) || strcmp(lastchannel, string) || (size != lastchannelsize)) { EraseChannel(); if(transparent_letters) pal.bg_col = gatos_colorkey(); else pal.bg_col = pal.black_col; channel = printString(string, "fixed", size,&pal); if(lastchannel != NULL) free(lastchannel); lastchannel = strdup(string); lastchannelsize = size; lastchannel_x = channel_x; lastchannel_y = channel_y; } channel_y = 10; channel_x = window_x-channel->width; #ifdef USE_DGA if(usedga && full) { DGAPutImage((u8*)frame, mwin->XDeskSize(), channel_x, channel_y, channel); } else #endif USE_DGA { XPutImage(mwin->GetDisplay(), mwin->GetWindow(), mwin->GetGC(), channel, 0, 0, channel_x, channel_y, channel->width, channel->height); } channelon = 2*slider_timeout; } /* ------------------------------------------------------------------------ */ void ShowMessage(char *string) { int size; // Don't want to hide old GUI. -ISG //if(show){ // toggleshow(); // message_turn_gui_on=1; // } #ifdef USE_DGA if(usedga && full) { size = gatos_ydim(); } else #endif USE_DGA { size = mwin->YSize(); } size = size/10; if((message == NULL) || (lastmessage == NULL) || strcmp(lastmessage, string) || (size != lastmessagesize)) { EraseMessage(); if(transparent_letters) pal.bg_col = gatos_colorkey(); else pal.bg_col = pal.black_col; message = printString(string, "fixed", size, &pal); if(lastmessage != NULL) free(lastmessage); lastmessage = strdup(string); lastmessagesize = size; lastmessage_x = message_x; lastmessage_y = message_y; } message_y = slider_y-message->height-5; #ifdef USE_DGA if(usedga && full) { DGAPutImage((u8*)frame, mwin->XDeskSize(), message_x, message_y, message); } else #endif USE_DGA { XPutImage(mwin->GetDisplay(), mwin->GetWindow(), mwin->GetGC(), message, 0, 0, message_x, message_y, message->width, message->height); } messageon = slider_timeout; } /* ------------------------------------------------------------------------ */ void EraseMessage(void) { if(message == NULL) return; UniDrawRectangle(message_x, message_y, message->width, message->height, gatos_colorkey()); XFreeImage(message); message = NULL; } /* ------------------------------------------------------------------------ */ void ShowControl(void) { switch(message_mode) { case MODE_VOLUME: DrawSlider(svol->Value(), 100, 2); ShowMessage(_("Volume")); DrawSlider(svol->Value(), 100, 0); return; case MODE_BRIGHTNESS: DrawSlider(sbr->Value()-sbr->Min(), sbr->Max()-sbr->Min(), 2); ShowMessage(_("Brightness")); DrawSlider(sbr->Value()-sbr->Min(), sbr->Max()-sbr->Min(), 0); return; case MODE_CONTRAST: DrawSlider(scnt->Value()-scnt->Min(), scnt->Max()-scnt->Min(), 2); ShowMessage(_("Contrast")); DrawSlider(scnt->Value()-scnt->Min(), scnt->Max()-scnt->Min(), 0); return; case MODE_INPUT_SOURCE: DrawSlider(1, 100, 1); if(gatos_mux() == 3 || gatos_mux() == 0) { ShowMessage(_("Input:\\rS-Video")); } else if(gatos_mux() == 1) { ShowMessage(_("Input:\\rComposite")); } else { ShowMessage(_("Input:\\rTV signal")); } return; case MODE_CC: DrawSlider(1, 100, 1); if(!useCC) { ShowMessage(_("Caption:\\rNone")); return; } switch(ccmode) { case -1: ShowMessage(_("Caption:\\rNone")); return; case CC_MODE_CC1: ShowMessage(_("Caption:\\rCC1")); return; case CC_MODE_CC2: ShowMessage(_("Caption:\\rCC2")); return; case CC_MODE_TEXT1: ShowMessage(_("Caption:\\rTEXT1")); return; case CC_MODE_TEXT2: ShowMessage(_("Caption:\\rTEXT2")); return; default: ShowMessage(_("Caption:\\rERROR")); return; } return; case MODE_SAP: DrawSlider(1, 100, 1); if(gatos_sap()) { if(gatos_stereo()) { ShowMessage(_("Stereo/SAP:\\rST/SAP")); } else { ShowMessage(_("Stereo/SAP:\\r /SAP")); } } else { if(gatos_stereo()) { ShowMessage(_("Stereo/SAP:\\rST/")); } else { ShowMessage(_("Stereo/SAP:\\r /")); } } return; default: return; } } /* ------------------------------------------------------------------------ */ int charNotValid(char c) { if(c == 1) return 1; if(c < 10) return 1; if((c >= 'a') && (c <= 'z')) return 0; if((c >= 'A') && (c <= 'Z')) return 0; if(c == ' ') return 0; if(c == '.') return 0; if(c == ':') return 0; if(c == ';') return 0; if(c == '\'') return 0; if(c == '?') return 0; if(c == '-') return 0; if(c == '\"') return 0; //" Just for emacs hilit19 display bug return 2; } /* ------------------------------------------------------------------------ */ void cleanString(char *string) { int i, j; for(i = 0; string[i]; i++) switch(charNotValid(string[i])) { case 1: string[i] = ' '; for(j = 0; string[i+j]; j++) { string[i+j] = string[i+j+1]; } i--; break; case 2: string[i] = ' '; break; default: break; } } /* ------------------------------------------------------------------------ */ void ShowCCText(void) { int size; long window_x, window_y, slider_grid; int i, j, k; XImage *im; GC gc; if(!useCC) return; if(ccmode < 0) return; gc = mwin->GetClipGC(); #ifdef USE_DGA if(usedga && full) { window_x = gatos_xdim(); window_y = gatos_ydim(); } else #endif USE_DGA { window_x = mwin->XSize(); window_y = mwin->YSize(); } /* slider grid is the minimum unit of graphic detail. It should be 10 at window_x=1024 and of course not less than 1 */ slider_grid = window_x/100; if(slider_grid < 1) slider_grid = 1; cctext_x = 10; size = window_x/24; if(size > window_y/18) size = window_y/18; if(size < 1) size = 1; cctext_y = 5; if(transparent_letters) pal.bg_col = gatos_colorkey(); else pal.bg_col = pal.black_col; struct ccdata * ccdat = cc_get_data(); struct ccdata ccd = ccdat[ccmode]; if(*ccd.clrflag) { EraseCCText(); } for(j = 0; j < ccd.num_row; j++) { k = ccd.row[j]-1; for(i = 0; i < CC_COLUMNS; i++) { if(cctext_repaint || *ccd.clrflag || (ccd.attrib[j][i] & CC_ATTR_NEWCHAR)) { ccd.attrib[j][i] &= ~CC_ATTR_NEWCHAR; im = getCCChar(ccd.text[j][i], size, ccd.attrib[j][i], &pal); cctext_width = im->width; cctext_height = im->height; #ifdef USE_DGA if(usedga && full) { DGAPutImage((u8*)frame, mwin->XDeskSize(), cctext_x+i*im->width, cctext_y+k*im->height, im); } else #endif USE_DGA { XPutImage(mwin->GetDisplay(), mwin->GetWindow(), gc, im, 0, 0, cctext_x+i*im->width, cctext_y+k*im->height, im->width, im->height); } cctexton = slider_timeout; } } } *ccd.clrflag = 0; cctext_repaint = 0; } /* ------------------------------------------------------------------------ */ void EraseCCText(void) { long window_x, window_y; long m; #ifdef USE_DGA if(usedga && full) { window_x = gatos_xdim(); window_y = gatos_ydim(); } else #endif USE_DGA { window_x = mwin->XSize(); window_y = mwin->YSize(); } UniDrawRectangle(0, 0, window_x, window_y, gatos_colorkey()); m = messageon; if(m) { ShowControl(); messageon = m; } } /* ------------------------------------------------------------------------ */ void UniDrawRectangle(int x, int y, int width, int height, long color) { GC gc; #ifdef USE_DGA if(usedga && full) { DGADrawRectangle((u8*)frame, depth, mwin->XDeskSize(), x, y, width, height, color); } else { #endif USE_DGA if(show) gc = mwin->GetClipGC(); else gc = mwin->GetGC(); XSetForeground(mwin->GetDisplay(), gc, color); XFillRectangle(mwin->GetDisplay(), mwin->GetWindow(), gc, x, y, width, height); #ifdef USE_DGA } #endif USE_DGA } /* ------------------------------------------------------------------------ */ /* These are the constants that regulate green,yellow and red appearance the maximum is 100 */ long yellow_start = 33; long red_start = 66; /* erase: 0 : do normal painting 1 : erase slider 2 : only perform slider_x,slider_y calculation */ void DrawSlider(long value, long maxvalue, int erase) { long slider_width, slider_height, slider_grid, slider_height_small; long slider_step; long window_x ,window_y; long i; long color; #ifdef USE_DGA if(usedga && full) { window_x = gatos_xdim(); window_y = gatos_ydim(); } else #endif USE_DGA { window_x = mwin->XSize(); window_y = mwin->YSize(); } /* slider grid is the minimum unit of graphic detail. It should 10 at window_x=1024 and of course not less than 1 */ slider_grid = window_x/100; if(slider_grid < 1) slider_grid = 1; slider_y = window_y-6*slider_grid; slider_width = window_x-4*slider_grid; slider_height = 4*slider_grid; slider_height_small = slider_grid; slider_step = slider_grid+slider_grid/2; slider_x = 2*slider_grid; /* note that (slider_height-slider_height_small)/2==slider_step */ if(erase == 2) return; if(value < 0) value = 0; if(maxvalue < 0) maxvalue = 1; if(value > maxvalue) value = maxvalue; if(erase == 1) { UniDrawRectangle(slider_x, slider_y, slider_width, slider_height, gatos_colorkey()); slideron = 0; slider_y = window_y; return; } for(i = 0; i < slider_width/(2*slider_step); i++) { if(i*100*2*slider_step < yellow_start*slider_width) color = mwin->greencol; else if(i*100*2*slider_step < red_start*slider_width) color = mwin->yellowcol; else color = mwin->redcol; if(i*maxvalue*2*slider_step < slider_width*value) { /* draw big ones */ UniDrawRectangle(slider_x+i*2*slider_step, slider_y, slider_step, slider_height, color); } else { /* draw dashes */ UniDrawRectangle(slider_x+i*2*slider_step, slider_y, slider_step, slider_height, gatos_colorkey()); UniDrawRectangle(slider_x+i*2*slider_step, slider_y+slider_step, slider_step, slider_height_small, color); } } slideron = slider_timeout; } /* ------------------------------------------------------------------------ */ void EraseSlider(void) { } /* ------------------------------------------------------------------------ */ void fullCB(IDoDad *p, IDoDad *d, int x) { #ifdef USE_DGA static int oauto, ouauto; //oshow; #endif USE_DGA if(x && full == 0) { #ifdef USE_DGA if(usedga) { depth = DefaultDepth(mwin->GetDisplay(), 0); XGrabKeyboard(mwin->GetDisplay(), DefaultRootWindow(mwin->GetDisplay()), True, GrabModeAsync, GrabModeAsync, CurrentTime); XGrabPointer(mwin->GetDisplay(), DefaultRootWindow(mwin->GetDisplay()), True, PointerMotionMask | ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); XF86DGADirectVideo(mwin->GetDisplay(), 0, XF86DGADirectGraphics); { int ctr, n; double maxclock = gatos.aticard[gatos.cardidx].dotclock + gatos_overclock(); maxclock *= 1000.0; XF86VidModeModeInfo curv, **allv; XF86VidModeGetAllModeLines(mwin->GetDisplay(), 0, &n, &allv); oldv = *(allv[0]); curv = oldv; if(curv.dotclock >= maxclock) { for(ctr = 0; ctr < n; ctr++) { if(allv[ctr]->dotclock < maxclock && (allv[ctr]->hdisplay > curv.hdisplay || allv[ctr]->vdisplay > curv.vdisplay || curv.dotclock >= maxclock)) { curv = *(allv[ctr]); } } } free(allv); XF86VidModeSwitchToMode(mwin->GetDisplay(), 0, &curv); } /* old quick-and-dirty DGA colorset method if(depth<=8) memset((unsigned char *)frame, 0, mwin->YDeskSize( ) * mwin->XDeskSize()); else if(depth<=16) memset((unsigned char *)frame, 0, mwin->YDeskSize( ) * mwin->XDeskSize() << 1); else if(depth<=32) memset((unsigned char *)frame, 0, mwin->YDeskSize( ) * mwin->XDeskSize() << 2); else { printf("AARRGGGHH!!\n"); exit(0); } gatos_setcolorkey(0); */ XF86DGASetViewPort(mwin->GetDisplay(), 0, 0, 0); XF86DGAGetViewPortSize(mwin->GetDisplay(), 0, &ctrx, &ctry); gatos_setgeometry(ctrx, ctry, 0, 0); DGADrawRectangle((u8 *)frame, depth, mwin->XDeskSize(), 0, 0, ctrx, ctry, gatos_colorkey()); //oshow=show; fulldga = 1; oauto = autohide; ouauto = useautohide; useautohide = 0; autohide = 0; //if(show) toggleshow(); } else { #endif USE_DGA tmpfar = far; far = 0; oldx = mwin->XSize(); oldy = mwin->YSize(); oldxp = mwin->XPos(); oldyp = mwin->YPos(); XMoveResizeWindow(mwin->GetDisplay(),mwin->GetWindow(), 0, 0, mwin->XDeskSize(), mwin->YDeskSize()); #ifdef USE_DGA } #endif USE_DGA full = 1; } else if((!x) && full == 1) { #ifdef USE_DGA if(usedga) { autohide = oauto; useautohide = ouauto; fulldga = 0; //show=0; if(oshow) toggleshow(); //XF86VidModeSwitchToMode(mwin->GetDisplay(), 0, &oldv); XUngrabPointer(mwin->GetDisplay(), CurrentTime); XUngrabKeyboard(mwin->GetDisplay(), CurrentTime); XF86VidModeSwitchToMode(mwin->GetDisplay(), 0, &oldv); XF86DGADirectVideo(mwin->GetDisplay(), 0, 0); gatos_setcolorkey(mwin->GetWinBGColor()); gatos_setgeometry(mwin->XSize(), mwin->YSize(), mwin->XPos(), mwin->YPos()); } else { #endif USE_DGA XMoveResizeWindow(mwin->GetDisplay(), mwin->GetWindow(), oldxp, oldyp, oldx, oldy); far = tmpfar; #ifdef USE_DGA } #endif USE_DGA if(sdesk) { XSetForeground(mwin->GetDisplay(), mwin->GetGC(), mwin->GetWinBGColor()); XFillRectangle(mwin->GetDisplay(), mwin->GetRootWindow(), mwin->GetGC(), 0, 0, mwin->XDeskSize(), mwin->YDeskSize()); gatos_setgeometry(mwin->XDeskSize(), mwin->YDeskSize(), 0, 0); } full = 0; } } /* ------------------------------------------------------------------------ */ //void iaCB(IDoDad *p, IDoDad *d, int x) { // if((((ISButton *)d)->State()) && (!gatos_intaudio())) // gatos_setintaudio(1); // else if((((ISButton *)d)->State() == 0) && (gatos_intaudio())) // gatos_setintaudio(0); // } /* ------------------------------------------------------------------------ */ void svszCB(IDoDad *p, IDoDad *d, int x) { svsz = ((ISButton *)d)->State(); } /* ------------------------------------------------------------------------ */ void farCB(IDoDad *p, IDoDad *d, int x) { far = ((ISButton *)d)->State(); } /* ------------------------------------------------------------------------ */ void coldCB(IDoDad *p, IDoDad *d, int x) { if((((ISButton *)d)->State()) && (!gatos_cold())) { gatos_setcold(1); } else if((((ISButton *)d)->State()==0) && (gatos_cold())) { gatos_setcold(0); } } /* ------------------------------------------------------------------------ */ void muteCB(IDoDad *p, IDoDad *d, int x) { if((((ISButton *)d)->State()) && (!gatos_mute())) { gatos_setmute(1); } else if((((ISButton *)d)->State()==0) && (gatos_mute())) { gatos_setmute(0); } } /* ------------------------------------------------------------------------ */ void stereoCB(IDoDad *p, IDoDad *d, int x) { if((((ISButton *)d)->State()==0) && gatos_stereo()) { gatos_setstereo(!gatos_stereo()); } else if((((ISButton *)d)->State()) && (!gatos_stereo())) { gatos_setstereo(!gatos_stereo()); } } /* ------------------------------------------------------------------------ */ void sapCB(IDoDad *p, IDoDad *d, int x) { if((((ISButton *)d)->State()==0) && gatos_sap()) { gatos_setsap(!gatos_sap()); } else if((((ISButton *)d)->State()) && (!gatos_sap())) { gatos_setsap(!gatos_sap()); } } /* ------------------------------------------------------------------------ */ void guich(IDoDad *p, IDoDad *d, int x) { if(d == aguib) advgui = ((ISButton*)d)->State(); else if(d == chguib) changui = ((ISButton*)d)->State(); else if(d == captguib) captgui = ((ISButton*)d)->State(); else { fprintf(stderr, _("Bad ButtonPress!\n")); exit(1); } updategui(); } /* ------------------------------------------------------------------------ */ void snapcb(IDoDad *p, IDoDad *d, int n) { int h = xcaptb->GetVal(), v = ycaptb->GetVal(); unsigned char *rgb = new unsigned char[3*h*v]; gatos_rgbcapture(rgb); FILE *fl = fopen(captfl->GetText(), "w"); fprintf(fl,"P6\n%d %d\n255\n",h,v) ; fwrite(rgb, 3, h*v, fl); fclose(fl); delete rgb; /* Increment filename */ char buf[256], *ind; sprintf(buf, "%s%c", captfl->GetText(), 0); ind = &(buf[strlen(buf)]); while(ind > buf) { --ind; if(*ind >= '0' && *ind <= '8') { ++(*ind); break; } else if(*ind == '9') { *ind = '0'; } } captfl->SetText(buf); } /* ------------------------------------------------------------------------ */ void reccb(IDoDad *p, IDoDad *d, int n) { gatos_capture(captfl->GetText(), 0); recb->Disable(); stopb->Enable(); } /* ------------------------------------------------------------------------ */ void playcb(IDoDad *p, IDoDad *d, int n) { #ifdef USE_IPC playback_running = 1; #endif gatos_playback(captfl->GetText(), 0); playb->Disable(); stopb->Enable(); } /* ------------------------------------------------------------------------ */ void clearcb(IDoDad *p, IDoDad *d, int n) { unlink(captfl->GetText()); } /* ------------------------------------------------------------------------ */ void stopcb(IDoDad *p, IDoDad *d, int n) { gatos_stop(); #ifdef USE_IPC if(playback_running) playback_running = 0; #endif playb->Enable(); recb->Enable(); stopb->Disable(); } /* ------------------------------------------------------------------------ */ void cremcb(IDoDad *p, IDoDad *d, int) { if(!gatos_tvtype()) { gatos_delchan(gatos_channel()); if(gatos_channel() > 0) chnum->SetVal(gatos_channel()); else chnum->SetVal(gatos_channel()+1); chnum->SetMax(gatos_numchans()-1); chnum->SetMin(0); chchan(NULL, chnum); chnum->Redraw(); } else { gatos_disablechan(gatos_channel()); chnum->SetElementFlag(chnum->GetVal(), ELEMENT_SKIP); chnum->Increment(); } } /* ------------------------------------------------------------------------ */ void caddcb(IDoDad *p, IDoDad *d, int) { if(!gatos_tvtype()) { int ch = gatos_addchan(freq->GetVal(), _("New Channel")); chnum->Enable(); nameb->Enable(); chnum->SetMax(gatos_numchans()-1); chnum->SetVal(ch+1); updatechgui(); chnum->Redraw(); } else { gatos_enablechan(gatos_channel()); chnum->ClearElementFlag(chnum->GetVal(), ELEMENT_SKIP); } } /* ------------------------------------------------------------------------ */ void cresetcb(IDoDad *p, IDoDad *d, int) { cvol->SetValue(0); cbr->SetValue(0); ccnt->SetValue(0); chue->SetValue(0); csat->SetValue(0); } /* ------------------------------------------------------------------------ */ void chchan(IDoDad *p, IDoDad *d) { timeval tv; gettimeofday(&tv, NULL); time_t tmpt = tv.tv_sec; #ifdef CC_CURSES if(useCC) cc_show(); #else EraseCCText(); if(useCC) ShowCCText(); #endif CC_CURSES if(lprev || lasttime < (tmpt-5)) { prevch = gatos_channel(); lprev = 0; } lasttime = tmpt; gatos.channel = ((IIntBox *)d)->GetVal(); // need this to update GUI. updatetextbox(); updatechgui(); /* Display message about a new channel */ #ifdef USE_DGA if((!show) || (usedga && full)) #else if(!show) #endif USE_DGA ShowChannel(chnb->GetText()); if(gatos_mux() == 2) { gatos_setchan(((IIntBox *)d)->GetVal()); } cc_reset(); } /* ------------------------------------------------------------------------ */ void mixerCB(IDoDad *p, IDoDad *d, int n) { gatos_setsoundmixer(n); } /* ------------------------------------------------------------------------ */ void tvtypeCB(IDoDad *p, IDoDad *d, int n) { if(tvtype_format[n]) gatos_setformat(tvtype_format[n]); gatos_settvtype(n); stdfreq = (double *)tvtype_chanfreq[n]; maxstdchan = tvtype_chanmax[n]; } /* ------------------------------------------------------------------------ */ void setupCB(IDoDad *p, IDoDad *d, int n) { if(((IButton *)d) == setupb) setupgui = 1; else if(((IButton *)d) == doneb) setupgui = 0; else { fprintf(stderr, _("Bad ButtonPress!\n")); exit(1); } updategui(); } /* ------------------------------------------------------------------------ */ static int scan_cancel = 0; void canCB(IDoDad *p, IDoDad *d, int n) { scan_cancel = 1; } /* ------------------------------------------------------------------------ */ int scannerCB(double p) { mwin->DispatchCurrentEvents(); csisb->SetProgress(p-gatos_minfreq()); csisb->Redraw(); return (scan_cancel || mwin->HasQuit()); } /* ------------------------------------------------------------------------ */ void convert(IDoDad *p, IDoDad *d, int n) { if(gatos_tvtype() > 0) { int ctr, ctrs, onum = gatos_numchans(); char buf[128]; chnum->SetMin(0); chnum->SetMax(maxstdchan-1); for(ctrs = 0; ctrs < maxstdchan; ctrs++) { if(stdfreq[ctrs] != 0.0) { if(VERBOSE) printf("%d: %f\n", ctrs, stdfreq[ctrs]); int best = -1; float diff, bdiff = 1.0; for(ctr = 0; ctr < onum; ctr++) { diff = stdfreq[ctrs]-gatos_chanfreq(ctr); diff *= diff; if(gatos_chanenabled(ctr) && diff < bdiff) { best = ctr; bdiff = diff; } } if(best >= 0) { if((gatos_channame(best)[0] <= '9' && gatos_channame(best)[0] >= '0' && gatos_channame(best)[1] <= '9' && gatos_channame(best)[1] >= '0' && gatos_channame(best)[2] <= '9' && gatos_channame(best)[2] >= '0' && gatos_channame(best)[4] <= '9' && gatos_channame(best)[4] >= '0' && gatos_channame(best)[5] <= '9' && gatos_channame(best)[5] >= '0' && gatos_channame(best)[6] <= '9' && gatos_channame(best)[6] >= '0' && gatos_channame(best)[3] == '.' && gatos_channame(best)[7] == ' ' && gatos_channame(best)[8] == 'M' && gatos_channame(best)[9] == 'H' && gatos_channame(best)[10] == 'z' && gatos_channame(best)[11] == 0) || (gatos_channame(best)[0] <= '9' && gatos_channame(best)[0] >= '0' && gatos_channame(best)[1] <= '9' && gatos_channame(best)[1] >= '0' && gatos_channame(best)[3] <= '9' && gatos_channame(best)[3] >= '0' && gatos_channame(best)[4] <= '9' && gatos_channame(best)[4] >= '0' && gatos_channame(best)[5] <= '9' && gatos_channame(best)[5] >= '0' && gatos_channame(best)[2] == '.' && gatos_channame(best)[6] == ' ' && gatos_channame(best)[7] == 'M' && gatos_channame(best)[8] == 'H' && gatos_channame(best)[9] == 'z' && gatos_channame(best)[10] == 0)) { sprintf(buf, _("Channel %d%c"), ctrs, 0); if(gatos_chanenabled(best)) { int ch = gatos_addchan(gatos_chanfreq(best), buf); gatos_enablechan(ch); if(chnum) chnum->ClearElementFlag(ch-onum, ELEMENT_SKIP); } else { int ch = gatos_addchan(gatos_chanfreq(best), buf); gatos_disablechan(ch); if(chnum) chnum->SetElementFlag(ch-onum, ELEMENT_SKIP); } } else { if(gatos_chanenabled(best)) { int ch = gatos_addchan(gatos_chanfreq(best), gatos_channame(best)); gatos_enablechan(ch); if(chnum) chnum->ClearElementFlag(ch-onum, ELEMENT_SKIP); } else { int ch = gatos_addchan(gatos_chanfreq(best), gatos_channame(best)); gatos_disablechan(ch); if(chnum) chnum->SetElementFlag(ch-onum, ELEMENT_SKIP); } } } else { sprintf(buf, _("Channel %d%c"), ctrs, 0); int ch = gatos_addchan(stdfreq[ctrs], buf); gatos_disablechan(ch); if(chnum) chnum->SetElementFlag(ch-onum, ELEMENT_SKIP); } } else { sprintf(buf, _("Channel %d%c"), ctrs, 0); int ch = gatos_addchan(stdfreq[ctrs], buf); gatos_disablechan(ch); if(chnum) chnum->SetElementFlag(ch-onum, ELEMENT_SKIP); } } for(ctr = 0; ctr < onum; ctr++) gatos_delchan(0); chchan(NULL, chnum); updatechgui(); if(is_channel_enabled()) chnum->Enable(); else chnum->Disable(); chnum->Redraw(); } } /* ------------------------------------------------------------------------ */ void scanchan(IDoDad *p, IDoDad *d, int n) { int sh = show; show = 0; updategui(); scan_cancel = 0; scangui = 1; csitb1->Show(); csitb2->Show(); csitp1->Show(); csitp2->Show(); csisb->SetTotalWork(gatos_maxfreq()-gatos_minfreq()); csisb->SetProgress(0.0); csisb->Show(); cscan->Show(); if(d == rescanb) chan_clearchans(); gatos_chanscan(scannerCB); csitb1->Hide(); csitb2->Hide(); csitp1->Hide(); csitp2->Hide(); csisb->Hide(); cscan->Hide(); chchan(NULL, chnum); show = sh; updategui(); convert(NULL, NULL, n); scangui = 0; } /* ------------------------------------------------------------------------ */ void toggleshow() { show = !show; updategui(); } /* ------------------------------------------------------------------------ */ void updatechgui() { cfreq->SetChangeCallback(NULL); cvol->SetChangeCallback(NULL); cbr->SetChangeCallback(NULL); ccnt->SetChangeCallback(NULL); chue->SetChangeCallback(NULL); csat->SetChangeCallback(NULL); freq->SetChangeCallback(NULL); cfreq->SetVal(gatos_chanfreq(gatos_channel())); cfreq->Redraw(); cvol->SetValue(gatos_chanvolume(gatos_channel())); cbr->SetValue(gatos_chanbrightness(gatos_channel())); ccnt->SetValue(gatos_chancontrast(gatos_channel())); chue->SetValue(gatos_chanhue(gatos_channel())); csat->SetValue(gatos_chansaturation(gatos_channel())); freq->SetVal(gatos_chanfreq(gatos_channel())); freq->Redraw(); cfreq->SetChangeCallback(&chcfreq); cvol->SetChangeCallback(csld); cbr->SetChangeCallback(csld); ccnt->SetChangeCallback(csld); chue->SetChangeCallback(csld); csat->SetChangeCallback(csld); freq->SetChangeCallback(&chfreq); } /* ------------------------------------------------------------------------ */ void updategui() { csitb1->Hide(); csitb2->Hide(); csitp1->Hide(); csitp2->Hide(); csisb->Hide(); cscan->Hide(); if(show && (!setupgui)) { setupb->Show(); aguib->Show(); chguib->Show(); captguib->Show(); inp1->Show(); inp2->Show(); inp3->Show(); svol->Show(); chnum->Show(); nameb->Show(); muteb->Show(); if(!gatos_audiotype()) muteb->Disable(); else muteb->Enable(); CCt->Show(); } else { setupb->Hide(); aguib->Hide(); chguib->Hide(); captguib->Hide(); inp1->Hide(); inp2->Hide(); inp3->Hide(); svol->Hide(); chnum->Hide(); nameb->Hide(); muteb->Hide(); CCt->Hide(); } if(show && (!setupgui) && advgui) { sbr->Show(); scnt->Show(); shue->Show(); ssat->Show(); stereob->Show(); fullb->Show(); sapb->Show(); coldb->Show(); gammas->Show(); freq->Show(); scanb->Show(); } else { sbr->Hide(); scnt->Hide(); shue->Hide(); ssat->Hide(); stereob->Hide(); fullb->Hide(); sapb->Hide(); coldb->Hide(); gammas->Hide(); freq->Hide(); scanb->Hide(); } if(show && (!setupgui) && captgui) { snapb->Show(); playb->Show(); recb->Show(); stopb->Show(); clearb->Show(); captfl->Show(); xcaptb->Show(); ycaptb->Show(); } else { snapb->Hide(); playb->Hide(); recb->Hide(); stopb->Hide(); clearb->Hide(); captfl->Hide(); xcaptb->Hide(); ycaptb->Hide(); } if(show && (!setupgui) && changui) { cvol->Show(); cbr->Show(); ccnt->Show(); chue->Show(); csat->Show(); cadd->Show(); crem->Show(); creset->Show(); cfreq->Show(); chnb->Show(); } else { cvol->Hide(); cbr->Hide(); ccnt->Hide(); chue->Hide(); csat->Hide(); crem->Hide(); cadd->Hide(); creset->Hide(); cfreq->Hide(); chnb->Hide(); } if(show && setupgui) { formb->Show(); forml->Show(); optl->Show(); if(gatos_nummixers() > 0) { mixl->Show(); mixerb->Show(); } svszb->Show(); farb->Show(); doneb->Show(); rescanb->Show(); convertb->Show(); deskb->Show(); CCb->Show(); CCl->Show(); topb->Show(); dotb->Show(); dotl->Show(); ahb->Show(); ahl->Show(); senscb->Show(); #ifdef USE_DGA dgab->Show(); #endif USE_DGA #ifdef GATOSBUTTONS int ctr; for(ctr = 0; ctr < GATOSBUTTONS; ++ctr) { testb[ctr]->Show(); testl[ctr]->Show(); } #endif GATOSBUTTONS } else { formb->Hide(); if(gatos_nummixers() > 0) { mixerb->Hide(); mixl->Hide(); } forml->Hide(); optl->Hide(); svszb->Hide(); farb->Hide(); doneb->Hide(); rescanb->Hide(); convertb->Hide(); deskb->Hide(); CCb->Hide(); CCl->Hide(); topb->Hide(); dotb->Hide(); dotl->Hide(); ahb->Hide(); ahl->Hide(); senscb->Hide(); #ifdef USE_DGA dgab->Hide(); #endif USE_DGA #ifdef GATOSBUTTONS int ctr; for(ctr = 0; ctr < GATOSBUTTONS; ++ctr) { testb[ctr]->Hide(); testl[ctr]->Hide(); } #endif GATOSBUTTONS } mwin->RebuildClip(); // mwin->Redraw(); cctext_repaint = 1; ShowCCText(); } /* ------------------------------------------------------------------------ */ void initgui() { /* Install the on-top war prevention handler */ struct sigaction act; act.sa_flags = 0; #if defined(__linux__) act.sa_restorer = NULL; #endif __linux__ sigemptyset(&act.sa_mask); act.sa_handler = &OnTopAgain; sigaction(SIGALRM, &act, NULL); /* Round up standards and mixer box sizes for faster clip regions */ int stsz = ((NUM_STANDARDS*13+6+9)/10)*10; int mxsz = ((gatos_nummixers()*13+6+9)/10)*10; setupb = new IButton(_("Setup"), mwin, 80, 10, 50, 20); setupb->SetClickCallback(&setupCB); aguib = new ISButton(_("Adv."), mwin, 130, 10, 50, 20); if(advgui) aguib->Press(0, 0, 0); aguib->SetDownCallback(&guich); aguib->SetUpCallback(&guich); captguib = new ISButton(_("Capture"), mwin, 180, 10, 50, 20); if(captgui) captguib->Press(0, 0, 0); captguib->SetDownCallback(&guich); captguib->SetUpCallback(&guich); chguib = new ISButton(_("Edit Channel"), mwin, 140, 70, 90, 20); if(changui) chguib->Press(0, 0, 0); chguib->SetDownCallback(&guich); chguib->SetUpCallback(&guich); inp3 = new ISButton(_("TV"), mwin, 10, 10, 20, 20); inp2 = new ISButton(_("CV"), mwin, 30, 10, 20, 20); inp1 = new ISButton(_("SV"), mwin, 50, 10, 20, 20); inp1->SetDownCallback(inp); inp1->SetUpCallback(ButtonRadioReleaseCB); if(gatos_mux() == 3 || gatos_mux() == 0) inp1->Press(0, 0, 0); inp2->SetDownCallback(inp); inp2->SetUpCallback(ButtonRadioReleaseCB); if(gatos_mux() == 1) inp2->Press(0, 0, 0); inp3->SetDownCallback(inp); inp3->SetUpCallback(ButtonRadioReleaseCB); if(gatos_mux() == 2) inp3->Press(0, 0, 0); svol = new ISlider(_("Volume: "), mwin, 10, 30, 150, 20); svol->SetMin(0); svol->SetMax(100); svol->SetValue(gatos_volume()); svol->SetChangeCallback(sld); if(gatos_nummixers() <= 0) svol->Disable(); muteb = new ISButton(_("Mute"), mwin, 160, 30, 40, 20); muteb->SetDownCallback(muteCB); muteb->SetUpCallback(muteCB); if(gatos_mute()) muteb->Press(0, 0, 0); if(!gatos_audiotype()) muteb->Disable(); else muteb->Enable(); CCt = new ISButton(_("CC"), mwin, 200, 30, 30, 20); CCt->SetDownCallback(CCtCB); CCt->SetUpCallback(CCtCB); chnum = new IIntBox(0, mwin, 10, 50, 50, 20); chnum->SetMin(0); chnum->SetMax(gatos_numchans()-1); chnum->SetVal(gatos_channel()); chnum->SetFlags(IBTK_WRAP|IBTK_SUPPLEMENTARY); chnum->SetChangeCallback(chchan); for(int ctr = 0; ctr < gatos_numchans(); ctr++) { if(chan_flag(ctr, CHANNEL_SKIP)) if(chnum) chnum->SetElementFlag(ctr, ELEMENT_SKIP); } if(gatos_mux() != 2) chnum->Disable(); nameb = new IBox("", mwin, 60, 50, 170, 20); nameb->SetChangeCallback(chname); freq = new IRealBox(gatos_chanfreq(gatos_channel()), mwin, 10, 70, 80, 20); freq->SetMin(gatos_minfreq()); freq->SetMax(gatos_maxfreq()); freq->SetIncVal(0.0625); freq->SetChangeCallback(&chfreq); sbr = new ISlider(_("Brightness: "), mwin, 10, 90, 220, 20); sbr->SetMin(0); sbr->SetMax(200); sbr->SetValue(gatos_brightness()); sbr->SetChangeCallback(sld); scnt = new ISlider(_("Contrast: "), mwin, 10, 110, 220, 20); scnt->SetMin(0); scnt->SetMax(200); scnt->SetValue(gatos_contrast()); scnt->SetChangeCallback(sld); shue = new ISlider(_("Hue: "), mwin, 10, 130, 220, 20); shue->SetMin(-90); shue->SetMax(90); shue->SetValue(gatos_hue()); shue->SetChangeCallback(sld); ssat = new ISlider(_("Saturation: "), mwin, 10, 150, 220, 20); ssat->SetMin(0); ssat->SetMax(200); ssat->SetValue(gatos_saturation()); ssat->SetChangeCallback(sld); stereob = new ISButton(_("Stereo"), mwin, 110, 170, 50, 20); stereob->SetDownCallback(stereoCB); stereob->SetUpCallback(stereoCB); if(gatos_stereo()) stereob->Press(0, 0, 0); sapb = new ISButton(_("SAP"), mwin, 160, 170, 30, 20); sapb->SetDownCallback(sapCB); sapb->SetUpCallback(sapCB); if(gatos_sap()) sapb->Press(0, 0, 0); fullb = new ISButton(_("Full"), mwin, 190, 170, 40, 20); fullb->SetDownCallback(fullCB); fullb->SetUpCallback(fullCB); coldb = new ISButton(_("Cold"), mwin, 10, 170, 40, 20); coldb->SetDownCallback(coldCB); coldb->SetUpCallback(coldCB); if(gatos_cold()) coldb->Press(0, 0, 0); gammas = new ISlider(_("Gamma: "), mwin, 50, 170, 60, 20); gammas->SetMin(0); gammas->SetMax(3); gammas->SetValue(gatos_gamma()); gammas->SetChangeCallback(sld); scanb = new IButton(_("Scan"), mwin, 90, 70, 50, 20); scanb->SetDownCallback(scanchan); clearb = new IButton(_("Delete"), mwin, 30, 200, 60, 20); clearb->SetClickCallback(&clearcb); captfl = new IBox("gatos000.ppm", mwin, 90, 200, 120, 20); snapb = new IButton(_("Snap"), mwin, 30, 220, 45, 20); snapb->SetClickCallback(&snapcb); recb = new IButton(_("Rec"), mwin, 75, 220, 45, 20); recb->SetClickCallback(&reccb); playb = new IButton(_("Play"), mwin, 120, 220, 45, 20); playb->SetClickCallback(&playcb); stopb = new IButton(_("Stop"), mwin, 165, 220, 45, 20); stopb->Disable(); stopb->SetClickCallback(&stopcb); xcaptb = new IIntBox(gatos_xcapt(), mwin, 30, 240, 90, 20); xcaptb->SetMin(gatos_xcaptmin()); xcaptb->SetMax(gatos_xcaptmax()); xcaptb->SetChangeCallback(&chcapt); ycaptb = new IIntBox(gatos_ycapt(), mwin, 120, 240, 90, 20); ycaptb->SetMin(gatos_ycaptmin()); ycaptb->SetMax(gatos_ycaptmax()); ycaptb->SetChangeCallback(&chcapt); cadd = new IButton(_("Add"), mwin, 240, 10, 50, 20); cadd->SetClickCallback(&caddcb); crem = new IButton(_("Remove"), mwin, 290, 10, 50, 20); crem->SetClickCallback(&cremcb); cfreq = new IRealBox(gatos_chanfreq(gatos_channel()), mwin, 240, 30, 100, 20); cfreq->SetMin(gatos_minfreq()); cfreq->SetMax(gatos_maxfreq()); cfreq->SetIncVal(0.0625); cfreq->SetChangeCallback(&chcfreq); chnb = new IBox("", mwin, 240, 50, 100, 20); chnb->SetChangeCallback(chdesc); updatetextbox(); cvol = new ISlider(_("Vol: "), mwin, 240, 70, 100, 20); cvol->SetMin(-30); cvol->SetMax(30); cvol->SetValue(gatos_chanvolume(gatos_channel())); cvol->SetChangeCallback(csld); if(gatos_nummixers() <= 0) cvol->Disable(); cbr = new ISlider(_("Bright: "), mwin, 240, 90, 100, 20); cbr->SetMin(-30); cbr->SetMax(30); cbr->SetValue(gatos_chanbrightness(gatos_channel())); cbr->SetChangeCallback(csld); ccnt = new ISlider(_("Contr: "), mwin, 240, 110, 100, 20); ccnt->SetMin(-30); ccnt->SetMax(30); ccnt->SetValue(gatos_chancontrast(gatos_channel())); ccnt->SetChangeCallback(csld); chue = new ISlider(_("Hue: "), mwin, 240, 130, 100, 20); chue->SetMin(-30); chue->SetMax(30); chue->SetValue(gatos_chanhue(gatos_channel())); chue->SetChangeCallback(csld); csat = new ISlider(_("Sat: "), mwin, 240, 150, 100, 20); csat->SetMin(-30); csat->SetMax(30); csat->SetValue(gatos_chansaturation(gatos_channel())); csat->SetChangeCallback(csld); creset = new IButton(_("Set to Default"), mwin, 240, 170, 100, 20); creset->SetClickCallback(&cresetcb); forml = new ITextBox(_("Select Television Type"), mwin, 10, 10, 300, 20); formb = new IListBox((char **)tvtype_names, NUM_STANDARDS, mwin, 10, 30, 300, stsz); formb->SetSelCallback(tvtypeCB); formb->SetDCCallback(tvtypeCB); formb->Select(gatos_tvtype()); if(gatos_nummixers() > 0) { mixl = new ITextBox(_("Mixer"), mwin, 460, 10, 100, 20); mixerb = new IListBox(gatos_mixerlabels(), gatos_nummixers(), mwin, 460, 30, 100, mxsz); mixerb->SetSelCallback(mixerCB); mixerb->SetDCCallback(mixerCB); mixerb->Select(gatos_mixer()); } optl = new ITextBox(_("Option"), mwin, 320, 10, 130, 20); svszb = new ISButton(_("Save Window Size"), mwin, 320, 30, 130, 20); if(svsz) svszb->Press(0, 0, 0); svszb->SetDownCallback(svszCB); svszb->SetUpCallback(svszCB); farb = new ISButton(_("Fixed Aspect Ratio"), mwin, 320, 50, 130, 20); if(far) farb->Press(0, 0, 0); farb->SetDownCallback(farCB); farb->SetUpCallback(farCB); topb = new ISButton(_("Always On Top"), mwin, 320, 70, 130, 20); if(ontop) topb->Press(0, 0, 0); topb->SetDownCallback(topCB); topb->SetUpCallback(topCB); deskb = new ISButton(_("Use Desktop Mode"), mwin, 320, 90, 130, 20); deskb->SetDownCallback(deskCB); deskb->SetUpCallback(deskCB); if(usedesk) deskb->Press(0, 0, 0); ahb = new IIntBox((useautohide+99)/100, mwin, 410, 110, 40, 20); ahb->SetMin(0); ahb->SetMax(10); ahb->SetChangeCallback(ahCB); ahl = new ISButton(_("Autohide"), mwin, 320, 110, 90, 20); ahl->SetDownCallback(ahlCB); ahl->SetUpCallback(ahlCB); if(useautohide) ahl->Press(0, 0, 0); else ahb->Disable(); senscb = new ISButton(_("Use Sensitive SCAN"), mwin, 320, 130, 130, 20); if(gatos_senscan()) senscb->Press(0, 0, 0); senscb->SetDownCallback(senscCB); senscb->SetUpCallback(senscCB); dotl = new ITextBox(_("Overclock"), mwin, 320, 150, 90, 20); dotb = new IIntBox(gatos_overclock(), mwin, 410, 150, 40, 20); dotb->SetMin(-20); dotb->SetMax(20); dotb->SetChangeCallback(dotCB); #ifdef USE_DGA dgab = new ISButton(_("Use DGA/VM"), mwin, 320, 170, 130, 20); if(usedga) dgab->Press(0, 0, 0); dgab->SetDownCallback(dgaCB); dgab->SetUpCallback(dgaCB); #endif USE_DGA #ifdef GATOSBUTTONS int ctr; char buf[16]; for(ctr = 0; ctr < GATOSBUTTONS; ++ctr) { sprintf(buf, _("Test Var #%d%c"), ctr+1, 0); testl[ctr] = new ITextBox(buf, mwin, 320, 200+(20*ctr), 90, 20); testb[ctr] = new IIntBox(gatos_testbutton(ctr), mwin, 410, 200+(20*ctr), 40, 20); testb[ctr]->SetMin(-1000000); testb[ctr]->SetMax(1000000); testb[ctr]->SetChangeCallback(testCB); } #endif GATOSBUTTONS CCb = new ITextBox(_("CC Mode"), mwin, 10, stsz+40, 110, 20); char *ccms[4] = { _("CC1"), _("CC2"), _("Text1"), _("Text2") }; CCl = new IListBox(ccms, 4, mwin, 10, stsz+60, 110, 4*13+6); CCl->Select(ccmode); CCl->SetSelCallback(CCCB); rescanb = new IButton(_("Rescan Channels"), mwin, 130, stsz+40, 140, 20); rescanb->SetClickCallback(&scanchan); convertb = new IButton(_("Convert to Standard"), mwin, 130, stsz+60, 140, 20); convertb->SetClickCallback(&convert); doneb = new IButton(_("Done"), mwin, 130, stsz+80, 140, 20); doneb->SetClickCallback(&setupCB); csitb1 = new ITextBox(_("Scanning For Channels"), mwin, 10, 10, 200, 20); csitp1 = new ITextBox("", mwin, 10, 30, 20, 20); csisb = new IStatBar(mwin, 30, 30, 160, 20); csitp2 = new ITextBox("", mwin, 190, 30, 20, 20); csitb2 = new ITextBox(_("Please Be Patient"), mwin, 10, 50, 200, 20); cscan = new IButton(_("Done"), mwin, 30, 80, 160, 20); cscan->SetClickCallback(&canCB); updategui(); updatetextbox(); // mwin->Redraw(); } /* ------------------------------------------------------------------------ */ void loadstate() { gatos_getintvalue("Autohide=", &useautohide); gatos_getintvalue("ShowGUI=", &show); gatos_getintvalue("ChanGUI=", &changui); gatos_getintvalue("CaptGUI=", &captgui); gatos_getintvalue("AdvGUI=", &advgui); gatos_getintvalue("SaveSize=", &svsz); gatos_getintvalue("FixedAspectRatio=", &far); #ifdef USE_DGA gatos_getintvalue("UseDGA=", &usedga); #endif USE_DGA gatos_getintvalue("UseDesktopMode=", &usedesk); gatos_getintvalue("AlwaysOnTop=", &ontop); gatos_getintvalue("CC_Mode=", &ccmode); gatos_getintvalue("FavChannel1=", &favch[0]); gatos_getintvalue("FavChannel2=", &favch[1]); gatos_getintvalue("FavChannel3=", &favch[2]); gatos_getintvalue("FavChannel4=", &favch[3]); gatos_getintvalue("FavChannel5=", &favch[4]); gatos_getintvalue("FavChannel6=", &favch[5]); gatos_getintvalue("FavChannel7=", &favch[6]); gatos_getintvalue("FavChannel8=", &favch[7]); gatos_getintvalue("SaveSize=", &svsz); if(svsz) { gatos_getintvalue("XSize=", &ixs); gatos_getintvalue("YSize=", &iys); /* If UseDGA is unset and SaveSize is set, and * if xatitv is equal/wider than RootWindow, xatitv * will crash (green window). * So xatitv window geometry will be forced to * RootWindow geometry - 50 (really arbitrary!). DCB */ #ifdef USE_DGA if(usedga == 0) { #endif USE_DGA if(ixs >= GetWindowXSize(mwin->GetDisplay(), mwin->GetRootWindow()) || iys >= GetWindowYSize(mwin->GetDisplay(), mwin->GetRootWindow())) { ixs = (GetWindowXSize(mwin->GetDisplay(), mwin->GetRootWindow())-50); iys = (GetWindowYSize(mwin->GetDisplay(), mwin->GetRootWindow())-50); } #ifdef USE_DGA } #endif USE_DGA } } /* ------------------------------------------------------------------------ */ void savestate() { gatos_setintvalue("Autohide=", useautohide); gatos_setintvalue("ShowGUI=", show); gatos_setintvalue("ChanGUI=", changui); gatos_setintvalue("CaptGUI=", captgui); gatos_setintvalue("AdvGUI=", advgui); gatos_setintvalue("SaveSize=", svsz); gatos_setintvalue("FixedAspectRatio=", far); #ifdef USE_DGA gatos_setintvalue("UseDGA=", usedga); #endif USE_DGA gatos_setintvalue("UseDesktopMode=", usedesk); gatos_setintvalue("AlwaysOnTop=", ontop); gatos_setintvalue("CC_Mode=", ccmode); gatos_setintvalue("FavChannel1=", favch[0]); gatos_setintvalue("FavChannel2=", favch[1]); gatos_setintvalue("FavChannel3=", favch[2]); gatos_setintvalue("FavChannel4=", favch[3]); gatos_setintvalue("FavChannel5=", favch[4]); gatos_setintvalue("FavChannel6=", favch[5]); gatos_setintvalue("FavChannel7=", favch[6]); gatos_setintvalue("FavChannel8=", favch[7]); gatos_setintvalue("SaveSize=", svsz); gatos_setintvalue("XSize=", mwin->XSize()); gatos_setintvalue("YSize=", mwin->YSize()); } /* ------------------------------------------------------------------------ */ /* void visibility(XVisibilityEvent &e) { if(ontop && e.state) XRaiseWindow(mwin->GetDisplay(), mwin->GetWindow()); gatos_setvisibility(e.state); cctext_repaint=1; } */ /* ------------------------------------------------------------------------ */ void OnTopAgain(int sig) { ontop = 1; XRaiseWindow(mwin->GetDisplay(), mwin->GetWindow()); } /* ------------------------------------------------------------------------ */ void visibility(XVisibilityEvent &e) { if(ontop && e.state) { if(ontop > 10) { ontop = 0; alarm(7); } else { ontop++; XRaiseWindow(mwin->GetDisplay(), mwin->GetWindow()); } } gatos_setvisibility(e.state); cctext_repaint = 1; } /* ------------------------------------------------------------------------ */ /* * Return 1 if at least 1 channel is enabled */ int is_channel_enabled(void) { int ctrs; for(ctrs = 0; ctrs < maxstdchan; ctrs++) { if(gatos_chanenabled(ctrs)) return 1; } return 0; } /* ------------------------------------------------------------------------ */ gatos-0.0.5/src/yuvsum.c0100644002411700123110000000513007010662536013601 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include "config.h" #include "i18n.h" #define LIMIT(x) (((x)<0)?0:((x)>255)?255:(x)) int main() { int y, cr, cb, r, g, b, h, v, i, j, res, n = 0 ; FILE *file ; unsigned char rgb[3], buf[9], name[13] ; struct stat st ; int *rp, *gp, *bp, N=0, ptr ; bindtextdomain("yuvsum", GATOS_LOCALEDIR); textdomain("yuvsum"); rp = calloc(768*576,sizeof(int)) ; gp = calloc(768*576,sizeof(int)) ; bp = calloc(768*576,sizeof(int)) ; while ( fread(buf,1,8,stdin) == 8 ) { res = sscanf(buf,"%3d %3d\n",&h,&v) ; ptr = 0 ; N++ ; fprintf(stderr,"yuvsum: %dx%d image #%d\n",h,v,N) ; for ( i=0 ; i>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *(rp+ptr) += LIMIT(r) ; *(gp+ptr) += LIMIT(g) ; *(bp+ptr) += LIMIT(b) ; ptr++ ; y = buf[2] - 16 ; r = ( 76284*y + 104595*cr )>>16 ; g = ( 76284*y - 53281*cr - 25624*cb )>>16 ; b = ( 76284*y + 132252*cb )>>16 ; *(rp+ptr) += LIMIT(r) ; *(gp+ptr) += LIMIT(g) ; *(bp+ptr) += LIMIT(b) ; ptr++ ; } } while (1) { snprintf(name,sizeof(name),"tv%06d.ppm",++n) ; if (lstat(name,&st)) break ; } file = fopen(name,"w") ; if (!file) { perror(_("fopen() failed")) ; exit(0) ; } fprintf(stderr,"yuvsum: %d images: %s\n",N,name) ; fprintf(file,"P6\n%d %d\n255\n",h,v) ; ptr = 0 ; for ( i=0 ; i #include char *name="data"; int main(int argc,char *argv[]) { FILE *fin; long i; unsigned char c; if(argc==1)fin=stdin; else{ fin=fopen(argv[1],"r"); if(fin==NULL){ fprintf(stderr,"Opening \"%s\":",argv[1]);fflush(stderr); perror(""); return -1; } if(argc>2){ name=argv[2]; } else { name=argv[1]; } } printf("#ifndef __INCLUDED__%s__\n",name); printf("#define __INCLUDED__%s__\n",name); printf("char %s[]={\n\t",name); i=0; while(!feof(fin)){ i++; c=fgetc(fin); printf("0x%02x",c); if(i%8)printf(","); else printf(",\n\t"); } printf("0};\n"); printf("#endif\n"); fflush(stdout); return 0; } gatos-0.0.5/src/ati.h0100644002411700123110000000276507026175441013027 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_ATI_H #define GATOS_ATI_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_ATI_C #define WHERE #else #define WHERE extern #endif #include /* ATI function declarations */ int ati_inita(void) ; int ati_initb(void) ; int ati_setcolorkey(void) ; void ati_enable_video(int) ; void ati_enable_capture(int) ; void ati_buffer_mode(void) ; int ati_setcaptsize(void) ; int ati_pollscreen(int) ; void ati_setgeometry(void) ; int ati_setgamma(void) ; int ati_setcold(void) ; void ati_rgbcapture(unsigned char*) ; void ati_capture(FILE*, int) ; void ati_playback(FILE*, int) ; void ati_dumpregs(void) ; #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/atim64.h0100644002411700123110000000407507026175441013352 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_ATIM64_H #define GATOS_ATIM64_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_ATIM64_C #define WHERE #else #define WHERE extern #endif #include #ifdef XY #undef XY #endif #ifdef XYZ #undef XYZ #endif #define XY(X,Y) \ ( ( (0xFFFF&((u32)(X))) << 16 ) | (0xFFFF&((u32)(Y))) ) #define XYZ(X,Y,Z) \ ( ( (0xFF&((u32)(X))) << 16 ) | ( (0xFF&((u32)(Y))) << 8 ) | (0xFF&((u32)(Z))) ) /* OVERLAY_SCALE_CNTL values */ #define DISABLE_M64_VIDEO 0x0000007BL #define ENABLE_M64_VIDEO \ (0xC4000001L|((gatos.gamma)?((4-gatos.gamma)<<5):0)|(gatos.cold<<1)) /* CAPTURE_CONFIG values */ #define ENABLE_M64_CAPTURE 0x10000015L /* ATI Mach64 function declarations */ int m64_init(void) ; int m64_inita(void) ; int m64_initb(void) ; int m64_setcolorkey(void) ; void m64_enable_video(int) ; void m64_enable_capture(int) ; void m64_buffer_mode(void) ; int m64_setcaptsize(void) ; int m64_pollscreen(int) ; void m64_setgeometry(void) ; int m64_setgamma(void) ; int m64_setcold(void) ; void m64_rgbcapture(unsigned char*) ; void m64_capture(FILE*, int) ; void m64_playback(FILE*, int) ; void m64_dumpregs(void) ; #ifdef GATOS_ATIM64_C static int m64_chipid(int, int, int, int) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/atir128.h0100644002411700123110000000400307026175441013427 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_ATIR128_H #define GATOS_ATIR128_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_ATIR128_C #define WHERE #else #define WHERE extern #endif #include #ifdef XY #undef XY #endif #ifdef XYZ #undef XYZ #endif #define XY(Y,X) \ ( ( (0xFFFF&((u32)(X))) << 16 ) | (0xFFFF&((u32)(Y))) ) #define XYZ(X,Y,Z) \ ( ( (0xFF&((u32)(X))) << 16 ) | ( (0xFF&((u32)(Y))) << 8 ) | (0xFF&((u32)(Z))) ) /* OV0_SCALE_CNTL values */ #define DISABLE_R128_VIDEO 0x00FF8B03L #define ENABLE_R128_VIDEO \ (0x71FF8C01L|((gatos.gamma)?((4-gatos.gamma)<<5):0)|(gatos.cold<<1)) /* CAP0_CONFIG values */ #define ENABLE_R128_CAPTURE 0x1C0000B5L /* ATI Rage128 function declarations */ int r128_init(void) ; int r128_inita(void) ; int r128_initb(void) ; int r128_setcolorkey(void) ; void r128_enable_video(int) ; void r128_enable_capture(int) ; void r128_buffer_mode(void) ; int r128_setcaptsize(void) ; int r128_pollscreen(int) ; void r128_setgeometry(void) ; int r128_setgamma(void) ; int r128_setcold(void) ; void r128_rgbcapture(unsigned char*) ; void r128_capture(FILE*, int) ; void r128_playback(FILE*, int) ; void r128_dumpregs(void) ; #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/atiregs.h0100644002411700123110000000166606771371566013723 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_ATIREGS_H #define GATOS_ATIREGS_H 1 #include "m64regs.h" #include "r128regs.h" #endif gatos-0.0.5/src/board.h0100644002411700123110000000352507010201405013313 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_BOARD_H #define GATOS_BOARD_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_BOARD_C #define WHERE #else #define WHERE extern #endif #define TDA8425(R,V) \ { i2c_writereg8(gatos.tda8425.addr,(R),(V)) ; tda8425reg[R] = V ; } #define TDA9850(R,V) \ { i2c_writereg8(gatos.tda9850.addr,(R),(V)) ; tda9850reg[R] = V ; } #define TDA9851(R,V) i2c_writereg8(gatos.tda9851.addr,(R),(V)) /* Board function declarations */ int board_init(void) ; int board_setfm(void) ; int board_setmux(void) ; int board_setvol(int) ; int board_setmute(void) ; int board_setstereo(void) ; int board_setsap(void) ; int board_hasvol(void) ; int board_hasstereo(void) ; int board_hassap(void) ; int board_isstereo(void) ; void board_dumpregs(void) ; #ifdef GATOS_BOARD_C static u8 board_identify(u8*, u8*) ; static int board_setbyte(void) ; static int board_setaudio(void) ; #if 0 /* NIY */ static int MSP3410(u8, u16, u16) ; #endif static u16 MSP3410get(u8, u16) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/bogo.h0100644002411700123110000000176106777603451013204 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_BOGO_H #define GATOS_BOGO_H 1 #ifdef __cplusplus extern "C" { #endif unsigned long get_bogomips(void); #ifdef __cplusplus } #endif #endif gatos-0.0.5/src/bt829.h0100644002411700123110000000654506765053731013130 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_BT829_H #define GATOS_BT829_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_BT829_C #define WHERE #else #define WHERE extern #endif #define BTREAD(R) i2c_readreg8(gatos.bt829.addr,(R)) #define BTWRITE(R,V) i2c_writereg8(gatos.bt829.addr,(R),(V)) #define H(X) ( ((X)>>8) & 0xFF ) #define L(X) ( (X) & 0xFF ) /* Bt829 family chip ID's */ #define BT815 0x02 #define BT817 0x06 #define BT819 0x07 #define BT827 0x0C #define BT829 0x0E /* Bt829 registers */ #define STATUS 0x00 /* Device Status */ #define IFORM 0x01 /* Input Format */ #define TDEC 0x02 /* Temporal Decimation */ #define CROP 0x03 /* MSB Cropping */ #define VDELAY_LO 0x04 /* Vertical Delay */ #define VACTIVE_LO 0x05 /* Vertical Active */ #define HDELAY_LO 0x06 /* Horizontal Delay */ #define HACTIVE_LO 0x07 /* Horizontal Active */ #define HSCALE_HI 0x08 /* Horizontal Scaling */ #define HSCALE_LO 0x09 /* Horizontal Scaling */ #define BRIGHT 0x0A /* Brightness Control */ #define CONTROL 0x0B /* Miscellaneous Control */ #define CONTRAST_LO 0x0C /* Luma Gain (Contrast) */ #define SAT_U_LO 0x0D /* Chroma (U) Gain (Saturation) */ #define SAT_V_LO 0x0E /* Chroma (V) Gain (Saturation) */ #define HUE 0x0F /* Hue Control */ #define SCLOOP 0x10 /* SC Loop Control */ #define WC_UP 0x11 /* White Crush Up Count */ #define OFORM 0x12 /* Output Format */ #define VSCALE_HI 0x13 /* Vertical Scaling */ #define VSCALE_LO 0x14 /* Vertical Scaling */ #define TEST 0x15 /* Test Control */ #define VPOLE 0x16 /* Video Timing Polarity */ #define IDCODE 0x17 /* ID Code */ #define ADELAY 0x18 /* AGC Delay */ #define BDELAY 0x19 /* Burst Gate Delay */ #define ADC 0x1A /* ADC Interface */ #define VTC 0x1B /* Video Timing Control */ #define CC_STATUS 0x1C /* Extended Data Services/Closed Capt Status */ #define CC_DATA 0x1D /* Extended Data Services/Closed Capt Data */ #define WC_DN 0x1E /* White Crush Down Count */ #define SRESET 0x1F /* Software Reset */ #define P_IO 0x3F /* Programmable I/O */ /* Bt829 function declarations */ int bt829_init(void) ; int bt829_setformat(void) ; int bt829_setmux(void) ; int bt829_setbrightness(void) ; int bt829_setcontrast(void) ; int bt829_setsaturation(void) ; int bt829_sethue(void) ; int bt829_setcaptsize(void) ; int bt829_setCC(void) ; int bt829_getCCdata(struct CCdata *) ; void bt829_dumpregs(void) ; #ifdef GATOS_BT829_C static int bt829_register(u8, int, int) ; static int bt829_crop(void) ; static int bt829_ctrl(void) ; static int bt829_iform(void) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/ccshow.h0100644002411700123110000000212406765053731013533 0ustar bayleasr/**************************************************************************\ Closed Captionning decoding Initial version by Chrisitan Lupien (lupien@physics.utoronto.ca) This is part of the Gatos project: gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifdef __cplusplus extern "C" { #endif void cc_show(void); void cc_mode(int); #ifdef __cplusplus } #endif gatos-0.0.5/src/delay.h0100644002411700123110000000250006765063475013347 0ustar bayleasr#ifndef _I386_DELAY_H #define _I386_DELAY_H /* * Copyright (C) 1993 Linus Torvalds * * Delay routines, using a pre-computed "loops_per_second" value. */ #include "linkage.h" extern void __do_delay(void); /* Special register call calling convention */ extern __inline__ void __delay(int loops) { int dummy; __asm__ __volatile__( "call " SYMBOL_NAME_STR(__do_delay) :"=a" (dummy) :"0" (loops)); } /* * division by multiplication: you don't have to worry about * loss of precision. * * Use only for very small delays ( < 1 msec). Should probably use a * lookup table, really, as the multiplications take much too long with * short delays. This is a "reasonable" implementation, though (and the * first constant multiplications gets optimized away if the delay is * a constant) */ extern __inline__ void udelay(unsigned long usecs) { int dummy; usecs *= 0x000010c6; /* 2**32 / 1000000 */ __asm__("mull %0" :"=d" (usecs), "=a" (dummy) #ifdef __SMP__ :"0" (usecs), "1" (cpu_data[smp_processor_id()].udelay_val) #else :"0" (usecs), "1" (loops_per_sec)); #endif __delay(usecs); } extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) { __asm__("mull %1 ; divl %2" :"=a" (a) :"d" (b), "r" (c), "0" (a) :"dx"); return a; } #endif /* defined(_I386_DELAY_H) */ gatos-0.0.5/src/linkage.h0100644002411700123110000000224306765053731013661 0ustar bayleasr#ifndef _LINUX_LINKAGE_H #define _LINUX_LINKAGE_H #ifdef __cplusplus #define asmlinkage extern "C" #else #define asmlinkage #endif #ifdef __ELF__ #define SYMBOL_NAME_STR(X) #X #define SYMBOL_NAME(X) X #ifdef __STDC__ #define SYMBOL_NAME_LABEL(X) X##: #else #define SYMBOL_NAME_LABEL(X) X/**/: #endif #else #define SYMBOL_NAME_STR(X) "_"#X #ifdef __STDC__ #define SYMBOL_NAME(X) _##X #define SYMBOL_NAME_LABEL(X) _##X##: #else #define SYMBOL_NAME(X) _/**/X #define SYMBOL_NAME_LABEL(X) _/**/X/**/: #endif #endif #if !defined(__i486__) && !defined(__i586__) #ifdef __ELF__ #define __ALIGN .align 4,0x90 #define __ALIGN_STR ".align 4,0x90" #else /* __ELF__ */ #define __ALIGN .align 2,0x90 #define __ALIGN_STR ".align 2,0x90" #endif /* __ELF__ */ #else /* __i486__/__i586__ */ #ifdef __ELF__ #define __ALIGN .align 16,0x90 #define __ALIGN_STR ".align 16,0x90" #else /* __ELF__ */ #define __ALIGN .align 4,0x90 #define __ALIGN_STR ".align 4,0x90" #endif /* __ELF__ */ #endif /* __i486__/__i586__ */ #ifdef __ASSEMBLY__ #define ALIGN __ALIGN #define ALIGN_STRING __ALIGN_STRING #define ENTRY(name) \ .globl SYMBOL_NAME(name); \ ALIGN; \ SYMBOL_NAME_LABEL(name) #endif #endif gatos-0.0.5/src/fi12xx.h0100644002411700123110000000322206765053731013366 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_FI12XX_H #define GATOS_FI12XX_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_FI12XX_C #define WHERE #else #define WHERE extern #endif #define MAXTUNERTYPE 0x12 #define FISTATUS i2c_read(gatos.fi12xx.addr) #define FREQ2K(F) ((F+gatos.Fpc+0.03125)*16.0) #define K2FREQ(K) (K/16.0-gatos.Fpc) #define HAVESIGNAL \ ( ((FISTATUS & 0x47) == 0x42) && (BTREAD(STATUS) & 0x80) ) /* FI12XX function declarations */ int fi12xx_init(void) ; void fi12xx_setformat(void) ; double fi12xx_minfreq(void) ; double fi12xx_maxfreq(void) ; int fi12xx_tune(void) ; double fi12xx_scan(double, double, int(*)(double,char*), int(*)(double)) ; void fi12xx_dumpregs(void) ; #ifdef GATOS_FI12XX_C static u8 fi12xx_band(double) ; static int fi12xx_register(u8, int) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/i2c.h0100644002411700123110000000534106776115745012734 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_I2C_H #define GATOS_I2C_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_I2C_C #define WHERE #else #define WHERE extern #endif /* Number of I2C Driver Interfaces */ #define MAXI2CDRIVER 5 #ifdef USE_DELAY_S #include "delay.h" #define I2C_SLEEP udelay(5) #else #define I2C_SLEEP i2c_delay(5) #endif WHERE int i2c_ddelay ; /* I2C function declarations */ int i2c_init(void) ; #ifndef USE_DELAY_S void i2c_delay(u32) ; #endif u8 i2c_read(u8) ; int i2c_readn(u8, u8*, int) ; int i2c_write(u8, u8*, int) ; u8 i2c_readreg8(u8, u8) ; int i2c_writereg8(u8, u8, u8) ; int i2c_device(u8) ; char* i2c_ident(u8) ; char* i2c_name(u8) ; void i2c_info(void) ; void i2c_register(u8, char*, char*) ; #ifdef GATOS_I2C_C /* Hardware initialization and debugging */ static int i2c_init_hw(void) ; static void i2c_alarm(int) ; /* Low-level (software driver) routines */ static void i2c_start(void) ; static void i2c_stop(void) ; static u8 i2c_readbyte(int) ; static int i2c_sendbyte(u8) ; /* Hardware routines for I2C modes A, B and LG (DAC+GEN_TEST or GP_IO) */ static void reg_scldir(int) ; static void reg_sdadir(int) ; static void reg_setscl(int) ; static void reg_setsda(int) ; static int reg_getscl(void) ; static int reg_getsda(void) ; /* Hardware routines for I2C mode C (Rage PRO) */ static void pro_scldir(int) ; static void pro_sdadir(int) ; static void pro_setscl(int) ; static void pro_setsda(int) ; static int pro_getscl(void) ; static int pro_getsda(void) ; /* Hardware routines for I2C mode TB (ImpacTV) */ static void itv_scldir(int) ; static void itv_sdadir(int) ; static void itv_setscl(int) ; static void itv_setsda(int) ; static int itv_getscl(void) ; static int itv_getsda(void) ; /* Hardware routines for I2C mode R128 (Rage 128 Hardware) */ static int r128_wait_ack(void) ; static void r128_reset(void) ; static int r128_go(int, int, u32) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/ipc.h0100644002411700123110000000221207020525141012776 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_IPC_H #define GATOS_IPC_H 1 #ifdef __cplusplus extern "C" { #endif struct gatosmsgbuf { long mtype; char mtext[80]; }; int ipc_init_message(void); int ipc_send_message(char *message); int ipc_receive_message(char *message); int ipc_delete_message(void); #ifdef __cplusplus } #endif #endif gatos-0.0.5/src/m64regs.h0100644002411700123110000001041106776115746013541 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_M64REGS_H #define GATOS_M64REGS_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_GATOS_C #define WHERE #else #define WHERE extern #endif /* Accelerator CRTC Registers */ #define CRTC_H_TOTAL_DISP (*(MEM_0+0x00)) #define CRTC_H_SYNC_STRT_WID (*(MEM_0+0x01)) #define CRTC_V_TOTAL_DISP (*(MEM_0+0x02)) #define CRTC_V_SYNC_STRT_WID (*(MEM_0+0x03)) #define CRTC_OFF_PITCH (*(MEM_0+0x05)) #define CRTC_INT_CNTL (*(MEM_0+0x06)) #define CRTC_GEN_CNTL (*(MEM_0+0x07)) /* I2C Registers (Rage PRO only) */ #define I2C_CNTL_0 (*(MEM_0+0x0F)) #define I2C_CNTL_0_PTR (MEM_0+0x0F) #define I2C_CNTL_1 (*(MEM_0+0x2F)) /* General I/O Register */ #define GP_IO (*(MEM_0+0x1E)) #define GP_IO_PTR (MEM_0+0x1E) #define GP_IO_DATA (*( ((volatile u16*)MEM_0) + 0x3C )) #define GP_IO_CTRL (*( ((volatile u16*)MEM_0) + 0x3D )) /* PLL Clock Registers */ #define CLOCK_CNTL (*(MEM_0+0x24)) #define CLOCK_CNTL0 (*(((volatile u8*)(MEM_0+0x24))+0)) #define CLOCK_CNTL1 (*(((volatile u8*)(MEM_0+0x24))+1)) #define CLOCK_CNTL2 (*(((volatile u8*)(MEM_0+0x24))+2)) /* Registers reused for I2C Interface and All-In-Wonder TV Sound Enable */ #define DAC_CNTL (*(MEM_0+0x31)) #define DAC_CNTL_PTR (MEM_0+0x31) #define EXT_DAC_REGS (*(MEM_0+0x32)) #define GEN_TEST_CNTL (*(MEM_0+0x34)) #define GEN_TEST_CNTL_PTR (MEM_0+0x34) /* Config and Device ID Registers */ #define MEM_CNTL (*(MEM_0+0x2C)) #define CONFIG_CNTL (*(MEM_0+0x37)) #define CONFIG_CHIP_ID (*(MEM_0+0x38)) /* Overlay Scaler Registers */ #define OVERLAY_Y_X_START (*(MEM_1+0x00)) #define OVERLAY_Y_X_END (*(MEM_1+0x01)) #define OVERLAY_VIDEO_CLR (*(MEM_1+0x02)) #define OVERLAY_VIDEO_MSK (*(MEM_1+0x03)) #define OVERLAY_GRAPHICS_CLR (*(MEM_1+0x04)) #define OVERLAY_GRAPHICS_MSK (*(MEM_1+0x05)) #define OVERLAY_KEY_CNTL (*(MEM_1+0x06)) #define OVERLAY_SCALE_INC (*(MEM_1+0x08)) #define OVERLAY_SCALE_CNTL (*(MEM_1+0x09)) #define SCALER_HEIGHT_WIDTH (*(MEM_1+0x0A)) #define SCALER_BUF0_OFFSET (*(MEM_1+0x0D)) #define SCALER_BUF1_OFFSET (*(MEM_1+0x0E)) #define SCALER_BUF_PITCH (*(MEM_1+0x0F)) #define OVERLAY_EXCLUSIVE_HORZ (*(MEM_1+0x16)) #define OVERLAY_EXCLUSIVE_VERT (*(MEM_1+0x17)) #define SCALER_COLOR_CNTL (*(MEM_1+0x54)) #define SCALER_H_COEFF0 (*(MEM_1+0x55)) #define SCALER_H_COEFF1 (*(MEM_1+0x56)) #define SCALER_H_COEFF2 (*(MEM_1+0x57)) #define SCALER_H_COEFF3 (*(MEM_1+0x58)) #define SCALER_H_COEFF4 (*(MEM_1+0x59)) #define SCALER_BUF0_OFFSET_U (*(MEM_1+0x75)) #define SCALER_BUF0_OFFSET_V (*(MEM_1+0x76)) #define SCALER_BUF1_OFFSET_U (*(MEM_1+0x77)) #define SCALER_BUF1_OFFSET_V (*(MEM_1+0x78)) /* Video Capture Registers */ #define CAPTURE_START_END (*(MEM_1+0x10)) #define CAPTURE_X_WIDTH (*(MEM_1+0x11)) #define VIDEO_FORMAT (*(MEM_1+0x12)) #define VBI_START_END (*(MEM_1+0x13)) #define CAPTURE_CONFIG (*(MEM_1+0x14)) #define TRIG_CNTL (*(MEM_1+0x15)) #define VBI_WIDTH (*(MEM_1+0x18)) #define CAPTURE_BUF0_OFFSET (*(MEM_1+0x20)) #define CAPTURE_BUF1_OFFSET (*(MEM_1+0x21)) #define ONESHOT_BUF_OFFSET (*(MEM_1+0x22)) /* Multimedia Peripheral Port (MPP) Registers */ #define MPP_CONFIG (*(MEM_1+0x30)) #define MPP_CONFIG3 (*(((volatile u8*)(MEM_1+0x30))+3)) #define MPP_STROBE_SEQ (*(MEM_1+0x31)) #define MPP_ADDR (*(MEM_1+0x32)) #define MPP_ADDR0 (*(((volatile u8*)(MEM_1+0x32))+0)) #define MPP_DATA (*(MEM_1+0x33)) #define MPP_DATA0 (*(((volatile u8*)(MEM_1+0x33))+0)) /* TV Out Feature Registers */ #define TVO_CNTL (*(MEM_1+0x40)) #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/pci.h0100644002411700123110000000077506765053731013032 0ustar bayleasr#ifndef GATOS_PCI_H #define GATOS_PCI_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_PCI_C #define WHERE #else #define WHERE extern #endif struct ati_info { double maxdotclock ; /* Max dotclock for which Overlay Scaler works */ int maxhcapt ; /* Max video source width for Overlay Scaler */ int bus ; /* PCI or AGP bus */ char *name ; /* Long name */ } ; /* PCI function declarations */ int pci_scan(void) ; #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/r128regs.h0100644002411700123110000002075106777771540013640 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_R128REGS_H #define GATOS_R128REGS_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_GATOS_C #define WHERE #else #define WHERE extern #endif /* PLL Clock Registers */ #define R128_CLOCK_CNTL_INDEX (*((u32*)(MMR+0x0008))) #define R128_CLOCK_CNTL_INDEX0 (*(( u8*)(MMR+0x0008))) #define R128_CLOCK_CNTL_INDEX1 (*(( u8*)(MMR+0x0009))) #define R128_CLOCK_CNTL_DATA (*((u32*)(MMR+0x000C))) /* PLL index registers values */ #define FCP_CNTL 0x012 /* Accelerator CRTC Registers */ #define R128_CRTC_H_TOTAL_DISP (*((u32*)(MMR+0x0200))) #define R128_CRTC_H_SYNC_STRT_WID (*((u32*)(MMR+0x0204))) #define R128_CRTC_V_TOTAL_DISP (*((u32*)(MMR+0x0208))) #define R128_CRTC_V_SYNC_STRT_WID (*((u32*)(MMR+0x020C))) #define R128_CRTC_OFFSET (*((u32*)(MMR+0x0224))) #define R128_CRTC_PITCH (*((u32*)(MMR+0x022C))) #define R128_CRTC_GEN_CNTL (*((u32*)(MMR+0x0050))) /* Framebuffer Memory Address and Size and Device ID Registers */ #define R128_CONFIG_MEMSIZE (*((u32*)(MMR+0x00F8))) #define R128_CONFIG_APER_0_BASE (*((u32*)(MMR+0x0100))) #define R128_DEVICE_ID (*((u16*)(MMR+0x0F02))) #define R128_REVISION_ID (*(( u8*)(MMR+0x0F08))) /* GUI registers */ #define R128_GUI_STAT (*((u32*)(MMR+0x1740))) /* I2C Registers */ #define R128_I2C_CNTL_0 (*((u32*)(MMR+0x0090))) #define R128_I2C_CNTL_0_0 (*(( u8*)(MMR+0x0090))) #define R128_I2C_CNTL_0_1 (*(( u8*)(MMR+0x0091))) #define R128_I2C_CNTL_1 (*((u32*)(MMR+0x0094))) #define R128_I2C_DATA (*(( u8*)(MMR+0x0098))) /* R128_I2C_CNTL_0 bits */ #define I2C_DONE 0x00000001 #define I2C_NACK 0x00000002 #define I2C_HALT 0x00000004 #define I2C_SOFT_RST 0x00000020 #define I2C_DRIVE_EN 0x00000040 #define I2C_DRIVE_SEL 0x00000080 #define I2C_START 0x00000100 #define I2C_STOP 0x00000200 #define I2C_RECEIVE 0x00000400 #define I2C_ABORT 0x00000800 #define I2C_GO 0x00001000 #define I2C_CLEAR (I2C_DONE|I2C_NACK|I2C_HALT|I2C_SOFT_RST) /* R128_I2C_CNTL_1 bits */ #define I2C_SEL 0x00010000 #define I2C_EN 0x00020000 /* Overlay Scaler Registers */ #define OV0_Y_X_START (*((u32*)(MMR+0x0400))) #define OV0_Y_X_END (*((u32*)(MMR+0x0404))) #define OV0_EXCLUSIVE_HORZ (*((u32*)(MMR+0x0408))) #define OV0_EXCLUSIVE_VERT (*((u32*)(MMR+0x040C))) #define OV0_REG_LOAD_CNTL (*((u32*)(MMR+0x0410))) #define OV0_SCALE_CNTL (*((u32*)(MMR+0x0420))) #define OV0_V_INC (*((u32*)(MMR+0x0424))) #define OV0_P1_V_ACCUM_INIT (*((u32*)(MMR+0x0428))) #define OV0_P23_V_ACCUM_INIT (*((u32*)(MMR+0x042C))) #define OV0_P1_BLANK_LINES_AT_TOP (*((u32*)(MMR+0x0430))) #define OV0_P23_BLANK_LINES_AT_TOP (*((u32*)(MMR+0x0434))) #define OV0_VID_BUF0_BASE_ADRS (*((u32*)(MMR+0x0440))) #define OV0_VID_BUF1_BASE_ADRS (*((u32*)(MMR+0x0444))) #define OV0_VID_BUF2_BASE_ADRS (*((u32*)(MMR+0x0448))) #define OV0_VID_BUF3_BASE_ADRS (*((u32*)(MMR+0x044C))) #define OV0_VID_BUF4_BASE_ADRS (*((u32*)(MMR+0x0450))) #define OV0_VID_BUF5_BASE_ADRS (*((u32*)(MMR+0x0454))) #define OV0_VID_BUF_PITCH0_VALUE (*((u32*)(MMR+0x0460))) #define OV0_VID_BUF_PITCH1_VALUE (*((u32*)(MMR+0x0464))) #define OV0_AUTO_FLIP_CNTRL (*((u32*)(MMR+0x0470))) #define OV0_DEINTERLACE_PATTERN (*((u32*)(MMR+0x0474))) #define OV0_H_INC (*((u32*)(MMR+0x0480))) #define OV0_STEP_BY (*((u32*)(MMR+0x0484))) #define OV0_P1_H_ACCUM_INIT (*((u32*)(MMR+0x0488))) #define OV0_P23_H_ACCUM_INIT (*((u32*)(MMR+0x048C))) #define OV0_P1_X_START_END (*((u32*)(MMR+0x0494))) #define OV0_P2_X_START_END (*((u32*)(MMR+0x0498))) #define OV0_P3_X_START_END (*((u32*)(MMR+0x049C))) #define OV0_FILTER_CNTL (*((u32*)(MMR+0x04A0))) #define OV0_FOUR_TAP_COEF_0 (*((u32*)(MMR+0x04B0))) #define OV0_FOUR_TAP_COEF_1 (*((u32*)(MMR+0x04B4))) #define OV0_FOUR_TAP_COEF_2 (*((u32*)(MMR+0x04B8))) #define OV0_FOUR_TAP_COEF_3 (*((u32*)(MMR+0x04BC))) #define OV0_FOUR_TAP_COEF_4 (*((u32*)(MMR+0x04C0))) #define OV0_COLOUR_CNTL (*((u32*)(MMR+0x04E0))) #define OV0_VIDEO_KEY_CLR (*((u32*)(MMR+0x04E4))) #define OV0_VIDEO_KEY_MSK (*((u32*)(MMR+0x04E8))) #define OV0_GRAPHICS_KEY_CLR (*((u32*)(MMR+0x04EC))) #define OV0_GRAPHICS_KEY_MSK (*((u32*)(MMR+0x04F0))) #define OV0_KEY_CNTL (*((u32*)(MMR+0x04F4))) #define OV0_TEST (*((u32*)(MMR+0x04F8))) /* Video Capture Registers */ #define VID_BUFFER_CONTROL (*((u32*)(MMR+0x0900))) #define CAP_INT_CNTL (*((u32*)(MMR+0x0908))) #define CAP_INT_STATUS (*((u32*)(MMR+0x090C))) #define CAP0_BUF0_OFFSET (*((u32*)(MMR+0x0920))) #define CAP0_BUF1_OFFSET (*((u32*)(MMR+0x0924))) #define CAP0_BUF0_EVEN_OFFSET (*((u32*)(MMR+0x0928))) #define CAP0_BUF1_EVEN_OFFSET (*((u32*)(MMR+0x092C))) #define CAP0_BUF_PITCH (*((u32*)(MMR+0x0930))) #define CAP0_V_WINDOW (*((u32*)(MMR+0x0934))) #define CAP0_H_WINDOW (*((u32*)(MMR+0x0938))) #define CAP0_VBI_ODD_OFFSET (*((u32*)(MMR+0x093C))) #define CAP0_VBI_EVEN_OFFSET (*((u32*)(MMR+0x0940))) #define CAP0_VBI_V_WINDOW (*((u32*)(MMR+0x0944))) #define CAP0_VBI_H_WINDOW (*((u32*)(MMR+0x0948))) #define CAP0_PORT_MODE_CNTL (*((u32*)(MMR+0x094C))) #define CAP0_TRIG_CNTL (*((u32*)(MMR+0x0950))) #define CAP0_DEBUG (*((u32*)(MMR+0x0954))) #define CAP0_CONFIG (*((u32*)(MMR+0x0958))) #define CAP0_ANC_ODD_OFFSET (*((u32*)(MMR+0x095C))) #define CAP0_ANC_EVEN_OFFSET (*((u32*)(MMR+0x0960))) #define CAP0_ANC_H_WINDOW (*((u32*)(MMR+0x0964))) #define CAP0_VIDEO_SYNC_TEST (*((u32*)(MMR+0x0968))) #define CAP0_ONESHOT_BUF_OFFSET (*((u32*)(MMR+0x096C))) #define CAP0_BUF_STATUS (*((u32*)(MMR+0x0970))) #define CAP0_DWNSC_XRATIO (*((u32*)(MMR+0x0978))) #define CAP0_XSHARPNESS (*((u32*)(MMR+0x097C))) #define CAP1_BUF0_OFFSET (*((u32*)(MMR+0x0990))) #define CAP1_BUF1_OFFSET (*((u32*)(MMR+0x0994))) #define CAP1_BUF0_EVEN_OFFSET (*((u32*)(MMR+0x0998))) #define CAP1_BUF1_EVEN_OFFSET (*((u32*)(MMR+0x099C))) #define CAP1_BUF_PITCH (*((u32*)(MMR+0x09A0))) #define CAP1_V_WINDOW (*((u32*)(MMR+0x09A4))) #define CAP1_H_WINDOW (*((u32*)(MMR+0x09A8))) #define CAP1_VBI_ODD_OFFSET (*((u32*)(MMR+0x09AC))) #define CAP1_VBI_EVEN_OFFSET (*((u32*)(MMR+0x09B0))) #define CAP1_VBI_V_WINDOW (*((u32*)(MMR+0x09B4))) #define CAP1_VBI_H_WINDOW (*((u32*)(MMR+0x09B8))) #define CAP1_PORT_MODE_CNTL (*((u32*)(MMR+0x09BC))) #define CAP1_TRIG_CNTL (*((u32*)(MMR+0x09C0))) #define CAP1_DEBUG (*((u32*)(MMR+0x09C4))) #define CAP1_CONFIG (*((u32*)(MMR+0x09C8))) #define CAP1_ANC_ODD_OFFSET (*((u32*)(MMR+0x09CC))) #define CAP1_ANC_EVEN_OFFSET (*((u32*)(MMR+0x09D0))) #define CAP1_ANC_H_WINDOW (*((u32*)(MMR+0x09D4))) #define CAP1_VIDEO_SYNC_TEST (*((u32*)(MMR+0x09D8))) #define CAP1_ONESHOT_BUF_OFFSET (*((u32*)(MMR+0x09DC))) #define CAP1_BUF_STATUS (*((u32*)(MMR+0x09E0))) #define CAP1_DWNSC_XRATIO (*((u32*)(MMR+0x09E8))) #define CAP1_XSHARPNESS (*((u32*)(MMR+0x09EC))) /* Multimedia Peripheral Port (MPP) Registers */ #define R128_MPP_TB_ADDR (*((u32*)(MMR+0x0070))) #define R128_MPP_TB_DATA (*((u32*)(MMR+0x0074))) #define R128_MPP_GP_ADDR (*((u32*)(MMR+0x0078))) #define R128_MPP_GP_DATA (*((u32*)(MMR+0x007C))) #define R128_MPP_GP_ALT_REG_ADDR (*((u32*)(MMR+0x0088))) #define R128_MPP_GP_ALT_REG_DATA (*((u32*)(MMR+0x008C))) #define R128_AMCGPIO_MASK (*((u32*)(MMR+0x0194))) #define R128_MDGPIO_MASK (*((u32*)(MMR+0x0198))) #define R128_AMCGPIO_A_REG (*((u32*)(MMR+0x01A0))) #define R128_AMCGPIO_Y_REG (*((u32*)(MMR+0x01A4))) #define R128_AMCGPIO_EN_REG (*((u32*)(MMR+0x01A8))) #define R128_MDGPIO_A_REG (*((u32*)(MMR+0x01AC))) #define R128_MDGPIO_EN_REG (*((u32*)(MMR+0x01B0))) #define R128_MDGPIO_Y_REG (*((u32*)(MMR+0x01B4))) #define R128_MPP_TB_CONFIG (*((u32*)(MMR+0x01C0))) #define R128_MPP_TB_STROBE_SEQ (*((u32*)(MMR+0x01C4))) #define R128_MPP_GP_CONFIG (*((u32*)(MMR+0x01C8))) #define R128_MPP_GP_STROBE_SEQ (*((u32*)(MMR+0x01CC))) /* Video mux register */ #define R128_VIDEOMUX_CNTL (*((u32*)(MMR+0x0190))) #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/saa5281.h0100644002411700123110000000225306765053731013334 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_SAA5281_H #define GATOS_SAA5281_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_SAA5281_C #define WHERE #else #define WHERE extern #endif /* SAA5281 function declarations */ int saa5281_init(void) ; #ifdef GATOS_SAA5281_C static int saa5281_register(u8) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/tvout.h0100644002411700123110000000662506772356610013440 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev, Christian Lupien and Chris Hardy This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_TVOUT_H #define GATOS_TVOUT_H 1 #ifdef __cplusplus extern "C" { #endif #ifdef GATOS_TVOUT_C #define WHERE #else #define WHERE extern #endif /* ImpacTV family chip ID's */ /* ImpacTV */ #define IMPACTV 0x1A /* ImpacTV2 */ #define IMPACTV2 0x0B #define IMPACTV2M 0x1B /* ImpacTV2+ */ #define IMPACTV2P 0x31 #define IMPACTV2PM 0x30 /* ImpacTV registers */ #define TV_MASTER_CNTL 0x0010 #define TV_RGB_CNTL 0x0012 #define TV_CLKOUT_CNTL 0x0013 #define TV_SYNC_CNTL 0x0014 #define TV_I2C_CNTL 0x0015 #define TV_MPP_DATA_CNTL 0x0016 #define TV_HTOTAL 0x0020 #define TV_HDISP 0x0021 #define TV_HSIZE 0x0022 #define TV_HSTART 0x0023 #define TV_HCOUNT 0x0024 #define TV_VTOTAL 0x0025 #define TV_VDISP 0x0026 #define TV_VCOUNT 0x0027 #define TV_FTOTAL 0x0028 #define TV_FCOUNT 0x0029 #define TV_FRESTART 0x002A #define TV_HRESTART 0x002B #define TV_VRESTART 0x002C #define TV_SYNC_SIZE 0x002D #define TV_TV_PLL_CNTL 0x0030 #define TV_CRT_PLL_CNTL 0x0031 #define TV_PLL_CNTL 0x0032 #define TV_PLL_TEST_CNTL 0x0033 #define TV_CLOCK_SEL_CNTL 0x0034 #define TV_FRAME_LOCK_CNTL 0x0040 #define TV_SYNC_LOCK_CNTL 0x0041 #define TV_TVO_SYNC_PAT_ACCUM 0x0042 #define TV_TVO_SYNC_THRESHOLD 0x0043 #define TV_TVO_SYNC_PAT_EXPECT 0x0044 #define TV_DELAY_ONE_MAP_A 0x0045 #define TV_DELAY_ONE_MAP_B 0x0046 #define TV_DELAY_ZERO_MAP_A 0x0047 #define TV_DELAY_ZERO_MAP_B 0x0048 #define TV_TVO_DATA_DELAY_A 0x0050 #define TV_TVO_DATA_DELAY_B 0x0051 #define TV_HOST_READ_DATA 0x0060 #define TV_HOST_WRITE_DATA 0x0061 #define TV_HOST_RD_WT_CNTL 0x0062 #define TV_VSCALER_CNTL 0x0070 #define TV_TIMING_CNTL 0x0071 #define TV_GAMMA_CNTL 0x0072 #define TV_Y_FALL_CNTL 0x0073 #define TV_Y_RISE_CNTL 0x0074 #define TV_Y_SAW_TOOTH_CNTL 0x0075 #define TV_MODULATOR_CNTL1 0x0080 #define TV_MODULATOR_CNTL2 0x0081 #define TV_PRE_DAC_MUX_CNTL 0x0090 #define TV_TV_DAC_CNTL 0x00A0 #define TV_CRC_CNTL 0x00B0 #define TV_VIDEO_PORT_SIG 0x00B1 #define TV_VBI_20BIT_CNTL 0x00BA #define TV_VBI_LEVEL_CNTL 0x00BE #define TV_UV_ADR 0x00C0 #define TV_FIFO_TEST_CNTL 0x00C1 /* TV Out (ImpacTV) function declarations */ int tvout_init(void) ; int tvout_start(void) ; int tvout_reset(void) ; int tvout_monitor(void) ; void tvout_dumpregs(void) ; int tvout_present(void) ; u8 tvout_read_i2c_cntl8(void) ; void tvout_write_i2c_cntl8(u8) ; u32 tvout_read32(u16) ; void tvout_write32(u16, u32) ; #ifdef GATOS_TVOUT_C static void tvout_addr(u16) ; static int mpp_wait(char*) ; static int tvout_setmode(void) ; static void findNM(double, u32 *,u32 *,u32, u8 *) ; #endif #ifdef __cplusplus } #endif #undef WHERE #endif gatos-0.0.5/src/version.h0100644002411700123110000000216707030251706013725 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #ifndef GATOS_VERSION_H #define GATOS_VERSION_H 1 #ifdef __cplusplus extern "C" { #endif #define GATOS_MAJOR_VERSION 0 #define GATOS_MINOR_VERSION 0 #define GATOS_SUB_VERSION 5 #define GATOS_VERSION_STRING "0.0.5" #define IBTK_REQUIRED_VERSION "00001400" #ifdef __cplusplus } #endif #endif gatos-0.0.5/src/ccshow.c0100644002411700123110000001542206765053731013533 0ustar bayleasr/**************************************************************************\ Closed Captionning decoding Initial version by Chrisitan Lupien (lupien@physics.utoronto.ca) This is part of the Gatos project: gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include "cc.h" #include /* Display area is 15 row by 32 columns starts on line 43 and ends on line 237 on interlaced display (195 lines long. Note full height is 21 to 262, first line is 1 and the frame is 525 including blanking (fields are 262.5). E.I. A full screen has 3 more lines(18 of 13 rows each), about 1.5 above and below the 15. Overall the text should be inside 80% vertically and horiszontally of the displayable area (considering 15x34). Should erase the screen when shitching channels or fields. */ /* Currently the display of caption is done on the tty where xatitv is started so the program cannot be run in backgound mode (it blocks if you try. Also since I am using ncurses you need to have a correctly set TERM variable. You can try a couple of different ones (linux, VT100, xterm). For modes CC1 and CC2 the program puts a blue screen (if ncurses thinks your terminal handles colors). The blue screen corresponds to the addresable size of the TV screen. */ static int curmode=-1; static int clrflag=1; WINDOW *mainw,*mwin,*twin; static int navail=0,nedsd=0; static int preveds=-1; static int ccerror=0; int cursattr(int); static char *short_title[]={"NONE","CC1","CC2","TEXT1","TEXT2"}; void cc_show(void) { struct ccdata *csd; int dnum_row,*drow,(*dattrib)[CC_COLUMNS]; unsigned char (*dtext)[CC_COLUMNS]; int row,col,crow; char avail[40],edsd[40]; int sum,i; struct ccdata *ccdat; struct edsdata *edsdat; #ifdef CCTEST return; #endif if(ccerror) return; if(curmode==-1) return; /* show nothing, the mode is off */ ccdat=cc_get_data(); edsdat=eds_get_data(); csd=&(ccdat[curmode]); if(*csd->clrflag) clrflag=1; if(curmode<=CC_MODE_CC2) wbkgdset(mwin,COLOR_PAIR(7)); else wbkgdset(mwin,0); if(clrflag) wclear(mwin); wbkgdset(mwin,0); dnum_row=csd->num_row; drow=csd->row; dtext=csd->text; dattrib=csd->attrib; /* Start of diagnostic section ---------------------------------*/ sprintf(avail,"Avail. CC:%c%c Text:%c%c doing %5s", (ccdat[0].num_row!=0)?'1':' ', (ccdat[1].num_row!=0)?'2':' ', (ccdat[2].num_row!=0)?'1':' ', (ccdat[3].num_row!=0)?'2':' ', short_title[curmode+1]); sum=i=0; while(avail[i]!=0) sum+=avail[i++]; if(sum!=navail) mvwaddstr(twin,0,1,avail); navail=sum; sprintf(edsd,"Num of EDS %6i",edsdat->num); sum=i=0; while(edsd[i]!=0) sum+=edsd[i++]; if(sum!=nedsd) mvwaddstr(twin,1,1,edsd); nedsd=sum; /* if(preveds!=edsdat->num) { preveds=edsdat->num; wmove(twin,2,1); for(i=0,j=edsdat->cur;i=EDS_BUFMAX) j=0; waddch(twin,edsdat->buf[j]); if(((i+1)%(EDS_BUFMAX/2))==0) wmove(twin,3,1); } } */ wnoutrefresh(twin); /* End of diagnostic section ----------------------------------*/ for(row=0;row1) if(clrflag||(dattrib[row][col-2]&CC_ATTR_NEWCHAR)) if(dtext[row][col-2]!=CC_INVSPACE) mvwaddch(mwin,crow,col,' '); if(col<(CC_COLUMNS-2)) if(clrflag||(dattrib[row][col]&CC_ATTR_NEWCHAR)) if(dtext[row][col]!=CC_INVSPACE) mvwaddch(mwin,crow,col,' '); continue; } if((!clrflag)&&(!(dattrib[row][col-1]&CC_ATTR_NEWCHAR))) continue; mvwaddch(mwin,crow,col,dtext[row][col-1]| cursattr(dattrib[row][col-1])); } for(col=0; colclrflag=0; } void cc_mode(int mode) { if(ccerror) return; if((mode==-1)&&(curmode==-1)) return; if((mode==-1)&&(curmode>=0)) { curmode=-1; #ifndef CCTEST wbkgdset(mwin,COLOR_PAIR(0)); wclear(mwin); wclear(twin); wrefresh(mwin); wrefresh(twin); endwin(); return; #endif } else if((mode!=-1)&&(curmode==-1)) { curmode=mode; navail=nedsd=0; preveds=-1; #ifndef CCTEST mainw=initscr(); start_color(); if(COLOR_PAIRS>7) { /* 0 is white on black */ init_pair(1,COLOR_GREEN,COLOR_BLACK); init_pair(2,COLOR_BLUE,COLOR_BLACK); init_pair(3,COLOR_CYAN,COLOR_BLACK); init_pair(4,COLOR_RED,COLOR_BLACK); init_pair(5,COLOR_YELLOW,COLOR_BLACK); init_pair(6,COLOR_MAGENTA,COLOR_BLACK); init_pair(7,COLOR_WHITE,COLOR_BLUE); /* To be use for the rest of the screen */ } mwin=newwin(15,34+1,7,0); /* 34+1: +1 is to prevent line wrap */ twin=newwin(5,78,2,0); if((mwin==NULL)||(twin==NULL)) {endwin(); ccerror=1; printf("Problems creating windows. tty too small ?\n"); return;} scrollok(mwin,0); clrflag=1; cc_show(); return; #endif } curmode=mode; clrflag=1; cc_show(); } /* input CC attr, returns attr to use with wattrset */ int cursattr(int attr){ int ret=0; if(attr&CC_ATTR_UNDERLINE) ret|=A_UNDERLINE; if(attr&CC_ATTR_FLASH) ret|=A_BLINK; if(attr&CC_ATTR_ITALICS) ret|=A_REVERSE; ret|=COLOR_PAIR((attr&0xff)>>4); return ret; } gatos-0.0.5/src/cp850-8x160100644002411700123110000001000006765053731013352 0ustar bayleasr~¥½™~~ÿÛÿÿÃçÿÿ~lþþþþ|88|þ|8<<ççç<<~ÿÿ~<<<ÿÿÿÿÿÿçÃÃçÿÿÿÿÿÿþ><~~<fffffffffÛÛÛ{|Æ`8lÆÆl8 Æ|þþþþ<~~<~<~~< þ 0`þ`0ÀÀÀþ(lþl(88||þþþþ||88<<<fff$llþlllþll|ÆÂÀ|†Æ|ÂÆ 0`Ɔ8ll8vÜÌÌÌv000` 000000 0 0f<ÿlÌÌþÌÌÌÌÎ8l|ÆÆÆÆÆ|Æ|ÆÆÆÆÆ|`0|ÆÆÆÆÆ|0xÌÌÌÌÌÌÌv`0ÌÌÌÌÌÌvÆÆÆÆÆÆÆ~ xÆ|ÆÆÆÆÆÆÆ|ÆÆÆÆÆÆÆÆÆ||ÎÞöæÆ|8ld`ð````æü|ÎÎÖÖÖÖææ|@Æl88lÆ~Øp0`x |ÌÌÌv 08<0`|ÆÆÆÆÆ|0`ÌÌÌÌÌÌvvÜÜffffffvÜÆæöþÞÎÆÆÆ~8ll8|0000`ÀÆÆ||‚²ª²ªª‚|þ`àbfl0`܆ >`àbfl0fΚ?<<<6lØl6Øl6lØDDDDDDDDUªUªUªUªUªUªUªUªÝwÝwÝwÝwÝwÝwÝwÝwø`À8lÆÆþÆÆÆÆ|Æ8lÆÆþÆÆÆÆ 8lÆÆþÆÆÆÆ|‚𢢢š‚|66666öö666666666666666666666666þö6666666666666öþ|ÆÀÀÆ|ff<~~øÿÿÿÿvÜx |ÌÌÌvvÜ8lÆÆþÆÆÆÆ6666670??076666666666666÷ÿÿ÷666666666666670766666666ÿÿ66666÷÷66666666Æ|ÆÆÆÆ|Æ4,>ffff<ølfföffflø8lþfbhxhbfþÆþfbhxhbfþ0þfbhxhbfþ8< <<þ><~~<fffffffffÛÛÛ{|Æ`8lÆÆl8 Æ|þþþþ<~~<~<~~< þ 0`þ`0ÀÀÀþ$fÿf$88||þþþþ||88<<<fff$llþlllþll|ÆÂÀ|†Æ|ÂÆ 0`Ɔ8ll8vÜÌÌÌv000` 000000 0 0f<ÿø€ð€€€> < pˆ€€ˆp<"<($"€€€€€ø> < þþþþþþþþþþþþþþþþþþþþþþþþþþþþˆÈ¨¨˜ˆ >ˆˆˆˆP >øøÿÿÿÿÿÿøÿÿ 0`0 ~0  0~~ìlllllÌ ~~0`?3?0000pðàñ[UQ<<<|ÆÀÀÆ|8ld`ð````æü‚Æ|ÆÆÆÆ|Æ‚ff<~~|Æ`8lÆÆl8 Æ|Æ|Æ‚º¢¢º‚Æ|pxÈxø6lØl6þþ|Æ‚ºª²ª‚Æ|ÿ8ll8~~à0b6ì0fΚ?0000`ÀÆÆ| 8lÆÆþÆÆÆÆ`À8lÆÆþÆÆÆÆ|Æ8lÆÆþÆÆÆÆvÜ8lÆÆþÆÆÆÆÆ8lÆÆþÆÆÆ8l88lÆÆþÆÆÆ>lÌÌþÌÌÌÌÎffff<vÜÜffffff`0|ÆÆÆÆÆ|0`|ÆÆÆÆÆ|8l|ÆÆÆÆÆ|vÜ|ÆÆÆÆÆ|Æ|ÆÆÆÆÆ|~|ÎÞÖöæ|À€`0ÌÌÌÌÌÌv0`ÌÌÌÌÌÌv0xÌÌÌÌÌÌÌvÌÌÌÌÌÌÌv 0ÆÆÆÆÆÆ~ øà``|fffff|``ðÆÆÆÆÆÆÆ~ xgatos-0.0.5/src/xutils.c0100644002411700123110000007033307023537540013570 0ustar bayleasr/**************************************************************************\ gatos (General ATI TV and Overlay Software) Project Coordinated By Insomnia (Steaphan Greene) (insomnia@core.binghamton.edu) Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, Vladimir Dergachev and Christian Lupien. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \**************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "xutils.h" #include "gatos.h" #include "cc.h" #include "version.h" /* for debugging */ /* #define REPORT_DEPTH */ /* fix later */ /* do_alloc always returns a valid chunk of memory */ #define do_alloc(a,b) (calloc((a),(b))) XImage *proto_image = NULL; /* this contains image parameters and should be initialized when the program first opens the window */ #ifdef HASH_CHARS XImage *font_bitmaps[256]; XImage *scaled_font_bitmaps[256]; u8 font_attr[256]; long font_fg_color[256]; long font_bg_color[256]; long last_height = -1; /* counters */ long unscaled_char_requests = 0; long unscaled_char_rendered = 0; long scaled_char_requests = 0; long scaled_char_rendered = 0; #endif HASH_CHARS /* ------------------------------------------------------------------------ */ void createProtoImage(Display *display, Drawable d) { int i; if(proto_image != NULL) { XFreeImage(proto_image); } XFlush(display); proto_image = XGetImage(display, d, 1, 1, 4, 4, ~0, ZPixmap); #ifdef HASH_CHARS for(i = 0; i < 256; i++) { font_bitmaps[i] = NULL; scaled_font_bitmaps[i] = NULL; font_attr[i] = 255; } #endif HASH_CHARS #ifdef REPORT_DEPTH fprintf(stderr,"createProtoImage: depth =%d\n", proto_image->depth); fprintf(stderr,"createProtoImage: 8*bytes_per_line/width=%d\n", 8*proto_image->bytes_per_line/proto_image->width); fflush(stderr); #endif REPORT_DEPTH } /* ------------------------------------------------------------------------ */ int get_actual_depth(void) { if(proto_image == NULL) { fprintf(stderr, "get_actual_depth: proto_image==NULL, internal malfunction\n"); fflush(stderr); return 0; } return 8*proto_image->bytes_per_line/proto_image->width; } /* ------------------------------------------------------------------------ */ void reset_xutils_stats(void) { #ifdef HASH_CHARS unscaled_char_requests = 0; unscaled_char_rendered = 0; scaled_char_requests = 0; scaled_char_rendered = 0; #endif HASH_CHARS } /* ------------------------------------------------------------------------ */ void print_xutils_stats(void) { #ifdef HASH_CHARS fprintf(stderr, "unscaled_char_requests=%ld\n", unscaled_char_requests); fprintf(stderr, "unscaled_char_rendered=%ld\n", unscaled_char_rendered); if(unscaled_char_requests) fprintf(stderr,"unscaled_char_hash effectiveness=%ld%%\n", 100-(100*unscaled_char_rendered)/unscaled_char_requests); fprintf(stderr, "scaled_char_requests=%ld\n", scaled_char_requests); fprintf(stderr, "scaled_char_rendered=%ld\n", scaled_char_rendered); if(scaled_char_requests) fprintf(stderr,"scaled_char_hash effectiveness=%ld%%\n", 100-(100*scaled_char_rendered)/scaled_char_requests); fflush(stderr); #endif HASH_CHARS } /* ------------------------------------------------------------------------ */ void fillPalette(Display *d,Drawable dw, GC gc, PALETTE *p) { XColor g; XFlush(d); g.red = 0xFFFF; g.green = 0xFFFF; g.blue = 0; XAllocColor(d, DefaultColormap(d, 0), &g); p->yellow_col = g.pixel; g.red = 0xFFFF; g.green = 0; g.blue = 0; XAllocColor(d, DefaultColormap(d, 0), &g); p->red_col = g.pixel; g.red = 0x0; g.green = 0xFFFF; g.blue = 0; XAllocColor(d, DefaultColormap(d, 0), &g); p->green_col = g.pixel; g.red = 0; g.green = 0x0; g.blue = 0xFFFF; XAllocColor(d, DefaultColormap(d, 0), &g); p->blue_col = g.pixel; g.red = 0xFFFF; g.green = 0xFFFF; g.blue = 0xFFFF; XAllocColor(d, DefaultColormap(d, 0), &g); p->white_col = g.pixel; /* fix this one later */ g.red = 0xFFFF; g.green = 0; g.blue = 0xFFFF; XAllocColor(d, DefaultColormap(d, 0), &g); p->magenta_col = g.pixel; /* fix this one later */ g.red = 0x0; g.green = 0xFFFF; g.blue = 0xFFFF; XAllocColor(d, DefaultColormap(d, 0), &g); p->cyan_col = g.pixel; g.red = 0x1; g.green = 0x1; g.blue = 0x1; XAllocColor(d, DefaultColormap(d,0 ), &g); p->black_col = g.pixel; } /* ------------------------------------------------------------------------ */ /* XImage *printString1(Display *display, Drawable d, char *string, char *font, long height,PALETTE *pal) { long startx, starty; long length, size; int dir_r, fa_r, fd_r; long depth; XCharStruct ov_r; XImage *r, *r1; Pixmap p; Font f; GC gc; XFontStruct *fs; depth = DefaultDepthOfScreen((DefaultScreenOfDisplay(display))); f = XLoadFont(display, font); gc = XCreateGC(display, d, None, None); XSetFont(display, gc, f); fs = XQueryFont(display, f); XTextExtents(fs, string, strlen(string), &dir_r, &fa_r, &fd_r, &ov_r); size = fa_r+fd_r+2; length = XTextWidth(fs, string, strlen(string))+4; if(!dir_r) startx = 0; else startx = length; starty = fa_r+1; p = XCreatePixmap(display, d, length, size, depth); XSetForeground(display, gc, pal->black_col); XFillRectangle(display, p, gc, 0, 0, length, size); XSetForeground(display, gc, pal->yellow_col); XDrawString(display, p, gc, startx, starty, string, strlen(string)); r = XGetImage(display, p, 0, 0, length, size, ~0, ZPixmap); XFreeGC(display, gc); XFreePixmap(display, p); XFreeFontInfo(NULL, fs, 0); XUnloadFont(display, f); r1 = XScaleImage(r, (height*1.0)/r->height, pal->black_col, 0); XFreeImage(r); return r1; } */ /* ------------------------------------------------------------------------ */ void ImagePutImage(XImage *dest, int x, int y, XImage *source) { DGAPutImage(dest->data, dest->width, x, y, source); } /* ------------------------------------------------------------------------ */ void ImageDrawRectangle(XImage *dest, int x, int y, int width, int height, long color) { DGADrawRectangle(dest->data, 8*dest->bytes_per_line/dest->width, dest->width, x, y, width, height, color); } /* ------------------------------------------------------------------------ */ /* allow to override in Makefile */ /* #ifndef FONTNAME #define FONTNAME "/usr/lib/kbd/consolefonts/cp850-8x16" #endif */ #include "cp850_8x16.inc" #include "iso01mod_8x16.inc" #ifndef SCANLINES #define SCANLINES 16 #endif SCANLINES #define NORMAL_SLANT 0.0 #define ITALIC_SLANT 0.2 int font_file = -1; struct FONT_DATA { char scan_line[SCANLINES]; } *font_chars = (struct FONT_DATA *)iso01mod_8x16; /* ------------------------------------------------------------------------ */ /* you should not free the resulting XImage structure */ XImage *charToImage(char c, long fg_color, long bg_color) { XImage *im; int i, j, k; long color; int depth; #ifdef HASH_CHARS unscaled_char_requests++; if((font_bitmaps[(u8)c] != NULL) && (font_fg_color[(u8)c] == fg_color) && (font_bg_color[(u8)c] == bg_color)) return font_bitmaps[(u8)c]; #endif HASH_CHARS depth = 8*proto_image->bytes_per_line/proto_image->width; #ifdef REPORT_DEPTH printf("charToImage: depth=%d\n", depth); fflush(stdout); #endif REPORT_DEPTH im = do_alloc(1, sizeof(XImage)); im->width = 8; im->height = SCANLINES; im->bytes_per_line = (im->width*depth)/8; im->bits_per_pixel = depth; im->xoffset = 0; im->bitmap_bit_order = proto_image->bitmap_bit_order; im->bitmap_pad = proto_image->bitmap_pad; im->bitmap_unit = proto_image->bitmap_unit; im->format = ZPixmap; im->byte_order = proto_image->byte_order; im->depth = proto_image->depth; im->data = do_alloc(im->height*im->bytes_per_line, sizeof(char)); XInitImage(im); for(j = 0; j < 16; j++) for(i = 0; i < 8; i++){ if(font_chars[(u8)c].scan_line[j] & (0x80 >> i)) color = fg_color; else color = bg_color; for(k = 0; k < depth/8; k++) im->data[i*depth/8+j*im->bytes_per_line+k] = (u8)((color>>(8*k))&0xFF); } #ifdef HASH_CHARS unscaled_char_rendered++; if(font_bitmaps[(u8)c] != NULL) XFreeImage(font_bitmaps[(u8)c]); font_bitmaps[(u8)c] = im; font_bg_color[(u8)c] = bg_color; font_fg_color[(u8)c] = fg_color; #endif HASH_CHARS return im; } /* ------------------------------------------------------------------------ */ XImage *getScaledChar(char c, long height, long fg_color, long bg_color, u8 attribute) { XImage *r1, *r2; double slant; int i; #ifdef HASH_CHARS scaled_char_requests++; /* check if height has changed - this invalidates everything */ if(height != last_height) { for(i = 0; i < 256; i++) font_attr[i]=255; /* this is enough to cause faults */ last_height = height; } /* check if character is in hash */ if((font_fg_color[(u8)c] == fg_color) && (font_bg_color[(u8)c] == bg_color) && (font_attr[(u8)c] == attribute) && (font_bitmaps[(u8)c] != NULL) /* this one because it's easy to check and if it's invalid than all the other data is invalid as well */ && (scaled_font_bitmaps[(u8)c] != NULL)) return scaled_font_bitmaps[(u8)c]; #endif HASH_CHARS if(attribute & ITALIC_ATTR) slant = ITALIC_SLANT; else slant = NORMAL_SLANT; r1 = charToImage(c, fg_color, bg_color); r2 = XScaleImage(r1, (height*1.0)/r1->height, bg_color, slant); if(attribute & UNDERLINE_ATTR) { ImageDrawRectangle(r2, 0, r2->height-2, r2->width, 2, fg_color); } #ifdef HASH_CHARS scaled_char_rendered++; if(scaled_font_bitmaps[(u8)c] != NULL) XFreeImage(scaled_font_bitmaps[(u8)c]); scaled_font_bitmaps[(u8)c] = r2; font_attr[(u8)c] = attribute; /* other parameters have been taken care of by charToImage() */ #else XFreeImage(r1); #endif HASH_CHARS return r2; } /* ------------------------------------------------------------------------ */ XImage *getCCChar(char c, long height, int attr, PALETTE *pal) { long fg_color, bg_color; u8 a; bg_color=pal->bg_col; switch(attr & 0xF0) { case CC_ATTR_WHITE: fg_color =pal->yellow_col; break; case CC_ATTR_GREEN: fg_color = pal->green_col; break; case CC_ATTR_BLUE: fg_color = pal->blue_col; break; case CC_ATTR_CYAN: fg_color = pal->cyan_col; break; case CC_ATTR_RED: fg_color = pal->red_col; break; case CC_ATTR_YELLOW: fg_color = pal->white_col; break; case CC_ATTR_MAGENTA: fg_color = pal->magenta_col; break; case CC_ATTR_BACK: fg_color = pal->black_col; break; default: fg_color = pal->black_col; break; } a = 0; if(c == ' ') fg_color = pal->black_col; if(attr & CC_ATTR_ITALICS) a |= ITALIC_ATTR; if(attr & CC_ATTR_UNDERLINE) a |= UNDERLINE_ATTR; if(attr & CC_ATTR_FLASH) { bg_color = pal->white_col; } return getScaledChar(c, height, fg_color, bg_color, a); } /* ------------------------------------------------------------------------ */ int load_font(char *font_name) { if(font_file < 0) { font_file = open(font_name, O_RDONLY); if(font_file < 0) { perror("printString: opening font:"); return -1; } font_chars = mmap(NULL, 256*SCANLINES, PROT_READ, MAP_SHARED, font_file, 0); if(font_chars == NULL) { perror("printString: opening font:"); close(font_file); font_file = -1; return -1; } } return 0; } /* ------------------------------------------------------------------------ */ XImage *printString(char *string, char *font, long height, PALETTE *pal) { long color; long depth; long char_width = 0; long offset; XImage *r = NULL; XImage *r2; char *c; u8 attr; if(proto_image == NULL) { fprintf(stderr, "Warning: proto_image was not created,\n"); fprintf(stderr, " internal program malfunction.\n"); fflush(stderr); return NULL; } char_width = (height*10)/SCANLINES; depth = 8*proto_image->bytes_per_line/proto_image->width; r2 = getScaledChar('X', height, pal->yellow_col, pal->black_col, 0); r = do_alloc(1, sizeof(XImage)); r->width = (strlen(string)+1)*r2->width; r->height = r2->height; #ifndef HASH_CHARS XFreeImage(r2); #endif HASH_CHARS r->format = proto_image->format; r->byte_order = proto_image->byte_order; r->depth = proto_image->depth; r->bits_per_pixel = proto_image->bits_per_pixel; r->xoffset = 0; r->bitmap_unit = proto_image->bitmap_unit; r->bitmap_bit_order = proto_image->bitmap_bit_order; r->bitmap_pad = proto_image->bitmap_pad; r->data = NULL; r->bytes_per_line = r->width*depth/8; r->data = do_alloc(r->height*r->bytes_per_line, sizeof(char)); ImageDrawRectangle(r, 0, 0, r->width, r->height, pal->bg_col); color = pal->yellow_col; offset = 2; attr = NORMAL_ATTR; for(c = string; *c;) { if(*c == '\\') { /* got control symbol */ c++; switch(*c) { case 'y': color = pal->yellow_col; break; case 'g': color = pal->green_col; break; case 'r': color = pal->red_col; break; case 'b': color = pal->blue_col; break; case 'u': attr |= UNDERLINE_ATTR; break; case 'i': attr |= ITALIC_ATTR; break; case 'f': attr = NORMAL_ATTR; break; case '\\': c--; /* display symbol */ break; default: c--; /* display symbol */ break; } c++; continue; } r2 = getScaledChar(*c, height, color, pal->bg_col, attr); ImagePutImage(r, offset, 0, r2); offset += r2->width; c++; #ifndef HASH_CHARS XFreeImage(r2); #endif HASH_CHARS } return r; } /* ------------------------------------------------------------------------ */ void DGADrawRectangle(u8 *frame, int depth, int ysize, int x, int y, int width, int height, long color) { long xstart, yinc, bytes_per_line; int i, j; u8 *ptr; bytes_per_line = width*depth/8; #ifdef REPORT_DEPTH fprintf(stderr, "DGADrawRectangle: depth=%d\n", depth); fflush(stderr); #endif REPORT_DEPTH color = color & 0xFFFFFF; /* zero the top 8 bytes */ switch(depth) { case 8: xstart = x+y*ysize; yinc = ysize; for(j = 0; j < height; j++) for(i = 0; i < width; i++) { memcpy(frame+xstart+i+j*yinc, &color, 1); } break; case 16: xstart = x*2+y*ysize*2; yinc = ysize*2; for(j = 0; j < height; j++) for(i = 0; i < width; i++) { memcpy(frame + xstart+i*2+j*yinc, &color, 2); } break; case 24:/* This is probably for "packed" 24 bit mode. It is interesting that xserver reports both 32 and 24bit mode as 24bit.. perhaps we are wrong bc we look at the depth of the visual */ /* Just fallback to 32bit depth code */ /* xstart = x*3+y*ysize*3; yinc = ysize*3; for(i = 0;i < width;i++) for(j = 0;j < height;j++){ frame[xstart+i*3+j*yinc+2] = (u8)((color>>16)&0xFF); frame[xstart+i*3+j*yinc+1] = (u8)((color>>8)&0xFF); frame[xstart+i*3+j*yinc] = (u8)(color&0xFF); } break; */ case 32: xstart = x*4+y*ysize*4; yinc = ysize*4; ptr = frame+xstart; for(j = 0; j < height; j++) { for(i = 0; i < width; i++) { memcpy(frame + xstart+i*4+j*yinc, &color, 4); } } break; default: fprintf(stderr, "DGADrawRectangle: unimplemented depth %d\n", depth); fflush(stderr); break; } } /* ------------------------------------------------------------------------ */ void DGAPutImage(u8 *frame, long ysize, int x, int y, XImage *im) { int j; long yinc, xstart, xlimit, ylimit; int actual_depth; /* actual depth is divided by 8 */ actual_depth = im->bytes_per_line/im->width; yinc = ysize*actual_depth; xstart = x*actual_depth+y*yinc; /* Horizontal clipping */ xlimit = im->bytes_per_line> yinc-x*actual_depth ? yinc-x*actual_depth : im->bytes_per_line; ylimit = im->height; for(j = 0; j < ylimit; j++) memcpy(&(frame[xstart+j*yinc]), &(im->data[j*im->bytes_per_line]), xlimit); } /* ------------------------------------------------------------------------ */ /* this last trick bc gatos doesn't always use black color for transparency */ XImage * XScaleImage(XImage *im, double ratio, long black, double slant) { int i, j; XImage *r; long color1, color2, color3, color4, color; double source_x, source_y, delta1, delta2; int x1, y1, actual_depth; /* here actual depth is divided by 8 */ r = NULL; while(r == NULL) { r = (XImage *)calloc(1, sizeof(XImage)); if(r == NULL) sleep(1); } r->width = (int)(ratio*(im->width+2)); r->height = (int)(ratio*(im->height+2)); r->format = im->format; r->byte_order = im->byte_order; r->depth = im->depth; r->bits_per_pixel = im->bits_per_pixel; r->xoffset = 0; r->bitmap_unit = im->bitmap_unit; r->bitmap_bit_order = im->bitmap_bit_order; r->bitmap_pad = im->bitmap_pad; r->data = NULL; actual_depth = im->bytes_per_line/im->width; r->bytes_per_line = r->width*actual_depth; while(r->data == NULL) { r->data = (char *)calloc(r->height*r->bytes_per_line, sizeof(char)); if(r->data == NULL) sleep(1); } switch(actual_depth) { case 1: for(i = 0; i < r->width; i++) for(j = 0; j < r->height; j++) { /* no antialiasing in 8bpp */ source_y = j/ratio; source_x = i/ratio+slant*source_y; x1 = (int)source_x; y1 = (int)source_y; source_x -= 2; source_y -= 2; x1 -= 2; y1 -= 2; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color = black; else color = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]; r->data[i*actual_depth+j*r->bytes_per_line] = (u8)(color & 0xFF); } break; case 2: for(i = 0; i < r->width; i++) for(j = 0; j < r->height; j++) { source_y = j/ratio; source_x = i/ratio+slant*source_y; x1 = (int)source_x; y1 = (int)source_y; delta1 = source_x-x1; delta2 = source_y-y1; source_x -= 2; source_y -= 2; x1 -= 2; y1 -= 2; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color1=black; else color1 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8); if(color1 == black) color1 = 0; x1++; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color2=black; else color2 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8); if(color2 == black) color2 = 0; y1++; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color4=black; else color4 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8); if(color4 == black) color4 = 0; x1--; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color3=black; else color3 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8); if(color3 == black) color3 = 0; #define BLUE(u) ((u)&0x1F) #define GREEN(u) (((u)>>5)&0x3F) #define RED(u) (((u)>>11)&0x1F) color = (long)(BLUE(color4)*delta1*delta2+ BLUE(color2)*delta1*(1-delta2)+ BLUE(color3)*(1-delta1)*delta2+ BLUE(color1)*(1-delta1)*(1-delta2)) | (((long)(GREEN(color4)*delta1*delta2+ GREEN(color2)*delta1*(1-delta2)+ GREEN(color3)*(1-delta1)*delta2+ GREEN(color1)*(1-delta1)*(1-delta2)))<<5) | (((long)(RED(color4)*delta1*delta2+ RED(color2)*delta1*(1-delta2)+ RED(color3)*(1-delta1)*delta2+ RED(color1)*(1-delta1)*(1-delta2)))<<11); if(color == 0) color = black; #undef BLUE #undef GREEN #undef RED r->data[i*actual_depth+j*r->bytes_per_line] = (u8)(color & 0xFF); r->data[i*actual_depth+j*r->bytes_per_line+1] = (u8)((color >> 8)&0xFF); } break; case 3:/* This is probably for "packed" 24 bit mode. It is interesting that xserver reports both 32 and 24bit mode as 24bit.. perhaps we are wrong bc we look at the depth of the visual */ /* Just fallback to 32bit depth code */ /* xstart = x*3+y*ysize*3; yinc = ysize*3; for(i = 0; i < im->byte_per_line; i++) for(j = 0; j < height; j++){ frame[xstart+i+j*yinc] = (u8)im->data[i+j*im->bytes_per_line]; } break; */ case 4: for(i = 0; i < r->width; i++) for(j = 0; j < r->height; j++) { source_y = j/ratio; source_x = i/ratio+slant*source_y; x1 = (int)source_x; y1 = (int)source_y; delta1 = source_x-x1; delta2 = source_y-y1; source_x -= 2; source_y -= 2; x1 -= 2; y1 -= 2; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color1 = black; else color1 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8)+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+2])<<16); if(color1 == black) color1 = 0; x1++; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color2=black; else color2 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8)+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+2])<<16); if(color2 == black) color2 = 0; y1++; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color4 = black; else color4 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8)+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+2])<<16); if(color4 == black) color4 = 0; x1--; if((x1 < 0) || (y1 < 0) || (x1 >= im->width) || (y1 >= im->height)) color3 = black; else color3 = (u8)im->data[x1*actual_depth+y1*im->bytes_per_line]+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+1])<<8)+ (((u8)im->data[x1*actual_depth+y1*im->bytes_per_line+2])<<16); if(color3 == black) color3 = 0; #define BLUE(u) ((u)&0xFF) #define GREEN(u) (((u)>>8)&0xFF) #define RED(u) (((u)>>16)&0xFF) color = ((long)(BLUE(color4)*delta1*delta2+ BLUE(color2)*delta1*(1-delta2)+ BLUE(color3)*(1-delta1)*delta2+ BLUE(color1)*(1-delta1)*(1-delta2))) | (((long)(GREEN(color4)*delta1*delta2+ GREEN(color2)*delta1*(1-delta2)+ GREEN(color3)*(1-delta1)*delta2+ GREEN(color1)*(1-delta1)*(1-delta2)))<<8) | (((long)(RED(color4)*delta1*delta2+ RED(color2)*delta1*(1-delta2)+ RED(color3)*(1-delta1)*delta2+ RED(color1)*(1-delta1)*(1-delta2)))<<16); if(color == 0) color = black; #undef BLUE #undef GREEN #undef RED r->data[i*actual_depth+j*r->bytes_per_line] = (u8)(color & 0xFF); r->data[i*actual_depth+j*r->bytes_per_line+1] = (u8)((color >> 8)&0xFF); r->data[i*actual_depth+j*r->bytes_per_line+2] = (u8)((color >> 16)&0xFF); } break; default: fprintf(stderr, "XScaleImage: unimplemented depth %d\n", actual_depth); fflush(stderr); break; } XInitImage(r); return r; } /* ------------------------------------------------------------------------ */ void XFreeImage(XImage *im) { free(im->data); free(im); } /* ------------------------------------------------------------------------ */ int GetWindowXSize(Display *display, Drawable d) { Window wintmp; unsigned rootxsize, rootysize, utmp; int itmp; XGetGeometry(display, d, &wintmp, &itmp, &itmp, &rootxsize, &rootysize, &utmp, &utmp); return rootxsize; } /* ------------------------------------------------------------------------ */ int GetWindowYSize(Display *display, Drawable d) { Window wintmp; unsigned rootxsize, rootysize, utmp; int itmp; XGetGeometry(display, d, &wintmp, &itmp, &itmp, &rootxsize, &rootysize, &utmp, &utmp); return rootysize; } /* ------------------------------------------------------------------------ */ /* * Check if ibtk version is equal/greater * or less than required */ void check_ibtk_version(void) { char ctmp[8], *preq = &IBTK_REQUIRED_VERSION[0]; int imaj = 0, imin = 0, isub = 0, ipre = 0, i; /* * Extract major/minor/sub/pre versions * from IBTK_REQUIRED_VERSION string. */ for(i = 0; i < 8; i += 2) { strncpy(ctmp, preq+i, 2); switch(i) { case 0: imaj = atoi(ctmp); break; case 2: imin = atoi(ctmp); break; case 4: isub = atoi(ctmp); break; case 6: ipre = atoi(ctmp); break; } } if(!ibtk_required_version(IBTK_REQUIRED_VERSION)) { perror(_("xatitv: Bad IBTK library version.")); fprintf(stderr, _("Expected IBTK version %d.%d.%d"), imaj, imin, isub); if(ipre > 0) fprintf(stderr, _("-pre%d"), ipre); fprintf(stderr, _(", and %s found.\n"), get_ibtk_full_version_string()); exit(1); } } /* ------------------------------------------------------------------------ */ /* * Check the DISPLAY environment variable, * return 1 if DISPLAY is set and not match * with the local display, else return 0. */ int exported_display(void) { char myhn[256], myfqdn[256], myipaddr[16] = "127.0.0.1", displayname[512]; char *disp_env, *p; struct hostent *hp = NULL; /* Get the DISPLAY environment variable */ disp_env = getenv("DISPLAY"); if(disp_env != NULL && strlen(disp_env) > 0) { if(!gethostname(myfqdn, 255) && (hp = gethostbyname(myfqdn)) != NULL) { /* Get the local IP address */ while(hp->h_addr_list[0]) sprintf(myipaddr, "%s", inet_ntoa(*(struct in_addr *) *hp->h_addr_list++)); /* Get the hostname without domain name */ gethostname(myhn, 255); strncpy(myfqdn, hp->h_name, 255); /* Get the fqdn */ if(strchr(myfqdn, '.') == NULL) { char ** alias; alias = hp->h_aliases; while(alias && *alias) if(strchr(*alias, '.') && (strlen(*alias) > strlen(myfqdn))) strncpy(myfqdn, *alias, 255); else alias++; } } else { *myhn = '\0'; *myfqdn = '\0'; } /* Remove the ':' and follow chars */ if((p=strchr(disp_env, ':'))) memcpy(displayname, disp_env, (strlen(disp_env)-strlen(p))); if((strncasecmp(displayname, "localhost", 9) == 0) || (strcmp(displayname, "unix") == 0) || (strncasecmp(displayname, myhn, strlen(myhn)) == 0) || (strncasecmp(displayname, myfqdn, strlen(myfqdn)) == 0) || (strcmp(displayname, myipaddr) == 0) || (strcmp(displayname, "127.0.0.1") == 0) || (strncmp(disp_env,":", 1) == 0)) { return 0; } else { return 1; } } return 0; } /* ------------------------------------------------------------------------ */ /* * Return the Vendor name and release, * Protocol version/revision, available screen(s) and color depth. */ char *GetXVendorRelease(Display *display) { static char buf[256]; sprintf(buf, "XServer Vendor: %s. Release: %d,\n", XServerVendor(display), XVendorRelease(display)); sprintf(buf, "%s Protocol Version: %d, Revision: %d,\n", buf, XProtocolVersion(display), XProtocolRevision(display)); sprintf(buf, "%s Available Screen(s): %d,\n", buf, XScreenCount(display)); sprintf(buf, "%s Depth: %d.\n", buf, XDisplayPlanes(display, XDefaultScreen(display))); return buf; } /* ------------------------------------------------------------------------ */ gatos-0.0.5/tech-docs/0042755002411700123110000000000007030251720013144 5ustar bayleasrgatos-0.0.5/tech-docs/Makefile.in0100644002411700123110000001450407030251720015210 0ustar bayleasr# 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 = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ CXX = @CXX@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ GATOS_MAJOR_VERSION = @GATOS_MAJOR_VERSION@ GATOS_MINOR_VERSION = @GATOS_MINOR_VERSION@ GATOS_SUB_VERSION = @GATOS_SUB_VERSION@ GATOS_VERSION = @GATOS_VERSION@ GENCAT = @GENCAT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ GT_YES = @GT_YES@ HASH_CHARS = @HASH_CHARS@ IBTK_REQUIRED_VERSION = @IBTK_REQUIRED_VERSION@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLDIR = @INTLDIR@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LANG_SUBDIRS = @LANG_SUBDIRS@ LD = @LD@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NETBSD_EXTRA = @NETBSD_EXTRA@ NM = @NM@ NOPADS = @NOPADS@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ RAW_OUTPUT = @RAW_OUTPUT@ SPEC_CVS_VERSION = @SPEC_CVS_VERSION@ SPEC_VERSION = @SPEC_VERSION@ STATIC = @STATIC@ TAR_NAME = @TAR_NAME@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_IPC = @USE_IPC@ USE_NLS = @USE_NLS@ USE_SHM = @USE_SHM@ VERSION = @VERSION@ XEXTFLAGS = @XEXTFLAGS@ XEXTLIBS = @XEXTLIBS@ X_X11_INC = @X_X11_INC@ X_X11_LIB = @X_X11_LIB@ l = @l@ docdir = /usr/doc/@PACKAGE@-@SPEC_VERSION@ EXTRA_DIST = doc.ati doc.bt829 doc.extra doc.fi12xx doc.gatos doc.i2c docs_DOCS = $(EXTRA_DIST) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps tech-docs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = tech-docs distdir: $(DISTFILES) @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-data-local install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-local uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool 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: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-local install-data-am install-data install-am install \ uninstall-local uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean install-data-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir/library-functions; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$doc $$dir/$$name; \ echo "installing $$doc as $$dir/$$name"; \ done uninstall-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir; \ rm -f $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ############################################################################### # 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: gatos-0.0.5/tech-docs/Makefile.am0100644002411700123110000000202407016250772015203 0ustar bayleasr## ## Process this file with automake to produce Makefile.in ## docdir = /usr/doc/@PACKAGE@-@SPEC_VERSION@ EXTRA_DIST = doc.ati doc.bt829 doc.extra doc.fi12xx doc.gatos doc.i2c docs_DOCS = $(EXTRA_DIST) install-data-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir/library-functions; \ $(mkinstalldirs) $$dir; \ $(INSTALL_DATA) $$doc $$dir/$$name; \ echo "installing $$doc as $$dir/$$name"; \ done uninstall-local: @documentations='$(docs_DOCS)'; \ for doc in $$documentations; do \ destdir=$(docdir); \ name=`echo $$doc` \ dir=$$destdir; \ rm -f $$dir/$$name; \ echo "removing $$dir/$$name" ; \ done mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in ## ## End of Makefile.am ## ############################################################################### gatos-0.0.5/tech-docs/doc.ati0100644002411700123110000000232106765053731014421 0ustar bayleasrint ati_init(u32, u32, int) Initialize ATI chip. fbaddr, regaddr and videoram set from configfile, should be polled for. Needs extra arg: reserveram. int ati_setformat(int) Set video format. Called by gatos_setformat(). int ati_deviceid() Return ATI deviceID (u16 value). int ati_desktop_size(int, int) Size of virtual X desktop. Called by gatos_desktop_size(). int ati_setcolorkey(u32) Get/set colorkey, colormask is read from CRTC_GEN_CNTL. Called by gatos_setcolorkey(). void ati_enable_video(int) void ati_enable_sound(int) void ati_enable_capture(int) Called by gatos_enable_xxx(). ati_enable_video() also called by gatos_setmapped() and gatos_setvisibility(). void ati_buffer_mode() Switch capture buffer mode (NIY). int ati_capture_size(int, int) Set capture buffer size. Called by gatos_capture_size(). int ati_geometry(int,int, int, int) ConfigureNotify XEvent propagation. Called by gatos_geometry(). char* ati_setgamma(int) void ati_setredtemp(int) Set gamma and warm/cold color. gatos_setxxx() missing for these. void ati_endcapture(int) void ati_capture(int) void ati_playback(int) Video disk capture/playback (NIY). void ati_dumpregs() Dump ATI registers. Called by gatos_dumpregs(). gatos-0.0.5/tech-docs/doc.bt8290100644002411700123110000000126506765053731014522 0ustar bayleasrint bt829_init() Initialize Bt829 chip. int bt829_setformat(int) Set video format. Called by gatos_setformat(). void bt829_setvpole(int) int bt829_vpole() Get/set VPOLE. gatos_*vpole() missing. int bt829_setbrightness() int bt829_setcontrast() int bt829_setsaturation() int bt829_sethue() Set Bt829 brightness, contrast, setsaturation and hue. Called by gatos_setxxx(). int bt829_setmux() Set video source (Bt829 MUX input). Called by gatos_setmux(). int bt829_capture_size(int, int) Set capture buffer size. Mandatory at the moment, will become optional (autoconfig). Called by gatos_capture_size(). void bt829_dumpregs() Dump Bt829 registers. Called by gatos_dumpregs(). gatos-0.0.5/tech-docs/doc.extra0100644002411700123110000000073506765053731014776 0ustar bayleasrRoutines that need a little more work :-) double gatos_channelfreq(int) Return channel frequency. char* gatos_channeldesc(int) Return channel description string. int gatos_maxchan() Number of channels in use. int gatos_configfile(char*, char*) Parse GATOS config file. Called by gatos_init(). void gatos_addchannel(double, char*, char*) Add channel to list. Called by gatos_configfile(). void gatos_setcaptidx(int, int) Change capture size. Called from atitv.c. gatos-0.0.5/tech-docs/doc.fi12xx0100644002411700123110000000101206765053731014761 0ustar bayleasrint fi12xx_init() Initialize tuner. int fi12xx_setformat(int) Set video format. Called by gatos_setformat(). double fi12xx_minfreq() double fi12xx_maxfreq() Get tuner frequency limits. Called by gatos_{min,max}freq(). double fi12xx_tune(double, int) Set tuner frequency. Second arg is experimental, will probably disappear. Called by gatos_settuner(). double fi12xx_scan(double, double) Channel scanner (NIY). Called by gatos_scan(). void fi12xx_dumpregs() Dump FI12XX status. Called by gatos_dumpregs(). gatos-0.0.5/tech-docs/doc.gatos0100644002411700123110000000465706765053731014777 0ustar bayleasrint gatos_setverbosity(int) int gatos_verbosity() Get/set gatos_debug. int gatos_init() Initialize: Clear channel list, read GATOS config file, open sound device, call ati_init(), bt829_init() and fi12xx_init(). int gatos_setformat(int) int gatos_format() Get/set video format (1..10). int gatos_setcolorkey(u32) u32 gatos_colorkey() Get/set colorkey, colormask is read from CRTC_GEN_CNTL. int gatos_geometry(int, int, int, int) ConfigureNotify XEvent propagation. Only needed for overlay window, see main event loop in atitv.c. int gatos_capture_size(int, int) Set capture buffer size. Mandatory at the moment, will become optional (autoconfig). int gatos_desktop_size(int, int) Size of virtual X desktop. Must be called to get (future) desktop panning support. Note: ati_init() reads screen (monitor) size from CRTC_H_TOTAL_DISP and CRTC_V_TOTAL_DISP. int gatos_setmux(int) int gatos_mux() Get/set video source (Bt829 MUX input). void gatos_enable_sound(int) void gatos_enable_video(int) void gatos_enable_capture(int) Master switches for video capture, video display and sound. Video is displayed only if enabled (gatos_enable_capture()), video window is mapped (gatos_setmapped()) and window not FullyObscured (gatos_setvisibility()). void gatos_setmapped(int) MapNotify/UnmapNotify XEvent propagation. Only needed for overlay window, see main event loop in atitv.c. void gatos_setvisibility(int) VisibilityNotify XEvent propagation. Only needed for overlay window, see main event loop in atitv.c. int gatos_setmute(int) int gatos_mute() Get/set audio mute. int gatos_setvolume(int) int gatos_volume() Get/set audio volume. int gatos_setstereo(int) int gatos_stereo() Get/set stereo mode. int gatos_setsap(int) int gatos_sap() Get/set second language. double gatos_settuner(double, int) double gatos_tuner() Get/set tuner frequency. Second arg to gatos_settuner() is experimental, will probably disappear. double gatos_minfreq() double gatos_maxfreq() Get tuner frequency limits. double gatos_scan(double, double) Channel scanner (NIY). int gatos_setbrightness(int) int gatos_brightness() int gatos_setcontrast(int) int gatos_contrast() int gatos_setsaturation(int) int gatos_saturation() int gatos_sethue(int) int gatos_hue() Get/set Bt829 brightness, contrast, setsaturation and hue. int gatos_setintaudio(int) int gatos_intaudio() ATI internal audio ? void gatos_dumpregs() Dump registers (ATI, Bt829 and FI12XX). gatos-0.0.5/tech-docs/doc.i2c0100644002411700123110000000332406765053731014325 0ustar bayleasrI2C API: int i2c_init() Initialize, choose lowlevel interface. u8 i2c_read(u8) Read byte from I2c unit. int i2c_write(u8, u8*, int) Write bytes to I2C unit. u8 i2c_readreg8(u8, u8) Read byte register from I2C unit. int i2c_writereg8(u8, u8, u8) Write byte register in I2C unit. int i2c_device(u8) Poll for I2C unit. void i2c_info() I2C clock frequency and bus scan. void i2c_setident(u8, char*) Register I2C unit ident. Called by {bt829,fi12xx}_init(), used by i2c_info(). Internal functions: void i2c_delay(u32) Sleep routine, uses bogomips. static void i2c_start() Send I2C START condition. static void i2c_stop() Send I2C STOP condition. static u8 i2c_readbyte(int) Read byte from bus. Arg should be true if this is the last byte the I2C master reads from unit. static int i2c_sendbyte(u8) Write byte to bus, return unit ack/nack. Rage PRO interface: int i2c_init_pro() void i2c_start_pro() void i2c_stop_pro() u8 i2c_readbyte_pro(int) int i2c_sendbyte_pro(u8) static void i2c_setscl(int) static void i2c_setsda(int) GPIO interface: int i2c_init_gpio() void i2c_start_gpio() void i2c_stop_gpio() u8 i2c_readbyte_gpio(int) int i2c_sendbyte_gpio(u8) static void i2c_setscl(int) static void i2c_setsda(int) MPP interface: int i2c_init_mpp() void i2c_start_mpp() void i2c_stop_mpp() u8 i2c_readbyte_mpp(int) int i2c_sendbyte_mpp(u8) static void mpp_setmode(int) static int mpp_notready() static void i2c_dir(int) static void i2c_setD(int) static void i2c_setC(int) static int i2c_readD_sub() static int i2c_readD() static int i2c_ack_mpp(int) static void MPP_disable() static void MPP_sendbyte(u8, u32) static u8 MPP_readbyte(u8) static void Impact_TV_reg_write(u16, u32) static u32 Impact_TV_reg_read(u16)